3 Cách Tìm Lại Product Key Windows Đơn Giản và Nhanh Chóng

Khi cài lại Windows, bạn cần Product Key để kích hoạt hệ điều hành. Nếu bạn quên hoặc không nhớ Product Key của mình, đừng lo lắng! Bài viết này sẽ hướng dẫn bạn 3 cách đơn giản và hiệu quả để tìm lại Product Key Windows, giúp bạn kích hoạt Windows thành công sau khi cài đặt lại.

1. Tìm Product Key Windows bằng PowerShell

PowerShell là một công cụ mạnh mẽ có sẵn trên Windows, cho phép bạn truy xuất thông tin hệ thống, bao gồm cả Product Key. Dưới đây là các bước thực hiện:

  1. Mở Notepad trên máy tính.

  2. Sao chép và dán đoạn mã sau vào file Notepad:

function Get-WindowsKey {
    ## function to retrieve the Windows Product Key from any PC
    ## by Jakob Bindslet ([email protected])
    param ($targets = ".")
    $hklm = 2147483650
    $regPath = "SoftwareMicrosoftWindows NTCurrentVersion"
    $regValue = "DigitalProductId"
    Foreach ($target in $targets) {
        $productKey = $null
        $win32os = $null
        $wmi = [WMIClass]"\$targetrootdefault:stdRegProv"
        $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue)
        $binArray = ($data.uValue)[52..66]
        $charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"
        ## decrypt base24 encoded binary data
        For ($i = 24; $i -ge 0; $i--) {
            $k = 0
            For ($j = 14; $j -ge 0; $j--) {
                $k = $k * 256 -bxor $binArray[$j]
                $binArray[$j] = [math]::truncate($k / 24)
                $k = $k % 24
            }
            $productKey = $charsArray[$k] + $productKey
            If (($i % 5 -eq 0) -and ($i -ne 0)) {
                $productKey = "-" + $productKey
            }
        }
        $win32os = Get-WmiObject Win32_OperatingSystem -computer $target
        $obj = New-Object Object
        $obj | Add-Member Noteproperty Computer -value $target
        $obj | Add-Member Noteproperty Caption -value $win32os.Caption
        $obj | Add-Member Noteproperty CSDVersion -value $win32os.CSDVersion
        $obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture
        $obj | Add-Member Noteproperty BuildNumber -value $win32os.BuildNumber
        $obj | Add-Member Noteproperty RegisteredTo -value $win32os.RegisteredUser
        $obj | Add-Member Noteproperty ProductID -value $win32os.SerialNumber
        $obj | Add-Member Noteproperty ProductKey -value $productkey
        $obj
    }
}
  1. Lưu file Notepad với phần mở rộng “.ps1” (ví dụ: keyfinder.ps1) vào một vị trí dễ tìm, chẳng hạn như màn hình Desktop.
    Lưu file .ps1 để tìm Product Key WindowsLưu file .ps1 để tìm Product Key Windows

  2. Mở PowerShell với quyền quản trị viên. Bạn có thể tìm kiếm “PowerShell” trong Start Menu, sau đó nhấp chuột phải và chọn “Run as administrator”.

  3. Cho phép thực thi các script bằng cách nhập lệnh sau và nhấn Enter:

Set-ExecutionPolicy RemoteSigned

Khi được hỏi, hãy nhập A (Yes to All) và nhấn Enter.

Cho phép PowerShell thực thi scriptCho phép PowerShell thực thi script

  1. Chạy script để hiển thị Product Key. Thay đổi đường dẫn file nếu bạn lưu file .ps1 ở vị trí khác.
Import-Module C:UsersYourUsernameDesktopkeyfinder.ps1; Get-WindowsKey

Thay “C:UsersYourUsernameDesktopkeyfinder.ps1” bằng đường dẫn thực tế đến file .ps1 bạn đã lưu.

  1. Product Key Windows của bạn sẽ hiển thị trên màn hình.

Product Key Windows hiển thị trên PowerShellProduct Key Windows hiển thị trên PowerShell

2. Lấy Product Key Windows bằng Command Prompt

Command Prompt là một công cụ dòng lệnh khác của Windows, cũng có thể giúp bạn tìm lại Product Key.

  1. Mở Command Prompt với quyền quản trị viên. Bạn có thể nhấp chuột phải vào nút Start và chọn “Command Prompt (Admin)” hoặc “Windows PowerShell (Admin)”.

  2. Nhập lệnh sau và nhấn Enter:

wmic path softwarelicensingservice get OA3xOriginalProductKey

Tìm Product Key bằng Command PromptTìm Product Key bằng Command Prompt

  1. Product Key của bạn sẽ hiển thị ngay bên dưới dòng lệnh.

3. Tìm Product Key Windows trong Registry Editor và Giải Mã

Registry Editor là một công cụ quản lý cơ sở dữ liệu cấu hình của Windows. Mặc dù Product Key được lưu trữ ở dạng mã hóa trong Registry, bạn có thể giải mã nó bằng một công cụ hỗ trợ.

  1. Mở Registry Editor. Tìm kiếm “regedit” trong Start Menu và chọn “Registry Editor”.

  2. Điều hướng đến đường dẫn sau:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion
  1. Ở khung bên phải, tìm giá trị có tên DigitalProductId. Đây là Product Key đã được mã hóa.
    Giá trị DigitalProductId trong Registry EditorGiá trị DigitalProductId trong Registry Editor

  2. Để giải mã, bạn cần một công cụ hỗ trợ. Một trong số đó là WinProdKeyFinder, một công cụ mã nguồn mở miễn phí.

  3. Tải WinProdKeyFinder từ Github (tìm kiếm trên Google để tìm nguồn tải chính thức và đáng tin cậy).

  4. Giải nén file ZIP và chạy file WinProdKeyFind.exe.

  5. Trong Registry Editor, nhấp chuột phải vào thư mục CurrentVersion và chọn Export.
    Export thư mục CurrentVersion trong Registry EditorExport thư mục CurrentVersion trong Registry Editor

  6. Lưu file .reg vào Desktop.

  7. Nhấp chuột phải vào file .reg vừa lưu và chọn Edit.

  8. Tìm dòng chứa giá trị DigitalProductId (bắt đầu bằng DigitalProductId=hex:). Sao chép toàn bộ đoạn mã HEX.
    Sao chép mã HEX của DigitalProductIdSao chép mã HEX của DigitalProductId

  9. Trong WinProdKeyFinder, nhấp vào nút Decode DigitalProductID.

  10. Dán đoạn mã HEX đã sao chép vào ô trống và nhấp vào nút Parse DigitalProductId.
    Dán mã HEX vào WinProdKeyFinderDán mã HEX vào WinProdKeyFinder

  11. WinProdKeyFinder sẽ giải mã và hiển thị Product Key Windows của bạn.
    WinProdKeyFinder hiển thị Product KeyWinProdKeyFinder hiển thị Product Key

Kết luận

Với 3 cách trên, bạn có thể dễ dàng tìm lại Product Key Windows của mình một cách nhanh chóng và hiệu quả. Hãy lưu lại Product Key ở một nơi an toàn để sử dụng khi cần thiết. Chúc bạn thành công!