How to open and run AutoHotKey, Windows PC automation software, with administrator privileges and admin rights.
After investigating a bit because AutoHotkey wasn’t working on rpcs3, I found that the most likely cause of AutoHotKey not working with specific software is the presence or absence of administrator privileges.
- AutoHotKey not working in some programs - Ask for Help - AutoHotkey Community
- AHK doesn’t work inside certain programs - Ask for Help - AutoHotkey Community
So, to run an AutoHotkey script with administrator privileges from PowerShell:
Start-Process -Verb runAs AutoHotkeyU64.exe -argumentlist "C:\pg\autohotkey\tmp.ahk"
From Bash:
powershell.exe 'Start-Process -Verb runAs AutoHotkeyU64.exe -argumentlist "C:\pg\autohotkey\tmp.ahk"'
As a side note, even AutoHotkey running with administrator privileges couldn’t work on rpcs3. Grrr.