0 0

Set Restore files and directories rights

Ensure 'Restore files and directories' is set to 'Administrators'. Set using cmd:
@echo off

REM Define the path for the .inf file
set "infFilePath=C:\restore_policy.inf"

REM Define the content for the .inf file
echo [Unicode] > %infFilePath%
echo Unicode=yes >> %infFilePath%
echo [Version] >> %infFilePath%
echo signature="$CHICAGO$" >> %infFilePath%
echo Revision=1 >> %infFilePath%
echo [Privilege Rights] >> %infFilePath%
echo SeRestorePrivilege = *S-1-5-32-544 >> %infFilePath%

REM Apply the security template using secedit.exe
secedit /configure /db C:\Windows\security\new.sdb /cfg %infFilePath%

REM Clean up the .inf file
del %infFilePath%

echo Done.