WshNetwork.MapNetworkDrive

[This is preliminary documentation and subject to change.]

The MapNetworkDrive method maps the share point specified by strRemoteName to the local resource name strLocalName.

Syntax

WshNetwork.MapNetworkDrive strLocalName, strRemoteName, [bUpdateProfile], [strUser], [strPassword]
 

Parameters

strLocalName
Local resource name to map to.
strRemoteName
Remote share to map.
bUpdateProfile
If bUpdateProfile is supplied and its value is TRUE, this mapping is stored in the user profile.
strUser, strPassword
If you are mapping the share point using the credentials of someone other than current user, you can specify strUser and strPassword.

Example

Set WshNetwork = Wscript.CreateObject("Wscript.Network")
WshNetwork.MapNetworkDrive "Z:", "\\Server\Share"

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.