怎么能查看电脑安装密匙?|查看电脑安装密匙的操作方法
发布时间:2018-12-02 18:17:20 浏览数: 小编:yue
1.我们做一个脚本程序就可以实现查看了。首先我们在桌面上新建一个文本,建好后打开这个文本。
2.然后将以下这段加粗的代码复制粘贴到文本中。原文复制粘贴即可。
Set WshShell = CreateObject("WScript.Shell")
regKey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
DigitalProductId = WshShell.RegRead(regKey & "DigitalProductId")
WinProductName = "Windows Product Name: " & WshShell.RegRead(regKey & "ProductName") & vbNewLine
WinProductID = "Windows Product ID: " & WshShell.RegRead(regKey & "ProductID") & vbNewLine
WinProductKey = ConvertToKey(DigitalProductId)
strProductKey ="Windows Key: " & WinProductKey & vbNewLine & vbNewLine & "- 由百度ID:qianyuntea提供"& vbNewLine & vbNewLine & "-----------------------------------------点击确定下一步复制密匙"
WinProductID = WinProductName & WinProductID & strProductKey
MsgBox(WinProductID)
Dim ret
ret = InputBox(vbNewLine & "右击密匙,弹出选择复制:"& vbNewLine & vbNewLine & "[ 点击确定或取消退出继续]" ,"Win10 序列号查看器",WinProductKey)
Function ConvertToKey(regKey)
Const KeyOffset = 52
isWin8 = (regKey(66) \ 6) And 1
regKey(66) = (regKey(66) And &HF7) Or ((isWin8 And 2) * 4)
j = 24
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
y = 14
Do
Cur = Cur * 256
Cur = regKey(y + KeyOffset) + Cur
regKey(y + KeyOffset) = (Cur \ 24)
Cur = Cur Mod 24
y = y -1
Loop While y >= 0
j = j -1
winKeyOutput = Mid(Chars, Cur + 1, 1) & winKeyOutput
Last = Cur
Loop While j >= 0
If (isWin8 = 1) Then
keypart1 = Mid(winKeyOutput, 2, Last)
insert = "N"
winKeyOutput = Replace(winKeyOutput, keypart1, keypart1 & insert, 2, 1, 0)
If Last = 0 Then winKeyOutput = insert & winKeyOutput
End If
a = Mid(winKeyOutput, 1, 5)
b = Mid(winKeyOutput, 6, 5)
c = Mid(winKeyOutput, 11, 5)
d = Mid(winKeyOutput, 16, 5)
e = Mid(winKeyOutput, 21, 5)
ConvertToKey = a & "-" & b & "-" & c & "-" & d & "-" & e
End Function
3.然后在文本菜单中,点击文件,弹出点击保存。关掉该窗口
4.然后把这个上扩展名改.VBS格式,原来的是txt文本。这里我们改为序列号查看器.vbs
5.如果没有显示扩展名,需要在资源管理器中的文件夹属性里面,将隐藏扩展名取消,然后再修改为.VBS
6.改好后双击打开这个脚本。我们就可以看到当前系统的版本,产品ID,密匙KEY
按提示,点击“确定”继续。
7.然后选中这个KEY,右击复制,然后在需要使用的地方粘贴就可以了。
接下来再点击“确定”该窗口就关闭。