当普通用户运行需要提升权限的 WiX 安装程序时,在用户单击“安装”按钮和 UAC 提示出现。即使安装按钮标有 UAC 盾牌,也会发生这种情况,这表明安装程序“知道”需要提升。
当用户 1) 运行安装程序或 2) 单击“安装”按钮时,有没有办法立即抛出 UAC?
When a normal user runs a WiX installer which requires elevation, there appears to be a delay of 30 seconds or more between the user clicks the "Install" button and the UAC prompt comes up. This happens even though the install button is marked with the UAC shield, suggesting the installer "knows" that elevation will be required.
Is there a way to IMMEDIATELY throw up the UAC when the user 1) runs the installer or 2) clicks that "Install" button?
发布评论
评论(2)
UAC 提示出现的时间长度取决于 exe 的大小。 (自己尝试一下,右键单击以管理员身份运行各种大小的各种 exe。)因此,我听说它建议您制作一个小型启动器 exe,它将快速弹出提示,并让它启动其他所有内容。任何从提升的进程启动的东西都是提升的。
确保为真正阅读 UAC 提示的 1% 用户命名您的启动器。
The length of time for the UAC prompt to come up depends on the size of the exe. (Try it yourself by right-click run as admin various exes of various sizes.) Therefore I have heard it suggested that you make a teeny launcher exe that will bring the prompt up quickly, and have it launch everything else. Anything launched from an elevated process is elevated.
Be sure to name your launcher well, for the 1% of users who actually read the UAC prompts.
您的 MSI 文件有多大?我不知道事实,但我认为将文件拆分为单独的 .cab 文件并可能对其进行数字签名可能会使 MSI 文件的验证速度更快。
否则,据我所知,你真的无能为力。我希望有人能证明我错了。 :-)
How big is your MSI file? I don't know for a fact, but I think splitting your files into a separate .cab file and possibly digitally signing it might make the validation of the MSI file go faster.
Otherwise, there really isn't anything you can do about it to my knowledge. I hope someone proves me wrong. :-)