Map and Disconnect a Network Drive using .NET?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Back
Top