在 Vista 上的 Windows Installer 中将 UAC 设为可选 [英] Make UAC optional in Windows Installer on Vista

查看:30
本文介绍了在 Vista 上的 Windows Installer 中将 UAC 设为可选的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一个 msi 文件,它在 UI 阶段提供了每用户"或所有"安装选择,现在发现安装程序在 Vista 上失败了:

I'm have written an msi file that offers a choice of "per-user" or "for all" installation in the UI phase, and now find that the installer fails on Vista:

  • 如果我只是重复使用适用于 XP 的安装程序,那么即使是按用户"安装,Vista 也会触发 UAC 提示,使安装变得毫无意义
  • 如果我在 PID_WORDCOUNT 的第 3 位关闭 UAC,Vista 将不再调用 UAC,因此即使用户有权安装到机器注册表中(例如),特权提升也不会发生,所以安装失败.

那么:如何防止安装程序在不需要时调用 UAC?或者,即使设置了第 3 位,我如何以编程方式请求 UAC?

So: how can I prevent installer from invoking UAC when it isn't really needed? Alternatively, how can I programmatically request UAC even if bit 3 is set?

推荐答案

不幸的是,Windows Installer 没有提供一种方法来创建可以安装每台机器和每用户的单个包,但只提示在每台机器上输入 UAC- 机壳.问题是可以抑制 UAC 提示的位存储在 SummaryInformation 流中,并且在包执行时不可修改.

Unfortunately, the Windows Installer does not provide a way to create a single package that can install per-machine and per-user but only prompt for UAC on the per-machine case. The issue is that the bit that can suppress the UAC prompt is stored in the SummaryInformation stream and is not modifiable while the package is executing.

这篇关于在 Vista 上的 Windows Installer 中将 UAC 设为可选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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