Tuesday, August 14, 2012

c# + System.Diagnostics.Process.Star + Access denied

I am getting the "Access denied" error while executing my exe which is internally executing one batch file.

Its working fine in my dev server, but receiving the above error in Prod server.

After searching a while found this atricle @ http://blogsandip.wordpress.com/2011/08/06/resolved-access-denied-error-on-system-diagnostics-process-start/


thanks to author


The trick is 


p.StartInfo.UseShellExecute = false;
p.Start();
p.WaitForExit();

No comments:

Post a Comment