Wix - 以非管理员身份安装并添加到 GAC
我正在使用 WIX 编写安装程序,并且需要将 .dll 文件添加到 GAC。 我使用:
<File Id="my.dll" Name="my.dll" DiskId="1" Source="..\MyResources\" KeyPath="yes" Assembly=".net" />
这对于管理员用户来说工作得很好,但是当我从非管理员用户运行它时,安装程序失败并显示我没有权限的错误。
有办法克服这个问题吗?
如果我编写自定义操作,我是否能够从非管理员用户使用 gacutil?
感谢您的帮助, 格言
I am writing an installer using WIX, and I need to add a .dll file to the GAC.
I use:
<File Id="my.dll" Name="my.dll" DiskId="1" Source="..\MyResources\" KeyPath="yes" Assembly=".net" />
This works perfectly fine for the Administrator user, however when i run this from a non-administrator user, the installer fails with an error that i don't have privileges.
Is there a way to overcome this?
If i write a custom action, will i be able to use gacutil from a non-administrator user?
Thanks for your help,
Maxim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装到 GAC 需要管理员权限。标准用户可以执行此操作的唯一方法是让管理员发布软件包。这样,系统将信任该程序包,并且当标准用户运行安装时,它将在执行序列期间提升并使用系统将程序集发布到 GAC。
如何允许非管理员用户安装 MSI 软件包
Installing to the GAC requires administrator privs. The only way a standard user can do it is to have the package advertised by an admin. This way the system will trust the package and when the standard user runs the install it will elevate during the execute sequence and use System to publish the assembly to the GAC.
How to allow users who are not administrators to install MSI packages