Jump to content

[Solved] Detect and Log UAC prompts


Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 5 years later...

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...