tags:

views:

82

answers:

3

In my project, I am going to do that : There is a server in restaurant, and some pos machines which are running on Windows XP called Radiant systems. There will be a .exe on server, and this .exe will stop running some process on Radiant Poses. It is possible with .Net Remoting. But it requires to write an .exe on the Radiant Poses, but I dont want to do that. Think there is no problem on network access on Main Server in restaurant and Radiant Poses in restaurant. Is it possible to do that without using .Net Remoting?

A: 

Do you really need a programming solution for this? Take a look at the command line tools that are available with Windows XP, namely the taskkill command. It allows to kill processes on a local or remote system.

Syntax

taskkill [/s Computer] [/u Domain\User [/p Password]]] 
         [/fi FilterName] [/pid ProcessID]|[/im ImageName] [/f][/t]

...

Examples

The following examples show how you can use the taskkill command:

taskkill /pid 1230 /pid 1241 /pid 1253
taskkill /f /fi "USERNAME eq NT AUTHORITY\SYSTEM" /im notepad.exe
taskkill /s srvmain /f /im notepad.exe
taskkill /s srvmain /u maindom\hiropln /p p@ssW23 /fi "IMAGENAME eq note*" /im *
taskkill /s srvmain /u maindom\hiropln /fi "USERNAME ne NT*" /im *
taskkill /f /fi "PID ge 1000" /im *
Frank Bollack
How you gonna execute these commands on Radiant System from Server?I need a programming solution at that point.
Serkan Hekimoglu
+1  A: 

One way could be, to use Remoting to call a KillProcess() method that would in turn call the Process.Kill method to kill a process. This article is worth looking at.

KMan
Actually, this is what I am looking for. Thank you.
Serkan Hekimoglu
I tested this application. Works fine, just be careful about Permissions.
Serkan Hekimoglu
A: 

Thats a good question

cmon_stoke
but you need to write it as a comment, not an answer.
Serkan Hekimoglu
I would like to but there was no option too.
cmon_stoke