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

编程入门 行业动态 更新时间:2024-10-26 06:32:52
本文介绍了如何让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安装程序请求管理权限?

本文发布于:2023-11-11 06:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577673.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:安装程序   管理权限   WiX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!