在Windows XP上,Inno Setup不会弹出带有PrivilegesRequired = none的UAC提示 [英] Inno Setup does not popup UAC prompt on Windows XP with PrivilegesRequired=none

查看:252
本文介绍了在Windows XP上,Inno Setup不会弹出带有PrivilegesRequired = none的UAC提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Inno Setup中,我执行PrivilegesRequired=none.

In Inno Setup I do PrivilegesRequired=none.

如果用户具有管理权限,则此设置应提示UAC.

This setting should prompt the UAC, if the user has Administrative privileges.

在Windows XP的某些计算机上,即使管理员已登录,也未收到UAC的提示,我通过检查IsAdminLoggedOn设置进行了验证,发现它已设置为True.

On some computers of Windows XP the UAC doesn't get prompted even though the Administrator is logged in, I verified this by checking the IsAdminLoggedOn setting and I saw that it was set to True.

为什么会这样?

推荐答案

  • 如果IsAdminLoggedOn返回True,则表明安装程序已使用管理员特权(提升")运行.

    • If IsAdminLoggedOn returns True, the installer is already running with Administrator privileges ("elevated").

      请注意,Windows XP中没有特权分离.如果运行安装程序的用户是管理员,则您始终具有管理员权限. Windows XP中没有UAC提示.

      Note that there's no privileges separation in Windows XP. If the user you are running the installer with is the Administrator, you always have Administrator privileges. There's no UAC prompt in Windows XP.

      在Windows XP中唯一可以得到的提示是运行方式"提示,该提示使您可以以其他用户(通常是管理员)的身份运行应用程序/安装程序.

      The only prompt you can get in Windows XP is "Run as" prompt that allows you to run an application/installer as a different user (usually the Administrator).

      通过使用(未记录且不推荐使用的)PrivilegesRequired=none,您实际上实际上告诉Inno Setup 不要升高,即使安装程序未升高也没有升高.无论如何,通常都会收到UAC/Run As提示,这完全是由于Windows内部启发式技术检测到您正在启动的.exe是安装程序,可能需要提升运行状态.

      By using the (undocumented and deprecated) PrivilegesRequired=none, you actually tell Inno Setup explicitly not to elevate the installer, even when it is started not-elevated. That you usually get the UAC/Run As prompt anyway is solely because of Windows internal heuristics that detects that the .exe you are starting is an installer and will probably need to be run elevated.

      有关详细信息,请参见我的问题仅在需要时才使Inno Setup安装程序请求特权提升.

      For details, see my question Make Inno Setup installer request privileges elevation only when needed.

      这篇关于在Windows XP上,Inno Setup不会弹出带有PrivilegesRequired = none的UAC提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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