but the problem is that that script reads an ini file and it cant find it when you run it like this. it probarly seaches for the ini in the dir of the program that tries to run the other program but i cant sett the ini there because this prog is meant to run more times the same prog with other ini settings

This will set the subdir called "dir" as the working directory of the "script2.exe" process. So, you can use IniRead() in the "script2" without specifying the full path to the ini file, and the script will look for it in the "dir" subdirectory.