Jump to content
Sign in to follow this  

autoit to create folders and change security

Recommended Posts

I am very new at Autoit. I have need of a solution to add or create a folder in a given directory and then add a specific user to the security setting and set the settings to allow that user to modify the contents of the folder.

Say the location is h:/users/

I want to create the folder newuser. I use DirCreate("h:/users/newuser") to create the directory

what i am having trouble with is then setting the security.

i want to add the user, say newuser, to the permissions list and grant modify to the user.

Can I do this with autoit?

Share this post

Link to post
Share on other sites

Hello Biggs,

you can assign rights to files and folders by autmating icacls.exe (Vista, 7, 2008) or xcacls.vbs (2000, XP, 2003).

There are lots of examples around. E.g. for 2008:

icacls.exe "H:\Users\theuser" /grant theuser:(OI)(CI)(M)

Edit: Typos

Edited by hannes08

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...