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

Mark Hammond skippy.hammond at gmail.com
Sun Jan 31 23:42:58 EST 2016


On 17/01/2016 6:51 AM, Malte Forkel wrote:
> 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.

That sounds a little strange - the script should only be executed after 
python27.dll is loaded, which itself relies on msvcr90.dll.

Does it happen to work if you put the installer executable in the same 
directory as python27.dll?

Mark

>
> 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
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>



More information about the python-win32 mailing list