Map and Disconnect a Network Drive using .NET?

G

Guest

Dear all,

I need to map a network drive at run-time then disconnect it after use. The
only way I know and I am using is creating a Process to call the shell
command 'net use'. It has no problem in connecting, but however, I failed to
remove the connection after use by calling the 'net use /delete' when the
user is opening a explorer and connected to the drive.

Can anyone tell me how to FORCE to disconnect a network drive? Or tell me a
better way to connect network drive rather than using 'net use'?

Thanks for any help.

Tedmond
 

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