/build/static/layout/Breadcrumb_cap_w.png

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.

0 Comments   [ + ] Show comments

Answers (8)

Posted by: anonymous_9363 13 years ago
Red Belt
0
The '/c' argument copies the file to the target machine.
Posted by: mhsl808 13 years ago
Fifth Degree Brown Belt
0
Yes, I know about /c what I am struggling with is the syntax of the whole command since I need to copy a file (which is a .msp file) but not run that copied file. Once it is copied I need to run c:\windows\system32\msiexec /i "TheFileICopied.MSP" and I have not gotten the correct snytax yet.
Posted by: anonymous_9363 13 years ago
Red Belt
0
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 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
Fifth Degree Brown Belt
0
VBScab, thanks for the info, I will give your command line a try and if I still can't get it working I will wrap it all up in a Wise script and do it that way. And i'd love to use SMS/SCCM but we have some remote offices that don't have SMS installed......yet.
Posted by: mhsl808 13 years ago
Fifth Degree Brown Belt
0
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?
Posted by: anonymous_9363 13 years ago
Red Belt
0
Run("c:\windows\system32\msiexec.exe", "/p c:\windows\Communicator.msp REBOOT=R /qb! /L*V c:\windows\build\OC225.log") This doesn't reference the original MSI or the ProductCode so it's hardly surprising that it doesn't work.
Posted by: mhsl808 13 years ago
Fifth Degree Brown Belt
0
Hi. the target machine already has Office Communicator installed so the original .MSI is there. And this .EXE I call works fine if I run it manually on a machine. It only dies when run using psexec.
Posted by: rich0864 13 years ago
Orange Belt
0
Hey mhsl808,
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=&#77954

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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