@Echo Off
Title Revert File/Folder Deletion To OS Defaults
Color 1F
mode con cols=80 lines=20
CLS

echo.
echo Note: This does not affect any new users created as they may 
echo       still be set as the original MRP option if you had also 
echo       selected to copy MRP options over to any new users.
echo.

cd "%systemroot%\system32"
call :IsAdmin

CLS
 Reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ConfirmFileDelete" /f >NUL 2>&1
 Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /f >NUL 2>&1
 Reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ConfirmFileDelete" /f >NUL 2>&1
 Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /f >NUL 2>&1

echo.
echo Note: This does not affect any new users created as they may 
echo       still be set as the original MRP option if you had also 
echo       selected to copy MRP options over to any new users.
echo.
echo Reboot/Logout cycle IS required to reset registry/Policy Edits.
echo.
pause
Exit

:IsAdmin
Reg query "HKU\S-1-5-19\Environment" >NUL 2>&1

If Not %ERRORLEVEL% EQU 0 (
 echo.
 Echo You must have administrator rights to continue ...
 echo.
 Pause
 Exit
)

CLS
GOTO :eof
