I'm in need a vbscript that I can work with that identifies the shares
on a computer that has everyone set with full control permissions. I
can then feed it the list of 100 or so servers that I need to run this
script on several times per year. I know there are some utilities out
there like xcacls, but I simply don't have the time to write a parsing
script to parse the output, and our file server alone has 1500+ shares.
Does anyone have anything they can help me get started with. Please
try to stay with vbscript - that's really all I do well. Thanks!

Re: Everyone Shares by jacksneed2000

jacksneed2000
Mon May 02 13:03:42 CDT 2005

Since no one helped me out, I wrote my own script, which I will share.
I used srvcheck.exe from the windows 2003 resource kit. I also have
all of my servers to check listed in a text file, which I read in and
parsed. I stripped out some of the other extra things I did in the
script, so I hope I didn't break it by doing this. But hopefully it
will help somebody else out.


'create output and temporary files
dir = "C:\Scripts\EveryoneShares\"
tempdir = dir & "temp\"
serverlist = "C:\MasterList.txt"
aFile = dir & "out.txt"
set shell = createobject("wscript.shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Lines = Split(FSO.OpenTextFile(serverlist).ReadAll, vbCrLf)
Set f = (FSO.CreateTextFile(aFile, 2))
f.writeline "Started " & now
f.writeblanklines 1
sharename = ""

'************************************************************************************************
'read in the list of servers from the masterlist

Set shell = createobject("wscript.shell")
On Error Resume Next
For L = 0 To UBound(Lines)
Fields = Split(Lines(L), ",")
strComputer = Fields(0)
If Not strComputer = TempSvr Then
If Not Left(strComputer, 1) = ";" Then
bfile = tempdir & strComputer & ".out"
doscmd = "srvcheck \\" & strComputer & " > " & bfile
shell.run "%comspec% /c " & doscmd, 0, True
set txtStream = fso.OpenTextFile(bFile)
Do While Not (txtStream.atEndOfStream)
TLines = txtStream.Readline
temp1 = 0
temp1 = instr(TLines,"\\")
If temp1 > 0 then
sharename = TLines
End If
temp2 = 0
temp2 = instr(1,TLines,"Everyone", 1)
If temp2 > 0 then
f.writeblanklines 1
f.writeline sharename
f.writeline TLines
End If
Loop
End If
End If
TempSvr = strComputer
Next
f.writeblanklines 2
f.writeline "Finished " & now
wscript.echo "finished"