====================================================================================================
   KMS38 Activation:
====================================================================================================

 - This activation activate Windows 10 / Server, until the year 2038.
 - This activation does not store any files in the system.

 - Make sure the following things before applying KMS38 Activation:
   - Prior to the activation, if any KMS activator is installed then make sure to uninstall it.
   - After the activation, if you want to use 180 days KMS activator for office then make sure that 
     it is compatible with Windows KMS38 activation. FYI following activators can activate office 
     without interfering KMS38 activation.

     KMS_VL_ALL by @abbodi1406     https://forums.mydigitallife.net/posts/838808
     Online KMS Activation Script  https://www.nsaneforums.com/topic/316668--/

 - Any KMS Activator which is not compatible with KMS38, can overwrite KMS38 with 180 days 
   activation. To prevent this accidental overwriting, you can apply KMS38 protection, check 
   Extras folder for more details.

 - Why script is setting specific KMS host to 127.0.0.2 (localhost) ?
   - By doing this global KMS IP can not replace KMS38 activation but can be used with Office and
     other Windows Editions.
   - In case you don't like it, you can remove it with following codes, open CMD as admin and enter,

set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
reg delete "HKLM\%SPPk%\55c92734-d682-4d71-983e-d6ec3f16059f" /f
reg delete "HKU\S-1-5-20\%SPPk%\55c92734-d682-4d71-983e-d6ec3f16059f" /f

====================================================================================================

   How it works?
   Is it safe?

   https://pastebin.com/raw/7Xyaf15Z

====================================================================================================
   Supported Products:
====================================================================================================

   Windows 10:

   Core
   CoreCountrySpecific
   CoreN
   CoreSingleLanguage
   Education
   EducationN
   Enterprise
   EnterpriseG
   EnterpriseGN
   EnterpriseN
   EnterpriseS       [LTSB 2016 & LTSC 2019]
   EnterpriseSN      [LTSB 2016 & LTSC 2019]
   Professional
   ProfessionalEducation
   ProfessionalEducationN
   ProfessionalN
   ProfessionalWorkstation
   ProfessionalWorkstationN
   ServerRdsh

   ------------------------

   Windows Server:

   ServerCloudStorage     [Server 2016]
   ServerDatacenter       [Server 2016 & 2019]
   ServerDatacenterCor    [Server 2016 & 2019]
   ServerSolution         [Server 2016 & 2019]
   ServerSolutionCor      [Server 2016 & 2019]
   ServerStandard         [Server 2016 & 2019]
   ServerStandardCor      [Server 2016 & 2019]
   ServerDatacenterACor   [Server Version 1709 & 1803 & 1809 & 1903]
   ServerStandardACor     [Server Version 1709 & 1803 & 1809 & 1903]


   Note - Any Evaluation version of Windows (i.e. 'EVAL' LTSB/C) cannot be activated.
        - KMS38 doesn't support W10 1507. 

====================================================================================================
   Switches in the Script:
====================================================================================================

 - For unattended mode, run the script with /u parameter.

KMS38_Activation.cmd /u

   * Applies to MAS Separate Files version

====================================================================================================
   File Details:
====================================================================================================

 - File Details:

   48d928b1bec25a56fe896c430c2c034b7866aa7a *ClipUp.exe                         Virus Total = 0/66
   73b54242dddf7770cdcaae9278fe1fb530ad5a63 *gatherosstate.exe                  Virus Total = 0/70
   5433d8530fa7649ecd340e024aa28b9da7d1ee68 *slc.dll                            Virus Total = 0/66

   Virus Total Report Date: 08-05-2019

 - File Sources:

   - ClipUp.exe (Original):
     From Windows server 2016 x64 ISO
     (This file is required to activate Server Cor and Acor editions)

   - gatherosstate.exe (Original):
     From Windows 10 x86 17134 ADK

   - slc.dll (Modified):

     Original slshim
     https://github.com/vyvojar/slshim

     New ideas and codes for the slc.dll by @sponpa
     Source Code https://tinyurl.com/y24dbdmw

     Further improvements for the slc.dll by @leitek8
     Source Code http://tinyurl.com/y2a98rlk

     How to compile slc.dll file?
     Download slc.7z Source Code file from the above @leitek8 post's link.
     Download mingw-w64,
     https://sourceforge.net/projects/mingw-w64/files/i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
     Put source code folders in compiler folder in following way,
     mingw64\slcR
     mingw64\slcVL

     Run compile.cmd
     slc.dll = 64bit, slc32.dll (rename to slc.dll) 32bit
     slcR = For Digital License , slcVL = For KMS38

     Done.

====================================================================================================
   Manual Activation Process:
