I am trying to test for the existance of shares on a server. I can create a reference to the Lanmanserver object and enumerate the names of the existing shares but if there are no shares the script fails with and "Object required error" I know this is something simple but...
Sample script:
Dim fs,share
Set fs = GetObject("WinNT://computername/LanmanServer"
For Each share In fs
MsgBox("Share: " & share.name)
MsgBox ("Path: " & share.path)
Next
Sample script:
Dim fs,share
Set fs = GetObject("WinNT://computername/LanmanServer"
For Each share In fs
MsgBox("Share: " & share.name)
MsgBox ("Path: " & share.path)
Next