Geeks With Blogs
Joaquin Jares Just another geek's blog

It is very common on Vista (with UAC activated) to have a setup run through with no error, but to end up not installing anything. This happens when you try to write to protected resources (such as some parts of the file system, registry, etc). It’s easy to get past this on custom actions (using impersonate=”no” and Execute=”deferred”), but finding out how to do it on the “standard” components is not that easy. Luckily, it’s a one-liner. Just add the InstalledPrivileges attribute to your package, like this:

<Package Id='????????-????-????-????-????????????' Description='My Software' Manufacturer='MyCompany' InstallerVersion='250' InstallPrivileges='elevated'></Package>

And now your package will ask for elevation as soon as the execute sequence starts, resulting in all the actions/components being installed with elevated privileges.

Posted on Friday, August 15, 2008 5:50 AM Setup | Back to top

Comments on this post: Setup - Elevation

# re: Setup - Elevation
Requesting Gravatar...
I want to create setup installation for my database.the database was design by microsoft access 2010. so, how to prepare installation wizard
Left by hamza on Mar 15, 2012 2:34 AM

# re: Setup - Elevation
Requesting Gravatar...
can I get some elivation design for my 3BHK home?
Left by Rajendran C on May 20, 2012 7:46 AM

Your comment:
 (will show your gravatar)

Copyright © Joaquin Jares | Powered by: