Sopalajo de Arrierez
Sopalajo de Arrierez

Reputation: 3870

How can I check if there is a Windows UAC Elevation Administrator Prompt awaiting for confirmation?

I would like to programmatically know if my Windows 7 system is stopped in the UAC elevation prompt, awaiting for the user to press "Yes".

Is there any running process that appears only in this case and disappear when the user accepts elevation? That would be a good solution, because I could check it via tasklist.

I have checked (during UAC prompt stopped and waiting) for these patterns:

...with no luck (all of them case insensitive).

Upvotes: 1

Views: 366

Answers (1)

Sopalajo de Arrierez
Sopalajo de Arrierez

Reputation: 3870

I have found it via remote SSH:

c:\>tasklist | find "consent" -i
consent.exe                   5700 Console                    1    14.784 KB

It keeps running while your desktop is on UAC.

Upvotes: 1

Related Questions