User Account Control Automation Assistant [UacAA]


User Account Control Automation Assistant [UacAA] can be used as part of your Test Automation to programmatically automate the confirmation and rejection of Uac elevation and credential dialog boxes on Windows 7 and Windows Vista using languages such as VBScript, Perl, C# and PowerShell on either the standard or secure desktop. Microsoft has a well defined process in place to achieve the same thing by leveraging their UI automation technologies but it is all a bit of a kerfuffle when all you want to do is modify a registry key as part of your smoke test!

UacAA requires no tweaking to your Uac settings, no third party dependencies or DLL's and no digital certificates. Install and go!

 

Where can I get a copy?

Click on the Downloads link on the left to get your free copy of UacAA!

 

How it works

Using UacAA as part of your test scripts (C# and VBScript samples included) is easy:

  1. Set an "expectation" that a UAC Dialog will appear shortly and provide the response for when it does (credentials, confrm/reject).
  2. Do something that causes the UAC Dialog to appear - such as launching a priveleged application, using "RunAs" Verb from VBScript or automating the installation of an MSI package that requires elevation.
  3. In the background, UacAA monitors for the appearance of the UAC dialog and dismisses it according to the expectation you set.
  4. Depending on your test: optionally get the "expectation result" from UacAA and ask whether the UAC dialog was displayed and on what desktop.

 

Why is UacAA handy?

  • Launching elevated applications as part of your automated test suite to modify the environment between tests (Coded UI, VBScript, PowerShell etc...)
  • Integration / smoke testing where UI automation is not a primary objective but where User Account Control automation is required.
  • Testing your application behaves correctly under Uac!
  • Running your integration tests on an isolated P2V-SOE production clone without making any changes to the environment whatsoever.
  • Reducing the number of snapshots and virtual machine baselines that need to be managed.
  • Automating security-related tests that were previously manual in nature.

 

CAUTION!

UacAA allows any user, at any privelege level, to automate the User Account Control elevation and credential dialog boxes. UacAA should not be installed on systems where arbitrary content can be downloaded and executed from the Internet and should not be installed on servers, production or public-facing systems on the grounds of security. UacAA should be used only in test environments - the kind that currently have User Account Control disabled and/or free text Administrative passwords laying around :-)

UacAA must absolutely not be used as a hackey-wackey way of executing scripts that require elevation on production desktop systems!