簡體   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