Skip to content

Instantly share code, notes, and snippets.

@Lukaszeq
Created November 4, 2022 11:38
Show Gist options
  • Save Lukaszeq/99ddd172a76e5549c345deeaddb4dd41 to your computer and use it in GitHub Desktop.
Save Lukaszeq/99ddd172a76e5549c345deeaddb4dd41 to your computer and use it in GitHub Desktop.
Stop nagging an user to upgrade from Win 10 to Win 11
@echo off
cls
mkdir %HOMEDRIVE%\stopWin11\
cd %HOMEDRIVE%\stopWin11\
echo Windows Registry Editor Version 5.00 > win11-stop-update.reg
echo. >> win11-stop-update.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] >> win11-stop-update.reg
echo "ProductVersion"="Windows 10" >> win11-stop-update.reg
echo "TargetReleaseVersion"=dword:00000001 >> win11-stop-update.reg
echo "TargetReleaseVersionInfo"="26H2" >> win11-stop-update.reg
reg import %HOMEDRIVE%\stopWin11\win11-stop-update.reg
pause
echo.
gpupdate /force
rmdir /s /q %HOMEDRIVE%\stopwin11
timeout /t 30
echo Rebooting in a moment.
shutdown.exe /r /f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment