This shows you how to map a network drive using VBS.
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath, strUser, strPassword, strProfile
' Values of variables set
strDriveLetter = "X:"
strRemotePath = "\\server\share"
strUser = "guest"
strPassword = "nopass"
strProfile = "false" 'set this to TRUE if you want to update the user profile
' This section creates a network object. (objNetwork)
Set objNetwork = WScript.CreateObject("WScript.Network")
' ... and executes the MapNetworkDrive command.
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, strProfile, strUser, strPassword
WScript.Quit