How to run testsuite with admin privileges on Win7

Experiences, small talk, and other automation gossip.
Posts: 19
Joined: Wed Mar 14, 2012 9:20 am

How to run testsuite with admin privileges on Win7

Post by sauer-peters » Tue Mar 27, 2012 1:16 pm

we started to use Ranorex some weeks ago and now we trying to find out a suitable solution to build and run the test suites in our continuous integration process:
This is our plan:
- CruiseControl.Net is running on our build server and triggers an NAnt script
- this script will check out the latest sources from SVN and start MSBuild to build the applications under test (AUT) as well as the Ranorex test suites
- on a seperate test server several prepared VirtualBox VM snapshots are waiting with Ranorex already installed
- another CruiseControl.Net instance on the test server is waiting for the build to be complete and triggers an NAnt script that starts the VMs and transfers the testsuites and testdata into the VMs

To run the AUT setup and also for changing some reg keys we need admin privileges on Windows 7. But it is not possible to set the 'Compatibility/Run as admin' checkbox for the testsuite.exe. This is grayed out. Why? How can we run the testsuite.exe with admin rights. A right-click on the file, selecting 'Run as admin' and confirming with OK works manually but is hard to do automatically at this point. Any ideas on how to solve this issue? Using a second UI automation tool? :?
Is it possible to force the testsuite.exe to run with admin rights? How? Then a possible solution could be to turn off the Win7 user account control in the VM completly.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: How to run testsuite with admin privileges on Win7

Post by Support Team » Thu Mar 29, 2012 11:53 am


Do you have tried to use a Manifest file for this purpose? If not you could try it, here is a useful link.
We also suggest turning off the UAC, especially for testing machines.

Ranorex Support Team