Link to home
Start Free TrialLog in
Avatar of gimmeadrink
gimmeadrink

asked on

Replace the current running exe

Hi all,

(note this is related to another question which i will post the url to once i submit the question)
I'm writing a application that will eventually have little 'agents' that are running on about 70 computers on a WAN.

Basically, I have a central application that via tcp/ip sends xml commands to these agents, which in turn do 'stuff' based on the xml commands and return a result.

Because the only way i have access to these agents is via a ssh tunnel and vnc, i decided that i really dont want to log onto by opening the tunnel and a vnc session 70 times whenever i need to upgrade the exe. Instead, I have a system where dll's are dynamically loaded based on a config file. the idea being i can just send a xml command (and some binary data) to add new dlls and update the config file so the agent knows how to respond to new xml commands (or to fix any problems in existing dlls).

PROBLEM: In the event that i need to replace the agent exe itself, i need to also do this remotely. How do i replace an exe that is running at the time? I guess the short answer is that I cant, so what is an alternative to upgrade the exe remotely.

NOTE: i cannot use 2 ports, so I cannot have a second applicaiton running always listening on a second port to receive an upgrade to the first exe.

Thanks in advance for your help.
Avatar of gimmeadrink
gimmeadrink

ASKER

ASKER CERTIFIED SOLUTION
Avatar of VBtorment
VBtorment

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David Lee
Or, if you don't want a second executable, you could use the existing connection to send the agent a script to run.  It would perform the same steps that VBtorment described.  
VBtorment: I like the idea.... ill give it a go today and get back to ya.

Thanks
yep, works nicely, thanks