HWID Generation without KMS or predecessor install/upgrade
==========================================================

Activate fresh installed Windows (without the need of KMS) via GatherOsState.exe. 

* RETAIL
* OEM_COA_NSLP Licenses
* VOLUME Licenses - There aren't eligible, which means if a Volume ISO with pre-inserted gVLK is installed, the MS Servers won't recognize the systems Digital License. 


After switching to the default keys the system is recognized and will get activated if HWID exists.


Supported Windows 10 editions (SKUs)
====================================
* Core (Home) (N)
* CoreSingleLanguage (N)
* Professional (N)
* ProfessionalEducation (N)
* ProfessionalWorkstation (N)
* Education (N)
* Enterprise (N)
* EnterpriseS (N)

Every SKU except Server versions!


Info
====

* Upgrade licenses are based on hardware IDs stored at MS Servers, so as long as the hardware isn't changed, the system will activate when online. This process uses the generic retail keys (products.ini) but it's the HWID that grants the activation.
* Tool/Script must be run from C:\




1. Get GatherOsState.exe from Windows 10 17134 ISO
3. Extract slshim32.dll (for gatherosstate from x86 ISO) or slshim64.dll (for gatherosstate from the x64 ISO)
4. Place gatherosstate and extracted slshim dll in the same directory
5. Rename slshim.dll to slc.dll
6. Import the following into your registry:

```
reg add "HKLM\SYSTEM\Tokens" /v "Channel" /t REG_SZ /d "Retail" /f
reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Security-SPP-GenuineLocalStatus" /t REG_DWORD /d 1 /f
```

ALTERNATIVE

```
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\Tokens]
"Channel"="Retail"

[HKEY_LOCAL_MACHINE\SYSTEM\Tokens\Kernel]
"Security-SPP-GenuineLocalStatus"=dword:00000001
```

7. Set the real value for %sku% from beneath list.
```
%sku% must be set.


edition=Cloud
sku=178

edition=CloudN
sku=179

edition=Core
sku=101

edition=CoreCountrySpecific
sku=99

edition=CoreN
sku=98

edition=CoreSingleLanguage
sku=100

edition=Education
sku=121

edition=EducationN
sku=122

edition=Enterprise
sku=4

edition=EnterpriseN
sku=27

edition=EnterpriseS
sku=125

edition=EnterpriseSN
sku=126

edition=Professional
sku=48

edition=ProfessionalEducation
sku=164

edition=ProfessionalEducationN
sku=165

edition=ProfessionalN
sku=49

edition=ProfessionalWorkstation
sku=161

edition=ProfessionalWorkstationN
sku=162
```

8. Enter 'default' Retail/OEM key from products.ini

In case you're on Enterprise N or LTSB 2016 N Editions use a elevated Powershell (this will gather the key from within gatherosstate.exe):

```
::EnterpriseN
((Get-Content '.\gatherosstate.exe') -replace "`0" | Select-String -Pattern "(.....-){4}C372T" -AllMatches).Matches | Select-Object -ExpandProperty Value

::EnterpriseSN
((Get-Content '.\gatherosstate.exe') -replace "`0" | Select-String -Pattern "(.....-){4}VMJWR" -AllMatches).Matches | Select-Object -ExpandProperty Value
```

8. Run gatherosstate. After a few seconds you should get GenuineTicket.xml
9. (**optional**) Remove HKEY_LOCAL_MACHINE\SYSTEM\Tokens from your registry via `reg delete "HKLM\SYSTEM\Tokens" /f` or:

```
Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SYSTEM\Tokens]
```

10. Place the created genuineticket at the root of c:\ and in admin CMD and execute `clipup -v -o -altto c:\` 

11. Force the activation with: `cscript /nologo %windir%\system32\slmgr.vbs -ato`



WORKAROUND Method 2 (in case you have troubles with specific versions)
================

1. You need a KMS activated Windows, this variant checks ProfessionalEducation (N) (which the above check doesn't include)
2. Is based on patching the build 17074 gatherosstate.exe (also tested on Build 17623) to accept a Volume activated Windows to gather the genuineticket. This is done via busybox.

```bash
reg delete "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\gatherosstate.exe" /f
```
