Skip to content

Instantly share code, notes, and snippets.

@amitbd1508
Created May 13, 2020 04:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amitbd1508/fe64e926005c85d424e8e79a943b3b60 to your computer and use it in GitHub Desktop.
Save amitbd1508/fe64e926005c85d424e8e79a943b3b60 to your computer and use it in GitHub Desktop.
# Copy the bellow code and save it as program.cmd then run program.cmd as administator
@echo off
title Office Activation Wizard&cls&echo ============================================================================&echo Office 2019 Standard and Office 2019 Pro Plus Activation&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Office Standard 2019&echo - Microsoft Office Professional Plus 2019&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo ============================================================================&echo Activating your Office...&cscript //nologo slmgr.vbs /ckms >nul&cscript //nologo ospp.vbs /setprt:1688 >nul&cscript //nologo ospp.vbs /unpkey:6MWKP >nul&cscript //nologo ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP >nul&set i=1
:server
if %i%==1 set KMS_Sev=kms7.microsoft.com
if %i%==2 set KMS_Sev=kms8.microsoft.com
if %i%==3 set KMS_Sev=kms9.microsoft.com
if %i%==4 goto notsupported
cscript //nologo ospp.vbs /sethst:%KMS_Sev% >nul&echo ============================================================================&echo.&echo.
cscript //nologo ospp.vbs /act | find /i "successful" && (echo.&echo ============================================================================&echo.&echo&goto halt
:notsupported
echo.&echo ============================================================================&echo Sorry! Your version is not supported.&echo
:halt
pause >nul
@osertok
Copy link

osertok commented Jan 19, 2023

Thank you.

@AaryanSoni20
Copy link

It is not working

@Anythingfrees
Copy link

Not working for me

I bought office 2019 and windows 11 from a Microsoft partner https://hypestkey.com/, the office key was activated via office.com/setup, and linked to the account

@Germanskyedik
Copy link

Not working for me

I bought office 2019 and windows 11 from a Microsoft partner https://hypestkey.com/, the office key was activated via office.com/setup, and linked to the account

Thanks, work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment