pointeman
asked on
Map Network Drive Coding Options?
Q. Which is the most reliable way to map a network drive on either local or remote drive?
I generally use the Process class and run the Net Use command. I think this can also be accomplished within c# using Netsh or Powershell, etc...
I generally use the Process class and run the Net Use command. I think this can also be accomplished within c# using Netsh or Powershell, etc...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How to Map a Drive using C#?
@dj_alik
Maybe I'm not reading the post correctly. Isn't WNetAddConnection2 what I suggested?
Maybe I'm not reading the post correctly. Isn't WNetAddConnection2 what I suggested?
ASKER
I can manually Map the network drive share using the built-in Windows 7 'Add network share' window. This is what I'm looking to do, except programmatically.
Maybe I don't understand what you are asking then. From what you described, that is exactly what WNetAddConnection2 is for.
ASKER
I'm currently trying these suggestions. There is also a WNetAddConnection3.
ASKER
thx