Forked from stavrossk/Script to delete enforced Google Chrome policies.bat
Created
September 22, 2024 10:20
-
-
Save eplord/97b2faf028e7580272736e5b9fde662d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
IF NOT EXIST %WINDIR%\System32\GroupPolicy goto next | |
echo Deleting GroupPolicy folder... | |
RD /S /Q "%WINDIR%\System32\GroupPolicy" || goto error | |
echo. | |
:next | |
IF NOT EXIST %WINDIR%\System32\GroupPolicyUsers goto next2 | |
echo Deleting GroupPolicyUsers folder... | |
RD /S /Q "%WINDIR%\System32\GroupPolicyUsers" || goto error | |
echo. | |
:next2 | |
gpupdate /force | |
pause | |
exit | |
:error | |
echo. | |
echo An unexpected error has occurred. Have you opened the program as an administrator (right click, run as administrator)? | |
echo. | |
pause | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment