@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
nsudo /U:T /P:E sc stop sppsvc
nsudo /U:T /P:E 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 Removing the missing activation watermark on desktop (System) ...
bcdedit /set TESTSIGNING OFF

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