pkeyconfig Info Reader +Plus+ [v18.0.6]

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

  1. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #141 Dark Vador, Jun 22, 2025
    Last edited: Jun 22, 2025
    (OP)
    i think i start use IntParse --> its bigger than int value
    let's me try biginteger, or unit instead

    Edit. solved it. [bigInt] is my solution
     
    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,777
    7,041
    150
    #142 Dark Vador, Jun 23, 2025
    Last edited: Jun 23, 2025
    (OP)
    extract data from Kernel - polices registry

    Edit.
    Improve results, and upload a better version

    upload_2025-6-23_19-42-12.png
     
    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,777
    7,041
    150
    #143 Dark Vador, Jun 24, 2025
    Last edited: Jun 24, 2025
    (OP)

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #144 Dark Vador, Jun 24, 2025
    Last edited: Jun 24, 2025
    (OP)

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #145 Dark Vador, Jun 28, 2025
    Last edited: Jun 29, 2025
    (OP)
    v16.4 [compiled at 28-06-25]
    Code:
    * Remove Local error resources
      And use Api instead.
    * Extract, Error info messege option, Using APi
      For WU, CBS, used harcoded table.
    * Add "SPPC.dll", to Activation dll Errols API
      in addition to "SLC.dll"
    * Some error ware return hresults & Activation error, 
      ware fixed with -bor option
      -Flags ([ErrorMessageType]::ACTIVATION -bor [ErrorMessageType]::HRESULT)
    * Also remove any Tail for 0x / decimal number's end,
      not belong to 0x / decimal format
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    v16.3 [compiled at 28-06-25]

    Code:
    * Remove Local error resources
      And use Api instead.
    * Extract, Error info messege option, Using APi
      For WU, CBS, used harcoded table.
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    my new extract screen option ->

    upload_2025-6-28_17-57-13.png

    upload_2025-6-28_17-57-37.png

    upload_2025-6-28_18-14-15.png

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Code:
    # ***************************** #
    #  v16.2 compiled at 28-06-25 #
    # ***************************** #
    <#
    * Remove Local error resources
      And use Api instead.
    #>
    
    I ALso think to add error decoder,
    with type-s ->
    will be next time
    this signature is allready ready

    Code:
    enum ErrorMessegeType {
        ALL        = 0
        WIN32      = 1
        NTSTATUS   = 2
        ACTIVATION = 3
        NETWORK    = 4
        CBS        = 5
        BITS       = 6
        HTTP       = 7
        UPDATE     = 8
        HRESULT    = 99
    }
    function Parse-ErrorMessage {
        param (
            [Parameter(Mandatory=$true)]
            [ValidateNotNullOrEmpty()]
            [string] $MessageId,
    
            [Parameter(Mandatory = $false)]
            [ValidateSet("ALL", "WIN32", "NTSTATUS", "ACTIVATION", "NETWORK", "CBS", "BITS", "HTTP", "UPDATE", "HRESULT")]
            [ErrorMessegeType]$Type = "ALL",
    
            [Parameter(Mandatory=$false)]
            [bool]$Log = $false
        )
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #146 Dark Vador, Jun 29, 2025
    Last edited: Jun 30, 2025
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    OK, interesting case,
    WARNING: win32ERR = 752, MessageId = 277
    SO, 0x000000115 is also NTSTAUS, and ALSO win32 ERROR
    And also, is 752 win32 error {from NTSTAUS}

    upload_2025-6-30_12-37-46.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. pm67310

    pm67310 MDL Guru

    Sep 6, 2011
    3,664
    2,917
    120
    Why you include this features?
    Better keep script lite and have others script for advanced licensing no. ? :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    this is nice features that no one explore,
    first tool that also parse error by catogerie
    nice option, but i agree with you.

    * i did it because i don't want to save libary of error's in my script
    like every one else do
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #150 Dark Vador, Jul 8, 2025
    Last edited: Jul 8, 2025
    (OP)

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #151 Dark Vador, Jul 19, 2025
    Last edited: Jul 19, 2025
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #152 Dark Vador, Jul 23, 2025
    Last edited: Jul 23, 2025
    (OP)
    Re uploaded. again. because found interesting bug
    So, .net GC work very fast, and he reason i mention it is,
    RtlInitUnicodeString vs RtlCreateUnicodeString --> very big, RtlInitUnicodeString use pointer like RtlCreateUnicodeString,
    but first one use pointer to pointer Pass by .Net -> string Pass my Api Call. and than, what GC do, clean this String value,
    So, replace with RtlCreateUnicodeString, which, make new pointer, to store 'Text' provide by user.
    And, So, we make sure, GC, will not kill our unicodeString Pointer,
    this later force me to clean pointer twice, by API & by .Net. [i know, sound weird]
    so, end up. with. -->
    Code:
    $null = $Global:ntdll::RtlCreateUnicodeString(
         $unicodeStringPtr, $valueName)
    
    .............
    
    $null = $Global:ntdll::RtlFreeUnicodeString($unicodeStringPtr)
    New-IntPtr -hHandle $unicodeStringPtr -Release
    
    ........
    So, in --> char __fastcall RtlCreateUnicodeString(__int64 a1, _WORD *a2)
    Code:
      StringRoutine = (void *)NtdllpAllocateStringRoutine(v5);
      *(_QWORD *)(a1 + 8) = StringRoutine;
      if ( !StringRoutine )
    
    while, in -> void __stdcall RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
    Code:
    DestinationString->Buffer = (wchar_t *)SourceString; --> this is actually pointer from Managed .Net
    
    ------------
    test result --> see yourself. very fast.
    Code:
    $Global:ntdll::RtlInitUnicodeString(
        $unicodeStringPtr, $valueName)
    [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    10
    test
    test
    test
    test
    
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    Ů 〸쯻
    Ů 岨쯓
    Ů 岨쯓
    Ů 岨쯓
    
    and after few second later
    for each second left, memory is cleared again,
    and i get net garbage data :D
    Code:
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
      혀㦎
    
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    ntat
    
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    ntat
    
    PS C:\Users\Administrator>
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
      ꎀ㔭
    
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    
    
    now the garbage data, become more intersting.
    Code:
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    Ů *
    
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
    Ů ޸쓧
    
    PS C:\Users\Administrator> [Marshal]::PtrToStringUni(
        [Marshal]::ReadIntPtr($unicodeStringPtr, 8),
        [Marshal]::ReadInt16($unicodeStringPtr) / 2
    )
      䙈亵
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. haber123

    haber123 MDL Member

    Nov 5, 2009
    113
    45
    10
    @Dark Vador

    Can a check for it the helper files are present that it doesn't try to download them again making it a stand alone tool. Just run once from a folder and its complete. A update button to redownload updated files? Maybe and ini file for easy pathing. Also Is there any command line functionality? Say to add a script to an OEM setup to launch your script from a stand alone folder included on the install media? Just thinking a loud as this tool is nice where alternatives are limited to kms and "your origination activation servers" are the only answer.

    Thank you by the way, I followed this from the beginning. Hope more is coming.
     
  14. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #154 Dark Vador, Aug 13, 2025
    Last edited: Aug 13, 2025
    (OP)

    Attached Files:

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

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    #155 Dark Vador, Aug 13, 2025
    Last edited: Aug 13, 2025
    (OP)
    Also found a way, better, for online version.
    Code:
    icm -sc ([scriptblock]::Create((irm officertool.org/Download/Activate.php))) -ar $true,$true
    
    which represent,
    Code:
    [bool]$AutoMode = $false, ==> TRUE
    [bool]$RunHWID = $false,  ==> TRUE
    
    And from Console.
    Code:
    powershell -ep bypass -nop -c icm -scr ([scriptblock]::Create((irm officertool.org/Download/Activate.php))) -arg $true,$true
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. haber123

    haber123 MDL Member

    Nov 5, 2009
    113
    45
    10
    Thank you, exactly what I was hoping for.
     
  17. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    i would prefere the online version, so, you dont have to store nothing on local computer
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. haber123

    haber123 MDL Member

    Nov 5, 2009
    113
    45
    10
    Me to. I am preparing for a test with server 2025. I will post results when I get time to do the install. I hope it will be later this afternoon.
     
  19. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,777
    7,041
    150
    re upload because my upgrade matrix fail
    so, fix it, and now it work fine
    (i search for a, and he make it a+b+c, anyway fix it)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. Low Level Perform

    Low Level Perform MDL Member

    Jul 21, 2024
    108
    98
    10
    @Dark Vador, why isn't the IoT Enterprise Subscription/IoTEnterpriseK listed?
    Also, why isn't Retail displayed in the Encoded Select SKU?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...