Results 1 to 3 of 3

Thread: need vbscript to pull explicit assigned permission on folder which are not inherited

  1. #1
    Join Date
    Jun 2009
    Posts
    18

    Post need vbscript to pull explicit assigned permission on folder which are not inherited

    hi everyone ,

    i need a script which list me ACL enteries whose permission are explicitly assigned and not inherited is there anyway in which i can do that, how can i get that,

    i am having folder in C:\ drive named AAA whose inheritance permission are disabled to the child folder ,i am creating folder named BBB under AAA and i am adding explicit permissions to one of the user (eg:vivek) to BBB folder when i look at the Advanced setting of the folder security permission i will get the following on ACL entries list

    Type: Name: Permission: inheritedfrom: Applyto:

    Allow vivek.M FullControl <not inherited> this folder ,subFolder,files

    Allow System FullControl C:\AAA this folder ,subFolder,files


    i need to pull or get only the first line of result whose inheritedfrom: are <not inherited>

    important vivek.m is explicty assigned to the particular folder by using ADD fuction on Advance security tab


    how can i get reply me............

  2. #2
    Join Date
    May 2008
    Posts
    33

    Re: need vbscript to pull explicit assigned permission on folder which are not inherited

    To set folder permissions in VBScript

    Code:
    'This script will assign Modify/C-Change (write) Permission To Power User on "C:\MyFolder" using cacls on NTFS formatted drive
    
    Dim oShell, FoldPerm, Calcds, oFSO
    
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oShell = CreateObject("WScript.Shell")
    
    sSysDir = oFSO.GetSpecialFolder(1).Path
    If Right(sSysDir,1) <> "\" Then sSysDir = sSysDir & "\"
    
    Calcds = sSysDir & "cacls.exe" 
    
    'Chang The folder Name, User and Access rights in the following line of code  
    
    FoldPerm = """" & Calcds &"""" & """C:\MyFolder""" & " /E /T /C /G " & """Power Users""" & ":C" 
    
    oShell.Run FoldPerm, 1 ,True
    Grant Permission

  3. #3
    Join Date
    May 2008
    Posts
    44

    Re: need vbscript to pull explicit assigned permission on folder which are not inherited

    Have you tried Windows Management Instrumentation (WMI)
    http://msdn.microsoft.com/library/de...itysetting.asp

    Please have a look at Microsoft
    1. http://support.microsoft.com/default...b;en-us;266461
    2. http://support.microsoft.com/default...b;en-us;269159

    I hope this helps you.

Similar Threads

  1. Maybe a VBScript to pull email addresses?
    By Modom in forum Active Directory
    Replies: 1
    Last Post: 03-08-2011, 04:21 PM
  2. how to pull local group members in vbscript?
    By vivekmohan in forum Software Development
    Replies: 3
    Last Post: 25-07-2009, 01:52 PM
  3. how to pull NTFS security permission in vbscript
    By vivekmohan in forum Software Development
    Replies: 3
    Last Post: 25-07-2009, 01:28 PM
  4. How to Change Permission in VBScript
    By Quattro in forum Software Development
    Replies: 3
    Last Post: 09-06-2009, 08:44 AM
  5. Microsoft VBScript runtime error: Permission denied: 'GetObject'
    By Swati_here_2008 in forum Software Development
    Replies: 3
    Last Post: 05-05-2008, 01:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,046,665.08570 seconds with 16 queries