Remote Install of MSI packages using PSExec

 

Remote Install of MSI packages using PSExec

 

Here is what I finally got:

psexec \\Server -u "DOMAIN\Username" -p "PASSWORD" cmd /c "msiexec.exe /i "\\Server\FolderShare\My Install.msi" /quiet /norestart"



NOTE: 

1.    If your MSI or server path contains spaces then surround with quotes

2.    I'm not sure why I have to use the cmd /c (runs command window and then terminates), the straight msiexec.exe /i ~~~~ runs fine from a command prompt but when passed through PSExec the arguments are not correct which then causes msiexec to prompt a GUI window displaying the optional program arguments.  When this occurs you get a hung msiexec.exe process which is doing nothing and PSExec never returns (at least until you kill the MSIExec.exe process from the remote server).

3.    Run psexec with the @filename to install on all the listed computers.  In a seperate file create a list of computers to run against, one computer per line, and do not include the leading '\\'.

ie. (blank lines unneccessary but the stupid forum keeps putting them in there)

Server1.mydomain 
Server2.mydomain

Other thoughts:

1.    You can play around with other msiexec.exe features for more advanced deployment. /uninstall - to remove an installed package, /fa - to force a reinstall, and /logging & /log to log MSI install actions and output.  To view all msiexec options go to a command prompt and run msiexec.exe /?

2.    PSExec -d option to start up the install and then disconnect (perform MSI install asynchronously), obviously since your are not watching would be best to combine with MSIExec.exe logging.

3.    PSExec -n option to cut down on the time for connecting to non-responsive machines.

4.    List of msiexec error codes - http://support.microsoft.com/kb/229683

 

0 comments:

Post a Comment