Starting a process with multiple arguments

C

CroDude

Hi all!

Please help me with this, I'm stuck here.
I have a command line .exe file which needs a few arguments passed to do
it's job.

In help there's a example like this:

Process.Start("notepad.exe", "something.txt");

This is ok, but what if I must supply .exe with multiple arguments.
Something like this:

PTStitcher -o outputpano script.txt imagein

Real example:
PTStitcher.exe -o c:\path\pic.tif script.txt c:\path\pic01.jpg

How to pass this four arguments to PTSctitcher.exe ?

Thanks in advance!
 
J

Joe Mayo

Hi CroDude,

Create an instance of Process and set it's StartInfo property, something
like this:

Process ptStitcher = new Process();

ptStitcher.StartInfo.FileName = "PTStitcher.exe";
ptStitcher.StartInfo.Arguments = "-o c:\path\pic.tif script.txt
c:\path\pic01.jpg";

ptStitcher.Start();

Joe
 
C

CroDude

Thanks Joe! That helped!


Joe Mayo said:
Hi CroDude,

Create an instance of Process and set it's StartInfo property, something
like this:

Process ptStitcher = new Process();

ptStitcher.StartInfo.FileName = "PTStitcher.exe";
ptStitcher.StartInfo.Arguments = "-o c:\path\pic.tif script.txt
c:\path\pic01.jpg";

ptStitcher.Start();

Joe
 

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