On Error Resume Next
strServer = wscript.arguments(0)
strShare = wscript.arguments(1)

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strServer & "rootcimv2")

Set colItems = objWMIService.ExecQuery( _
"Select * from Win32_Share where Name = '" & strShare & "'")

For Each objItem in colItems
wscript.echo objItem.Path
Next