How to List Folder Permissions with vbscript

Hi All,

I need to do a vbcript program to list the permissions to an specific folder
on a 2003 server. I am a beginner vbscripter and could'nt find a sample fo
that anywhere else...

Any hint on how can I do that?

Thanks to all!
rosadoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tone28Commented:
ADsSecurity.dll is a great way to get permissions of a Windows folder. It requires downloading and registering it but using it in scripts is easy. There is some good documentation on how to use it to.

Let me know if you need more information.
0
WillEastburyCommented:
Something like this might do the trick .....

Dim wshShell
Dim folderpath

Set wshShell = CreateObject("WScript.Shell")

folderpath = "C:\Windows\"
wshShell.Run("CACLS " & folderpath & " > C:\dirperms.Txt")
Should produce you a text file looking like....

           C:\WINDOWS BUILTIN\Users:R
           BUILTIN\Users:(OI)(CI)(IO)(special access:)
                                     GENERIC_READ
                                     GENERIC_EXECUTE

           BUILTIN\Power Users:C
           BUILTIN\Power Users:(OI)(CI)(IO)C
           BUILTIN\Administrators:F
           BUILTIN\Administrators:(OI)(CI)(IO)F
           NT AUTHORITY\SYSTEM:F
           NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
           BUILTIN\Administrators:F
           CREATOR OWNER:(OI)(CI)(IO)F
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WillEastburyCommented:
Would suggest that since the user has not responded, I have provided a complete answer to their problem.

However, I believe that the other experts have provided correct advice and assistance also and hence would suggest a points split as follows...

WillEastbury  100 points
vinnyd79       75 points
tone28          75 points

Thanks,
Will
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.