Renaming The Mapped Drive

Home Forums Scripting General Scripting Renaming The Mapped Drive

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    MetalSmith
    Member
    #127865

    Anyone have an idea how to rename the mapped drive in this script. My old script (not listed) was able to rename it but I needed to mask the password so I rewrote the script and founddownloaded this .DLL file that someone created that allows the password to be masked. It uses different code so my old code is not working with it.

    I found this .DLL at http://internet.cybermesa.com/~bstewart/passdlg/

    I want to name the Drive “AUM Common”

    Thanks!!

    Option Explicit
    Dim objPassDlg
    Dim WshNetwork
    Dim strMessage
    Set WshNetwork = WScript.CreateObject(“WScript.Network”)
    Set objPassDlg = CreateObject(“PassDlg.LogonDialog”)
    strMessage = MsgBox(“Will you need AUM’s Common Drive Today?”, 36, “Welcome To AWA DET”)
    If strMessage = 7 Then WScript.Quit
    objPassDlg.Confirm = True
    objPassDlg.ShowDialog “Connecting to AUM’s Common Drive”
    If objPassDlg.Canceled Then
    ‘Wscript.Echo “Cancelled”
    Else
    WshNetwork.MapNetworkDrive “K:”, “\xxx.xxx.xxx.xxxCommon”, False, objPassDlg.UserName, objPassDlg.Password
    End If

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.