MSI and Run As Administrator

Some MSI programs require elevated privilege to run and its always cumbersome to run it through runas. In Windows Vista/7, the shell integration (right click) of an Exe will contain a Run As Administrator function like below. image But for MSI files, there’s no such context! Of course, there are otherways but this right click thingy is what i want, its quick and easy. image MSI files do not have the Run as administrator shell integration. How to make that Run as administrator come integrated with MSI and or other executables (e.g. VBS, MSI, BAT). Try this. For MSIs Start notepad.exe and paste the below text exactly

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTMsi.Packageshellrunas] [HKEY_CLASSES_ROOTMsi.Packageshellrunascommand]

Don’t worry about text residing to a point you can see, just copy and paste the whole table. When you paste the above, it MUST look something like this: image If it doesn’t stop right there, something is not right. Try again. Now save this document as shell_enable_msi.reg (filename doesnt matter, just as long the extension is .reg. Make sure the registryicon appears after you do that like below. image This means its associated with the registry tool. Now double click the icon and UAC should complain, but just say yes on both counts! image image Once exported, you should see this; image Now try again with that MSI extension. Voila! image And there you go. Anyway, in case you’re curious what all those jargon you pasted into your registry its nothing much, its actually… image

1 Comment

Comments are closed.