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();

shijin3 reputationPosted Feb 1, 2016, 6:48 PM EST
Mahe13 reputationPosted Feb 1, 2016, 5:47 AM EST
Mahe13 reputationPosted Feb 1, 2016, 5:47 AM EST