views:

28

answers:

1

I have python as an embedded scripting environment in my application. I supply the python bits (python26.dll, DLLs & Lib folders) with 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.

A: 

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

Wai Yip Tung
No. My application is not python scripts but an exe (gui application)
sambha
I don't think this should be an issue. Maybe you need add stub as an entry point to py2exe. It just finds all the script and binary dependency and put them together so that you that can distribute it.
Wai Yip Tung