Solved

How do I use psexec or a vbs script to run 2 .exe files on remote computers?

Posted on 2009-04-02
1
714 Views
Last Modified: 2013-11-10
I need help using psexec or a vbs script to copy and run 2 executables files on 200 remote computers. The two files are required to update an existing client application.
The first exe file stops the  running process of the application. The second exe file updates the client application.  Both exe files have to first be copied to the c:\program files\application path
on the remote computers. I've tried using 3 separate psexec commands to accomplish this but it isn't working; the files get copied and I get exit 0 on the next 2 steps but the updated application doesn't launch properly.  If I copy the files and run the 2 exe files from the console of a computer it works fine. I'd like to do this with one script. The comands that I use are below.
1- psexec @computernames.txt -c c:\program files\application path\file.exe
2-psexec @computernames.txt c:\program files\application path\stop_process.exe
3-psexec @compternames.txt c:\program files\application path\update_app.exe
0
Comment
Question by:briehill
1 Comment
 
LVL 6

Accepted Solution

by:
Justin_W_Chandler earned 250 total points
ID: 24054736
psexec @computernames.txt -c -w "c:\program files\application path" PROGRAM.EXE

- OR -

:: copy these two lines into WHATEVER.BAT and run it. it assumes PROGRAM.EXE is in the local folder
for /f %%A in (computernames.txt) do copy PROGRAM.EXE "\\%%A\c$\program files\application path"
for /f %%A in (computernames.txt) do psexec -w "\\%%A\c$\program files\application path" PROGRAM.EXE
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now