查看 Windows 11 的序列號(hào)其實(shí)不用什么第三方工具,只需寫(xiě)一個(gè) VBScript 腳本即可。該腳本同時(shí)適合 Windows 10、Windows 7和更早版本的 Windows。
Set WshShell = CreateObject("WScript.Shell")
strMessage = "Welcome to www.computer26.com"
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")),0,strMessage
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
要使用以上腳本非常簡(jiǎn)單,只需復(fù)制下來(lái)粘貼到一個(gè) TXT 中,將文件的擴(kuò)展名改為 .vbs 再執(zhí)行就可以通過(guò)VBScript腳本查看Windows 11序列號(hào)了。 |