Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
How to pass an argument to cmd.exe ?
Dinesh Santhalingam
Jan 31 2017 4:48 AM
261
Reply
static void Main(string[] args)
{
Process
p
=
new
Process();
ProcessStartInfo
startInfo
=
new
ProcessStartInfo();
startInfo.FileName
=@"C:\systemprocess\cmd.exe";
//I want to pass an argument to my cmd.exe
p.StartInfo
=
startInfo
;
p.Start();
}
This will open the cmd.exe . But I want to Send something
programmatic
.
Actually When I open Cmd I will give
1) d:
2) cd folder1
3) Force it 10.10.26.0 -a
I will type this in exe.Now I want to this in Programmatic.How to do this?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
iTextSharp convert to Unicode PDF Not Working
How to Generate/Print Multiple StudentID from Datagridview ?