On Windows log on, I'm starting AutoHotkey automatically with:
"C:\path\to\AutoHotkeyU64.exe" "C:\path\to\AutoHotkey.ahk"
with either a registry key in HKLM\Software\Microsoft\Windows\CurrentVersion\Run or a shortcut in C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.
Then, this AutoHotkey script intercepts my keyboard shortcut successfully, except when a program ran as administrator has the focus.
How to make AutoHotkey work even if a program ran as admin has focus?
Is it needed to run AutoHotkey as admin on startup? To do so, the only method I know is using Task scheduler - I know how to do this.
Question: for my culture of Windows 10 internals, is there another way than having to create a TaskScheduler task? I have no specific reason to avoid TaskScheduler, I just want to know if it is the only way or not, for better knowledge of Windows 10, UAC, etc.
I read about enabling/disabling AdminApprovalMode, but I don't see exactly how to apply this here. Could this be an alternative solution?
Linked: AutoHotkey Keyboard Shortcuts Not Captured When Certain Programs Are Focused
Not a dupe of How to run AutoHotKey script as an admin every time a user logs in? ; here I'm interested for non-task-scheduler solutions.