Solved

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

Posted on 2009-04-02
1
711 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This is about my first experience with programming Arduino.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 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

20 Experts available now in Live!

Get 1:1 Help Now