Não consigo encontrar nenhuma documentação sobre as constantes ou o enum da chave de política do produto
O artigo mencionado a seguir cria os engenheiros reversos com o valor binário contido na chave HKLM\System\CurrentControlSet\ProductOptions
.
Inclui também um programa (com código-fonte) para decodificar a chave.
Divertindo-se com o Licenciamento do Windows
If you look into the registry in the key HKLM\System\CurrentControlSet\ProductOptions you will find several licensing related Values.
The ProductType and ProductSuite keys contain the OS Suite and Edition, but the ProductPolicy key is much more interesting. So let’s have a closer look at it
...
As you can see the license names are there as a Unicode string and later on I will show you how we can read the values. But because I didn’t want to extract all the names manually I decided to see if I could reverse the used structure because it didn’t look very complicated
...
It starts with a header:
TProductPolicyHeader = packed record cbSize: DWORD; cbDataSize: DWORD; cbEndMarker: DWORD; Unknown1: DWORD; Unknown2: DWORD; end;
then an array of values follows:
TProductPolicyValue = packed record cbSize: Word; cbName: Word; SlDatatype: Word; cbData: Word; Unknown1: DWORD; Unknown2: DWORD; end;
The SlDataType is a word value that corresponds to the values of the 0SLDATATYPE enum:
_tagSLDATATYPE = ( SL_DATA_NONE = REG_NONE, SL_DATA_SZ = REG_SZ, SL_DATA_DWORD = REG_DWORD, SL_DATA_BINARY = REG_BINARY, SL_DATA_MULTI_SZ = REG_MULTI_SZ, SL_DATA_SUM = 100 ); SLDATATYPE = _tagSLDATATYPE; TSlDataType = SLDATATYPE; PSlDataType = ^SLDATATYPE;
And we end with an End Marker (of size cbEndMarker).