CRLF=CHR(13)+CHR(10) '**********Ask user for permission********** msgBoxText = "This script will map drives H: and I: to your computer." + CRLF + _ "These connections are not persistent across reboots." + CRLF + _ "Click OK to continue." msgBoxTitle = "Process Druid" result = MsgBox(msgBoxText, 1+32+4096, msgBoxTitle) If result = 2 Then MsgBox "Cancelled!", 64+4096, msgBoxTitle WScript.Quit End If If result = 7 Then MsgBox "Cancelled!", 64+4096, msgBoxTitle WScript.Quit End If '**********Ask user for permission********** Set objNetwork = CreateObject("WScript.Network") ' Forces script to skip errors (rem below line to see errors) on error resume next Dim WshNetwork Set WshNetwork = WScript.CreateObject("WScript.Network") Dim aShares, nShares, strShares nShares = 2 ReDim aShares(nShares,2) strShares = "Mapped shares:" aShares(1,0) = "h:" aShares(1,1) = "\\app0\" + WshNetwork.UserName aShares(2,0) = "i:" aShares(2,1) = "\\app0\exports" 'WScript.Echo(UBound(aShares)) For i=1 to UBound(aShares) 'WScript.Echo aShares(i,0) + " -=- " + aShares(i,1) strShares = strShares + CRLF + aShares(i,0) + " - " + aShares(i,1) WshNetwork.RemoveNetworkDrive aShares(i,0) WshNetwork.MapNetworkDrive aShares(i,0), aShares(i,1) Next WScript.Echo strShares WSCript.Quit