I'm trying to start a new Process by using Process.Start() which works great when I pass in
Process.Start("C:\\Documents and Settings\\Upload.exe")
but is it possible to perform that same operation when I move Upload.exe into a shared folder under My Network Places? I tried
Process.Start("\\Shared Folder\\Upload.exe");
but I get a Win32Exception. Thanks for any information or suggestions in advance.
You should use UNC path for accessing a network resource. (Your file becomes a network resource when you place it in a shared path)
UNC path takes the following form.
\\ServerName\SharedPath\YourFile.exe
or
\\ServerName\D$\SharedPath\YourFile.exe
where D$ is the drive letter.
In your case you may have to use the following
Process.Start(@"\\Server-Name\Shared Folder\Upload.exe");
Use @ symbol in front of the string because your \\ will be treated as \, as an escape character.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With