我们有一个内部开发的程序.我们正在升级以使用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安装程序请求管理权限?
发布评论