繁体   English   中英

使用WiX时,如何从MSI中删除“将被安装以从网络上运行”安装选项?

[英]How to remove “Will be installed to run from network” installation options from MSI when using WiX?

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

在此处输入图片说明

编辑:按照下面的要求,这是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>

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

对于不直接包含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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM