1

I have a remote drive mapped to my local Z:\ drive.

When running using this:

System.Diagnostics.Process.Start("Z:\\Test.bat");

It opens a prompt as to whether or not to open the file. How do I disable this setting in windows or get around it using c#?

b15
  • 2,101
  • 3
  • 28
  • 46
  • 1
    One possible reason is a Windows security setting which prevents execution of batch files with a directory on a network drive as current working directory. The solution is to set a local directory as working directory before starting the batch file as explained at [.NET Process.Start default directory?](http://stackoverflow.com/q/114928/3074564) – Mofi Aug 18 '14 at 16:48
  • 1
    And a second possible reason is that the server with the public share mapped as drive Z: does not belong to the trusted sites of local intranet. See on Super User [How to get rid of “the publisher cannot be verified” on network files?](http://superuser.com/a/381592) – Mofi Aug 18 '14 at 16:55

0 Answers0