Friday 16 December 2011

Stopping Windows 7 UAC for an application

The Windows 7 UAC can be a problem with some older applications when they were made with little thought to how crazy MS could get.

Any exe that has "Setup" or "Install" anywhere in its properties will have UAC ask for elevation. To get around this the "Microsoft Application Compatibility Toolkit" was created.

Download, install and run this (Compatibility Administrator). Once launched, create a new database under "Custom Databases". Right click the DB > "Create New" and select "Application Fix"


Give the whole thing a name, and browse to the application exe that is causing an issue.
Select the Compatibillity Mode for some version of XP (XP SP2/3) and select "RunAsInvoker" under "Additional Compatability modes". This tells Windows 7 that this app should run as the user who launches it... as in, it doesnt need to be an admin.
From the Compatibility Fixes select, "AddWritePermissionsToDeviceFiles" and click Next


Below is the reason my app wouldnt work, "spv-setup"... on the running application file.


Your application database thing should look like this

Once all that is done, copy it somewhere and run the command as an admin. I deployed this via SCCM which manages all that for me. But running it without a full path didnt actually work. So I copied it locally in my install script.

copy "spv.sdb" "c:\spv.sdb"
sdbinst c:\spv.sdb

No comments:

Post a Comment