pkeyconfig Info Reader - GUI [v8.0.0]

Discussion in 'MDL Projects and Applications' started by Dark Dinosaur, Apr 22, 2024.

  1. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    #41 Dark Dinosaur, Oct 20, 2024
    Last edited: Oct 20, 2024
    (OP)

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Boops

    Boops MDL Addicted

    Jan 5, 2008
    922
    1,217
    30
    I ask this because I understand that the content is the same in 32-bit and 64-bit, isn't that right?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    i agree, look the same.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    #44 Dark Dinosaur, Oct 24, 2024
    Last edited: Oct 24, 2024
    (OP)
    new version sool, add encode keys using pkeyhelper DLL
    using original method was share from `change edition` script (by windows addict)
    with some modification.

    Code:
           laomms (Tony) · GitHub
           public struct ChannelEnum
            {
                public const string eRtail = "Retail";
                public const string eOEM = "OEM";
                public const string eVolume = "Volume";
                public const string eMAK = "Volume:MAK";
                public const string eGVLK = "Volume:GVLK";
            }
    
    upload_2024-10-24_15-7-17.png

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

    i am also add this,
    so encoded keys will be last resurt

    Code:
    # Attempt to set ProductKey from the reference array
                $cInfo.ProductKey = $KeysRef[[INT]$RefGroupId]
    
                # Check if ProductKey is empty and handle accordingly
                if ([STRING]::IsNullOrEmpty($cInfo.ProductKey)) {
                    $value = GetProductKeys -EditionID $EditionId -ProductKeyType $ProductKeyType
    
                    # Set ProductKey based on the result of GetProductKeys or fallback to KeyEncode
                    $cInfo.ProductKey = if ($value) { $value.ProductKey } else { KeyEncode -GroupId $GroupId -Param1 0 -Param2 0 }}
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    #45 Dark Dinosaur, Oct 24, 2024
    Last edited: Oct 24, 2024
    (OP)
    Code:
    # v6.2.0 compiled at 24-10-24
    # Added few new keys
    # Ignore 999999 Products
    # Fixed Sku List declaration
    # Added new way to generate legit keys using undocument API
    # update Encode Form, with new way to encode keys using API
    # update Encode Form, Add SKU List + text box for manual input
    
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. haber123

    haber123 MDL Junior Member

    Nov 5, 2009
    93
    43
    0
    Get an unhandled exception opening some pkeyconfig files (pkey files open in previous versions). Says the character N must be in product key.
     
  7. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    it's a know problem.

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

    So .. with new option.
    (idea from change edition by W.A.)

    dism /online /get-targeteditions

    Code:
    Deployment Image Servicing and Management tool
    Version: 10.0.26100.1150
    
    Image Version: 10.0.26100.2033
    
    Editions that can be upgraded to:
    
    Target Edition : EnterpriseS
    Target Edition : IoTEnterpriseS
    
    The operation completed successfully.
    
    upload_2024-10-24_17-41-52.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    #48 Dark Dinosaur, Oct 24, 2024
    Last edited: Oct 24, 2024
    (OP)
    Fixed. you were right.
    upload fixed version v6.2.F
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    #49 Dark Dinosaur, Oct 24, 2024
    Last edited: Oct 24, 2024
    (OP)
    this is test version.
    it should combile encode using new API + read from xrm-ms file
    the current one only USE api.
    in some cases result will be duplicate
    but i try to ignore the duplicated items.
    as you can see, now it load 7 items instead 5-4
    i can still go back to use only API, tell me your opinion

    new SKU search code.
    Code:
            # v1 directly use API
            $productKeysGPK = GetProductKeys -EditionID $selectedSku
           
            # v2 directly use Config XRM-MS file [+API]
            $ConfigList = GenerateConfigList -pkeyconfig "$env:windir\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms" -IgnoreAPI $true
            $productKeysGCL = $ConfigList| ? EditionId -eq $selectedSku | select ProductKeyType, ProductKey
            $CombinedValues = @{}
           
            if (($productKeysGPK.Count -eq 0) -and ($productKeysGCL.Count -eq 0)) {
                #[MessageBox]::Show("No product keys found for the selected SKU.")
            } else {
                if ($productKeysGPK) {foreach ($key in $productKeysGPK) {
                    if (!$CombinedValues.Contains($key.ProductKeyType)) {
                      $CombinedValues.Add($key.ProductKeyType,$key.ProductKey)}
                }}
                if ($productKeysGCL) {foreach ($key in $productKeysGCL) {
                    if (!$CombinedValues.Contains($key.ProductKeyType)) {
                      $CombinedValues.Add($key.ProductKeyType,$key.ProductKey)}
                }}
                $CombinedValues.GetEnumerator() | % {
                  $dataGridView.Rows.Add($_.Name, $_.Value) }
            }
    
    upload_2024-10-24_22-38-5.png
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    #50 Dark Dinosaur, Oct 25, 2024
    Last edited: Oct 25, 2024
    (OP)

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. haber123

    haber123 MDL Junior Member

    Nov 5, 2009
    93
    43
    0
    Congratulations! This is an amazing script. Polish to gui, tips popups like suggestions are only thing I can suggest. Some fields are hard to know what are valid entries. Like "secret", a balloon with a range of possible values maybe. Key checker would be another nicety. No N value errors this build.
     
  12. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    # v7.0 compiled at 25-10-24
    # Update SKU List
    # update Filter Function
    # Add new Key's from TransmogProvider.dll File

    this result is way better.

    upload_2024-10-25_22-8-14.png
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    this is a test vesion.
    office key's was seperated from windows key's
    all the genine key's from DLL was extracted
    and saved as PS-CUSTOM-OBJECT
    so now i can store 9999X times of the same REF
    and this version choice randomally the key
    if we have 10X time's key's of ref 1564
    it will pick one randomally.
    it lets use the api since the api data extracted fully into script

    ALL keys store as text
    [with the one's was extracted from the dll file]

    upload_2024-10-26_13-48-8.png

    and saved Convert to PSCUSTOMOBJECT

    upload_2024-10-26_13-48-31.png

    logic how it choice the keys, was changed too

    upload_2024-10-26_13-49-4.png
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    #54 Dark Dinosaur, Oct 26, 2024
    Last edited: Oct 27, 2024
    (OP)
    # Update to v7.0.3
    # Add try-Catch to avoid extract failure
    # Move from HASH List to PE CUSTOM OBJECT
    # Update Extract Logic to handle .txt & .ini files

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

    New feature. Extract.
    already add pre defined files
    for easy use.

    Code:
    # Pre Defined Extract system file's
    $PreDefinedXt = @(
        "C:\Windows\System32\ClipUp.exe",
        "C:\Windows\System32\clipwinrt.dll",
        "C:\Windows\System32\LicensingWinRT.dll",
        "C:\Windows\System32\oobe\winsetup.dll",
        "C:\Windows\System32\pkeyhelper.dll",
        "C:\Windows\System32\Dism\TransmogProvider.dll",
        "C:\Program Files\Microsoft Office\root\Office16\protocolhandler.exe",
        "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe",
        "C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\Office16\Mso20win32client.dll",
        "C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\Office16\Mso30win32client.dll",
        "C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\Office16\Mso98win32client.dll",
        "C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX86\Microsoft Shared\Office16\Mso20win32client.dll",
        "C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX86\Microsoft Shared\Office16\Mso30win32client.dll",
        "C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX86\Microsoft Shared\Office16\Mso98win32client.dll"
    )
    
    upload_2024-10-27_1-19-39.png

    upload_2024-10-27_1-20-0.png

    upload_2024-10-27_1-20-26.png
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    Darki have another idea.

    upload_2024-10-27_19-36-55.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    upload new version now.
    which include extract lot of info from registry.
    also include reader for DigitalProductId + DigitalProductId4
    include extract the key's and other values.
    (yep. it store in registry. ! as byte array.)

    i never see one that share a code for extract data from DigitalProductId4
    i look all over MDL for such. :p

    Code:
    # v7.0.5 compiled at 27-10-24
    # Add Extra Info Registry Reader.
    # Add option to extract system keys's
    # Add try-Catch to avoid extract failure
    # Move from HASH List to PE CUSTOM OBJECT
    # Update Extract Logic to handle .txt & .ini files
    # Update Pre-Defined list of extract Loc', x:\Sources\.
    # Add Office Grace key's from OfficeClickToRun.exe file
    # Update SKU-KEY-REF list, with key's from gatherosstate.exe
    # Add extract System key's from Pre-Defined List or Folder or file
    
    upload_2024-10-27_23-29-34.png
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,149
    5,947
    150
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...