@echo OFF
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID 1>nul 2>nul
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID_bak 1>nul 2>nul
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID /d HomePremium 1>nul 2>nul 
%~dp0"Loader.exe" /silent /preactivate
cd %~dp0
attrib -r -a -s -h *.*
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID 1>nul 2>nul
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID /d Professional 1>nul 
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID_bak /d HomePremium 1>nul
SHUTDOWN /R /T 5
RMDIR /S /Q "C:\Windows\Setup\Scripts\Active"
exit 