Install Siteagent MSI as Administrator from Explorer GUI

Siteagent updates are released on a weekly basis. The upgrades are released as Microsoft Installer (msi) files with .msi extension. The installation has to be performed with an elevated privilege (Run as Administrator). Windows explorer by default does not show the option “Run as Administrator” or “Install as Administrator” for .msi fles in the explorer context menu, even though it does so for .exe, .bat, .com etc. files.

So, to install msi, we open up a command prompt in Administrator mode and find the new Siteagent msi and install it. This is a bit inconvenient and requires a number of additional steps.

To over come this, there is a registry configuration tweak that can be done once and which will make “Install as Administrator” option available for msi packages.

Run the attached batch script one time to “fix” the registry. Note that this needs to be “Run as Adminstrator” also.

Copy the following lines and save as msiinst.bat. Then run the batch file msiinst.bat as administrator.

rem ≈==================== beg of batch file ≈====================
@echo off
echo Windows Registry Editor Version 5.00 > temp.reg
echo [HKEY_CLASSES_ROOT\Msi.Package\DefaultIcon] >> temp.reg
echo @=“C:\Windows\System32\msiexec.exe,0” >> temp.reg
echo [HKEY_CLASSES_ROOT\Msi.Package\shell\runas] >> temp.reg
echo @=“Install as &administrator” >> temp.reg
echo [HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command] >> temp.reg
echo @="msiexec /i “%%1"” >> temp.reg

@echo on
regedit.exe /s temp.reg
@echo off
del temp.reg
rem ≈====================end of batch file ≈====================