[python-win32] Problem registering COM server at installation time

Malte Forkel malte.forkel at berlin.de
Sat Jan 16 14:51:50 EST 2016


Hi,

I'm trying the register a COM server using the install script of a built
distribution, created with the  bdist_wininst format of distutils. But
the script fails with a message that MSVCR90.dll can't be found.
Registering the server after the installer is done works fine. I'm using
Python 2.7.11 and pywin32-220 on Windows 7.1 64 bit.

>From what I see in Process Monitor, I think that the search for
MSVCR90.dll starts in the installer's directory, moves up the directory
tree and than uses the system search path. Using Dependeny Walter
(depends), I found that ''pythoncom27.dll'' and ''pywintypes27.dll''
can't locate msvcr90.dll, while pythoncomloader27.dll finds it (i.e.,
one of them).

I tried an to import pythoncom first, hoping for some DLL magic, but
that fails as well:

  Traceback (most recent call last):
    File "<string>", line 16, in <module>
    File "C:\Program Files\Python27\lib\site-packages\pythoncom.py", line 2, in <module>
      import pywintypes
    File "C:\Program Files\Python27\lib\site-packages\win32\lib\pywintypes.py", line 124, in <module>
      __import_pywin32_system_module__("pywintypes", globals())
    File "C:\Program Files\Python27\lib\site-packages\win32\lib\pywintypes.py", line 98, in __import_pywin32_system_module__
      raise ImportError("No system module '%s' (%s)" % (modname, filename))
  ImportError: No system module 'pywintypes' (pywintypes27.dll)

I'm not a Windows guy, so I'm running out of ideas what to do. Any advice?

Thanks in advance,
Malte


More information about the python-win32 mailing list