WshNetwork.MapNetworkDrive

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
If you are mapping the share point using the credentials of someone other than current user, you can specify strUser and strPassword.
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"