Class not registered???

Alex Martelli aleax at aleax.it
Sat Jan 19 04:25:46 EST 2002


maximilianscherr wrote:

> i'm doing this and getting this error
> 
> import win32com.client
>>>> shell = win32com.client.Dispatch("WScript.Shell")
        ...
>     IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
> pythoncom.IID_IDispatch)
> com_error: (-2147221164, 'Klasse nicht registriert', None, None)
> ____________________________^
> ____________________________| "Class not registered"
> 
> also happens with activepython 2.2.0 alpha

So, is WSH (the Windows Scripting Host, containing WScript etc)
in fact registered on the machine on which you're trying that?

You can check by editing the Windows registry e.g. with regedit or
regedt32.  HKEY_CLASSES_ROOT, does it have an entry whose
key is WScript.Shell?  If so does it point to a GUID which is in turn
undes CLSID?  These are all Windows and COM problems, of
course, not Python ones.

If WSH is not registered, uninstall it, find and download the latest
release from the Microsoft site, install it again: it should register.


Alex




More information about the Python-list mailing list