Thank you! (it works!)
Is there any practical difference between the proposals?
or the solution from the documentation - Run as Administrator?
Will check if it is possible to handle UAC with AHK 2.0 - but that may be a new question
Is there any practical difference between the proposals?
or the solution from the documentation - Run as Administrator?
CODE:
full_command_line := DllCall("GetCommandLine", "str")
if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
try
{
if A_IsCompiled
Run '*RunAs "' A_ScriptFullPath '" /restart'
else
Run '*RunAs "' A_AhkPath '" /restart "' A_ScriptFullPath '"'
}
ExitApp
}
Will check if it is possible to handle UAC with AHK 2.0 - but that may be a new question
Statistics: Posted by Albireo — 50 minutes ago