Windows / Office KMS activation script (Windows Enterprise)

@echo off
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%system32cacls.exe" "%SYSTEMROOT%system32configsystem"

REM –> If error flag set, we do not have admin.
if ‘%errorlevel%’ NEQ ‘0’ (
echo Requesting administrative privileges…
goto UACPrompt
) else ( goto gotAdmin )

echo Set UAC = CreateObject^(“Shell.Application”^) > “%temp%getadmin.vbs”
set params = %*:”=””
echo UAC.ShellExecute “%~s0”, “%params%”, “”, “runas”, 1 >> “%temp%getadmin.vbs”

exit /B

if exist “%temp%getadmin.vbs” ( del “%temp%getadmin.vbs” )
pushd “%CD%”
CD /D “%~dp0”

echo Windows Activation
slmgr.vbs /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
slmgr /ato

echo Office Activation
cscript “%ProgramFiles(x86)%Microsoft OfficeOffice14ospp.vbs” /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
cscript “%ProgramFiles(x86)%Microsoft OfficeOffice14ospp.vbs” /act

Leave a Reply

Your email address will not be published. Required fields are marked *