【发布时间】:2017-05-03 19:12:07
【问题描述】:
我正在尝试制作一个 perMachine 安装程序,它能够在每个用户的 PersonalFolder 和 LocalAppDataFolder 中创建文件和文件夹。我总是收到如下所示的警告消息“警告 LGHT1076: ICE91: ...”。当我以管理员身份安装时,尽管有警告,但仍会创建文件和文件夹,但是当我以标准用户身份尝试安装程序时,不会在用户配置文件上创建文件和文件夹。有什么解决办法?
<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,配置:Debug x86 --
警告 LGHT1076:ICE91:文件“Notepad.MyExe”将安装到每个用户目录“InstallDirPersonal”,该目录不会因 ALLUSERS 值而异。即使需要按机器安装,此文件也不会复制到每个用户的配置文件中。
警告 LGHT1076:ICE91:文件“Notepad.MyExe1”将安装到每个用户目录“InstallDirAppDataPersonal”,该目录不会因 ALLUSERS 值而异。即使需要按机器安装,此文件也不会复制到每个用户的配置文件中。
【问题讨论】:
标签: windows wix installation