launching a program using config file

May 27, 2010 at 10:08 PM

Hi all,

I need to run tests for this one program that needs a config file to run. To do so, i need the command --config filename.config. Unfortunatly, the application.launch command doesn't seem to like that despite it working like the windows run box in every other situation. Is there a way to get around that?

May 28, 2010 at 9:06 AM


have you tried Application.Attach (start teh application using Process class) or

Application .AttachAndLaunch





Jun 1, 2010 at 8:47 PM
Edited Jun 1, 2010 at 8:50 PM

Hmm, unfortunatly it still does the same thing. Both the process and the application start/launch commands will work when i just put the file path (get an error cause the program can't run without the config file) but when i put the --config filename.config it doesn't work. Am i useing the wrong command to add the config file in this case? It works through the windows run box.

Oh and sorry if it isn't clear.. the full commands i tried are

Application application = Application.Launch("<path> --config filename.config")

Process.Start("<path> --config filename.config")

Jun 2, 2010 at 11:34 AM


have you try this way?


Process myProcess = new Process();

myProcess.StartInfo.Arguments = "config path" (the correct argument as used in cmd)
myProcess.StartInfo.FileName = "path to the application"; myProcess.Start();

Application application = Application.Attach(myProcess);

Jun 3, 2010 at 8:19 PM

That got me closer... the application actually launches now but it crashes before it even gets to start up, even though it works through the windows run. I guess it opens a little different than the run command?

Jun 3, 2010 at 8:58 PM
Edited Jun 3, 2010 at 8:58 PM

Interesting, one of my co-workers had me create a .bat file with the program link in it and just use white to launch that and it worked, so i guess i can use that for now. Thanks for the help Throndorin!