I created a script that would access computers on the network and create a tab-delimited text file of each server's shares and who has access to them. That wasn't good enough.
I don't need to know who has access to the shares, I need to know who has access to the first level folders beneath those shares. The Win32 Networking extender won't allow me to do that, will it?
I was trying to do it via WMI. I got as far as creating a list of folders, but I ran into trouble when trying to retrieve the DACLS from folders on a remote computer.
What method are you using to get a listing of remote machine folders associate with the remote's share?
Not sure that it will work but if you are using the Network Extender, you could give the following a try using the hidden administrative shares:
list = wntAccessList('server-name', '\\server-name\C$\windows', 300, 2)
There should also be a 'D$' hidden administrative share if your server has a D disk.
Thank you. I tried wntAccessList previously, but it didn't work. It worked when I tried it the way you suggested.
I don't know if it was the object type flag. I don't recall what I used before, and it's been deleted at least twice since then.
The object-type value is critically important, as it determines what underlying Win32 API functions are called to obtain security descriptor information for the specified object. A share is not the same as a folder under the share, which again is different from a printer, a native NT service, a windowstation, a desktop, etc..., and it is the object-type value that is necessary to properly distinguish them apart from each other.