Map network drive in C#
4 January, 2018
0 Comments
1 category
// Create network drive mapping System.Diagnostics.Process.Start(“net.exe”, @”use K: “”\\my.server.com\Websites\Mail“” /user:MyDomain\admin MySuperSecretPassword”).WaitForExit(); // Remove network drive mapping System.Diagnostics.Process.Start(“net.exe”, @”use K: /delete”).WaitForExit();