for the life of me i have not been able to figure out how to modify the following script to list all of the mapped share/drives on a remote computer. I have gotten pretty good and making modifications to my robocopy script, but cant figure out this one from what i have learned. all i would like the script to do is parse the mapped share/drives and write the output to a txt file.
i would also appreciate it if someone can mention any books i can pick up so i can better understand vb scripting.
Code:
Set WshNetwork = CreateObject("Wscript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives
If oDrives.Count > 0 Then
report = report & vbCrLf & "******************************************" & vbCrLf
report = report & "Mapped Drive Information" & vbCrLf & "******************************************" & vbCrLf & vbCrLf
For i = 0 to oDrives.Count - 1 Step 2
report = report & "Drive " & oDrives.Item(i) & " = " & oDrives.Item(i+1) & vbCrLf
Next
End If
Wscript.Echo report