Home » Questions » Computers [ Ask a new question ]

Run MSI files as administrator from a user account

Run MSI files as administrator from a user account

I'm usually logged in as a normal user on my Windows XP box. Sometimes, when I want to install a software update, I don't want to log off and log on again as admin, but I right-click the installer exe and choose "Run as..." to run it from my admin account. However, this option only seems to exist for exe files, not for msi files.

Asked by: Guest | Views: 339
Total answers/comments: 2
Guest [Entry]

".msi files can be executed with msiexec.exe, so in combination with the runas command, you could accomplish what your want:

runas /user:administrator ""msiexec /i <path and filename of your msi>""

As a full-path to the file is recommended, it might need quotes around it and you need to escape them then with a backslash \:

runas /user:administrator ""msiexec /i \""<path and filename of your msi>\""""
^^ ^^"
Guest [Entry]

Take a look at runas from the command line. You can launch anything under as specified account.