jpalmerb 0 Posted April 19, 2010 Hi All, What I'm trying to do will probably be way easy, but I haven't figured it out. I would like to have an Autoit script that creates a folder and sets the permissions on the folder. Basically take away inheritance while copying the settings that are already there and then adding everyone read. Here's what I've got: DirCreate ("D:\Users") ;Run ('\\mavts003\software$\software\setacl\SetACL.exe -on "D:\Users" -ot file -actn setprot -op "dacl:p_c;sacl:nc" -rec no') Run ('\\mavts003\software$\software\setacl\SetACL.exe -on "D:\Users" -ot file -actn ace -ace "n:Authenticated Users;m:revoke" -ace "n:everyone;p:read"') Filecopy ("C:\Users\*.*", "D:\Users\", 9) I don't get any errors, but it doesn't do what I want. Can somebody please help? thanks! Share this post Link to post Share on other sites
Fire 3 Posted April 19, 2010 Try this: DirCreate ("D:\Users") ;Run ('\\mavts003\software$\software\setacl\SetACL.exe -on "D:\Users" -ot file -actn setprot -op "dacl:p_c;sacl:nc" -rec no') Run ("cmd.exe /c " & "\\mavts003\software$\software\setacl\SetACL.exe -on " & "D:\Users " & "-ot file -actn ace -ace " & "n:Authenticated Users;m:revoke " & "-ace " & "n:everyone;p:read") Filecopy ("C:\Users\*.*", "D:\Users\", 9) I dont know right execution syntax from cli for SetACL.exe. So if it didn`t worka please give me right execution syntax from cmd.exe for SetACL.exe Is this right execution ? \\mavts003\software$\software\setacl\SetACL.exe -on D:\Users -ot file -actn ace -ace n:Authenticated Users;m:revoke -ace n:everyone;p:read [size="5"] [/size] Share this post Link to post Share on other sites
PsaltyDS 42 Posted April 19, 2010 Hi All,What I'm trying to do will probably be way easy, but I haven't figured it out.I would like to have an Autoit script that creates a folder and sets the permissions on the folder. Basically take away inheritance while copying the settings that are already there and then adding everyone read.Here's what I've got:DirCreate ("D:\Users");Run ('\\mavts003\software$\software\setacl\SetACL.exe -on "D:\Users" -ot file -actn setprot -op "dacl:p_c;sacl:nc" -rec no')Run ('\\mavts003\software$\software\setacl\SetACL.exe -on "D:\Users" -ot file -actn ace -ace "n:Authenticated Users;m:revoke" -ace "n:everyone;p:read"')Filecopy ("C:\Users\*.*", "D:\Users\", 9)I don't get any errors, but it doesn't do what I want. Can somebody please help?thanks!The first Run() is commented out, so not an issue here?Does the second one work if you copy/paste that directly to a command line console (without the outer single quotes), using the same account that the script runs under? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
jpalmerb 0 Posted April 20, 2010 Hi! Thanks for the replies!! By running the cmd, I could see that the network drive wasn't being found. I copied setacl local and ran it local and it works! Now I'm just having problems with the syntax for setacl and removing the authenticated users. Thanks for the help! Share this post Link to post Share on other sites