Microsoft® Windows® Script Host MapNetworkDrive Method |
WSH Reference Version 1 |
Maps the share point specified by strRemoteName to the local resource name strLocalName.
object.MapNetworkDrive strLocalName, strRemoteName, [bUpdateProfile], [strUser], [strPassword]
Part Description object WshNetwork object. strLocalName Local resource name. strRemoteName Remote share to map. bUpdateProfile Optional. If bUpdateProfile is supplied and its value is TRUE, the mapping is stored in the user profile. The default is FALSE. strUser, strPassword Optional. If you are mapping the share point using the credentials of someone other than current user, you can specify strUser and strPassword.
The following example shows how to map the "Z" drive to a network share:Set WshNetwork = WScript.CreateObject("WScript.Network") WshNetwork.MapNetworkDrive "Z:", "\\Server\Share"