Take the 2-minute tour ×

I posted this question to SO, but I'm really not sure whether it should go SO or ServerFault, so I'm posting it here too. Here's the question:

Hey SO Gus,
This might seem like a dump question, but my complete ignorance with VbScript is giving me no chance to try to work it out.In short, a system administrator friend of mine, asked me to write him a script that should allow him to enter a remote machine name, a domain credentials, and an MSI package that will be installed on the specified remote machine. I know this is silly, I mean, come on! No one can just log in to SO and ask for a cake, people should ask about how to get the cake cooked. I know, but please forgive my absolute laziness and help! :) Thanks in advance.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

If you can work out the switches you require to get the MSI to install in a totally unattended manner you can use psexec part of pstools from Microsoft/SysInternals.

psexec \\workstation -u DOMAIN\Admin User -p password msiexec /i "\\server\share\installer.msi" switches

Having tried it, the process is very hit and miss; some installers will work some are so convoluted they just won't work. Uninstall dosn't work anywhere near as often as install does.

To get the MSI to unstall in an unatteneded mode try various combinations of the following switches:

/quiet, /passive, /qn, /qb

For more information about msiexec.exe try

msiexec /?
share|improve this answer

There is a tool from Sysinternals package called psexec.

psexec \\machinename -u username -p password msiexec /i "c:\your_program.msi" /qn ALLUSERS=2

Here is a psexec homepage

share|improve this answer
Thanks a lot dude! Can't up-vote because of the very low rep, will up-vote this answer as soon as I can. Thanks again (f) –  Galilyou Jun 15 '09 at 10:42

For Windows Vista/7/2008/R2, make sure you specify the -h flag to run with your accounts elevated token. Otherwise your installer won't run.

psexec \\host -h -u DOMAIN\Username /i msiexec /i "\\yourserver\yourshare\you.msi" switches
share|improve this answer

Your Answer


