Wix - 以非管理员身份安装并添加到 GAC

发布于 2024-10-02 15:51:13 字数 327 浏览 0 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟酒忠诚 2024-10-09 15:51:13

安装到 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文