vbs script map drives

This is a basic vbscript that maps 2 network drives

on error resume next

Set WshNetwork = WScript.CreateObject("WScript.Network")

DriveMapper "z:", "\\vsrpmain\BusApps"
DriveMapper "o:", "\\vsrpmain\common"


Sub DriveMapper(Drive, Share)
WshNetwork.MapNetworkDrive Drive, Share
End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.