RunAsTask() - Auto-elevates script without UAC prompt

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: RunAsTask() - Auto-elevates script without UAC prompt

Post by SKAN » 19 Sep 2023, 10:22

Philister wrote:
19 Sep 2023, 09:31
Isn't it the default to have to run shutdown.exe (plus, I assume, other shutdown commands like a shutdown.ahk) from an elevated command prompt?
I don' t think so.
I normally call ComObject("Shell.Application").ShutdownWindows() in my (non-elevated) always-running-script (Win7,Win10,Win11)...
and at times (rarely) my screen goes blank owing to graphics failure and I force restart blindly with a hotkey binding to Run("shutdown /f /r /t 0").

Philister
Posts: 33
Joined: 01 Apr 2016, 07:31

Re: RunAsTask() - Auto-elevates script without UAC prompt

Post by Philister » 19 Sep 2023, 10:57

I see, thanks!

Post Reply

Return to “Scripts and Functions (v1)”