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