Add scripts for setting and unsetting the correct permissions

This commit is contained in:
Fierelier 2022-06-22 07:52:35 +02:00
parent a6a6b4b4cf
commit 9a311215bd
2 changed files with 17 additions and 0 deletions

11
set-perms.bat Normal file
View File

@ -0,0 +1,11 @@
@echo off
setlocal
cd /d "%~dp0"
echo Setting permissions...
icacls "%cd%" /setowner Administrators /T /C /L /Q >nul
icacls "%cd%" /reset /T /C /L /Q >nul
icacls "%cd%" /inheritance:e /T /C /L /Q >nul
icacls "%cd%" /inheritance:r /C /L /Q >nul
icacls "%cd%" /setowner Administrators /T /C /L /Q >nul
icacls "%cd%" /grant Users:(OI)(CI)RX /grant Administrators:(OI)(CI)F /grant "NT SERVICE\TrustedInstaller":(OI)(CI)F /grant SYSTEM:(OI)(CI)F /T /C /L /Q >nul
pause

6
unset-perms.bat Normal file
View File

@ -0,0 +1,6 @@
@echo off
setlocal
cd /d "%~dp0"
echo Setting permissions...
icacls "%cd%" /reset /T /C /L /Q >nul
pause