如何让 WiX 安装程序请求管理权限? [英] How do I get WiX installer to request administrative privileges?

查看:27
本文介绍了如何让 WiX 安装程序请求管理权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个内部开发的程序.我们正在升级以使用 Visual Studio 2012,因此必须放弃 Visual Studio 安装程序项目.如果应用程序已经安装,InstallShield LE 会给我们带来快捷方式问题.这让我最终选择了 WiX.

We have a program we have developed in house. We are upgrading to use Visual Studio 2012, and so have to leave the Visual Studio installer project behind. InstallShield LE was giving us problems with shortcuts if the application was already installed. This left me with finally going with WiX.

我已经研究了几天并阅读了几篇关于如何获得管理员权限的帖子,但它们似乎都不起作用.Package 元素具有 InstallPrivileges="1" 并且存在以下 Property 元素:

I have researched this for a few days and read several posts on how to get administrator rights, but none of them seem to work. The Package element has InstallPrivileges="1" and the following Property element is present:

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

启动时不会请求管理员权限,所以在C:Program Files(x86)中创建程序文件夹失败.

It will not request administrator privileges when it starts, and so it fails when it tries to create the program folder in C:Program Files(x86).

推荐答案

如何让 WiX 安装程序请求管理权限

Opus Krokus评论.

回答

我添加了以下内容(到 Package 元素),但我不确定哪个(或什么组合)给了我我需要的东西,但它现在可以工作了:InstallPrivileges="elevated" AdminImage="yes" InstallScope="perMachine"

I added the following (to the Package element), and I am not sure which (or what combination) gave me what I need, but it works now: InstallPrivileges="elevated" AdminImage="yes" InstallScope="perMachine"

这篇关于如何让 WiX 安装程序请求管理权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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