MapNetworkDrive with Message box
" MapNetworkDrive.vbs
" VB to map a network drive. And provide a message box
" Author Guy Thomas http://computerperformance.co.uk/
" Version 3.2 - September 2005
" -----------------------------------------------------------------"
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "K:"
strRemotePath = "\\alan\home"
" Purpose of the to create a network . (objNetwork)
" Then to apply the MapNetworkDrive method. Result K: drive
Set objNetwork = Create("W.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
" Extra code just to add a message box
W.Echo " Launch Explorer, check: "& strDriveLetter
W.Quit
" End of MapNetworkDrive Example Logon .