FOR/F"TOKENS=2 DELIMS=="%%A IN('"WMIC PATH SoftwareLicensingProduct WHERE (ApplicationID='%_wApp%' AND PartialProductKey is not NULL) GET LicenseFamily /VALUE" %_Nul6%')DOIF NOTERRORLEVEL1SET "EditionWMI=%%A"
IFNOT DEFINEDEditionWMI(
FOR/F"TOKENS=2 DELIMS=="%%A IN('"WMIC PATH SoftwareLicensingProduct WHERE (ApplicationID='%_wApp%' AND PartialProductKey is not NULL) GET LicenseFamily /VALUE" %_Nul6%')DO SET "EditionWMI=%%A"
<li>A standalone batch script to automate the activation of supported Windows and Office products using local KMS server emulator or an external server.</li>
<p>The KMS_VL_ALL_AIO fork has these differences and extra features compared to the traditional KMS_VL_ALL:</p>
<ul>
<li>Portable all-in-one script, easier to move and distribute alone.</li><br />
<li>All options and configurations are accessed via easy-to-use menu.</li><br />
<li>Combine all the functions of the traditional scripts (Activate, AutoRenewal-Setup, Check-Activation-Status, setupcomplete).</li><br />
<li>Required binary files are embedded in the script (including ReadMeAIO.html itself), using ascii encoder by AveYo.</li><br />
<li>The needed files get extracted (decoded) later on-demand, via Windows PowerShell.</li><br />
<li>Simple text colorization for some menu options (for easier differentiation).</li><br />
<li>Portable all-in-one script, easier to move and distribute alone.</li>
</ul>
<ul>
<li>All options and configurations are accessed via easy-to-use menu.</li>
</ul>
<ul>
<li>Combine all the functions of the traditional scripts (Activate, AutoRenewal-Setup, Check-Activation-Status, setupcomplete).</li>
</ul>
<ul>
<li>Required binary files are embedded in the script (including ReadMeAIO.html itself), using ascii encoder by AveYo.</li>
</ul>
<ul>
<li>The needed files get extracted (decoded) later on-demand, via Windows PowerShell.</li>
</ul>
<ul>
<li>Simple text colorization for some menu options (for easier differentiation).</li>
</ul>
<ul>
<li>Auto administrator elevation request.</li>
</ul>
<hr />
<br />
<h2><a name="How"></a>How does it work?</h2>
<h2 id="How">How does it work?</h2>
<ul>
<li>Key Management Service (KMS) is a genuine activation method provided by Microsoft for volume licensing customers (organizations, schools or governments).<br />
The machines in those environments (called KMS clients) activate via the environment KMS host server (authorized Microsoft's licensing key), not via Microsoft activation servers.</li>
<p>For more info, see <a href="https://www.microsoft.com/Licensing/servicecenter/Help/FAQDetails.aspx?id=201#215">here</a> and <a href="https://technet.microsoft.com/en-us/library/ee939272(v=ws.10).aspx#kms-overview">here</a>.</p>
The machines in those environments (called KMS clients) activate via the environment KMS host server (authorized Microsoft's licensing key), not via Microsoft activation servers.
<div>For more info, see <a href="https://www.microsoft.com/Licensing/servicecenter/Help/FAQDetails.aspx?id=201#215">here</a> and <a href="https://technet.microsoft.com/en-us/library/ee939272(v=ws.10).aspx#kms-overview">here</a>.</div></li>
</ul>
<ul>
<li>By design, the KMS activation period lasts up to <strong>180 Days</strong> (6 Months) at max, with the ability to renew and reinstate the period at any time.<br />
<li>The mechanism of <strong>SppExtComObjPatcher</strong> makes it act as a ready-on-request KMS server, providing instant activation without external schedule tasks or manual intervention.<br />
Including auto renewal, auto activation of volume Office afterward, reactivation because of hardware change, date change, windows or office edition change... etc.</li>
<p>On Windows 7, later installed Office may require initiating the first activation vis OSPP.vbs or the script, or opening Office program.</p>
Including auto renewal, auto activation of volume Office afterward, reactivation because of hardware change, date change, windows or office edition change... etc.
<div>On Windows 7, later installed Office may require initiating the first activation vis OSPP.vbs or the script, or opening Office program.</div></li>
</ul>
<ul>
<li>That feature makes use of the "Image File Execution Options" technique to work, programmed as an Application Verifier custom provider for the system file responsible for the KMS process.<br />
Hence, OS itself handle the DLL injection, allowing the hook to intercept the KMS activation request and write the response on the fly.</li>
<p>On Windows 8.1/10, it also handles the localhost restriction for KMS activation and redirects any local/private IP address as it were external (different stack).</p>
Hence, OS itself handle the DLL injection, allowing the hook to intercept the KMS activation request and write the response on the fly.
<div>On Windows 8.1/10, it also handles the localhost restriction for KMS activation and redirects any local/private IP address as it were external (different stack).</div></li>
</ul>
<ul>
<li>The activation script consists of advanced checks and commands of Windows Management Instrumentation Command <strong>WMIC</strong> utility, that query the properties and executes the methods of Windows and Office licensing classes,<br />
<li>supported Windows products do not need volume conversion, only the GVLK (KMS key) is needed, which the script will install accordingly.</li>
<li>KMS activation on Windows 7 has a limitation related to SLIC 2.1 and Windows marker. For more info, see <a href="https://support.microsoft.com/en-us/help/942962">here</a> and <a href="https://technet.microsoft.com/en-us/library/ff793426(v=ws.10).aspx#activation-of-windows-oem-computers">here</a>.</li>
<li>supported <u>Windows</u> products do not need volume conversion, only the GVLK (KMS key) is needed, which the script will install accordingly.</li>
<li>KMS activation on Windows 7 has a limitation related to OEM Activation 2.0 and Windows marker. For more info, see <a href="https://support.microsoft.com/en-us/help/942962">here</a> and <a href="https://technet.microsoft.com/en-us/library/ff793426(v=ws.10).aspx#activation-of-windows-oem-computers">here</a>. To verify the activation possibility before attempting, see <a href="https://forums.mydigitallife.net/posts/1553139/">this</a>.</li>
</ul>
<p>______________________________</p>
<h3>Unsupported Products</h3>
<ul>
<li>Office Retail</li>
<li>Office UWP (Windows 10 Apps)</li>
<li>Windows Editions which do not support KMS activation by design:<br />
Windows Evaluation Editions<br />
Windows 7 (Starter, HomeBasic, HomePremium, Ultimate)<br />
Windows 10 (Cloud "S", IoTEnterprise, IoTEnterpriseS, ProfessionalSingleLanguage... etc)<br />
Windows Server (Server Foundation, Storage Server, Home Server 2011... etc)</li>
</ul>
<hr />
<br />
<h2><a name="OfficeR2V"></a>Office Retail to Volume</h2>
<h2 id="OfficeR2V">Office Retail to Volume</h2>
<p>Office Retail must be converted to Volume first before it can be activated with KMS</p>
<p>specifically, Office Click-to-Run products, whether installed from ISO (e.g. ProPlus2019Retail.img) or using Office Deployment Tool.</p>
<p>Office 365 itself does not have volume licenses, therefore it will be converted to Office Mondo licenses.</p>
<p>Recommended mode, where you only need to install the activation emulator once. Afterward, the system itself handles and renew activation per schedule.</p>
<li>All switches are case-insensitive, works in any order, but must be separated with spaces.</li><br />
<li>You can specify Configuration switches along with Activation switches.</li><br />
<li>If External mode switch <code>/e</code> is specified without server address, it will be changed to Manual or Auto (depending on SppExtComObjHook.dll presence).</li><br />
<li>If multiple Activation switches <code>/a /m /e</code> are specified together, the last one takes precedence.</li><br />
<li>Uninstall switch <code>/r</code> always takes precedence over Activation switches</li><br />
<li>If these Configuration switches <code>/w /o /c /x</code> are specified without other switches, they only change the corresponding state in Menu.</li><br />
<li>If Process Windows/Office switches <code>/o /w</code> are specified together, the last one takes precedence.</li><br />
<li>Log switch <code>/L</code> only works with Silent switch <code>/s</code></li><br />
<li>If Silent switch <code>/s</code> and/or Debug switch <code>/d</code> are specified without Activation switches, the script will just run activation in Manual or Auto Renewal mode (depending on SppExtComObjHook.dll presence).</li><br />
<li>All switches are case-insensitive, works in any order, but must be separated with spaces.</li>
</ul>
<ul>
<li>You can specify Configuration switches along with Activation switches.</li>
</ul>
<ul>
<li>If External mode switch <code>/e</code> is specified without server address, it will be changed to Manual or Auto (depending on SppExtComObjHook.dll presence).</li>
</ul>
<ul>
<li>If multiple Activation switches <code>/a /m /e</code> are specified together, the last one takes precedence.</li>
</ul>
<ul>
<li>Uninstall switch <code>/r</code> always takes precedence over Activation switches</li>
</ul>
<ul>
<li>If these Configuration switches <code>/w /o /c /x</code> are specified without other switches, they only change the corresponding state in Menu.</li>
</ul>
<ul>
<li>If Process Windows/Office switches <code>/o /w</code> are specified together, the last one takes precedence.</li>
</ul>
<ul>
<li>Log switch <code>/L</code> only works with Silent switch <code>/s</code></li>
</ul>
<ul>
<li>If Silent switch <code>/s</code> and/or Debug switch <code>/d</code> are specified without Activation switches, the script will just run activation in Manual or Auto Renewal mode (depending on SppExtComObjHook.dll presence).</li>
</ul>
<p>
<strong>Examples:</strong>
@ -4031,9 +4075,15 @@ KMS_VL_ALL_AIO.cmd /s
<strong>Remarks:</strong>
</p>
<ul>
<li>In general, Windows batch scripts do not work well with unusual folder paths and files name, which contain non-ascii and unicode characters, long paths and spaces, or some of these special characters <code>` ~ ; ' , ! @ % ^ & ( ) [ ] { } + =</code></li><br />
<li>KMS_VL_ALL_AIO script is coded to correctly handle those limitations, as much as possible.</li><br />
<li>If you changed the script file name and added some unusual characters or spaces, make sure to enclose the script name (or full path) in qoutes marks "" when you run it from command line prompt or another script.</li><br />
<li>In general, Windows batch scripts do not work well with unusual folder paths and files name, which contain non-ascii and unicode characters, long paths and spaces, or some of these special characters <code>` ~ ; ' , ! @ % ^ & ( ) [ ] { } + =</code></li>
</ul>
<ul>
<li>KMS_VL_ALL_AIO script is coded to correctly handle those limitations, as much as possible.</li>
</ul>
<ul>
<li>If you changed the script file name and added some unusual characters or spaces, make sure to enclose the script name (or full path) in qoutes marks "" when you run it from command line prompt or another script.</li>
</ul>
<ul>
<li>By default, even explorer context menu option "Run as administrator" will fail to execute on some of those paths.<br />
In order to fix that, open command prompt as administrator, then copy/paste and execute these commands:</li>