TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shijin
NA
3
696
How to run a batch file from current directory?
Feb 1 2016 3:02 AM
I have written a code for adding a registry key on a batch file and executed in my project as follows.But i want to run it from current directory. Please help me to add current path and run the file from that.
System.Diagnostics.Process regadd = new System.Diagnostics.Process();
regadd.StartInfo.FileName = "C:\\Users\\win7\\Desktop\\Regkeyadd.bat";
regadd.StartInfo.RedirectStandardError = false;
regadd.StartInfo.RedirectStandardOutput = false;
regadd.StartInfo.UseShellExecute = true;
regadd.Start();
regadd.WaitForExit();
Reply
Answers (
3
)
Whatsapp Api
How to disable the MDIparent form when a child form is activ