【发布时间】:2014-12-27 08:09:30
【问题描述】:
我正在使用 WiX 3.8,我想让用户选择按用户或按机器安装软件包。根据the docs,我有以下测试.wxs 文件:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Test' Id='D96B1E41-D392-4841-A526-D9BD50824163' UpgradeCode='FBCC53EC-6365-4D63-A584-F39F9984588B'
Language='1033' Codepage='1252' Version='1.0' Manufacturer='Test Manufacterer'>
<Package Id='*' Keywords='Installer'
Description="Test Installer" InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="Test Installation [1]" />
<Property Id="ApplicationFolderName" Value="Test" />
<Property Id="WixAppFolder" Value="WixPerUserFolder" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='APPLICATIONFOLDER' Name='Test'>
<Component Id='Test' Guid='3A810A32-0514-4616-993C-B5BBACB74FC6'>
<File Id='TestFile' Name='test.txt' DiskId='1' Source='test.txt' KeyPath='yes' />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='Complete' Title='Main Program' Description='The main program.'
Display='collapse' Level='1' ConfigurableDirectory='APPLICATIONFOLDER'>
<ComponentRef Id='Test' />
</Feature>
<UIRef Id="WixUI_Advanced" />
</Product>
</Wix>
我正在使用以下命令行构建 MSI:
candle test.wxs && light -ext WixUIExtension test.wixobj
这运行良好并且成功,没有任何错误或警告,但是当我以受限用户身份运行 MSI 并选择“仅为你安装”选项时,当我单击安装时,仍会提示我输入超级用户的凭据.如果我提供了正确的凭据,程序将按预期安装在用户的 AppData 文件夹中。为什么会提示我进行权限提升?有没有办法改变这种行为?
【问题讨论】:
-
你最终解决了这个问题吗?我在这里也有同样的情况……不想以多个 msi 告终。
-
我不记得找到解决方案了,抱歉。
标签: wix installation windows-installer elevated-privileges