Problems with Process.Start()

J

Jason via .NET 247

I'm trying to start a non-microsoft app, I've had much successusing Process and SendKeys with Microsoft apps, IE, notepad,etc. but this new app gives me the error "The parameter isincorrect". I'm not sure what the problem is, I've doublechecked the path and other things.

Process myProcess = new Process();
myProcess.StartInfo.FileName =@"C:\\FORMFLOW\\DFFILL.EXE";
myProcess.StartInfo.Arguments =@"C:\\FORMFLOW\\FAP\\AMEDD.FAL";
//myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.Verb = "Open";
myProcess.Start();

Thanks
 
H

Herfried K. Wagner [MVP]

I'm trying to start a non-microsoft app, I've had much success using Process
and SendKeys with Microsoft apps, IE, notepad, etc. but this new app gives
me the error "The parameter is incorrect". I'm not sure what the problem
is, I've double checked the path and other things.

Process myProcess = new Process();
myProcess.StartInfo.FileName = @"C:\\FORMFLOW\\DFFILL.EXE";
myProcess.StartInfo.Arguments = @"C:\\FORMFLOW\\FAP\\AMEDD.FAL";
//myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.Verb = "Open";
myProcess.Start();
<<<

Maybe the application doesn't accept a filename as argument...

Notice that this is a VB.NET group...
 
H

Herfried K. Wagner [MVP]

Addendum:
myProcess.StartInfo.FileName = @"C:\\FORMFLOW\\DFFILL.EXE";

I forgot to say that "\\" is not needed when using verbatim string literals
('@'). Simply use a single backslash inside the string literal
('@"C:\FORMFLOW\FFFILL.EXE"').
 

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