HWID Activation Script [ps1 version]

Discussion in 'Scripting' started by Dark Vador, May 21, 2025.

  1. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,444
    6,482
    150
    #1 Dark Vador, May 21, 2025
    Last edited: May 22, 2025
    HWID ps1 script, without too much error log
    it use hwid per productName, if fail
    out-gridview for any supported available product
    don't ask for a support for this, just a share.

    about the kms38 version,
    if hwid product search will fail,
    volume product's will be choice'n
    per current product name +fail safe ->
    any match Vol product's {using grid view}

    for version with Kms38
    use online version, it's too big to share
    or use directly, open the link. and get the source file
    https://officertool.org/Download/Activate.php

    Pastebin link for any case of censored
    https://pastebin.com/XxWw6Ym9

    Credit
    Code:
    ~ PS1 version of HWID_Activation.cmd
    ~ https://massgrave.dev/manual_hwid_activation
    
    Code Only. (no kms38)
    Code:
    # Manually Activate Windows
    # https://massgrave.dev/manual,hwid,activation
    
    # PS1 version of HWID_Activation.cmd
    # Credit WindowsAddict` - Mass Project
    
    cls
    Write-Host
    Write-Host "Notice.!" -ForegroundColor Yellow
    Write-Host
    Write-Host "Evaluation -nor Server Product's are not supported." -ForegroundColor Yellow
    Write-Host "Use TSForge method in such case's" -ForegroundColor Yellow
    
    Write-Host
    Start-Sleep -Seconds 2
    
    $sandbox = "Null" | Get-Service -ErrorAction SilentlyContinue
    if (-not $sandbox) {
        Write-Host "'Null' service found! Possible sandbox environment." -ForegroundColor Red
        Start-Sleep -Seconds 2
        return
    }
    
    # Get the Windows build number from the registry
    $build = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").CurrentBuild
    
    # Convert to integer (safely)
    [int]$buildNum = 0
    if ([int]::TryParse($build, [ref]$buildNum)) {
        # Now $buildNum contains the numeric value
    } else {
        Write-Host "`n[!] Failed to detect Windows build number." -ForegroundColor Red
        Start-Sleep 2
        return
    }
    
    # Check for 0 or invalid build
    if ($buildNum -eq 0) {
        Write-Host "`n[!] Invalid build number detected: 0" -ForegroundColor Red
        Start-Sleep 2
        return
    }
    
    # Check if the build is too old
    if ($buildNum -lt 10240) {
        Write-Host "`n[!] Unsupported OS version detected: $buildNum" -ForegroundColor Red
        Write-Host "HWID Activation is only supported on Windows 10 or 11." -ForegroundColor DarkYellow
        Write-Host "Use the TSforge activation option from the main menu." -ForegroundColor Cyan
        Start-Sleep 2
        return
    }
    
    ("ClipSVC","wlidsvc","sppsvc","KeyIso","LicenseManager","Winmgmt") | % { Start-Service $_}
    
    $LicensingService = gwmi SoftwareLicensingService -ea 1
    $LicensingProducts = gwmi SoftwareLicensingProduct -ea 1 -Filter "ApplicationId='55c92734-d682-4d71-983e-d6ec3f16059f'"
    $EditionID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name EditionID).EditionID
    if (!$EditionID) {
      throw "EditionID Variable not found" }
    $hashTable = @'
    ID,KEY,SKU_ID,Key_part,value,Status,Type,Product
    8b351c9c-f398-4515-9900-09df49427262,XGVPP-NMH47-7TTHJ-W3FW7-8HV2C,4,X19-99683,HGNKjkKcKQHO6n8srMUrDh/MElffBZarLqCMD9rWtgFKf3YzYOLDPEMGhuO/auNMKCeiU7ebFbQALS/MyZ7TvidMQ2dvzXeXXKzPBjfwQx549WJUU7qAQ9Txg9cR9SAT8b12Pry2iBk+nZWD9VtHK3kOnEYkvp5WTCTsrSi6Re4,0,OEM:NONSLP,Enterprise
    c83cef07-6b72-4bbc-a28f-a00386872839,3V6Q6-NQXCX-V8YXR-9QCYV-QPFCT,27,X19-98746,NHn2n0N1UfVf00CfaI5LCDMDsKdVAWpD/HAfUrcTAKsw9d2Sks4h5MhyH/WUx+B6dFi8ol7D3AHorR8y9dqVS1Bd2FdZNJl/tTR1PGwYn6KL88NS19aHmFNdX8s4438vaa+Ty8Qk8EDcwm/wscC8lQmi3/RgUKYdyGFvpbGSVlk,0,Volume:MAK,EnterpriseN
    4de7cb65-cdf1-4de9-8ae8-e3cce27b9f2c,VK7JG-NPHTM-C97JM-9MPGT-3V66T,48,X19-98841,Yl/jNfxJ1SnaIZCIZ4m6Pf3ySNoQXifNeqfltNaNctx+onwiivOx7qcSn8dFtURzgMzSOFnsRQzb5IrvuqHoxWWl1S3JIQn56FvKsvSx7aFXIX3+2Q98G1amPV/WEQ0uHA5d7Ya6An+g0Z0zRP7evGoomTs4YuweaWiZQjQzSpA,0,Retail,Professional
    9fbaf5d6-4d83-4422-870d-fdda6e5858aa,2B87N-8KFHP-DKV6R-Y2C8J-PKCKT,49,X19-98859,Ge0mRQbW8ALk7T09V+1k1yg66qoS0lhkgPIROOIOgxKmWPAvsiLAYPKDqM4+neFCA/qf1dHFmdh0VUrwFBPYsK251UeWuElj4bZFVISL6gUt1eZwbGfv5eurQ0i+qZiFv+CcQOEFsd5DD4Up6xPLLQS3nAXODL5rSrn2sHRoCVY,0,Retail,ProfessionalN
    f742e4ff-909d-4fe9-aacb-3231d24a0c58,4CPRK-NM3K3-X6XXQ-RXX86-WXCHW,98,X19-98877,vel4ytVtnE8FhvN87Cflz9sbh5QwHD1YGOeej9QP7hF3vlBR4EX2/S/09gRneeXVbQnjDOCd2KFMKRUWHLM7ZhFBk8AtlG+kvUawPZ+CIrwrD3mhi7NMv8UX/xkLK3HnBupMEuEwsMJgCUD8Pn6om1mEiQebHBAqu4cT7GN9Y0g,0,Retail,CoreN
    1d1bac85-7365-4fea-949a-96978ec91ae0,N2434-X9D7W-8PF6X-8DV9T-8TYMD,99,X19-99652,Nv17eUTrr1TmUX6frlI7V69VR6yWb7alppCFJPcdjfI+xX4/Cf2np3zm7jmC+zxFb9nELUs477/ydw2KCCXFfM53bKpBQZKHE5+MdGJGxebOCcOtJ3hrkDJtwlVxTQmUgk5xnlmpk8PHg82M2uM5B7UsGLxGKK4d3hi0voSyKeI,0,Retail,CoreCountrySpecific
    3ae2cc14-ab2d-41f4-972f-5e20142771dc,BT79Q-G7N6G-PGBYW-4YWX6-6F4BT,100,X19-99661,FV2Eao/R5v8sGrfQeOjQ4daokVlNOlqRCDZXuaC45bQd5PsNU3t1b4AwWeYM8TAwbHauzr4tPG0UlsUqUikCZHy0poROx35bBBMBym6Zbm9wDBVyi7nCzBtwS86eOonQ3cU6WfZxhZRze0POdR33G3QTNPrnVIM2gf6nZJYqDOA,0,Retail,CoreSingleLanguage
    2b1f36bb-c1cd-4306-bf5c-a0367c2d97d8,YTMG3-N6DKC-DKB77-7M9GH-8HVX7,101,X19-98868,GH/jwFxIcdQhNxJIlFka8c1H48PF0y7TgJwaryAUzqSKXynONLw7MVciDJFVXTkCjbXSdxLSWpPIC50/xyy1rAf8aC7WuN/9cRNAvtFPC1IVAJaMeq1vf4mCqRrrxJQP6ZEcuAeHFzLe/LLovGWCd8rrs6BbBwJXCvAqXImvycQ,0,Retail,Core
    2a6137f3-75c0-4f26-8e3e-d83d802865a4,XKCNC-J26Q9-KFHD2-FKTHY-KD72Y,119,X19-99606,hci78IRWDLBtdbnAIKLDgV9whYgtHc1uYyp9y6FszE9wZBD5Nc8CUD2pI2s2RRd3M04C4O7M3tisB3Ov/XVjpAbxlX3MWfUR5w4MH0AphbuQX0p5MuHEDYyfqlRgBBRzOKePF06qfYvPQMuEfDpKCKFwNojQxBV8O0Arf5zmrIw,0,OEM:NONSLP,PPIPro
    e558417a-5123-4f6f-91e7-385c1c7ca9d4,YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY,121,X19-98886,x9tPFDZmjZMf29zFeHV5SHbXj8Wd8YAcCn/0hbpLcId4D7OWqkQKXxXHIegRlwcWjtII0sZ6WYB0HQV2KH3LvYRnWKpJ5SxeOgdzBIJ6fhegYGGyiXsBv9sEb3/zidPU6ZK9LugVGAcRZ6HQOiXyOw+Yf5H35iM+2oDZXSpjvJw,0,Retail,Education
    c5198a66-e435-4432-89cf-ec777c9d0352,84NGF-MHBT6-FXBX8-QWJK7-DRR8H,122,X19-98892,jkL4YZkmBCJtvL1fT30ZPBcjmzshBSxjwrE0Q00AZ1hYnhrH+npzo1MPCT6ZRHw19ZLTz7wzyBb0qqcBVbtEjZW0Xs2MYLxgriyoONkhnPE6KSUJBw7C0enFVLHEqnVu/nkaOFfockN3bc+Eouw6W2lmHjklPHc9c6Clo04jul0,0,Retail,EducationN
    f6e29426-a256-4316-88bf-cc5b0f95ec0c,PJB47-8PN2T-MCGDY-JTY3D-CBCPV,125,X23-50331,OPGhsyx+Ctw7w/KLMRNrY+fNBmKPjUG0R9RqkWk4e8ez+ExSJxSLLex5WhO5QSNgXLmEra+cCsN6C638aLjIdH2/L7D+8z/C6EDgRvbHMmidHg1lX3/O8lv0JudHkGtHJYewjorn/xXGY++vOCTQdZNk6qzEgmYSvPehKfdg8js,1,Volume:MAK,EnterpriseS,Ge
    cce9d2de-98ee-4ce2-8113-222620c64a27,KCNVH-YKWX8-GJJB9-H9FDT-6F7W2,125,X22-66075,GCqWmJOsTVun9z4QkE9n2XqBvt3ZWSPl9QmIh9Q2mXMG/QVt2IE7S+ES/NWlyTSNjLVySr1D2sGjxgEzy9kLwn7VENQVJ736h1iOdMj/3rdqLMSpTa813+nPSQgKpqJ3uMuvIvRP0FdB7Y4qt8qf9kNKK25A1QknioD/6YubL/4,1,Volume:MAK,EnterpriseS,VB
    d06934ee-5448-4fd1-964a-cd077618aa06,43TBQ-NH92J-XKTM7-KT3KK-P39PB,125,X21-83233,EpB6qOCo8pRgO5kL4vxEHck2J1vxyd9OqvxUenDnYO9AkcGWat/D74ZcFg5SFlIya1U8l5zv+tsvZ4wAvQ1IaFW1PwOKJLOaGgejqZ41TIMdFGGw+G+s1RHsEnrWr3UOakTodby1aIMUMoqf3NdaM5aWFo8fOmqWC5/LnCoighs,0,OEM:NONSLP,EnterpriseS,RS5
    706e0cfd-23f4-43bb-a9af-1a492b9f1302,NK96Y-D9CD8-W44CQ-R8YTK-DYJWX,125,X21-05035,ntcKmazIvLpZOryft28gWBHu1nHSbR+Gp143f/BiVe+BD2UjHBZfSR1q405xmQZsygz6VRK6+zm8FPR++71pkmArgCLhodCQJ5I4m7rAJNw/YX99pILphi1yCRcvHsOTGa825GUVXgf530tHT6hr0HQ1lGeGgG1hPekpqqBbTlg,0,OEM:NONSLP,EnterpriseS,RS1
    faa57748-75c8-40a2-b851-71ce92aa8b45,FWN7H-PF93Q-4GGP8-M8RF3-MDWWW,125,X19-99617,Fe9CDClilrAmwwT7Yhfx67GafWRQEpwyj8R+a4eaTqbpPcAt7d1hv1rx8Sa9AzopEGxIrb7IhiPoDZs0XaT1HN0/olJJ/MnD73CfBP4sdQdLTsSJE3dKMWYTQHpnjqRaS/pNBYRr8l9Mv8yfcP8uS2MjIQ1cRTqRmC7WMpShyCg,0,OEM:NONSLP,EnterpriseS,TH
    3d1022d8-969f-4222-b54b-327f5a5af4c9,*****************************,126,X21-04921,zLPNvcl1iqOefy0VLg+WZgNtRNhuGpn8+BFKjMqjaNOSKiuDcR6GNDS5FF1Aqk6/e6shJ+ohKzuwrnmYq3iNQ3I2MBlYjM5kuNfKs8Vl9dCjSpQr//GBGps6HtF2xrG/2g/yhtYC7FbtGDIE16uOeNKFcVg+XMb0qHE/5Etyfd8,0,Volume:MAK,EnterpriseSN,RS1
    60c243e1-f90b-4a1b-ba89-387294948fb6,NTX6B-BRYC2-K6786-F6MVQ-M7V2X,126,X19-98770,kbXfe0z9Vi1S0yfxMWzI5+UtWsJKzxs7wLGUDLjrckFDn1bDQb4MvvuCK1w+Qrq33lemiGpNDspa+ehXiYEeSPFcCvUBpoMlGBFfzurNCHWiv3o1k3jBoawJr/VoDoVZfxhkps0fVoubf9oy6C6AgrkZ7PjCaS58edMcaUWvYYg,0,Volume:MAK,EnterpriseSN,TH
    01eb852c-424d-4060-94b8-c10d799d7364,3XP6D-CRND4-DRYM2-GM84D-4GG8Y,139,X23-37869,PVW0XnRJnsWYjTqxb6StCi2tge/uUwegjdiFaFUiZpwdJ620RK+MIAsSq5S+egXXzIWNntoy2fB6BO8F1wBFmxP/mm/3rn5C33jtF5QrbNqY7X9HMbqSiC7zhs4v4u2Xa4oZQx8JQkwr8Q2c/NgHrOJKKRASsSckhunxZ+WVEuM,1,Retail,ProfessionalCountrySpecific,Zn
    eb6d346f-1c60-4643-b960-40ec31596c45,DXG7C-N36C4-C4HTG-X4T3X-2YV77,161,X21-43626,MaVqTkRrGnOqYizl15whCOKWzx01+BZTVAalvEuHXM+WV55jnIfhWmd/u1GqCd5OplqXdU959zmipK2Iwgu2nw/g91nW//sQiN/cUcvg1Lxo6pC3gAo1AjTpHmGIIf9XlZMYlD+Vl6gXsi/Auwh3yrSSFh5s7gOczZoDTqQwHXA,0,Retail,ProfessionalWorkstation
    89e87510-ba92-45f6-8329-3afa905e3e83,WYPNQ-8C467-V2W6J-TX4WX-WT2RQ,162,X21-43644,JVGQowLiCcPtGY9ndbBDV+rTu/q5ljmQTwQWZgBIQsrAeQjLD8jLEk/qse7riZ7tMT6PKFVNXeWqF7PhLAmACbE8O3Lvp65XMd/Oml9Daynj5/4n7unsffFHIHH8TGyO5j7xb4dkFNqC5TX3P8/1gQEkTIdZEOTQQXFu0L2SP5c,0,Retail,ProfessionalWorkstationN
    62f0c100-9c53-4e02-b886-a3528ddfe7f6,8PTT6-RNW4C-6V7J2-C2D3X-MHBPB,164,X21-04955,CEDgxI8f/fxMBiwmeXw5Of55DG32sbGALzHihXkdbYTDaE3pY37oAA4zwGHALzAFN/t254QImGPYR6hATgl+Cp804f7serJqiLeXY965Zy67I4CKIMBm49lzHLFJeDnVTjDB0wVyN29pvgO3+HLhZ22KYCpkRHFFMy2OKxS68Yc,0,Retail,ProfessionalEducation
    13a38698-4a49-4b9e-8e83-98fe51110953,GJTYN-HDMQY-FRR76-HVGC7-QPF8P,165,X21-04956,r35zp9OfxKSBcTxKWon3zFtbOiCufAPo6xRGY5DJqCRFKdB0jgZalNQitvjmaZ/Rlez2vjRJnEart4LrvyW4d9rrukAjR3+c3UkeTKwoD3qBl9AdRJbXCa2BdsoXJs1WVS4w4LuVzpB/SZDuggZt0F2DlMB427F5aflook/n1pY,0,Retail,ProfessionalEducationN
    df96023b-dcd9-4be2-afa0-c6c871159ebe,NJCF7-PW8QT-3324D-688JX-2YV66,175,X21-41295,rVpetYUmiRB48YJfCvJHiaZapJ0bO8gQDRoql+rq5IobiSRu//efV1VXqVpBkwILQRKgKIVONSTUF5y2TSxlDLbDSPKp7UHfbz17g6vRKLwOameYEz0ZcK3NTbApN/cMljHvvF/mBag1+sHjWu+eoFzk8H89k9nw8LMeVOPJRDc,0,Retail,ServerRdsh
    d4ef7282-3d2c-4cf0-9976-8854e64a8d1e,V3WVW-N2PV2-CGWC3-34QGF-VMJ2C,178,X21-32983,Xzme9hDZR6H0Yx0deURVdE6LiTOkVqWng5W/OTbkxRc0rq+mSYpo/f/yqhtwYlrkBPWx16Yok5Bvcb34vbKHvEAtxfYp4te20uexLzVOtBcoeEozARv4W/6MhYfl+llZtR5efsktj4N4/G4sVbuGvZ9nzNfQO9TwV6NGgGEj2Ec,0,Retail,Cloud
    af5c9381-9240-417d-8d35-eb40cd03e484,NH9J3-68WK7-6FB93-4K3DF-DJ4F6,179,X21-32987,QGRDZOU/VZhYLOSdp2xDnFs8HInNZctcQlWCIrORVnxTQr55IJwN4vK3PJHjkfRLQ/bgUrcEIhyFbANqZFUq8yD1YNubb2bjNORgI/m8u85O9V7nDGtxzO/viEBSWyEHnrzLKKWYqkRQKbbSW3ungaZR0Ti5O2mAUI4HzAFej50,0,Retail,CloudN
    8ab9bdd1-1f67-4997-82d9-8878520837d9,XQQYW-NFFMW-XJPBH-K8732-CKFFD,188,X21-99378,djy0od0uuKd2rrIl+V1/2+MeRltNgW7FEeTNQsPMkVSL75NBphgoso4uS0JPv2D7Y1iEEvmVq6G842Kyt52QOwXgFWmP/IQ6Sq1dr+fHK/4Et7bEPrrGBEZoCfWqk0kdcZRPBij2KN6qCRWhrk1hX2g+U40smx/EYCLGh9HCi24,0,OEM:DM,IoTEnterprise
    ed655016-a9e8-4434-95d9-4345352c2552,QPM6N-7J2WJ-P88HH-P3YRH-YY74H,191,X21-99682,qHs/PzfhYWdtSys2edzcz4h+Qs8aDqb8BIiQ/mJ/+0uyoJh1fitbRCIgiFh2WAGZXjdgB8hZeheNwHibd8ChXaXg4u+0XlOdFlaDTgTXblji8fjETzDBk9aGkeMCvyVXRuUYhTSdp83IqGHz7XuLwN2p/6AUArx9JZCoLGV8j3w,0,OEM:NONSLP,IoTEnterpriseS,VB
    6c4de1b8-24bb-4c17-9a77-7b939414c298,CGK42-GYN6Y-VD22B-BX98W-J8JXD,191,X23-12617,J/fpIRynsVQXbp4qZNKp6RvOgZ/P2klILUKQguMlcwrBZybwNkHg/kM5LNOF/aDzEktbPnLnX40GEvKkYT6/qP4cMhn/SOY0/hYOkIdR34ilzNlVNq5xP7CMjCjaUYJe+6ydHPK6FpOuEoWOYYP5BZENKNGyBy4w4shkMAw19mA,0,OEM:NONSLP,IoTEnterpriseS,Ge
    d4bdc678-0a4b-4a32-a5b3-aaa24c3b0f24,K9VKN-3BGWV-Y624W-MCRMQ-BHDCD,202,X22-53884,kyoNx2s93U6OUSklB1xn+GXcwCJO1QTEtACYnChi8aXSoxGQ6H2xHfUdHVCwUA1OR0UeNcRrMmOzZBOEUBtdoGWSYPg9AMjvxlxq9JOzYAH+G6lT0UbCWgMSGGrqdcIfmshyEak3aUmsZK6l+uIAFCCZZ/HbbCRkkHC5rWKstMI,0,Retail,CloudEditionN
    92fb8726-92a8-4ffc-94ce-f82e07444653,KY7PN-VR6RX-83W6Y-6DDYQ-T6R4W,203,X22-53847,gD6HnT4jP4rcNu9u83gvDiQq1xs7QSujcDbo60Di5iSVa9/ihZ7nlhnA0eDEZfnoDXriRiPPqc09T6AhSnFxLYitAkOuPJqL5UMobIrab9dwTKlowqFolxoHhLOO4V92Hsvn/9JLy7rEzoiAWHhX/0cpMr3FCzVYPeUW1OyLT1A,0,Retail,CloudEdition
    5a85300a-bfce-474f-ac07-a30983e3fb90,N979K-XWD77-YW3GB-HBGH6-D32MH,205,X23-15042,blZopkUuayCTgZKH4bOFiisH9GTAHG5/js6UX/qcMWWc3sWNxKSX1OLp1k3h8Xx1cFuvfG/fNAw/I83ssEtPY+A0Gx1JF4QpRqsGOqJ5ruQ2tGW56CJcCVHkB+i46nJAD759gYmy3pEYMQbmpWbhLx3MJ6kvwxKfU+0VCio8k50,0,OEM:DM,IoTEnterpriseSK
    80083eae-7031-4394-9e88-4901973d56fe,P8Q7T-WNK7X-PMFXY-VXHBG-RRK69,206,X23-62084,habUJ0hhAG0P8iIKaRQ74/wZQHyAdFlwHmrejNjOSRG08JeqilJlTM6V8G9UERLJ92/uMDVHIVOPXfN8Zdh8JuYO8oflPnqymIRmff/pU+Gpb871jV2JDA4Cft5gmn+ictKoN4VoSfEZRR+R5hzF2FsoCExDNNw6gLdjtiX94uA,0,OEM:DM,IoTEnterpriseK
    '@
    $customObjectArray = $hashTable | ConvertFrom-Csv
    $SupportedProducts = $LicensingProducts |
        ? { $customObjectArray.ID -contains $_.ID }
    if (-not $SupportedProducts) {
        Write-Host "ERROR: No matching product found for SupportedProducts.ID: $($SupportedProducts.ID)" -ForegroundColor Red
        Start-Sleep -Seconds 2
        return
    }
    $filter = ($SupportedProducts.ID | % {$_}) -join "|"
    $products = $customObjectArray | ? { $_.ID -match $filter } | ? {$_.Status -eq 0 }
    
    $product = $null
    $product = $products | ? {$_.Product -match $EditionID} | select -First 1
    if (-not $product) {
      $product = $products | Out-GridView -Title "Select prefered product's" -OutputMode Single
    }
    
    # ask user ? nope.
    # $product = $products | Out-GridView -Title "Select prefered product's" -OutputMode Single
    
    if (-not $product) {
        Write-Host "ERROR: No matching product found for SupportedProducts.ID: $($SupportedProducts.ID)" -ForegroundColor Red
        Start-Sleep -Seconds 2
        return
    }
    
    $string = 'OSMajorVersion=5;OSMinorVersion=1;OSPlatformId=2;PP=0;Pfn=Microsoft.Windows.'+$($product.SKU_ID)+'.'+$($product.Key_part)+
        '_8wekyb3d8bbwe;PKeyIID=465145217131314304264339481117862266242033457260311819664735280;'
    $string += [char]0
    $encoded = [convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($string))
    
    if ($encoded -notmatch 'AAAA$') {
     Write-Host
     Write-Host "Base64 string doesn't contain 'AAAA'" -ForegroundColor DarkYellow
    }
    
    $signature = '<?xml version="1.0" encoding="utf-8"?><genuineAuthorization xmlns="http://www.microsoft.com/DRM/SL/GenuineAuthorization/1.0">'+
      '<version>1.0</version><genuineProperties origin="sppclient"><properties>OA3xOriginalProductId=;OA3xOriginalProductKey=;SessionId=' +
      $encoded + ';TimeStampClient=2022-10-11T12:00:00Z</properties><signatures><signature name="clientLockboxKey" method="rsa-sha256">' +
      $product.value + '=</signature></signatures></genuineProperties></genuineAuthorization>'
    $outputPath = Join-Path "C:\ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket" "GenuineTicket.xml"
    $geoName = (Get-ItemProperty -Path "HKCU:\Control Panel\International\Geo").Name
    $geoNation = (Get-ItemProperty -Path "HKCU:\Control Panel\International\Geo").Nation
    
    $tdir = "$env:ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket"
    
    # Create directory if it doesn't exist
    if (-not (Test-Path -Path $tdir)) {
        New-Item -ItemType Directory -Path $tdir | Out-Null
    }
    
    # Delete files starting with "Genuine" in $tdir
    Get-ChildItem -Path $tdir -Filter "Genuine*" -File -ErrorAction SilentlyContinue | Remove-Item -Force -ErrorAction SilentlyContinue
    
    # Delete .xml files in $tdir
    Get-ChildItem -Path $tdir -Filter "*.xml" -File -ErrorAction SilentlyContinue | Remove-Item -Force -ErrorAction SilentlyContinue
    
    # Delete all files in the Migration folder
    $migrationPath = "$env:ProgramData\Microsoft\Windows\ClipSVC\Install\Migration"
    if (Test-Path -Path $migrationPath) {
        Get-ChildItem -Path $migrationPath -File -ErrorAction SilentlyContinue | Remove-Item -Force -ErrorAction SilentlyContinue
    }
    
    try {
        if ($geoName -and $geoNation -and ($geoName -ne 'US')){
          Set-WinHomeLocation -GeoId 244 -ea 0 }
        $LicensingService.InstallProductKey($product.Key)
        [System.IO.File]::WriteAllText($outputPath, $signature, [System.Text.Encoding]::UTF8)
        Write-Host
        clipup -v -o
        [System.IO.File]::WriteAllText($outputPath, $signature, [System.Text.Encoding]::UTF8)
        Write-Host
        Restart-Service ClipSVC
        Start-Sleep 1
        Write-Host
        @($LicensingProducts | ? ID -Match $product.ID).Activate()
        Start-Sleep 4
        Write-Host
        $LicensingService.RefreshLicenseStatus()
    }
    catch {
        Write-Host "ERROR: Failed to activate. Operation aborted." -ForegroundColor Red
        Start-Sleep -Seconds 2
        return
    }
    Finally {
      if ($geoNation) {
        Set-WinHomeLocation -GeoId $geoNation -ea 0 }
    }
    

    Online version Of {oHook + TSForge + Hwid -or Kms38}
    Code:
    # Copy paste to PS \ Terminal window
    iex(irm https://officertool.org/Download/Activate.php)
    # Copy paste to PS \ Terminal window
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Hasefroch

    Hasefroch MDL Addicted

    Dec 24, 2018
    518
    381
    30
    What's the difference with "MAS"?
    And I thought HWID was a forbidden thing here
     
  3. CaptainKirk1966

    CaptainKirk1966 Former MDL Guru
    Staff Member

    Oct 31, 2009
    2,680
    1,559
    90
    We have discussed becoming more tolerant of hwid (and ohook) related matters.
     
  4. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,444
    6,482
    150
    Same just using ps1
    Mas work better, just a prototype
    This version, have less error report
    But for function? It work
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream
    Staff Member

    Dec 21, 2012
    7,143
    8,541
    240
    That reminds me that we have forgotten to announce it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,892
    109,297
    450
    #6 Enthousiast, May 22, 2025
    Last edited: May 22, 2025
    And now let's hope we don't get all the malware infected or badly, by chatgpt coded ^^, forks.

    The original MDL HWIDgen project, from which MAS was originated, was not allowed because it would cause dmca requests and that would affect the search engine ratings for MDL (one of the long list that was given to us back then), and now all seems allowed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. CaptainKirk1966

    CaptainKirk1966 Former MDL Guru
    Staff Member

    Oct 31, 2009
    2,680
    1,559
    90
    MAS has certainly been subtly advertised here for years, with expressions like "search for massgravel on Google"

    I'm sure the staff will continue actively watching. But, as nearly as I can tell, it has been a divisive issue for some time, with at least one former staff member vigorously opposed to allowing it here.
     
  8. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,892
    109,297
    450
    #8 Enthousiast, May 22, 2025
    Last edited: May 22, 2025
    Not that subtle but it was the most that was allowed by @Yen. And a bit of discussion. Before that, under *** policies, you got a thread ban for mentioning the findings.

    EDIT, wtf so now mentioning old staff members (even without the @), to show context, is not allowed?
     
    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,444
    6,482
    150
    @Enthousiast
    Let's say I want to build hwid version
    Build by mass source code
    And implement in a script I use
    Why all this negative
    If people possibly will use it for bad stuff
    Not related to me :D
    And chatgpt is the Future, just accept it
    It's make your life easy
    I made thing without it, it took me more time
    It save time, and time is $ as we say
    Anyway I think if people don't like the idea
    I will delete this threads, I only shared it here
    And never outside :)
     
    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,444
    6,482
    150
    Anyway
    Chatgpt it's just N helper
    You can't take 2000 lines of batch file
    And ask Chatgpt make it 80 lines script
    Not working like this, not even to write a virus
    You need to understand the logic you want build
    Function you like to use
    So, yes, it's not work like you say
    Drop some prompts & done
    And I have also fix the code he suggests
    So, yes, dumb with chatgpt can build nothing
    You need to know what is the logic behind the build
    Sorry :D
     
    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,444
    6,482
    150
    And mostly interesting is GitHub
    Own by Ms, host my famous mas activation tool
    First dmca should start there, Not here :cool:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. KleineZiege

    KleineZiege MDL Guru

    Dec 11, 2018
    2,007
    2,267
    90
  13. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,444
    6,482
    150
    3.3 is coming soon :D
    How much soon, don't know dates
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream
    Staff Member

    Dec 21, 2012
    7,143
    8,541
    240
    There's a dev branch for the curious.
     
    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,444
    6,482
    150
    so for my side fun project.
    i add few nice change in my free online `M`A`S alternative `Ps1` service :D
    • auto download clipup.exe file (save in my local server) + signature validation
    • better check for better solution for evel` and server` edition
    • actual check result for kms38 -or hwid activation
    • less ugly error, use more -ea 0, when needed
    Code:
    Write-Host
    Write-Host "Notice:" -ForegroundColor Magenta
    Write-Host
    Write-Host "HWID activation isn't supported for Evaluation or Server versions." -ForegroundColor Yellow
    Write-Host "If HWID activation isn't possible, KMS38 will be used." -ForegroundColor Yellow
    Write-Host "For Evaluation and Server, the script uses alternative methods:" -ForegroundColor Yellow
    Write-Host
    Write-Host "* KMS38   for {Server}`n* TSForge for {Evaluation}" -ForegroundColor Green
    Write-Host
    Start-Sleep -Seconds 2
    
    $sandbox = "Null" | Get-Service -ErrorAction SilentlyContinue
    if (-not $sandbox) {
        Write-Host "'Null' service found! Possible sandbox environment." -ForegroundColor Red
        Start-Sleep -Seconds 2
        return
    }
    
    $ClipUp = Get-Command ClipUp -ea 0
    if (-not $ClipUp) {
      Write-Host
      Write-Host "ClipUp.exe is missing.!" -ForegroundColor Yellow
      Write-Host "Attemp to download ClipUp.exe from remote server" -ForegroundColor Yellow
      iwr https://www.officertool.org/Download/ClipUp.exe -OutFile "$env:windir\ClipUp.exe" -ea 0
      if ([IO.FILE]::Exists("$env:windir\ClipUp.exe")) {
        if (@(Get-AuthenticodeSignature "$env:windir\ClipUp.exe" -ea 0).Status -eq 'Valid') {
          Write-Host "File was download & verified, at location: $env:windir\ClipUp.exe" -ForegroundColor Yellow
        }
        else {
          ri "$env:windir\ClipUp.exe" -Force -ea 0
        }
      }
    }
    
    $osInfo = Get-CimInstance Win32_OperatingSystem
    $server = $osInfo.Caption -match "Server"
    $evaluation = $osInfo.Caption -match "Evaluation"
    
    if ($server) {
      Write-Host
      Write-Host "Server edition found" -ForegroundColor Yellow
      Write-Host "KMS38 will use instead" -ForegroundColor Yellow
    }
    elseif ($evaluation) {
      Write-Host
      Write-Host "evaluation edition found" -ForegroundColor Yellow
      Write-Host "use TSFORGE to Remove-Reset Evaluation Lock" -ForegroundColor Yellow
      Write-Host
      $version = [LibTSforge.Utils]::DetectVersion();
      $production = [LibTSforge.Utils]::DetectCurrentKey();
      [LibTSforge.Modifiers.GracePeriodReset]::Reset($version,$production)
      [LibTSforge.Modifiers.KeyChangeLockDelete]::Delete($version,$production)
      Write-Host
      Write-Host "Done." -ForegroundColor Green
      Start-Sleep 2
      return
    }
    
    ..
    ..
    ..
    
    $ID = $product.ID
    $LicensingProducts = gwmi SoftwareLicensingProduct -ea 1 -Filter "ApplicationId='55c92734-d682-4d71-983e-d6ec3f16059f'"
    $Product = $LicensingProducts | ? ID -EQ $ID
    $UpTo = (Get-date).Year + ([MATH]::Floor($Product.GracePeriodRemaining / (60 * 24 * 365)))
    if ($Vol_Key -and ($UpTo -le 2036)) {
        Write-Host
        Write-Host "KMS38 Activation Failed. End date: ${UpTo}" -ForegroundColor Red
        Write-Host "Try re-apply Activation again later" -ForegroundColor Red
        Write-Host
        Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f" -Force -Recurse -ea 0
        Remove-Item -Path "HKU:\S-1-5-20\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f" -Force -Recurse -ea 0
    }
    elseif (-not $Vol_Key -and $Product.LicenseStatus -ne 1) {
        Write-Host
        Write-Host "HWID Activation Failed." -ForegroundColor Red
        Write-Host "Try re-apply Activation again later" -ForegroundColor Red
        Write-Host
    }
    else {
        Write-Host
        Write-Host "everything is Well Done" -ForegroundColor Yellow
        Write-Host "Go Home & Rest. !" -ForegroundColor Yellow
        Write-Host
    }
    Start-Sleep 3
    }
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. oyh023

    oyh023 MDL Junior Member

    May 6, 2014
    95
    58
    0
    #16 oyh023, May 23, 2025
    Last edited: May 23, 2025
  17. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,444
    6,482
    150
    i don't even use this old version of office :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. CaptainKirk1966

    CaptainKirk1966 Former MDL Guru
    Staff Member

    Oct 31, 2009
    2,680
    1,559
    90
  19. pm67310

    pm67310 MDL Guru

    Sep 6, 2011
    3,559
    2,793
    120
    Nb for mail avoid outlook 2010 you need for compatibility use office 2021 or up ( office 2016 and 2019 are end of life )
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,444
    6,482
    150
    Darki add volume activation to ps1 online activation service
    Took a few few few couple hour's
    From morning till 3 am
    It based on some custom logic for office ( conversation part, different from Kms vl all)
    But windows conversation logic as Kms vl all, guid & key table and blocked id list
    I thought use original.dll but use online available service instead
    Maybe it bee in future ?
    It detected mak, retail, OEM & ohook & kms38 -or 4k
    If such cases, ignore and skip activation
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...