Mapping a Network Drive with VB Script
The following piece of VB script shows you how to map a network drive through code.
'create the wscript.network Object Set wsNet=CreateObject("WScript.Network") 'map the drive letter To the required neywork path wsNet.MapNetworkDrive "P:","\servershared"That's all there is to it!