[python-win32] kill process on a remote server

Jürgen Kareta python at kareta.de
Mon Dec 19 11:44:51 CET 2005


Hi list,

I need some suggestions on how I best kill a process on a remote server. 
It is a NT4 Terminalserver.

Until now I have a working script which use the windows commands: 
'qprocess'  and 'kill' over popen to terminate the process.
This works fine for me as an administrator but I like to give this 
possibility to normal users (ok, I know thats a security issue, but it 
is restricted to only a few applications). Therefore I have to give this 
user the right permissions. What I want to know is, which way I should 
go on:

1) I can try to set the acl permissions for the processes using popen + 
setacl (setacl = commandtool found on sourceforge)

2) try to solve it with the win32 extension in python. I looked  also at 
the wmi stuff, but unfortunately wmi is not installed on that machine 
and I won't install it as long as I have other possibilities.
With win32process.EnumProcesse I can get all Process Ids, can I get them 
also from a remote machine ?
And if yes, can I use win32process.TerminateProcess or 
win32process.ExitProcesses to  terminate the process on the remote 
machine and if yes, how can I get rid of the permission restrictions.

Any hints are higly appreciated.

Regards,
Jürgen



More information about the Python-win32 mailing list