我正在尝试创建一个无需管理员权限即可运行的安装文件 (MSI)。为此,我尝试了以下选项。
更改上述属性后,仍需要管理员权限才能执行使用安装项目创建的 MSI 文件。
你能帮我解决这个问题吗?
提前致谢。
最佳答案
当您使用 Orca ( or equivalent MSI viewer ) 打开您的 MSI 时,您是否看到了 "UAC Compliant"
复选框被选中?示例截图在这里:
你真的应该使用 a more flexible and capable MSI tool比 Visual Studio 安装程序项目。它们有一些用途,但缺乏灵活性,还有许多其他问题:summary of VS Project problems ( short form )。
Per-User setups considered harmful: Some words of warning against per user setups. Here is one more answer on that.
WiX 中的简单每用户文件夹安装( 在显示为“PUT-GUID-HERE”的位置插入大写 GUID (2 次) - you can use this GUID generator):
<?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>
关于winforms - 使用 VS 2015 Professional 创建无需管理员权限即可运行的设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64330448/