command line of a process.exe on another host
mail at timgolden.me.uk
Fri Jun 12 03:24:26 EDT 2009
> HI ,
> I have number of process run on different windows servers which run's
> with different command line parameters. for example "process.exe
> -input<ddd> statusurl: http://sss.com "., These parameters can vary from
> host to host. using Psexec I know the PID and process name which are
> running on these machines, but how I can read the command line
> parameters of these process. Is there a way to read these command line
> of the proess via python pls?
WMI can get this for you. This example uses my WMI module
but it's not hard to do it with "raw" Python / Windows.
c = wmi.WMI ("other_machine")
for p in c.Win32_Process (name="process.exe"):
More information about the Python-list