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

查看:1766
本文介绍了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的防爆preSS 2008R2,福昕阅读器,ActiveX组件和其他一些人。这还需要一些SQL脚本运行新安装的数据库 - 反正,他们都需要管理员权限

The components include SQL Server Express 2008R2, 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 =架空属性包的节点,这似乎并没有发挥作用。

I tried adding the InstallScope="perMachine" and InstallPrivileges="elevated" attributes to the Package node, 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.

在此先感谢。

推荐答案

我想,如果你只需要添加

I think if you just add

<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天全站免登陆