Getting the process list on win98

Thomas Heller theller at python.net
Mon Mar 14 16:16:12 EST 2005


Ron <radam2 at tampabay.rr.com> writes:

> I've written a screen saver which opens multiple copies on windows
> 98. I'm trying to check the process list to determine if it is already
> running.
>
> So far all the example win32 routines I've found, through google, only
> work on newer xp and nt versions of windows. This is the current
> attempt to get the process list on windows 98:
[...]
> Results in this error on windows 98, works fine on windows xp:
>
> Traceback (most recent call last):
>    File "Aztec.pyw", line 255, in ?
>    File "Aztec.pyw", line 38, in IsRunning
>    File "Aztec.pyw", line 29, in GetProcessNameList
>    File "win32com\client\__init__.pyc", line 73, in GetObject
>    File "win32com\client\__init__.pyc", line 88, in Moniker
> pywintypes.com_error: (-2147221014, 'Moniker cannot open file', None, None)
>
> The program is in python v2.3 and packaged using pyexe, and inno setup.

It seems WMI is not installed per default in Win 95/98 and NT:
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/system_requirements.asp

If pywin32 also doesn't support win98, you could build shallow wrappers
with ctypes maybe ;-)

Thomas



More information about the Python-list mailing list