How to launch a .bat file in a C# windows Service project
- by freedark
I create a C# Windows servive project, then I want to run a .bat file, but I find that it does not run
Process pInfo = new Process();
pInfo.StartInfo.UseShellExecute=false;
pInfo.StartInfo.CreateNoWindow=true;
pInfo.StartInfo.FileName =bat file name ;
pInfo.StartInfo.RedirectStandardOutput = true;
pInfo.Start();
Could anyone help me ?