I need to start the external program c:\pro\prog1.exe
from my project. The external program has its configuration file in the same directory c:\pro\prog1.ini
. I do:
ShellExecute(NULL,L"open",L"c:\pro\prog1.exe" ,NULL,NULL,SW_SHOWDEFAULT);
Program c:\pro\prog1.exe
starts, but it does not load its configuration file c:\pro\prog1.ini
. It looks like I need to place the .ini
file in the same directory where my host application is run from. This is not acceptable. So, how to start an external program and ask Windows to run it from its directory?