Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject( "WScript.Network" )
Function TryMapDrive(intDrive, strShare)
Dim strDrive
strDrive = Chr(intDrive + 64) & ":"
On Error Resume Next
WSHNetwork.MapNetworkDrive strDrive, strShare
TryMapDrive = Err.Number = 0
End Function