Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Connect network driveContent of Connect network drive.vbsMD5 Hash: 9A7286AE2415BD57C1A1BFE8634E1590 |
||
Call ConnectND("m:","\\192.168.2.4\Docs",False,"","") ' ----------------------------------------------------------------------- Private Function ConnectND(sDrive, sTarget, bPermanent, sUser, sPassword) On Error Resume Next Dim oWNet : Set oWNet = WScript.CreateObject("WScript.Network") If Len(sUser) > 0 then oWNet.MapNetworkDrive sDrive, sTarget, bPermanent, sUser, sPassword Else oWNet.MapNetworkDrive sDrive, sTarget, bPermanent End if If Err.Number <> 0 then msgbox "Error: " & Err.Number & VbCrLf & Err.Description Else msgbox "Connect network drive " & sDrive & VbCrLf & "Status = OK" End if End Function | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |