Skip to content

Instantly share code, notes, and snippets.

@peter9811
Forked from ilovefreesw/reg.bat
Last active February 28, 2025 14:23
Show Gist options
  • Save peter9811/5f5461651fa3f5329ca3a11190545293 to your computer and use it in GitHub Desktop.
Save peter9811/5f5461651fa3f5329ca3a11190545293 to your computer and use it in GitHub Desktop.
A batch script for Windows to Fix "Some settings are managed by your organization". Works on Windows 10 and Windows 11.
@echo off
:: Script to remove "Some settings are managed by your organization" message
:: Works on Windows 10 and Windows 11
:: Run as Administrator
:: Delete registry keys from HKEY_CURRENT_USER
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies" /f
reg delete "HKCU\Software\Microsoft\WindowsSelfHost" /f
reg delete "HKCU\Software\Policies" /f
:: Delete registry keys from HKEY_LOCAL_MACHINE
reg delete "HKLM\Software\Microsoft\Policies" /f
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies" /f
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /f
reg delete "HKLM\Software\Microsoft\WindowsSelfHost" /f
reg delete "HKLM\Software\Policies" /f
:: Delete registry keys from WOW6432Node (32-bit compatibility)
reg delete "HKLM\Software\WOW6432Node\Microsoft\Policies" /f
reg delete "HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" /f
reg delete "HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /f
echo.
echo Registry keys have been removed. Please restart your computer.
pause
@peter9811
Copy link
Author

Batch Script to Fix "Some settings are managed by your organization"

Description

This batch script is designed to fix the "Some settings are managed by your organization" message that sometimes appears in Windows 10 and Windows 11 by deleting specific registry keys.

Usage Instructions

  1. Save the script with a .bat extension
  2. Right-click the file and select "Run as administrator"
  3. Wait for the process to complete
  4. Restart your computer

Important Notes

  • This script should be run as Administrator
  • It's recommended to create a system restore point before running
  • A restart is required after running the script

Compatibility

  • Works on Windows 10
  • Works on Windows 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment