1

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.

Galilyou
  • 135
  • 1
  • 3
  • 7

3 Answers3

3

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 /?
Richard Slater
  • 3,228
  • 2
  • 30
  • 42
2

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

Taras Chuhay
  • 645
  • 3
  • 9
  • 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
0

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
Bob
  • 2,569
  • 3
  • 26
  • 22