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

编程入门 行业动态 更新时间:2024-10-26 04:23:12
本文介绍了如何让 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:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577674.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:安装程序   管理权限   WiX

发布评论

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

>www.elefans.com

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