KMS_VL_ALL - Smart Activation Script

How does it work?

Supported Products



These editions are only KMS-activatable for 45 days at max:

These editions are only KMS-activatable for 30 days at max:



Unsupported Products


Office C2R 'Your license isn't genuine' notification banner

Office Retail to Volume

Office Retail must be converted to Volume first before it can be activated with KMS

specifically, Office Click-to-Run products, whether installed from ISO (e.g. ProPlus2019Retail.img) or using Office Deployment Tool.

Starting version 36, the activation script implements automatic license conversion for Office C2R.


Alternatively, if the automatic conversion did not work, or if you prefer to use the standalone converter script:

You can also use other tools that can convert licensing:

How To Use

Activation Modes

Auto Renewal

Recommended mode, where you only need to install the activation emulator once. Afterward, the system itself handle and renew activation per schedule.

To run this mode:

If you use Antivirus software, make sure to exclude this file from real-time protection:

If you later installed Volume Office product(s), it will be auto activated in this mode.

Additionally, If you want to convert and activate Office C2R, renew the activation, or activate new products:

On Windows 8 and later, the script duplicate inbox system scheduled task SvcRestartTaskLogon to SvcTrigger
this is just a precaution step to insure that the auto renewal period is evaluated and respected, it's not directly related to activation itself, and you can manually remove it.

To remove this mode:



No remnants mode, where you only need to run Activate.cmd, and then any KMS emulator traces will be cleared from the system.

To run this mode:

You will have to run Activate.cmd again to activate newly installed products (e.g. Office) or if Windows edition is switched.

You will have to run Activate.cmd again to activate before the KMS activation period expires.

You can run and activate anytime during that period to renew the period to the max interval.

If Activate.cmd is accidentally terminated before it completes the process, run the script again to clean any leftovers.



Standalone mode, where you only need the file Activate.cmd alone, previously refered to as "Online KMS".

You can use Activate.cmd to activate against trusted external KMS server, without needing other files or using local KMS emulator functions.

The external server can be a web address, or a network IP address (local LAN or VM).

To run this mode:

If you later installed Volume Office product(s), it will be auto activated if the external server is still connected.

The used server address will be left registered in the system to allow activated products to auto renew against it,
if the server is no longer available, you will need to run the mode again with a new available server.

If you want to clear the server registration and traces, run Activate.cmd in Manual mode once.
or else, use this external script: Clear-KMS-Cache

Additional Options

Activation Choice

Activate.cmd is set by default to process and try to activate both Windows and Office.

However, if you want to turn OFF processing Windows or Office, for whatever reason:

To do that:

this turn OFF is not very effective if Windows or Office installation is already Volume (GVLK installed),
because the system itself may try to reach and KMS activate the products, especially on Windows 8 and later.


Convert Office C2R-R2V

Activate.cmd is set by default to auto convert detected Office C2R Retail to Volume (except activated Retail products).

However, if you prefer to turn OFF this function:


Skip Windows 10/11 KMS 2038

Activate.cmd is set by default to check and skip Windows activation if KMS 2038 is detected.

However, if you want to revert to normal KMS activation:

On Windows 10/11, if SkipKMS38 is ON (default), Windows will always get checked and processed, even if Process Windows is No


Advanced KMS Options

You can manually modify these KMS-related options by editing Activate.cmd with Notepad before running.


Command line Switches

Activate.cmd switches

AutoRenewal-Setup.cmd switches



Activate.cmd /s /e pseudo.kms.server
Activate.cmd /d /w /o
Activate.cmd /u /x /e pseudo.kms.server
AutoRenewal-Setup.cmd /s /r /k
AutoRenewal-Setup.cmd /i /u 
AutoRenewal-Setup.cmd /s /l



set _r=^%SystemRoot^%
reg add HKLM\SOFTWARE\Classes\batfile\shell\runas\command /f /v "" /t REG_EXPAND_SZ /d "%_r%\System32\cmd.exe /C \"\"%1\" %*\""
reg add HKLM\SOFTWARE\Classes\cmdfile\shell\runas\command /f /v "" /t REG_EXPAND_SZ /d "%_r%\System32\cmd.exe /C \"\"%1\" %*\""


