Need help passing multiple arguments to an external executable.

H

H.B

This is a very simple question, but cant figure out a way to do it. I want
to know how to pass multiple parameters as arguments to an external process.
I want to call an exe with following arguments :- MyApp.exe "C:\Some
Directory\File.txt" /A /T . But the Process.Start or the
StartInfo.Argumnets only let you give one string as an argument. Therefore
it is not possible to pass a set of arguments like I want (one argument
having double quotes). When I pass the above in one string the argument is
given as "C:\Some Directory\File.txt /A /T" to the application which is
wrong (the application take it as a one parameter and tries to treat is as a
file). How can I do it ? Any help greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top