1
votes

I would like to use autohotkey to make a key binding that pastes my admin password into the admin prompts so I don't have to type it out 100 times a day. At the moment I have a AHK script that will paste text in most programs but it doesn't work in things like active directory or the windows admin prompt for credentials.

Can anyone help me with this?

here's my current script. When I press cntrl+J it pastes the testadminpass text but not into the password prompts

^j::
send, TestAdminPass
return 
1
Autohotkey is hotkeys and shortcuts are largely disabled when trying to interact with UACs. However, if you are largely opening the same applications as administrator over and over again, AHK has the ability to relatively easily open applications themselves with admin permissions. If it is the case that you are running the same programs as admin repeatedly, I can write an answer that can solve that problem. But in terms of having AHK interact with the UAC itself, solutions tend to be fairly situational and hackey as far as Ive seen them.Spyre

1 Answers

0
votes

If the application, browser or terminal runs with elevated admin privileges and ahk script is not then you can't send strings or expand hotkeys.

To solve this, simply run your script.ahk as Run as administrator.