@echo off setlocal echo ============================================ echo IDC - Windows Activation Tool echo ============================================ echo. echo [*] Checking Windows activation status... for /f "tokens=*" %%i in ('cscript //B //Nologo %windir%\system32\slmgr.vbs /dli ^| findstr /i "License Status"') do set STATUS=%%i echo %STATUS% | findstr /i "Licensed" >nul if %errorlevel%==0 ( echo [OK] Windows is already activated. Nothing to do. goto :end ) echo [INFO] Not activated. Starting activation process... echo. echo [1/2] Setting KMS server... cscript //B C:\Windows\system32\slmgr.vbs /skms 10.30.127.37 if %errorlevel% neq 0 ( echo [FAIL] Could not set KMS server. goto :fail ) echo [2/2] Activating Windows... cscript //B C:\Windows\system32\slmgr.vbs /ato if %errorlevel% neq 0 ( echo [FAIL] Activation command failed. goto :fail ) :: Re-check for /f "tokens=*" %%i in ('cscript //B //Nologo %windir%\system32\slmgr.vbs /dli ^| findstr /i "License Status"') do set STATUS2=%%i echo %STATUS2% | findstr /i "Licensed" >nul if %errorlevel%==0 ( echo. echo [OK] Activation successful! goto :end ) :fail echo. echo [FAIL] Activation failed. Please check KMS server connectivity. echo KMS: 10.30.127.37 pause exit /b 1 :end echo. pause exit /b 0