Check Activation Status

You can use those scripts to check the status of Windows and Office products.

Both scripts do not require running as administrator, a double-click to run is enough.



Setup Preactivate

To preactivate the system during Windows installation, copy $oem$ folder to sources folder in the installation installation media (ISO/USB).

If you already use another setupcomplete.cmd, rename this one to KMS_VL_ALL.cmd or similar name
then add a command to run it in your setupcomplete.cmd, example:
call KMS_VL_ALL.cmd



If the activation failed at first attempt:

if Auto-Renewal is installed already, but the activation started to fail, run AutoRenewal-Setup.cmd to Uninstall Completely then run it again for installation.

For Windows 7, if you have the errors described in KB4487266, execute the suggested fix.

If you got Error 0xC004F035 on Windows 7, it means your Machine is not qualified for KMS activation. For more info, see here and here.

If you got Error 0x80040154, it is mostly related to misconfigured Windows 10/11 KMS38 activation, rearm the system and start over, or revert to Normal KMS.

If you got Error 0xC004E015, it is mostly related to misconfigured Office retail to volume conversion, try to reinstall system licenses:
cscript //Nologo %SystemRoot%\System32\slmgr.vbs /rilc

If you got one of these Errors on Windows Server, verify that the system is properly converted from Evaluation to Retail/Volume:
0xC004E016 - 0xC004F014 - 0xC004F034

If the activation still failed after the above tips, you may enable the debug mode to help determine the reason:

If you have issues with Office activation, or got undesired or duplicate licenses (e.g. Office 2016 and 2019):

Final tip, you may try to rebuild licensing Tokens.dat as suggested in KB2736303 (this will require to repair Office afterwards).

Source Code


Visual Studio:

launch shortcut Developer Command Prompt for VS 2017 (or 2019)
MSBuild SppExtComObjHook.sln /p:configuration="Release" /p:platform="Win32"
MSBuild SppExtComObjHook.sln /p:configuration="Release" /p:platform="x64"


download mingw-w64
Windows x86
Windows x64
both can compile 32-bit and 64-bit binaries
extract and place SppExtComObjHook folder inside mingw32 or mingw64 folder
run _compile.cmd



Visual Studio:



namazso - SppExtComObjHook, IFEO AVrf custom provider.
qad - SppExtComObjPatcher, IFEO Debugger.
Mouri_Naruto - SppExtComObjPatcher-DLL
os51 - SppExtComObjPatcher ported to MinGW GCC, Retail/MAK checks examples.
MasterDisaster - Original script, WMI methods.
Windows_Addict - Features suggestion, ideas, testing, and co-enhancing.
qewpal - KMS-VL-ALL script.
NormieLyfe - GVLK categorize, Office checks help.
rpo, mxman2k, BAU, presto1234 - scripting suggestions.
Nucleus, Enthousiast, s1ave77, l33tisw00t, LostED, Sajjo and MDL Community for interest, feedback and assistance.

abbodi1406 - KMS_VL_ALL author


MDL forums - the home of the latest and current emulators.
mikmik38 - first reversed source of KMSv5 and KMSv6.
CODYQX4 - easy to use KMSEmulator source.
Hotbird64 - the resourceful vlmcsd tool, and KMSEmulator source development.
cynecx - SECO Injector bypass, SppExtComObj KMS functions.
deagles - SppExtComObjHook Injector.
deagles - KMSServerService.
ColdZero - CZ VM System.
ColdZero - KMS ePID Generator.
kelorgo, bedrock - TAP adapter TunMirror bypass.
mishamosherg - WinDivert FakeClient bypass.
Duser - KMS Emulator fork.
Boops - Tool Ghost KMS (TGK).
ZWT, nosferati87, crony12, FreeStyler, Phazor - KMS Emulator development.