安装更改不要求UAC权限 [英] Installation change do not ask for UAC permissions

查看:208
本文介绍了安装更改不要求UAC权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我们的产品实现了安装程序. 安装程序需要管理员权限,因此我将设置引导程序与清单文件一起使用(根据建议

I implemented an installer for our product. Installer needs administrator privileges, so I used setup bootstrapper with a manifest file (as recommended here) to get these privileges on a Windows machines with UAC enabled. Installation and uninstall goes fine - the user is asked for permission and the installer does what it needs to do.

但是,如果您运行控制面板程序和功能,并为已安装的程序选择更改" *,则会出现错误(自定义,从安装程序LaunchConditions中获取),告诉安装程序需要管理权限.在这种情况下,我找不到任何方法来请求权限-Windows只是运行MSI文件,而对所需的权限一无所知.

But if you run Control panelPrograms and Features and select "Change"* for installed program, an error occurs (custom, from installer LaunchConditions), telling that the installer needs administrative privileges. And I can't find any way to ask for permission in a such case - Windows simply runs the MSI file and doesn't know anything about required permissions.

修复功能更加奇怪-它要求获得许可,但随后无法使用SetupBootstrapper执行安装期间允许的某些操作.

Even more strange is the repair functionality - it asks for permission, but then fails to do some actions that were allowed during installation, using SetupBootstrapper.

我在但是在我们的案例中,建议的解决方案是不可接受的.

But the proposed solutions are unacceptable in our case.

现在更改功能的唯一解决方法是始终使用SetupBootstrapper而不使用 Programs and Features 菜单,但这不是非常友好的操作,会迫使用户继续安装程序他/她的硬盘驱动器.

The only workaround for the change functionality now is to always use SetupBootstrapper and do not use the Programs and Features menu, but that is not very user-friendly and forces the user to keep the installer on his/her hard drive.

有人建议吗?

PS:我使用 WiX 创建安装程序,因此很高兴听到有关WiX解决方案的信息,但是我很确定它不依赖于安装程序的创建语言,但是仅针对MSI.

PS: I use WiX for creating the installer, so it would be great to hear about WiX solutions, but I'm pretty sure that it doesn't depend on the installer creation language, but only on MSI specifics.

推荐答案

哪些操作失败?如果它们是您添加到安装中的操作,请确保使用Impersonate="no"Execute="deferred"(或"commit""rollback")定义了这些操作,并确保它们在InstallInitializeInstallFinalize之间排序.

What actions are failing? If they are actions that you added to the installation, make sure that such actions are defined with Impersonate="no" and Execute="deferred" (or "commit" or "rollback") and that they are sequenced somewhere between InstallInitialize and InstallFinalize.

这篇关于安装更改不要求UAC权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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