Sign in to follow this  
Followers 0

VB Scripting Question?

3 posts in this topic

I am trying to create a VB script that will help map network drives. I can get single drive mappings to map no problems but when I try to do this for multiple drive mappings it errors out on me? also try to make it where if there is an existing drive drive letter assigned to ignore and continue on with the mappings? Listed below is the script that I have been working with - Thanks in advance for looking at this...

Dim objNetwork

Dim strDriveLetter, strRemotePath

strDriveLetter = "F:"

strRemotePath = "\\Network share drive\"

' 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


' End of Example VBScript.

msgbox "Done, click OK"

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.