Answer the question
In order to leave comments, you need to log in
Why doesn't Process.Start in c# want to eat a command line parameter?
There is an exe launched from c#. She has a set of options.
Command line options like -z are eaten, but if you add after the "-z" option " -dg 2 " crashes with an invalid character error. Everything is separated by spaces. Parameters do not merge.
var process = new Process {
StartInfo = new ProcessStartInfo {
FileName = ".\\work.exe",
Arguments = @"-z " + beta ,
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = false
}
};
process.Start();
Answer the question
In order to leave comments, you need to log in
Try to pass the arguments along with FileName
I didn’t accept it either, in my opinion I solved the problem by passing them with the address, but I don’t remember exactly
stackoverflow.com/questions/15061854/how-to-pass-m...
Does the program itself interpret the arguments correctly?
And yes, it would not hurt to give the error code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question