X-Platform method of remote execution of Windows programs

Tim Golden tim.golden at viacom-outdoor.co.uk
Tue Aug 23 03:30:45 EDT 2005


[utabintarbo at gmail.com]

| Well, I can do this using WMI thru VBScript for Windows-Windows
| connections. What I would like is a method using python for both
| Windows-Windows and Linux-Windows connections. I've looked at pyWMI
| (http://tgolden.sc.sabren.com/python/wmi.html), and found it 
| unclear in it's dealings with remote boxes. A look at win32com netted me 
| a load of "Access Denied" errors.

Well, assuming I understand the question, the wmi module won't help you
if you're running on Linux, as it's just a thin wrapper around the pywin32 
extensions which will only work on Windows. I remember hearing tell of
a WBEM-on-Linux recently which might, I suppose, get you so far, but WMI
uses the DCOM infrastructure to communicate cross-machine, so you'd have
to factor that in somehow, too.

That said, I'd like to know in what way the wmi is unclear about its 
dealing with remote boxes (if only to improve my documentation). 
Basically, rather than doing:

import wmi
c = wmi.WMI ()

you do:

import wmi
c = wmi.WMI ("name_of_other_box")

and then carry on as before. I admit there are issues of security and
so on, especially -- I gather -- on XP, where they've actually applied
some of the security contexts that the WMI documentation talks about.
But that's to do with WMI itself, and not to do with Python, afaict.

Tim Golden

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list