Kill running processes on any other machine (over the network) using Delphi?

How can I kill the current process on some other machine (over the network) using Delphi?

+6
source share
2 answers

All you need can be found on The Road to Delphi , it is just a blogdd on how to do this on November 6th, check this link WMI Tasks using Delphi – Processes .

+9
source

You can use the WTSTerminateProcess API or use the Jwscl (Windows Security Library) Terminal Server ( TJwWTSProcess offers the Terminate method).

An example of a small code:

 var TS: TJwTerminalServer; begin TS := TJwTerminalServer.Create('Remote'); try if TS.EnumerateProcess then begin for i := 0 to TS.Processes.Count -1 do begin if TS.Processes[i].Name = 'notepad.exe' then begin TS.Processes[i].Terminate; end; end; end; finally TS.Free; end; end; 
+2
source

Source: https://habr.com/ru/post/902193/


All Articles