开发者

pywin32 captive installation (avoid py*.dll getting installed in system32 directory)

开发者 https://www.devze.com 2023-01-17 21:25 出处:网络
I have python as an embedded scripting environment in my application. I supply the python bits (python26.dll, DLLs & Lib folders) with 开发者_StackOverflow中文版my application. All this to avoid a

I have python as an embedded scripting environment in my application. I supply the python bits (python26.dll, DLLs & Lib folders) with 开发者_StackOverflow中文版my application. All this to avoid asking users to install python (you know how it goes in big corporations).

All works nice except pywin32. It installs pythoncom26.dll and pywintypes26.dll to the system32 directory. I want to keep these dlls in my Python directory. One option is to add my Python directory to the PATH env variable. But would like to avoid it for obvious reasons (windows DLL search path priorities issues).

Is there a way to tell Windows (a windows API is also fine) to look at my directories to load these pywin32 dlls? From what I understand these dlls get called by Windows COM.

Thanks.

Edit1: Note that python is deployed embedded with my application.


I previously used py2exe to freeze the application and all the DLLs. Then use Innosetup to create an installer. Work like a charm.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号