开发者

Accept UAC prompt verification with Autohotkey

开发者 https://www.devze.com 2023-01-15 06:13 出处:网络
I\'m running an application using an Authotkey script, which requires UAC. I\'ve read some开发者_如何学C post about it, but I can\'t get a clear answer explaining why it seems notpossible to accept th

I'm running an application using an Authotkey script, which requires UAC. I've read some开发者_如何学C post about it, but I can't get a clear answer explaining why it seems not possible to accept the prompt using Autohotkey.

My code is something like this:

Run,"%A_ProgramFiles%\someprogram.exe",,Max

Send !Y ; Send Alt-Y

I understand the process dispatched by the first line is halt by UAC, but the autohotkey process should continue working, right? I tried inserting a pause before, and also with mouseclick, unsuccessful.

Thanks,


No, the autohotkey process should not run in the secure desktop where the UAC prompt is displayed. See http://blogs.msdn.com/b/uac/archive/2006/05/03/589561.aspx and http://technet.microsoft.com/en-us/magazine/2009.07.uac.aspx for details.


I use a TIMER to check for the presence (WINEXIST) of alert windows every second or so.

IF WINEXIST alert window Send !Y

Otherwise, your !Y is typing into the ether, and not into the UAC alert window

0

精彩评论

暂无评论...
验证码 换一张
取 消