RunConsoleProcess could not launch the indicated process: The system cannot find the file specified.
There are many potential reasons why RunConsoleProcess might not be able to launch the process requested.
The most common is reason is the one shown -- that it can't find the file that you've specified, either because you made a typo in its name, or because it isn't in the directory that it is looking in. RunConsoleProcess looks for the process file in the CurrentDataFolder. If you tried specifying the directory using the «curDir» parameter to RunConsoleProcess, remember that «curDir» is not the directory of the program, but rather the directory that the program itself will see as the current directory (such as a data file directory).
Other reasons the process might not be launched include (the reason should be mentioned further in the error message)
- The operating system cannot map the file type to the program that would be used to open it. For example, if you were to specify
SomeProgram.abc, it might find the file, but Windows might not know what program to use to open a program of type
- There may be permission access restrictions in place preventing you from launching the file.
- If the file is on a remote file system, there could be network errors when trying to access the file.
This list is nowhere near complete. If you encounter a particular problem, and then identify the cause, please use Edit to add your experience to this page. If you encountered it, someone else eventually will also (maybe it will be you again in the future!), and others can benefit from what you've already figured out.