I\'m trying to run a batch file on a server via an ASP.Net page, and it\'s driving my crazy. When I run the below code, nothing happnes - I can see from some log statements
Just call the batch file directly:
p.StartInfo.FileName = batchFileLocation;
Also, make sure the WorkingDirectory is set to the right location:
p.StartInfo.WorkingDirectory= Path.GetDirectoryName(batchFileLocation);
A little google on "Faulting application cmd.exe" points me to this IIS forum.
It seems that you cannot create a new process in the background under IIS, unless you use the CreateProcessWithLogon method. (I have not tested this).