Set fso = GetObject("WinNT://mcmnetapp/LanmanServer")
If (IsEmpty(fso) = False) Then
For Each resource In fso.resources
If (Not resource.User = "") And (Not Right(resource.User,1) = "$") Then
FindPos = Instr(1, resource.path, "Axys32.exe" ,1)
If (FindPos <> 0) Then
XL.Cells(RowNumber, ColumnNumber).Value = resource.user
XL.Cells(RowNumber, ColumnNumber+1).Value = resource.Path
RowNumber=RowNumber+1
End If
FindPos = Instr(1, resource.path, "Rep32.exe" ,1)
If (FindPos <> 0) Then
XL.Cells(RowNumber, ColumnNumber).Value = resource.user
XL.Cells(RowNumber, ColumnNumber+1).Value = resource.Path
RowNumber=RowNumber+1
End If
FindPos = Instr(1, resource.path, "Rex32.exe" ,1)
If (FindPos <> 0) Then
XL.Cells(RowNumber, ColumnNumber).Value = resource.user
XL.Cells(RowNumber, ColumnNumber+1).Value = resource.Path
RowNumber=RowNumber+1
End if
End If
Next
End If
XL.Cells.EntireColumn.Autofit
Set XL=nothing
MsgBox "Done"
I'm not sure about the path syntax.
Set fso = GetObject("WinNT://mcmnetapp/LanmanServer")
If I want to hit a Windows Server2003 named "testserver" with a shared folder name "maindata". How would I type the syntax?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.