COM problem .py versus .exe
tim.golden at viacom-outdoor.co.uk
Wed Jun 29 13:29:51 CEST 2005
| The two machines are both running Windows XP, the desktop is
| running XP Pro, the "virgin" PC is running XP embedded.
Well my first thought was: maybe XP Embedded has cut out
WMI. A quick Google around suggests that it's still there,
but maybe there's some restrictions in what you can give
it as a moniker. My module puts sensible defaults in,
rather than using the most minimalistic moniker. You
can pass a ready-made moniker in:
wmi._DEBUG = 1
moniker = "winmgmts:"
c = wmi.WMI (moniker=moniker)
for i in c.Win32_Printer (): print i.Caption
You might try that to see if it gets round things.
| I didn't have this problem on the
| first release
| as we weren't interested in displaying the file version of the .dll.
| With this improved version of the product the request has come down to
| have all software package versions displayed, so that is why I am now
| attempting to extract the file version of the dll. Thanks again for
| everyone's assistance.................
There was some talk a while back about including the win32
calls to get file versions into the pywin32 packages. Might
be worth checking to see if it's happened. Or using ctypes,
of course. If WMI is this much trouble, and only for this one
piece of info, definitely worth looking elsewhere.
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:
More information about the Python-list