As a good user you should not run with administrator privileges. Perhaps you already know this and if you practice what you preach you might use the Runas... functionality that is available in Windows. Just right click on the file you want to execute and choose Runas... Then you get the opportunity to enter what user the file should be run as.
This works fine as long as you right click .exe files. When trying the context menu on .msi files nothing shows up. The .msi format is a very common format to distribute files so why not let it be as simple as with .exe files? The solution requires a tweak of the registry. Cut and paste the following snippet to a file and give the filename a .reg ending.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Msi.Package\shell\runas] @="Install &as..." [HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command] @="msiexec /i \"%1\""
Now run the .reg file or startup regedit as administrator:
runas /user:COMPUTERNAME\Administrator regedit
and then choose Import from the regedit menu.
By now an option that says Install as... should show when right clicking a .msi file.
Comments
Should be.. Windows Registry
Should be..
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Msi.Package\shell\runas]
@="Install &as..."
[HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
@="msiexec /i \"%1\""
Windows Registry Editor Version 5.00
Thanks for spotting that!
I didn't think the line "Windows Registry Editor Version 5.00
" was necessary.
// John
Should be..
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Msi.Package\shell\runas]
@="Install &as..."
[HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
@="msiexec /i \"%1\""
Youre right, very helpfull, thnx
it only worked with "Windows Registry Editor Version 5.00"
Christian louboutin
What a great post! Just one suggestion:If you add some pics, it would be easiler to follow!
Post new comment