SLC GUID Convert Function's.

Discussion in 'Chit Chat' started by Dark Vador, Jun 22, 2025.

  1. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,622
    6,804
    150
    #1 Dark Vador, Jun 22, 2025
    Last edited: Jun 29, 2025
    first, in low level, all operation managed by GUID,
    not partial product KEY, or else.

    let's say i want remove License or product key, i pass Guid,
    who belond to specifc product {SKU} that i want to remove

    SLC.dll offer function to convert one type to another
    SKU - GUID -> to this other type's
    Code:
    "SL_ID_APPLICATION" -> mainly know as WindowsAppID & OfficeAppID
    ~~~~~~~~~~~~~~~~~~~~~~~~
    "SL_ID_PRODUCT_SKU", ID under Main Application
    ~~~~~~~~~~~~~~~~~~~~~~~~
    "SL_ID_LICENSE", Don't know what used for Yet
    "SL_ID_PKEY", GUID that we receive after install Product Key, mainly use for remove Product KEY
    "SL_ID_LICENSE_FILE", Guid for uninstall license blob function
    
    ~~~~~~~~~~~~~~~~~~~~~~~~
    For Application ID ONLY
    ~~~~~~~~~~~~~~~~~~~~~~~~
    "SL_ID_ALL_LICENSES",
    "SL_ID_ALL_LICENSE_FILES",
    
    So, main function that do the Convert, is SLGetSLIDList, which offical supprot by MS,
    but, there is also other function's. Offical & Not offical.

    Let's start with the offical One's, it fail to convert SKU_ID to SL_ID_LICENSE_FILE
    but do let you receive All SL_ID_LICENSE_FILE GUID,
    so, you can remove all license's per APP { WINDOWS APP / OFFICE APP}
    and if you want remove ProductKEY, it does let's you get PKEY guid from SKU

    Another offical function, to Get PKEY Guid from SKU, {for remove with other SLC API }
    is SLGetInstalledProductKeyIds, and if you have actualy whole product key
    you can use SLGetPKeyId to get Pkey guid, and pass it to API.

    now let's go to un document on'e -> SLGetProductSkuInformation,
    first i say it in TSforge, didn't understand too much, after much resaerch.
    found even more hidden gem's
    Code:
    "fileId",               # SL_ID_LICENSE_FILE
    "pkeyId",               # SL_ID_PKEY
    "pkeyIdList"            # SL_ID_PKEY [Same]
    "productSkuId",         # SL_ID_PRODUCT_SKU
    "applicationId"         # SL_ID_APPLICATION
    "licenseId",            # SL_ID_LICENSE
    "privateCertificateId"  # SL_ID_LICENSE
    
    this one convert any to any, include Single SKU to SL_ID_LICENSE_FILE
    that the offical one don't support.
    what does it matter, well,you can remove now A specific SKU
    before that, you would remove store file, and re install all license's,
    no, you can locate SKU per Product, Convert SKU -> LICENSE FILE ID -> remove it
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,622
    6,804
    150
    #2 Dark Vador, Jun 22, 2025
    Last edited: Jun 25, 2025
    (OP)
    let's say you sociopath crazy person,
    who want to remove windows key, without know current key.
    we can use janek2012's magic decoding Function, to decode
    --> HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion
    --> DigitalProductId4 at offset 808 [part of BCDKEY]
    Code:
    struct DigitalProductId4 {
        unsigned int uiSize;
        unsigned short MajorVersion;
        unsigned short MinorVersion;
        WCHAR szAdvancedPid[64];
        WCHAR szActivationId[64];
        WCHAR szOemID[8];
        WCHAR szEditionType[260];
        BYTE bIsUpgrade;
        BYTE bReserved[7];
        BYTE bCDKey[16];
    
    than get Windows Current Product Key, Use SLGetPKeyId to get PKEY GUID, from current Product Key
    than call SLUninstallProofOfPurchase to remove current windows Product Key :D
    it dumb, stupid, but worked. i tried it. the most hard way to remove Windows product Key.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,622
    6,804
    150
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. haber123

    haber123 MDL Member

    Nov 5, 2009
    108
    44
    10
    This is getting interesting.
     
  5. witherornot

    witherornot MDL Member

    Nov 18, 2020
    107
    617
    10
    There is SLGetInstalledProductKeyIds, much simpler than all this.