strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colShares = objWMIService.ExecQuery _
("Select * From Win32_Share")
For Each objShare in colShares
Set colAssociations = objWMIService.ExecQuery _
("Associators of {Win32_Share.Name='" & objShare.Name & "'} " _
& " Where AssocClass=Win32_ShareToDirectory")
For Each objFolder in colAssociations
Wscript.Echo objShare.Name & vbTab & objFolder.Name
Next
Next