如何删除"将安装从网络运行"使用WiX时MSI的安装选项?

时间:2016-07-25 08:45:27

标签: wix windows-installer

忍受我,我只是想学习WiX。我很好奇如何从这个弹出菜单中删除以下网络安装选项(用红色圈出)?

enter image description here

编辑:根据以下要求,此处为Feature节点:

<Feature Id='Complete' Title='Product title' Description='The complete package.'
  Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR' Absent='disallow' AllowAdvertise='no' >

  <Feature Id='MainProgram' Title='Program files'
           Description='Installs the main executable files for the software.'
           Absent='disallow'
           AllowAdvertise='no'
           Level='1'>
    <ComponentRef Id='CompIDFile1EXE' />
    <ComponentRef Id='CompIDFile2EXE' />
    <ComponentRef Id='CompIDFile3EXE' />
    <ComponentRef Id='CompIDFile1DLL' />
    <ComponentRef Id='CompIDFile2DLL' />

    <ComponentRef Id='CompIDMainRegistry' />
    <ComponentRef Id='ProgramMenuDir' />
  </Feature>

  <Feature Id='ShortcutsStart' Title='Start Menu Shortcuts'
           AllowAdvertise='no'
           Description="Places software shortcuts into the Windows Start Menu."
           Level='1'>
    <ComponentRef Id='CompIDShortcutsStart' />
  </Feature>

  <Feature Id='ShortcutsDesktop' Title='Desktop Shortcut'
           AllowAdvertise='no'
           Description="Places software shortcut onto the users' desktops."
           Level='1000'>
    <ComponentRef Id='CompIDShortcutsDesktop' />
  </Feature>

</Feature>

2 个答案:

答案 0 :(得分:1)

您应该显示用于Feature元素的WiX源。它很可能是InstallDefault设置(您可能想要“本地”)和AllowAdvertise(并将其设置为“no”)的组合。

答案 1 :(得分:0)

对于不直接包含ComponentRefComponentGroupRef的特征,只需在该特征内使用Location="local"属性创建一个虚拟组件。这将摆脱“从网络运行”选项。 示例:

<Feature Id='Complete' Title='Product title' Description='The complete package.'  Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR' Absent='disallow' AllowAdvertise='no' >
   <!-- Dummy component to get rid of the "run from network" option  -->
   <Component Id="CompleteDummyComponent" Location="local" Directory="TARGETDIR" Guid="GUID_HERE_PLEASE" />

<!-- sub features here -->
</Feature>