WiX 安装程序应始终以管理员身份运行 [英] WiX installer should always run as administrator

查看:36
本文介绍了WiX 安装程序应始终以管理员身份运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 WiX 为 .NET WPF 应用程序开发了一个自定义安装程序.如果我右键单击并以管理员身份运行,它可以正常工作,但是在没有运行时,由于权限不足,某些组件无法安装.

I developed a custom installer with WiX for a .NET WPF application. It works fine if I right-click and run as administrator, however when running without, some components fail to install due to insufficient privileges.

这些组件包括 SQL Server Express 2008 R2、FoxIt Reader、一个 ActiveX 组件和其他一些组件.它还要求在新安装的数据库上运行一些 SQL 脚本——无论如何,它们都需要管理员权限.

The components include SQL Server Express 2008 R2, FoxIt Reader, an ActiveX component and some others. It also requires that some SQL scripts are ran on the newly installed database - anyway, they all require administrator privileges.

我尝试将 InstallScope="perMachine" 和 InstallPrivileges="elevated" 属性添加到 Package 节点,但这似乎没有什么不同.

I tried adding the InstallScope="perMachine" and InstallPrivileges="elevated" attributes to the Package node, but this didn't seem to make a difference.

我确定这很愚蠢,但我在参考资料或网上找不到任何东西.

I'm sure it's something silly, but I couldn't find anything in the reference or online.

推荐答案

我想如果你只是添加

<Property Id="MSIUSEREALADMINDETECTION" Value="1" />

它应该可以解决问题.如果没有,请告诉我,我可以做更多检查.

it should solve the problem. Let me know if not and I can do some more checking.

这篇关于WiX 安装程序应始终以管理员身份运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