2017-05-03 131 views
0

我正在嘗試使perMachine安裝程序能夠在每個用戶的PersonalFolder和LocalAppDataFolder中創建文件和文件夾。我總是收到警告消息「warning LGHT1076:ICE91:...」,如下所示。當我以管理員身份進行安裝時,即使出現警告,也會創建文件和文件夾,但是當我以標準用戶身份嘗試安裝程序時,用戶配置文件中不會創建任何文件和文件夾。什麼可能是解決方案?pericachine安裝程序中的ICE91 Wix


<Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
      <Directory Id="PFInstallDir" Name="Example"> 
       <Component Id="ApplicationFiles" Guid="12345678-1234-1234-1234-222222222222"> 
        <File Id="ApplicationFile1" Source="notepad.exe"/> 
       </Component> 
      </Directory> 
     </Directory> 

     <Directory Id="CommonFilesFolder"> 
      <Directory Id="CFInstallDir" Name="Example"> 
       <Component Id="CommonApplicationFiles" Guid="12345678-1234-1234-1234-222222222223"> 
        <File Id="ApplicationFile2" Source="notepad.exe"/> 
       </Component> 
      </Directory> 
     </Directory> 

     <Directory Id="CommonAppDataFolder"> 
      <Directory Id="CAInstallDir" Name="Example"> 
       <Component Id="CommonAppDataApplicationFiles" Guid="12345678-1234-1234-1234-222222222224"> 
        <File Id="ApplicationFile3" Source="notepad.exe"/> 
       </Component> 
      </Directory> 
     </Directory> 

     <Directory Id="PersonalFolder"> 
      <Directory Id="InstallDirPersonal" Name="ExampleDocs"> 
       <Component Id="ApplicationPersonalFiles" Guid="12345678-1234-1234-1234-222222222225"> 
        <CreateFolder /> 
        <RemoveFolder Id="RemoveMyExampleDir1" On="uninstall" Directory="InstallDirPersonal"/> 
        <RegistryKey Root="HKCU" Key="Software\MyCompany\Documents"> 
         <RegistryValue Name="MainExe" Value="1" KeyPath="yes" Type="integer" /> 
        </RegistryKey> 
        <File Id="Notepad.MyExe" 
         Source="notepad.exe" DiskId="1" Checksum="yes"> 
        </File> 
       </Component> 
      </Directory> 
     </Directory>    

     <Directory Id="LocalAppDataFolder" Name="AppData"> 
      <Directory Id="InstallDirAppDataPersonal" Name="ExampleLocals"> 
       <Component Id="ApplicationPersonalDataFiles" Guid="12345678-1234-1234-1234-222222222226"> 
        <CreateFolder /> 
        <RemoveFolder Id="RemoveMyExampleDir" On="uninstall" Directory="InstallDirAppDataPersonal"/> 
        <RegistryKey Root="HKCU" Key="Software\MyCompany\Example"> 
         <RegistryValue Name="MainExe" Value="1" KeyPath="yes" Type="integer" /> 
        </RegistryKey> 
        <File Id="Notepad.MyExe1" 
         Source="notepad.exe" DiskId="1" Checksum="yes"> 
        </File> 
       </Component> 
      </Directory> 
     </Directory> 
    </Directory> 

    <Feature Id="DefaultFeature" Level="1"> 
     <ComponentRef Id="ApplicationFiles"/> 
     <ComponentRef Id="CommonApplicationFiles"/> 
     <ComponentRef Id="CommonAppDataApplicationFiles"/> 
     <ComponentRef Id="ApplicationPersonalDataFiles"/> 
     <ComponentRef Id="ApplicationPersonalFiles"/> 
    </Feature> 

</Product> 

- 建立開始:項目:SetupProjectPerUsrMachine,配置:調試86 -

警告LGHT1076:ICE91:文件「記事本。 MyExe'將被安裝到每個用戶目錄'InstallDirPersonal',它不會基於A而變化LLUSERS值。即使需要每臺機器安裝,該文件也不會被複制到每個用戶的配置文件中。

警告LGHT1076:ICE91:文件'Notepad.MyExe1'將安裝到每個用戶目錄'InstallDirAppDataPersonal',該值不會根據ALLUSERS值而變化。即使需要每臺機器安裝,該文件也不會被複制到每個用戶的配置文件中。

回答

0

問題解決了! http://www.installworld.com/index.php?option=com_content&do_pdf=1&id=146

「如果資源必須被複制到每個用戶的配置文件,然後你的包來完成添加功能。要做到這一點,添加當前用戶的註冊表項(即,只是一個虛擬的註冊表項),使這個註冊表鍵是包含資源的組件的關鍵路徑,這意味着資源將作爲MSI自我修復機制的一部分複製到下一個用戶的配置文件中,前提是產品存在廣告入口點。「

http://blog.bittercoder.com/2007/02/28/wix-shortcuts/

<Component Id="StandAloneApplication" Guid="C8D5DB05-2D68-40e8-88D1-EF5BEA18DBE1"> 
    <File Id="SomeCompanySomeProductHostApp" 
     Name="SomeCompany.SomeProduct.HostApp.exe" 
     DiskId="1" 
     Source="....buildSomeCompany.SomeProduct.HostApp.exe" 
     Vital="yes"> 

    <Shortcut Advertise="yes" 
       Id="SomeCompanySomeProductHostAppShortcut" 
       Directory="ProgramMenuDir" 
       Name="My Product" 
       WorkingDirectory="INSTALLDIR" 
       Description="SomeProduct Application" 
       Icon="HostAppShortcutIcon.exe"> 

     <Icon Id="HostAppShortcutIcon.exe" 
      SourceFile="....buildSomeCompany.SomeProduct.HostApp.exe" /> 

    </Shortcut> 
    </File> 
</Component>