I have a .bat file to be executed.
Inside that .bat
file, at its end is that code
START _file_creator.bat %some_arg_name%
ENDLOCAL
EXIT
Try setting the working directory correctly or make sure that _file_creator.bat
is somewhere in the PATH
. See the documentation about the working directory in conjunction with UseShellExecute
:
The WorkingDirectory property behaves differently depending on the value of the UseShellExecute property. When UseShellExecute is true, the WorkingDirectory property specifies the location of the executable. If WorkingDirectory is an empty string, it is assumed that the current directory contains the executable.
When UseShellExecute is false, the WorkingDirectory property is not used to find the executable. Instead, it is used only by the process that is started and has meaning only within the context of the new process. When UseShellExecute is false, the FileName property must be a fully qualified path to the executable.