Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 686

[RESOLVED] List all mapped drives/shares on remote computer

$
0
0
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.

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

i would also appreciate it if someone can mention any books i can pick up so i can better understand vb scripting.

Viewing all articles
Browse latest Browse all 686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>