Sei sulla pagina 1di 2

Remote Install of MSI packages using

PSExec
Topic: Remote Install of MSI packages using PSExec
Posted: 21 May 2010 at 11:02pm
First of all I apologize, I know there are many threads trying to answer this question and
rather than copy and re-post all over the place or leave this answer under only one other
thread, I'm starting a new topic. Hopefully this will get sticky-ed and the other oustanding
threads can be linked into this.
What's the sitch? Ok I'm an administrator/domain admin and I want to run a MSI install
across multiple servers and/or workstations without writing a bunch of VBS or batch scripts
or modifying the domain for an install on login/logout. Give me a single line to run the stupid
install!!
The main problem with most of the solutions I have seen are focusing on how to get PSExec
to either run the msi package from a remote directory or how to copy to the local machine to
run the MSI package. The real solution is to have the remote machine run msiexec.exe and
then point to the MSI package as an argument of the msiexec. You need the MSI package
placed somewhere on the network accessable by the remote machine with the credentials that
you supply to 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
Hope this helps clear the waters and saves someone else some time. I cannot disagree with
some other's posts that having the domain force install may not be the best overall solution,
but this is just a tool in your belt to get er' done and get home at the end of the day. Please
note, this is specifically geared towards msi installs, not setup.exe installs. If you are wanting
(or forced) to run a setup.exe I don't see why the above mentioned practice shouldn't work,
but you will have to do additional research to determine the setup.exe arguments for a silent
install (if it even supports it), as each setup.exe can behave differently.
Some kinda self-proclaimed guru (LOL),
Jason S
aka Solid Snake
http://forum.sysinternals.com/remote-install-of-msi-packages-usingpsexec_topic22970.html

Potrebbero piacerti anche