Map Network Drive (API)
The Code Project - Map Network Drive (API) - C# Programming
"Introduction
This is a class for interfacing with windows map network drive API's.
Using the code
Add the class file "cNetworkDrives0010.cs" to your project / solution.
Add the "using" definition to your form, etc.
using aejw.Network;
Then declare and use the class.
//Example: Map Drive M
cNetworkDrive oNetwork = new cNetworkDrive();
oNetwork.MapNetworkDrive("\\Computer\Share1","M:");
oNetwork.MapNetworkDrive("\\Computer\Share2","N:","BobPass");
oNetwork.MapNetworkDrive("\\Computer\Share","O:","Bob","BobPass");
..."
I was looking for something like this the other day...
1 comment:
I'm having some problems when trying to use this code running as a service, because when you are logged in using the LocalSystem account you can't map.
Post a Comment