Remove a shared network drive mapping.

Syntax 
      WshNetwork.RemoveNetworkDrive(strName, [bForce], [bUpdateProfile])

options:

   strName : The mapped drive you want to remove.

   bForce  : Force the removal of the mapped drive (TRUE/FALSE).

   bUpdateProfile : Remove the mapping from the user's profile (TRUE/FALSE).

Example

   Dim WshNetwork
   Set WshNetwork = CreateObject("WScript.Network")
   WshNetwork.MapNetworkDrive "I:", "\\print_server\hp_01","True","jdoe","jdoepassword"
   WshNetwork.RemoveNetworkDrive "I:"
Advertisements