Jump to content
CarlMontgomery

[Solved] Detect and Log UAC prompts

Recommended Posts

CarlMontgomery

Hi All,

It seems my google foo and and forum search foo has failed me.

I'm trying to write a script that simply idles and detects when a user gets a UAC prompt. I meant generally rather than from my own script.

I'm trying to create a log of these prompts so i can get a good picture of how many and when the user is challenged with a UAC prompt.

Havnt been able to find a UAC API or anywhere it gets logged.

Only possibility i can think of is trying to detect when AutoIt's input is blocked (since UAC blocks pretty much everything) but dont know where to start with that either.

Not even where to start on this. any ideas?

Carl.

Edited by CarlMontgomery

Share this post


Link to post
Share on other sites
smartee

Hi All,

It seems my google foo and and forum search foo has failed me.

I'm trying to write a script that simply idles and detects when a user gets a UAC prompt. I meant generally rather than from my own script.

I'm trying to create a log of these prompts so i can get a good picture of how many and when the user is challenged with a UAC prompt.

Havnt been able to find a UAC API or anywhere it gets logged.

Only possibility i can think of is trying to detect when AutoIt's input is blocked (since UAC blocks pretty much everything) but dont know where to start with that either.

Not even where to start on this. any ideas?

Carl.

When an application asks for permission a process "consent.exe" is launched. Simply log how many times that process is launched and voila :x

Share this post


Link to post
Share on other sites
CarlMontgomery

When an application asks for permission a process "consent.exe" is launched. Simply log how many times that process is launched and voila :P

Exactly what i was looking for. Too easy!

Thanks for that. :x

Share this post


Link to post
Share on other sites
cu0x

Hello Guys I'm facing the same issue, is there any way to find out or the UAC window closed is? Already check for consent.exe and looks like its open and close in lease than a ms... :(

Here is my code to check if the process exists.

Local $GetconsentPID

Local $GetconsentRtnValue = False

While 1

                 $GetconsentPID = ProcessExists("consent.exe")

                    If $GetconsentPID <> 0 Then
                        $GetconsentRtnValue = True
                    EndIf

                    If $GetconsentRtnValue = True Then
                        ProcessWaitClose($GetconsentPID)
                        ExitLoop
                    EndIf

  WEnd

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.