Escalate Privilege at Runtime (Windows API C/C++)
问题 My application does not always require "admin" privileges and most of the time would run as the current user. Is there any way, I can escalate privs by throwing up a UAC at runtime after my program is already running? This will only happen as and when I need privs. Rather than having to start with high privs. I know the "runas" technique, manifest file etc. but all these are before the process is created and not at runtime, on-demand 回答1: Congratulations, that's exactly how UAC is designed to