Skip to: Site menu | Main content

Login

Name: 
Password:
Remember me?
Register

Mapping a Network Drive with VB Script

written by Mark Rowlinson - Last updated Oct 2004

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!