Computer >> Hướng Dẫn Máy Tính >  >> Hệ Thống >> Windows

Cách tìm Windows Product Key dùng VB Script trên Windows 11/10

Bài viết chỉ cách tìm Windows 11/10 Product License Key bằng VB Script. Cách này cũng hoạt động trên Windows 8.1, Windows 7 và các phiên bản trước. Nếu cần tìm license/serial Windows, bài này chắc chắn giúp tìm được Windows 10 Product Key.

Tìm Windows 11/10 Product Key bằng VB Script

Cách tìm Windows Product Key dùng VB Script trên Windows 11/10

Mở Notepad, copy-dán đoạn sau:

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function

Trong hộp Save as, chọn All files và lưu thành file .vbs, đặt tên phù hợp như keyfinder.vbs.

Chạy file này, bạn sẽ thấy Windows 10 product key.

Bạn cũng có thể tìm Windows Product Key dùng Command Prompt hoặc PowerShell.

Nếu các cách trên không hiệu quả, có thể dùng phần mềm Key Finder miễn phí để khôi phục và lưu không chỉ Windows, mà cả Office, phần mềm, game serial và license key.

Bài này cũng giúp nếu bạn muốn gỡ Windows Product Key khi cần.