用這種方法,輕松找回密碼 windows10密鑰激活碼

Windows 產品密鑰是很重要的一個密碼,它是我們重新安裝激活操作系統時必須要使用的,如果丟失或忘記了 Windows 產品密鑰,將給我們帶來很大的麻煩 。
下面我將提供一個解決方案,你將看到如何使用簡單的 VBS 腳本來顯示已安裝的 Windows 10、Windows 8 或 Windows 7 系統的產品密鑰 。這是從電腦上安裝的操作系統中提取產品密鑰的一個非常簡單的解決方案,無需使用任何第三方軟件 。
與其它方法相比,這個 VBScript 解決方案幾乎是完美的,用戶只需要單擊文件即可 。

用這種方法,輕松找回密碼 windows10密鑰激活碼


一、創建腳本文件
要查看電腦上安裝的 Windows 10 產品密鑰,請執行以下操作:
1.打開記事本 。
2.將以下文本復制并粘貼到“記事本”窗口中:
Option ExplicitDim objshell,path,DigitalID, ResultSet objshell = CreateObject("WScript.Shell") 'Set registry key path Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 'Registry key value DigitalID = objshell.RegRead(Path & "DigitalProductId") Dim ProductName,ProductID,ProductKey,ProductData 'Get ProductName, ProductID, ProductKey ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID") ProductKey = "Installed Key: " & ConvertToKey(DigitalID)ProductData = https://www.iketao.cn/2022/10/20/b6acd84027d433c4/ProductName& vbNewLine & ProductID& vbNewLine & ProductKey'Show messbox if save to a fileIf vbYes = MsgBox(ProductData& vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") thenSave ProductDataEnd If'Convert binary to chars Function ConvertToKey(Key)Const KeyOffset = 52Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert'Check if OS is Windows 8isWin8 = (Key(66) \ 6) And 1Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4)i = 24Maps = "BCDFGHJKMPQRTVWXY2346789"DoCurrent= 0j = 14DoCurrent = Current* 256Current = Key(j + KeyOffset) + CurrentKey(j + KeyOffset) = (Current \ 24)Current=Current Mod 24j = j -1Loop While j >= 0i = i -1KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutputLast = CurrentLoop While i >= 0If (isWin8 = 1) Thenkeypart1 = Mid(KeyOutput, 2, Last)insert = "N"KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0)If Last = 0 Then KeyOutput = insert & KeyOutputEnd IfConvertToKey = Mid(KeyOutput, 1, 5) & "-" & Mid(KeyOutput, 6, 5) & "-" & Mid(KeyOutput, 11, 5) & "-" & Mid(KeyOutput, 16, 5) & "-" & Mid(KeyOutput, 21, 5)End Function 'Save data to a file Function Save(Data)Dim fso, fName, txt,objshell,UserNameSet objshell = CreateObject("wscript.shell")'Get current user nameUserName = objshell.ExpandEnvironmentStrings("%UserName%")'Create a text file on desktopfName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt"Set fso = CreateObject("Scripting.FileSystemObject")Set txt = fso.CreateTextFile(fName)txt.Writeline Datatxt.Close End Function 3.單擊“文件-另存為”命令,在“保存類型”中選擇“所有文件”,在“文件名”中將上面的文本保存到桌面上帶有“ .vbs”擴展名的文件中,文件名可以自己隨意命名 。

用這種方法,輕松找回密碼 windows10密鑰激活碼


提示:為確保正確保存擴展名為“ .vbs”的文件,可以鍵入文件名并用雙引號引起來,例如“BackupWindowsKey.vbs” 。
二、查看/備份 Windows10 產品密鑰
現在打開 BackupWindowsKey.vbs 文件,瞧,Windows10 產品密鑰會顯示在屏幕上!把它記錄下來,保存到一個安全的地方 。

用這種方法,輕松找回密碼 windows10密鑰激活碼


如果你想直接下載得到 BackupWindowsKey.vbs 文件,請關注我,然后私信“密鑰腳本” 。

推薦閱讀