Logon Script : Map Network Drive

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
' MapNetworkDrive.vbs
' VBScript to map a network drive to a UNC Path.
' Author Guy Thomas http://computerperformance.co.uk/
' Version 2.3 - September 2005
' -----------------------------------------------------------------'
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "P:"
strRemotePath = "\\server2\public_data"
 
' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method.  Result J: drive
Set objNetwork = CreateObject("WScript.Network")
 
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
WScript.Quit
 
' End of Example VBScript.

Written by Komkid on January 27th, 2010 with no comments.
Read more articles on Admin and Networking and Programming.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:

You have to be identified to write a comment.