Sign in to follow this  
Followers 0
sshrum

Looking For...ways To Change File\folder Permissions

12 posts in this topic

I just had to build a file permission script via the GUI cuz I couldn't find a way to do this programmatically...damn what a pain.

Am I missing something. It seems like there should be a function that would give one the ability to set/modify permission settings on files and folders (as long as the current user or RUNAS had permissions to do so).

Any ideas?


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites




AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

That is only file *attributes*....nothing in there about dealing with user/group account permissions to the files/folders which is what I am looking for.

Maybe I wasn't clear.

Edited by sshrum

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

I just had to build a file permission script via the GUI cuz I couldn't find a way to do this programmatically...damn what a pain.

Am I missing something. It seems like there should be a function that would give one the ability to set/modify permission settings on files and folders (as long as the current user or RUNAS had permissions to do so).

Any ideas?

i think i remember a program called setacl or something like that, which does precisely what you need. search the forums for 'permissions file registry' and you should see it mentioned...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

You can use the 3rd party tool setacls as cameronsdad suggested, or you can try cacls which comes with Windows. It's not as nice, but if you use it then that one less external file you have to distribute with your script.

Share this post


Link to post
Share on other sites

Good point and really what I was going for with my last statement.

I think I'll play around with the cacls a bit.

Most of what I need done is file permissions changes (and a few reg permissions now and then)

Thanks for the info.


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Cant this be done with some Dll?

Edited by oleg

There is a hex ( 31303030303030 ) reasons i love AutoIt !

Share this post


Link to post
Share on other sites

I scripted this sometime back. I used CACLS. The only downside is that the CACLS command doesn't propergate through directories. This means that you have to set up a loop to query the file attributes. If its a folder, then go deeper into the file structure.

Share this post


Link to post
Share on other sites

I scripted this sometime back. I used CACLS. The only downside is that the CACLS command doesn't propergate through directories. This means that you have to set up a loop to query the file attributes. If its a folder, then go deeper into the file structure.

I never had a problem with /T switch.

Share this post


Link to post
Share on other sites
:mellow: I can't believe I didn't spot that! I could have saved myself a bit of time there. :)

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  
Followers 0