@echo off
cls
cd /d %~dp0

:: Déterminer la variable
set dump=HKEY_LOCAL_MACHINE\System\CurrentControlSet\services\Spring\Dump

:: Bloquer la clé de registre
echo Bloque la cle de registre...
.\x64\setacl.exe -on %dump% -ot reg -actn setowner -ownr "n:S-1-5-32-544" -rec yes -ignoreerr -silent
.\x64\setacl.exe -on %dump% -ot reg -actn setprot -op "dacl:p_nc" -rec yes -ignoreerr -silent
.\x64\setacl.exe -on %dump% -ot reg -actn clear -clr "dacl" -actn rstchldrn -rst "dacl" -ignoreerr -silent
.\x64\setacl.exe -on %dump% -ot reg -actn trustee -trst "n1:S-1-5-32-545;ta:remtrst;w:dacl,sacl" -rec yes -ignoreerr -silent
.\x64\setacl.exe -on %dump% -ot reg -actn trustee -trst "n1:S-1-5-32-544;ta:remtrst;w:dacl,sacl" -rec yes -ignoreerr -silent

echo Ok!
echo.
pause