Link to home
Start Free TrialLog in
Avatar of pointeman
pointemanFlag for United States of America

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...
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dj_alik
dj_alik

@dj_alik

Maybe I'm not reading the post correctly. Isn't WNetAddConnection2 what I suggested?
Avatar of pointeman

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.
I'm currently trying these suggestions. There is also a WNetAddConnection3.
thx