Click here to Skip to main content
15,887,832 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Purpose Of this code:
I want to run emgscan.exe <drive name="" which="" we="" want="" to="" scan=""> from command prompt in my windows application.
Suppose i want to scan d drive and location of emgscan.exe is C:\Document then we scan the D drive using the following syntex.

C:\Document>emgscan.exe D:\

Above command successfully run on command prompt, but error when we use in windows application. code of this application is following.

System.Diagnostics.Process.Start("cd//");
System.Diagnostics.Process.Start("cd Document");
System.Diagnostics.Process.Start("emgscan.exe " + sorce.FullName);



error is specified path is not found................
Posted

1 solution

Try the following;
System.Diagnostics.Process.Start("C:\\Document\\emgscan.exe", sorce.FullName);


Also read this msdn article on Process.Start(string, string)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900