Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 735
  • Last Modified:

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!
0
rosado
Asked:
rosado
  • 2
3 Solutions
 
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
 
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

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now