====================================================================================================

 - Prerequisite:
 
   Get the files,  https://s.put.re/JDj9Gk44.7z       9d078cef023a186d488f6545e259165b248e4c91

   Make sure you have following files, 
   48d928b1bec25a56fe896c430c2c034b7866aa7a *ClipUp.exe       
   73b54242dddf7770cdcaae9278fe1fb530ad5a63 *gatherosstate.exe   
   5433d8530fa7649ecd340e024aa28b9da7d1ee68 *slc.dll             

    * ClipUp.exe is only required to activate Server Cor and Acor editions.

   -------------------------------------------------------------------------------------------------

           GVLK                      Windows 10 Editions          

   TX9XD-98N7V-6WMQ6-BX7FG-H8Q99     Core
   PVMJN-6DFY6-9CCP6-7BKTT-D3WVR     CoreCountrySpecific
   3KHY7-WNT83-DGQKR-F7HPR-844BM     CoreN
   7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH     CoreSingleLanguage
   NW6C2-QMPVW-D7KKK-3GKT6-VCFB2     Education
   2WH4N-8QGBV-H22JP-CT43Q-MDWWJ     EducationN
   NPPR9-FWDCX-D2C8J-H872K-2YT43     Enterprise
   YYVX9-NTFWV-6MDM3-9PT4T-4M68B     EnterpriseG
   44RPN-FTY23-9VTTB-MP9BX-T84FV     EnterpriseGN
   DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4     EnterpriseN
   DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ     EnterpriseS               [LTSB 2016]
   M7XTQ-FN8P6-TTKYV-9D4CC-J462D     EnterpriseS               [LTSC 2019]
   QFFDN-GRT3P-VKWWX-X7T3R-8B639     EnterpriseSN              [LTSB 2016]
   92NFX-8DJQP-P6BBQ-THF9C-7CG2H     EnterpriseSN              [LTSC 2019]
   W269N-WFGWX-YVC9B-4J6C9-T83GX     Professional
   6TP4R-GNPTD-KYYHQ-7B7DP-J447Y     ProfessionalEducation
   YVWGF-BXNMC-HTQYQ-CPQ99-66QFC     ProfessionalEducationN
   MH37W-N47XK-V7XM9-C7227-GCQG9     ProfessionalN
   NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J     ProfessionalWorkstation
   9FNHH-K3HBT-3W4TD-6383H-6XYWF     ProfessionalWorkstationN
   7NBT4-WGBQX-MP4H7-QXFF8-YP3KX     ServerRdsh                [Less than 1809]
   CPWHC-NT2C7-VYW78-DHDB2-PG3GK     ServerRdsh                [Greater or Equal 1809]
   
           GVLK                      Windows Server Editions    
   
   QN4C6-GBJD2-FB422-GHWJK-GJG2R     ServerCloudStorage        [Server 2016]
   CB7KF-BWN84-R7R2Y-793K2-8XDDG     ServerDatacenter          [Server 2016]
   WMDGN-G9PQG-XVVXX-R3X43-63DFG     ServerDatacenter          [Server 2019]
   CB7KF-BWN84-R7R2Y-793K2-8XDDG     ServerDatacenterCor       [Server 2016]
   WMDGN-G9PQG-XVVXX-R3X43-63DFG     ServerDatacenterCor       [Server 2019]
   JCKRF-N37P4-C2D82-9YXRT-4M63B     ServerSolution            [Server 2016]
   WVDHN-86M7X-466P6-VHXV7-YY726     ServerSolution            [Server 2019]
   JCKRF-N37P4-C2D82-9YXRT-4M63B     ServerSolutionCor         [Server 2016]
   WVDHN-86M7X-466P6-VHXV7-YY726     ServerSolutionCor         [Server 2019]
   WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY     ServerStandard            [Server 2016]
   N69G4-B89J2-4G8F4-WWYCC-J464C     ServerStandard            [Server 2019]
   WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY     ServerStandardCor         [Server 2016]
   N69G4-B89J2-4G8F4-WWYCC-J464C     ServerStandardCor         [Server 2016]
   6Y6KB-N82V8-D8CQV-23MJW-BWTG6     ServerDatacenterACor      [Server 1709]
   2HXDN-KRXHB-GPYC7-YCKFJ-7FVDG     ServerDatacenterACor      [Server 1803]
   6NMRW-2C8FM-D24W7-TQWMY-CWH2D     ServerDatacenterACor      [Server 1809]
   TX3M3-HN6CW-2D8RM-QKCVK-WT3F3     ServerDatacenterACor      [Server 1903]
   DPCNP-XQFKJ-BJF7R-FRC8D-GF6G4     ServerStandardACor        [Server 1709]
   PTXN8-JFHJM-4WC78-MPCBR-9W4KR     ServerStandardACor        [Server 1803]
   N2KJX-J94YW-TQVFB-DG9YT-724CC     ServerStandardACor        [Server 1809]
   PHN2T-WHKP4-X8RTQ-TD9TT-D3YPC     ServerStandardACor        [Server 1903]

   -------------------------------------------------------------------------------------------------

 - Make sure to properly remove any installed KMS activator.
 - Open CMD as Admin, and enter following listed commands in the sequence in which they are given.
 - Enter Generic Volume License Key (GVLK) (Replace '%key%' with the key from above list) 
   with the following command:
   
