Remote kill, upload, execute file

2

1

I'm developing a program and I need to upload my xyz.exe file to many host machines and execute them frequently.

I need a server-client tool to do it as below steps after an update signal from my PC:

  1. Those host machines should kill any running processes with name xyz.exe.
  2. Download my new xyz.exe.
  3. Then execute new xyz.exe.

I know about some tools like PsExec, but I need a tools with better user-interface and more powerful.

Is there any tool to do it ?

UPDATE: The systems are in a same LAN, OS is windows (XP or 7), No full remote access is needed. I'm a developer and my program should run in remote hosts and I'm testing my application.

masoud

Posted 2012-04-12T13:35:25.297

Reputation: 167

More details would be useful. Are these systems on the same lan? Do you have some form of remote access? What Oses are the client PC? I'd also note this seems almost like the sort of behaviour that might end badly.. but i'll assume this has nothing to do with malware. – Journeyman Geek – 2012-04-12T13:42:33.070

What exactly is wrong about PsExec? You can't get more powerful than that... – Tamara Wijsman – 2012-04-12T14:03:02.203

@TomWijsman: First two steps. – masoud – 2012-04-12T14:08:36.440

1@MasoudM.: Can be done with PsExec using commands that come with Windows. – Tamara Wijsman – 2012-04-12T14:11:46.547

@TomWijsman: Yes, but I need a tool with easier steps – masoud – 2012-04-12T14:14:24.887

@MasoudM.: Define easier, better and more? PsExec is no rocket science. – Tamara Wijsman – 2012-04-12T14:15:51.877

Answers

4

You can do that all with psexec, note how taskkill and robocopy come with Windows:

psexec \\TARGET "taskkill /F /IM xyz.exe /T"
psexec \\TARGET "robocopy SOURCE_PATH TARGET_PATH xyz.exe"
psexec \\TARGET "TARGET_PATH\xyz.exe"

If any of these are unavailable, I'm pretty sure you can find older alternatives that come with Windows. xcopy for instance is the predecssor of robocopy and is still available even on Windows 8.

Tamara Wijsman

Posted 2012-04-12T13:35:25.297

Reputation: 54 163

@MasoudM.: If you don't want to belong on psexec and completely use only what Windows provides you, you could look into using a vbscript. I just don't see why you would grasp to a GUI if you want this to be automated, command-line tools are powerful at that...

– Tamara Wijsman – 2012-04-12T14:21:40.403

1I know, and I prefer it. but in our office there are other people with various level of skill. Maybe I should write a program myself or force them use this script :-) – masoud – 2012-04-12T14:32:54.147

1

If you don't want to use psexec, an alternative would be to create an event using task scheduler that would watch a user's public folder and when it gets updated, kill the current xyz.exe and run the new one. Then every time you created a new version all you would have to do would be put it in the user's networked public folder.

Garrett

Posted 2012-04-12T13:35:25.297

Reputation: 386

1

If you are open for a more professional alternative, you could use OPSI. Simply download the OPSI server appliance (it's a VM based on Linux), run the setup stuff and include the Windows clients.

You can then manage your clients within the web-interface of OPSI and do all that nasty stuff you want to do.

http://en.wikipedia.org/wiki/Opsi

Valentin

Posted 2012-04-12T13:35:25.297

Reputation: 826