Click here to Skip to main content
16,004,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What this do exactly...
ProcessInfo = new ProcessStartInfo("cmd.exe", "/C "......);
According to me it opens command prompt & then...
im not confermed what "/C" means...??
Can any one tell me How to write a series of commands executing one by one on command prompt through ASP.NET with C# ...
Posted

From the help for cmd.exe the /C switch "Carries out the command specified by string and then terminates", so what ever command you pass to cmd.exe when you start it, it will run, then cmd.exe will terminate.
 
Share this answer
 
amitthakkar1987 wrote:
Can any one tell me How to write a series of commands executing one by one on command prompt through ASP.NET with C# ...


Of course, bear in mind that any commands you execute in this fashion in ASP.NET will execute on the SERVER, not on the client's machine.
 
Share this answer
 
If I want to execute following commands on cmd.exe through asp.net C#
> c:
> cd\
> cd "Program Files"

How can i get this thr asp.net C#??????
 
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