How do you map network drives?

G

Guest

I have a Visual Basic .Net application that needs to disconnect and connect a network drive, how can I do this?
 
A

Arran Pearce

I dont believe there is anything in System.DirectoryServices. But yes
you can use P/Invoke to call a Win32 API.

Another solution is to use System.Diagnostics.Process to run the net use
command. (e.g. "NET USE z: \\server\share")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top