Description
Removes a shared network drive to your computer system.
PowerBASIC Syntax
METHOD RemoveNetworkDrive ( _
BYVAL bstrName AS STRING, _
OPTIONAL BYREF vForce AS VARIANT, _
OPTIONAL BYREF vUpdateProfile AS VARIANT, _
)
|
Arguments
bstrName
|
BSTR. The name by which the mapped drive will be known locally.
|
vForce
|
Optional. VARIANT. Boolean value indicating whether to force the removal of the mapped drive. If vForce is supplied and its value is true, this method removes the connections whether the resource is used or not.
|
vUpdateProfile
|
Optional. VARIANT. Boolean value indicating whether the mapping information is stored in the current user's profile. If vUpdateProfile is supplied and has a value of true, the mapping is stored in the user profile (the default is false).
|
Remarks
An attempt to map a non-shared network drive results in an error.
Example [PowerBASIC]
#INCLUDE
"WSHOM.INC"
DIM pWshNetwork AS IWshNetwork
DIM bstrLocalName AS STRING
DIM bstrRemoteName AS STRING
pWshNetwork
= NEWCOM "WScript.Network"
bstrLocalName
= UCODE$("LPT1")
bstrRemoteName
= UCODE$("\\Server\Print1")
pWshNetwork.RemoveNetworkDrive
UCODE$("E:")
|