I have a python executable called python.exe and and a launcher python-launcher.exe that preliminary sets environment variables before launching python.exe. If I run: python-launcher.exe -c "import sys; print(sys.executable)" I get python.exe printed. But the problem is that I need it to be python-launcher.exe. I thought maybe I could write a script that modifies executable import sys; sys.executable="python-launcher.exe" and that is called everytime python is launched? P.S. I cannot modify or recompile python-launcher.exe but I have an opportunity to set environment variables in .ini config file. Continue reading...