1. copy and paste following codes into text editor,
2. save it with extionsion '.vbs'
3. run the vbs file,
4. you will see windows cd-key in popup
Set WshShell = CreateObject("WScript.Shell")
winkey = ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
CreateObject("WScript.Shell").Run _
"mshta.exe javascript:eval(""document.parentWindow.clipboardData.setData ('text','" _
& winkey & "');window.close()"")", 0,True
MsgBox(winkey + Chr(13)+ Chr(13) + "Windows Key is copyed to Clipboard")
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
'Computer > Programing' 카테고리의 다른 글
MiTemp2 Read and write to SQL (0) | 2021.08.11 |
---|---|
VS CODE (0) | 2020.03.01 |
Send image file to Telegram (0) | 2019.03.18 |
Clien login python 클리앙 로그인 파이썬 (0) | 2019.02.07 |
Python data structure 파이썬 자료구조 (0) | 2019.02.07 |
Python load json from web (0) | 2019.02.07 |
Telegram URL 이용하여 문자 보내는법 (0) | 2019.02.07 |
Python 실행값을 PHP로 불러오기 (0) | 2019.02.07 |