First of all, you need to check batch file path and access this path properly in your application.
You should never assume it is in your working directory, even if you put your file in your executable directory. The working directory totally depends on where your start your executable.
Let's assume you put your file in your executable directory. More exactly, this is the directory of the "main module of entry assembly". This is how to find out its path:
exePath = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetEntryAssembly().Location);
By the way, Griff is right on exceptions: you should not block exception propagation like you do!
See this:
How do i make a loop that will stop when a scrollbar reaches the bottom[
^]
When i run an application an exception is caught how to handle this?[
^]
This is also important if you ask a CodeProject Question.
—SA