in reply to Killing Process on Win32 systems
If you want to kill a process on a remote Win32 system, then odds are that you'll want to handle killing things like services that refuse to shut down nicely. There is no Win32 API that lets you kill a service. There is a hack (pushed by Microsoft) of attaching to the process like you were a debugger and adding a thread to it that gets a memory access violation. It might be possible to even do that from Perl, but not remotely.
So first you need your "kill" program (you can get one from Microsoft if you are good at searching -- sorry, I don't have a link handy). Then you just copy your kill program to the remote system (I assume I don't have to explain how to do that). Then you can use Perl to tell the remote system to run your kill program.
Using "Win32 remote run" in Super Search I came up with Using WMI for create a remote Process on Win32 which should let you do that. Though I've never used it as we always installed RemoteCmd from the WinNT Resource Kit on the systems we had to maintain remotely. But we haven't bothered to install RemoteCmd at my new job and I'm getting tired of not having it so I'll probably be playing around with it soon enough. (:
- tye (but my friends call me "Tye")
|
|---|