Using psexec
Hi. We have a .MSP file that we want to push to some remote machines using psexec. I have tried seveal different command lines and can't get it to work.
How do you copy the .msp file to a target machine and then call msiexec on that target machine to run the .msp file?
Thank you.
How do you copy the .msp file to a target machine and then call msiexec on that target machine to run the .msp file?
Thank you.
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
mhsl808
13 years ago
Posted by:
anonymous_9363
13 years ago
D'oh! Of course! Sorry! PSExec won't do that for you. You'll need to wrap it all up into a script which copies the file to a know location and then executes MSIEXEC with full pathing to the MSI and MSP. And no, I don't have such a script. There are a quadzillion examples of file-copying scripts around. You could do worse than start at http://www.computerperformance.co.uk (no affiliation, etc., etc.)
Or, of course, you could use a proper deployment system. Or you could have used an AIP in the first place, which you would then patch and re-install the package to your client machines.
EDIT:
I guess you could use a UNC to the MSP and then just ensure you use a domain account to execute the PSExec command line, with the UNC as the path to the MSP...as in
Or, of course, you could use a proper deployment system. Or you could have used an AIP in the first place, which you would then patch and re-install the package to your client machines.
EDIT:
I guess you could use a UNC to the MSP and then just ensure you use a domain account to execute the PSExec command line, with the UNC as the path to the MSP...as in
PSEXEC \\whatever_machine MSIEXEC /I [path to MSI] /P [UNC path to MSP] [other arguments] /U [domain account name] /P [password for domain account]
Posted by:
mhsl808
13 years ago
Posted by:
mhsl808
13 years ago
VBScab, I tried your command line but it never seemed to work. so I wrote a WinBatch script that has this code:
CopyFrom = "\\AppServ3\Source$\Microsoft\Communicator\Office Communicator MSP File"
FileCopy("%CopyFrom%\Communicator.msp", "c:\windows", @FALSE)
DirMake("c:\windows\build")
if AppExist("communicator.exe") == @True then IntControl(56,"communicator.exe", 1,0,0) ;this will auto-close the .exe if it's running
Run("c:\windows\system32\msiexec.exe", "/p c:\windows\Communicator.msp REBOOT=R /qb! /L*V c:\windows\build\OC225.log")
So this is compiled into an .EXE. I then use psexec to push this .EXE to a target machine. The .EXE starts and it shows up in the TaskMan but it never does anything and it never exits TaskMan. I have pushed this to a VM and to a physical machine and the result is the same on both, it pops up in TaskMan but does nothing and never exits.
My psexec command line has varied and no matter what switches I pick it fails to work. I've used -u Domain\MyAdminID and I've used -s for the system account. I've used -i and no -i etc..... and nothing works. What gives?
CopyFrom = "\\AppServ3\Source$\Microsoft\Communicator\Office Communicator MSP File"
FileCopy("%CopyFrom%\Communicator.msp", "c:\windows", @FALSE)
DirMake("c:\windows\build")
if AppExist("communicator.exe") == @True then IntControl(56,"communicator.exe", 1,0,0) ;this will auto-close the .exe if it's running
Run("c:\windows\system32\msiexec.exe", "/p c:\windows\Communicator.msp REBOOT=R /qb! /L*V c:\windows\build\OC225.log")
So this is compiled into an .EXE. I then use psexec to push this .EXE to a target machine. The .EXE starts and it shows up in the TaskMan but it never does anything and it never exits TaskMan. I have pushed this to a VM and to a physical machine and the result is the same on both, it pops up in TaskMan but does nothing and never exits.
My psexec command line has varied and no matter what switches I pick it fails to work. I've used -u Domain\MyAdminID and I've used -s for the system account. I've used -i and no -i etc..... and nothing works. What gives?
Posted by:
anonymous_9363
13 years ago
Posted by:
mhsl808
13 years ago
Posted by:
rich0864
13 years ago
I had a similar requirement that I was working on, running psexec from an sfx exe wrapper to a known location:
http://itninja.com/question/fonts-installed-by-msi-not-available-until-next-logon&mpage=1&key=𓂂
Perhaps the psexec elements I used will help.
Cheers
Rich
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.