Solved

# How can I easily upgrade programs on my server?

Posted on 2009-12-18
Medium Priority
446 Views
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?
0
Question by:bail3yz

LVL 1

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
pause
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

0

Author Comment

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

LVL 2

Expert Comment

ID: 26080084
Hi

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

0

## Featured Post

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