Win32Exception the parameter is incorrect

Mukesh Gupta picture Mukesh Gupta · Feb 8, 2011 · Viewed 13.3k times · Source

exe file using Process.Start() but it throws the "Win32Exception the parameter is incorrect".

Process p = new Process();
Process.Start("C:\Program Files\APS2PP\keyl2000.exe");

I can run this file through command prompt successfully.

Answer

Hans Passant picture Hans Passant · Feb 8, 2011
 Process.Start("C:\Program Files\APS2PP\keyl2000.exe")

Somebody edited your question, fixing your mistake by accident. Use double backslashes or put a @ in front of the string.

 Process.Start(@"C:\Program Files\APS2PP\keyl2000.exe");