Modify lines 3–7 of your AutoHotkey script to explicitly invoke the AutoHotkey.exe interpreter. Update that block to look exactly like this:
; Force the script to run as Administrator by calling the AHK executable explicitly
if not A_IsAdmin
{
Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
ExitApp
}
Top comments (0)