Exe doesn't run correctly when executed with QProcess::start
-
What does it output ?
-
The outpus is as follows:
Board Name: CSE161G4 (The boardname is acquired by one of the functions defined in the include folder)
Cannot find Stream2Disk.ini - using default parameters. (The .ini file is searched by the configuration function inside CsAppSupport.h, the next 3 lines are connected to the .ini file)
No ini entry for Stm configuration. Using defaults.
Selecting Expert Stream from image 1.Failed to create the directory
-
Sorry about that, that was a mistake typing it out, there's no space in the code. I'll edit that now
-
It is there, there is no issue with the .ini file when executing the .exe not from the gui.
-
Don't think that is a problem since the path is specified correctly in the program variable.
-
Just for giggles, create a dos batch file with your command in it and try to execute the batch file as a QProcess. Try both explicitly using the path to the executable, and by inserting the chdir to where the exe lives.
Something is not being set right in your process environment. you may be able to work-around by making sure needed environment variables are set in a batch file.
Are all DLL search directories in the PATH? IIRC, windoze searches the PATH for DLLs.
-
Don't think that is a problem since the path is specified correctly in the program variable.
@incantation I would try to set working directory of the process to that where the ini file is located.
-
@Kent-Dorfman Thanks for the suggestion, but would this approach work if I need to read from and write to the process?
All the .dll dependencies are in C:\windows\system32 and I checked both the path variable and the environment of the process and it's present in both