locked
detecting how long an end user waits on UAC / when an UAC prompt is on RRS feed

  • Question

  • Hi,

    I'm currently building a generic installer application for non WHQL drivers (using UpdateDriverForPlugAndPlayDevices), and during the driver installation process, users get an UAC prompt about the driver (which is expected).

    Now, as a driver installation can be a fairly lengthy process, because of System Restore (for which Windows does not provide any progress indication), I want to let the user know that, say after 30 seconds, if the process still hasn't completed, a driver installation that takes one minute or more on Windows is not unusual. Then if install is still going after 1 minute, I want to inform them that, the process can take up to 5 minutes on some machines, etc.

    However, because there is an UAC prompt in between the time I launch the installation process and when I want to know whether 30 seconds *of actual installation activity* have elapsed, I cannot simply set a timer for 30 seconds when starting the installation process. I also need to detect the amount of time that was spent by the user answering the UAC prompt.

    Therefore my questions is: Is there an API call to detect whether Windows is currently waiting on an UAC prompt?

    Tuesday, June 29, 2010 11:18 AM

All replies

  • Actually, the driver prompt is a security prompt (that still allows interaction with the UI, at least on Windows 7), rather than UAC, which I think means that it should be possible to detect whether a "Windows Security" window exists on the Desktop to address my issue.
    Tuesday, June 29, 2010 11:44 AM