Book now with code EOY2025
@echo off REM Written by Devilsbane Title Fix H drive mapping echo Disconnecting H: Drive... wscript.exe HDriveFix.vbs *I used an absolute path here, but deleted it for this posting, \\servername\share\ * ping 127.0.0.1 -n 2 >NUL *This is my getto pause command, since not every workstation has all of the support tools installed* net use H: \\server\Share$\%username% echo Your H: drive has been mapped successfully. echo. pause
' Written by Devilsbane ' Date: July 12, 2011 Dim net, objShell err.number = vbempty set net = wscript.CreateObject("Wscript.Network") On Error Resume Next net.RemoveNetworkDrive "H:", _ True If err.number = vbEmpty then Set objShell = CreateObject("WScript.Shell") ElseIf err.number = -2147022646 then Wscript.Echo "H: Drive didn't exist, mapping H: Drive now" Else Wscript.echo "Unknown Error " & err.number End If Wscript.Quit
Use code EOY2025 to receive $250 off your 2025 certification boot camp!