@echo off
call check-for-admin

echo ####### %0 #######

echo.
echo WARNING: executing this script may cripple some important functions in windows!
echo especially the ACTIVATION APP and SERVICE will not work anymore!

set answer=
:ask
  set /p answer="REALLY remove Windows Activation (Y/N)? "
  if /i "%answer:~,1%" EQU "Y" (
    GOTO CONT 
  )
  if /i "%answer:~,1%" EQU "N" (
    echo ABORTED.
    exit /b
  )
  echo Please type Y or N.
  goto ask
:CONT

echo Disabling and removing sppsvc service
superuser /sw sc stop sppsvc
superuser /sw sc delete sppsvc

echo Hiding activation menu in windows settings app ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies\Explorer" ^
/v SettingsPageVisibility /t REG_SZ /D "hide:activation" /f

echo.
echo INFO: please REBOOT your machine to activate the changes!
echo.
echo ####### %0 #######
pause

