我正在尝试创建一个无需管理员权限即可运行的安装文件(MSI)。为此,我尝试了以下选项。
- 我已经设置了安装所有用户财产给false如下。
- 还设置了安装所有用户可见 to false
- 我还更改了默认位置[应用程序数据文件夹]
更改上述属性后,仍然需要管理员权限才能执行使用安装项目创建的 MSI 文件。
你能帮我解决这个问题吗?
提前致谢。
当您使用 Orca 打开 MSI 时(或同等 MSI 查看器 https://stackoverflow.com/questions/48482545/how-can-i-compare-the-content-of-two-or-more-msi-files/48482546#48482546),你看到了吗"UAC Compliant"
复选框已选中?示例截图在这里:
你真的应该使用更灵活、更强大的 MSI 工具 https://stackoverflow.com/a/50229840/129130比 Visual Studio 安装程序项目。它们有多种用途,但缺乏灵活性,并且存在许多其他问题:VS项目问题总结 https://stackoverflow.com/questions/47936435/visual-studio-publish-project-into-one-simple-installer/47944893#47944893 (简写 https://stackoverflow.com/questions/2635671/why-use-windows-installer-xml-wix-over-vdproj/2637666#2637666).
每用户设置被认为是有害的:针对每用户设置的一些警告 https://stackoverflow.com/a/52710390/129130。这是对此还有一个答案 https://stackoverflow.com/a/56403393/129130.
WiX 中简单的每用户文件夹安装(在“PUT-GUID-HERE”显示的位置插入大写 GUID(出现 2 次)-你可以使用这个 GUID 生成器 https://www.guidgenerator.com/online-guid-generator.aspx):
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="PerUserSample" Language="1033" Version="1.0.0.0" Manufacturer="-" UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perUser" InstallPrivileges="limited" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<UIRef Id="WixUI_Mondo" />
<Feature Id="ProductFeature" Title="PerUserSample" Level="1" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="AppDataFolder">
<Directory Id="Something" Name="Something">
<Component Feature="ProductFeature" Guid="PUT-GUID-HERE">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]\Test"
Name="installed" Type="integer" Value="1" KeyPath="yes"/>
<File Source="C:\Windows\Notepad.exe" />
<RemoveFolder Id="Something" Directory="Something" On="uninstall" />
</Component>
</Directory>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="PerUserSample" />
</Directory>
</Directory>
</Product>
</Wix>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)