Windows 7 Thread, iCacls on Windows 7 (modify permissons for Everyone user on file/folder) in Technical; In Windows XP I used to be able to do the following to change the permissions of a folder and ...
iCacls on Windows 7 (modify permissons for Everyone user on file/folder)
In Windows XP I used to be able to do the following to change the permissions of a folder and its files inside by doing the following (must modify not remove any exsisting):
Code:
cacls "C:\Test" /e /c /g Everyone:F
In Windows 7 I'm trying the following (in run cmd as Administrator):
Code:
Icacls "C:\Test" /grant Everyone:F
But it just doesnt do anything (cant use /e switch says invalid)!!
I'm starting to give up, need this to work so I can deploy a batch file to certain computers with Adobe Photoshop installed on Windows 7 and change the permissions of C:\ProgramData\Adobe\Photoshop Elements\5.0 to evryone so theres not a problem on first load - just like Game maker and it's softwrap errors, was hoping to do the same!!
*Free virtual ice lolly and a pint for the one who can solve my problem - would send but it would melt and the beer would go warm hehe*
One of the comments on the site suggests that cacls is still around in Windows Vista. Presumably it's been removed entirely in Windows 7?
I'm so confused!!
I've just tried CACLS again and it now works!
last time I tried it with commands it said "NOTE: Cacls is now deprecated, please use Icacls." and didnt work though that still comes up if I just type cacls in cmd, very confused - I'm going to try my batch files now and see if they work hopefuly they do!
Thanks for all your help btw, really appreciated!
Last edited by darrenstraight; 9th July 2010 at 01:53 PM.
Icacls "C:\Test\test.txt" /grant Everyone:f
should be:
icacls c:\test\test.ext /grant Everyone:(F)
or
icacls \\localhost\c$\test\test.ext /grant Everyone:(F)
if the user or group name has a space in it, include it in quotes such as "Domain Admins" or "Enterprise Admins"
icacls \\localhost\c$\test\test.ext /grant "Enterprise Admins":(F)
Last edited by pmkochie; 3rd March 2011 at 12:27 AM.
Reason: :( made a sad face and I need to put in :(
Here is the correct working script i used to apply to folders and files.
icacls * /T /C /grant systemOI)(CI)F
I too am scripting, a long time user of cacls, but confused as heck with icacls. They just got everything wrong with the docs: too much no one needs to do, and nothing you would need to do; I found many thing are undefined in docs: container, objects, sid, perm. They didn't take a single week to make the docs easier, while a billion people over the years will be lost at using this useful tool, over looking its power.
I also have no windows7 machine to test my icacl bat So I don't know if there are y/n confirmations I need to overcome or what will work.
I am distributing an few exes that do not need to extract on the fly anything. so I will be putting these exes in folder called toolbox that will not allow any file to be written to the folder toolbox.
Do any of these lines work? Which can I use to lock for everyone, every account?