![]() |
|
[Shell] ICACLS to change permission to a folder and its contents ? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Shell] ICACLS to change permission to a folder and its contents ? (/showthread.php?tid=5599536) |
ICACLS to change permission to a folder and its contents ? - Hackoo - Apr 14, 2017 Hi all 🤝 I made this piece of code to change permission to a folder and its contents (subfolders and files) with the command ICACLS My issue is : By clicking on properties of this folder > security I can always manually modify the access rights of this folder. Is there a script to prevent this ? ChangePermission.bat ChangePermission.bat (Click to View) * - Phlox - Apr 14, 2017 I think you are asking to remove security tab i think you can do this with a group policy. * - Hackoo - Apr 14, 2017 (Apr 14, 2017 07:02 AM) Wrote: I think you are asking to remove security tab i think you can do this with a group policy.Thank you for your answer Phlox, but, how to remove the security tab with a batch script ? EDIT : I found a hint here To Disable Security tab: Code REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v Nosecuritytab /t REG_DWORD /d 1 /fTo Enable Security tab: Code REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v Nosecuritytab /t REG_DWORD /d 0 /fHere is the new script : ChangePermission.bat ChangePermission.bat (Click to View) * - ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ - Apr 15, 2017 Hackoo!!! !ERRORLEVEL! needs to be expanded inside of ( ) :) * - jyuht - Apr 20, 2017 Why are you worried about the security tab? * - Beigevenus - Apr 21, 2017 (Apr 20, 2017 02:22 AM)jyuht Wrote: Why are you worried about the security tab? If he made a Batch script to change the permissions, he probably doesn't want a user to be able to change them by other means than the Batch file! |