Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Properties
Method: WshNetwork.RemoveNetworkDrive
WshNetwork.
RemoveNetworkDrive
strName, [,bForce] [,bUpdateProfile]
The
RemoveNetworkDrive
method removes a previously mapped network share point identified as
strName
. If the optional parameter
bForce
is set to True (default is False), then this method will remove the connection, even if the resource is currently being used. If the optional parameter
bUpdateProfile
is set to True (default is False), the mapping will be removed from the current user's profile.
The following VBScript code maps the remote share point \\Server\PublicFiles to the local drive letter Z:, and then removes the mapped drive.
Code:
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "Z:", "\\Server\PublicFiles"
WshNetwork.RemoveNetworkDrive "Z:"
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information