tags:

views:

11

answers:

1

Hi,I want to call third party software in .net application (C#) the code is as follows:

Process proc = new Process();
proc.EnableRaisingEvents = false;
\\name of the file
proc.StartInfo.FileName = "filename";
\\Path where the file is located 
proc.StartInfo.Arguments = "filepath";

proc.Start();

but its throwing an exception Win32 system unhandled exception

Please help

A: 

You should really post the actual error message as well as the actual paths to make it easier, but it seems like you might be using the wrong arguments. Rather that setting the filepath as the arguments you should be passing it before the filename so the following might work:

Process proc = new Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = System.IO.Path.Combine("filepath", "filename");
proc.Start();

You can find more information, including a sample, at the MSDN page for Process.Start here.

ho1
Thanks alot...:) it worked