Scripting Home > Code Snippets

Simple Network Drive Mapping Popular

Language: VBScript

Version: 1.0 (November 23, 2000)

Download: simplemap.vbs (Use "Save Target As..." with IE5.5)

This script show the functions needed to connect a network drive to a local drive letter.

Change the the value of "S:" to equal the required drive letter and "\\server\share" to equal the required network share point.

To copy the script either use the download link above or cut and paste the following code into a text document and name it simplemap.vbs

' Begin code for simplemap.vbs
' Downloaded from the Scripting Guide for Windows
' http://www.pctools.com/guides/scripting/
' Version: 1.0 (November 23, 2000)

Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")

WSHNetwork.MapNetworkDrive "S:", "\\server\share"

' End code

Disclaimer: This information is provided on an "as is" basis and all risk is with you. PC Tools Limited makes no warranties, express, implied or statutory, as to any matter whatsoever.