Inno Setup does not popup UAC prompt on Windows XP with PrivilegesRequired=none

旧时模样 提交于 2019-12-08 07:44:19

问题


In Inno Setup I do PrivilegesRequired=none.

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

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.

Why is this happening?


回答1:


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

    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.

    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).

  • 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.

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



来源:https://stackoverflow.com/questions/35824858/inno-setup-does-not-popup-uac-prompt-on-windows-xp-with-privilegesrequired-none

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!