Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["        <li><a href=\"http://area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"http://careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.7.26.1729\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Server Fault works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscr"], "copyright__copyright__copyright": ["a psexec homepage\n\nshare|improve this answer\n\nFor 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.\n\npsexec \\\\host -h -u DOMAIN\\Username /i msiexec /i \"\\\\yourserver\\yourshare\\you.msi\" switches\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}