Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem
- rem Lock Windows to a particular feature release
- rem By Matthew Borcherding, matt@borchtech.com
- rem 12/14/2024
- rem
- rem Based on info from:
- rem https://www.tenforums.com/installation-upgrade/185952-blocking-windows-11-upgrade.html
- rem https://answers.microsoft.com/en-us/windows/forum/all/anyway-to-not-update-to-24h2-but-still-get/765ba31f-a9c7-45af-99b5-a701cf624ceb
- rem
- setlocal
- rem
- rem Set the release level to lock
- rem
- set release-level=23H2
- rem
- rem Update registry
- rem
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v ProductVersion /t REG_SZ /d "Windows 11" /f > nul
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v TargetReleaseVersion /t REG_DWORD /d 1 /f > nul
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v TargetReleaseVersionInfo /t REG_SZ /d %release-level% /f > nul
- rem
- rem Restart Windows Update service
- rem
- net stop wuauserv
- net start wuauserv
- gpupdate /force
- echo Windows now locked to feature release %release-level%.
- echo.
- :end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement