@echo off :: Check for administrator privileges net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrator privileges... powershell -Command "Start-Process '%~f0' -Verb RunAs" exit /b ) echo Administrator privileges granted. Starting Windows activation... powershell -NoProfile -ExecutionPolicy Bypass -Command ^ "Clear-Host; ^ Write-Host 'Choose OS for activation (1-5):' -ForegroundColor Yellow; ^ Write-Host '1. Win 10/11 pro' -ForegroundColor White; ^ Write-Host '2. Win Server 2016 Standard' -ForegroundColor White; ^ Write-Host '3. Win Server 2019 Standard' -ForegroundColor White; ^ Write-Host '4. Win Server 2022 Standard' -ForegroundColor White; ^ Write-Host '5. Win Server 2025 Standard' -ForegroundColor White; ^ $choice = Read-Host 'Your Choice'; ^ switch ($choice) { ^ '1' { $key = 'W269N-WFGWX-YVC9B-4J6C9-T83GX'; break } ^ '2' { $key = 'WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY'; break } ^ '3' { $key = 'N69G4-B89J2-4G8F4-WWYCC-J464C'; break } ^ '4' { $key = 'VDYBN-27WPP-V4HQT-9VMD4-VMK7H'; break } ^ '5' { $key = 'TVRH6-WHNXV-R9WG3-9XRFY-MY832'; break } ^ default { Write-Host 'Неверный выбор. Выход из скрипта.' -ForegroundColor Red; exit } ^ }; ^ Write-Host 'Installing product key...' -ForegroundColor Green; ^ cscript //nologo %windir%\system32\slmgr.vbs -ipk $key; ^ Write-Host 'Waiting 5 seconds...' -ForegroundColor Magenta; ^ Start-Sleep -Seconds 5; ^ Write-Host 'Setting KMS host kms.helpdesk38.ru...' -ForegroundColor Green; ^ cscript //nologo %windir%\system32\slmgr.vbs -skms kms.helpdesk38.ru; ^ Write-Host 'Waiting 5 seconds...' -ForegroundColor Magenta; ^ Start-Sleep -Seconds 5; ^ Write-Host 'Activating Windows...' -ForegroundColor Green; ^ cscript //nologo %windir%\system32\slmgr.vbs -ato; ^ Write-Host 'Done.' -ForegroundColor Cyan; ^ Read-Host 'Press Enter to exit'" pause