I am running a C# console application in through my C# code using the Process.Start()
method. The console application takes a file name as argument. The file path is user given though my application and may contain spaces.
I am doing it this way:
string arguments = "\"" + inputListFilePath + "\"";
Process.Start(executableFilePath, arguments);
What I have observed is the argument being passed to the executable is \"inputListFilePath\"
because of which the EXE file is not running because of an incorrect parameter.
I have tried using @""""
instead of "\""
. But the string gets converted to \"
when I use this.
What wrong can I possibly be doing here?
BTW, the EXE file is running fine manually.