@echo off
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\VistaSp2 /f > NUL 2>&1
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\WindowsUpdate\VistaSP2 /f > NUL 2>&1
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\VistaSp2 /v Beta1 /t REG_SZ /d C21A5C64-2530-CC19-042F-9ABDB4ED27F9 /f
IF NOT %errorlevel% == 0 ( goto ERROR)
:SUCCESS
@echo.
echo ================================================== =========
echo Windows Vista SP2 registry key has been set successfully.
echo Please check for updates in Windows Update.
echo Ejoy with SP2. Dev...
echo ================================================== =========
@echo.
goto END
:ERROR
@echo.
echo ================================================== =========
echo FAILED to set Windows Vista SP2 registry keys.
echo Please run this script by right clicking and selecting
echo "Run as Administrator".
echo ================================================== =========
@echo.
goto END
:END
pause