Lot’s of installations need to run with elevated privileges and InstallShield has several ways to help you do this. Let’s look at an example and we will assume that your installation is written perfectly, so we don’t need to talk about what you want to do. We just need to talk about how to get your installation to run with elevated privileges.
First of all, if you are building a release that includes Setup.exe, in the Releases view, you can click the release, select the Setup.exe tab, and set the Required Execution Level property to Administrator. Then, when you run Setup.exe, it will run the MSI file with elevated privileges, and all your registry entries will be installed, along with everything else that needs elevated privileges.
What about if you have a Single MSI release and you just double-click on the MSI file? In that case, it won’t run with elevated privileges. So, how do you get it to run with elevated privileges?
In the General Information view, Summary Information Stream, Require Administrative Privileges property, if you set it to Yes, your MSI will run with elevated privileges. However, that only works for Windows Installer 4.0 and higher on Window Vista and higher systems. Earlier versions ignore this setting.
You’ll notice that if you right-click on and MSI file, there is no Run as Administrator choice in the context menu. So, you have to employ a trick used by a lot of System Administrators that involves setting Group Policy. Now, I’m not one of those guys, and I’m not going to pretend to be. I will just refer you to an excellent article I came across in the past.
You may be able to do this for other Windows versions, so if you read this blog and know about that, perhaps you could leave a Comment and let us know. I would certainly like to know more.