[python-win32] Handle pywin32 installation after a custom pywin32 installation

Nikhil L niks9731 at gmail.com
Wed Apr 6 19:57:52 EDT 2016


Hello All,

I am working on creating an installer which installs pywin32 silently on
the target VM. I am able to achieve that with Mark's suggestion at
https://sourceforge.net/p/pywin32/feature-requests/86/.

My concern though is that the user of the target VM should be able to
install the original pywin32 installer (by original I mean the one wherein
he/she can go through the UI to install pywin32) if he/she chooses since I
can't really place any restriction on the user. So, if the user does
install pywin32 after my custom pywin32 the installation is successful but
when the user uninstalls the pywin32, it deletes all the files and folders
that my custompywin32 uses. To workaround that, I installed the custom
pywin32 at a different location (didn't copy the supporting files to
site-packages but to other location) and modified my scripts to use the
custom location. I also had to manually copy the pywintypes27.dll and place
it under win32 directory under my custom location to make it work. But
after doing this, when I install pywin32, the installation completes but at
the final page it says below things:

"Close failed in file object destructor
Error in sys.excepthook

Original exception was:"

Any tips on how to avoid this or any suggestions as to what I might be
doing wrong? Let me know if you need more clarification on the question or
on the description of my question.

Thanks,
Nikhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20160407/a8678f08/attachment.html>


More information about the python-win32 mailing list