How can I easily upgrade programs on my server?

Posted on 2009-12-18
Medium Priority
Last Modified: 2012-05-08
I have 25 servers, that I run the same program on...

Is there an easy way to automatically update the program?

It is a program I made.. just a single EXE..

So basically what I need is something that can access all 25 servers.. end task the process.. upload the new version .. overwrite the old version.. and then run the new version..

I am sick of logging into 25 servers to do this manually! lol
Any suggestions?
Question by:bail3yz

Accepted Solution

Akmetra earned 2000 total points
ID: 26080013
Scripting, probably the easiest way to do it.

Google for psexec.exe, it's a tool that allows you to remotely upload&execute an application.

If the servers are in AD - run it as a domain-wide administrator account (you'll use the same credentials on all the machines)

List all the target boxes in a file such as serverlist.txt

Then make a batch script.. something like the one below.

echo Starting update-exe-script on servers:
type serverlist.txt
for /f %i in (serverlist.txt) do taskkill /s %i /im exefilename.exe & copy \\unc\path\to\new\version.exe \\%i\C$\path\on\server.exe & psexec \\%i exefilename.exe

Open in new window


Author Comment

ID: 26080054
Thanks.. thats exactly what I was looking for!

Expert Comment

ID: 26080084

What OS are you running, if windows, you might be able to accomplish this with  a batch file but it will require some work.

please provide more details

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Requirements: root access via SSH, telnet, or other.. Alternately, access from the server administrator to run a counter-strike server, and the proper access rights to do so. Enough free disk space (and allowed to use this much, eg disk quota): 6…
More or less everybody in the IT market understands the basics of Networking, however when we start talking about Storage Networks, things get a bit dizzier, and this is where I would like to help.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

750 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