slmgr.vbs /ipk %key%

 - Set specific KMS host to 127.0.0.2 [Localhost] with the following command: (Run one by one)
   - By doing this global KMS IP can not replace KMS38 activation but can be used with Office 
     and other Windows Editions.
   - Its optional.

set spp=SoftwareLicensingProduct
for /f "tokens=2 delims==" %G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%' and PartialProductKey is not NULL) get ID /VALUE"') do (set app=%G)
wmic path %spp% where ID='%app%' call ClearKeyManagementServiceMachine
wmic path %spp% where ID='%app%' call ClearKeyManagementServicePort
wmic path %spp% where ID='%app%' call SetKeyManagementServiceMachine MachineName="127.0.0.2"
wmic path %spp% where ID='%app%' call SetKeyManagementServicePort 1688

 - Make sure slc.dll and gatherosstate.exe files are located in the same location.
 - Run gatherosstate.exe
   After a few seconds GenuineTicket.xml file will appear.

 - Copy GenuineTicket.xml to the root of c:\ Drive and,
   [In case of server cor and acor editions, also copy the clipup.exe to the root of c:\ Drive]
   Now apply the following command:

clipup -v -o -altto c:\

   In case of server cor and acor editions, apply the following command:

cd /d c:\
clipup.exe -v -o -altto c:\

 - Activate Windows with the following command: (It'll show errors, don't worry it's fine)

slmgr.vbs /ato

 - Check the expiry date of the activation with the following command: 

slmgr.vbs -xpr

 - If the expiry date is not in the year 2038, then enter the following command: 

slmgr.vbs /rearm-app 55c92734-d682-4d71-983e-d6ec3f16059f
set spp=SoftwareLicensingProduct
for /f "tokens=2 delims==" %G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%' and PartialProductKey is not NULL) get ID /VALUE"') do (set app=%G)
slmgr.vbs /rearm-sku %app%

 - check expiry date again, now it should show activation until the year 2038.

 - Done.

====================================================================================================
   Troubleshoot activation issues:
====================================================================================================

 - Make sure to remove installed KMS activator if there is any.
 - Reboot the system.
 - Now run the script to activate Windows 10, and if unsuccessful, 
   - Try the troubleshoot button in settings activation page.
     If still unsuccessful then read additional troubleshoot options listed below.

   - Open CMD as Admin, and enter the following command:

Dism /online /Cleanup-Image /RestoreHealth

   - After its done, reboot the system and Open CMD as Admin, and enter the following command:

sfc.exe /scannow

   - After its done, reboot the system and run the activation script, and if unsuccessful,
     It's time to clean install the windows :D 

====================================================================================================
   Credits:
====================================================================================================

   'Microsoft Activation Scripts' is just a fork of other honorable developers tools and script.

   The purpose of this script is to create an activator which is opensource and clean from antivirus
   detection. To achieve this I've used the following projects as the base of this script.  
   I would like to say thanks to the following authors for making such awesome projects.

----------------------------------------------------------------------------------------------------

---------------------
   Original Authors:
---------------------

   *Anonymous        Original Author of KMS38 Activation

   @s1ave77          hwid.kms38.gen.mk6.exe
                     https://www.nsaneforums.com/topic/312871--/
                     P.S. @s1ave77 wrote this First frontend program based on the findings of above
                     mentioned *Anonymous Developer.

                     (*Forked it to make it batch script based open source and clean from av's 
                      detection)

   @vyvojar          slshim (slc.dll)
                     https://github.com/vyvojar/slshim/releases

   @abbodi1406       Check-Activation-Status.cmd
                     Check-Activation-Status-Alternative.cmd
                     https://forums.mydigitallife.net/posts/838808
                     (*Applied it as it is)

   @AveYo aka @BAU   Compressed2TXT
                     https://github.com/AveYo/Compressed2TXT
                     (For storing the files in text format)

   @Compo            Extract the text from batch script without character issue
                     https://forums.mydigitallife.net/posts/1221231/

---------------------
   Tweakers/Modders:
---------------------

   @sponpa           New ideas for the HWID/KM38 Generation
                     https://tinyurl.com/y24dbdmw

   @leitek8          Improvements for the slc.dll
                     http://tinyurl.com/y2a98rlk
                     (*Applied it as it is)

   @WindowsAddict    Microsoft Activation Scripts
                     https://www.nsaneforums.com/topic/316668--/

---------------------
          Kind Help:
---------------------

   @RPO              Providing Great support in correction and improvements in this script

   @abbodi1406       Answering all of my queries.

   @BorrowedWifi     Fixing English grammar errors in the Read Me.

====================================================================================================
   Discussion / Error Report / Support / Feedback / etc:
====================================================================================================

 - Go to the homepage,
   Microsoft Activation Scripts https://www.nsaneforums.com/topic/316668--/
   
   Alternatively, email me
   windowsaddict@protonmail.com

====================================================================================================