Показать сообщение отдельно
Старый 07.03.2019, 16:46   #4 (permalink)
IronArgument
Специалист
 
Аватар для IronArgument
 
Регистрация: 08.04.2015
Сообщений: 13,664
Сказал(а) спасибо: 107
Поблагодарили 56 раз(а) в 25 сообщениях
Репутация: 76096
По умолчанию

Запускаете программку "Блокнот", копируете туда это:

Код:
Set WshShell = CreateObject("WScript.Shell" )
 regKey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
 DigitalProductId = WshShell.RegRead(regKey & "DigitalProductId" )

 Win7ProductName = "Windows Product Name: " & WshShell.RegRead(regKey & "ProductName" ) & vbNewLine
 Win7ProductID = "Windows Product ID: " & WshShell.RegRead(regKey & "ProductID" ) & vbNewLine
 Win7ProductKey = ConvertToKey(DigitalProductId)
 strProductKey ="Windows 7 Key: " & Win7ProductKey
 Win7ProductID = Win7ProductName & Win7ProductID & strProductKey

 MsgBox(Win7ProductKey)
 MsgBox(Win7ProductID)

 Function ConvertToKey(regKey)
 Const KeyOffset = 52
 isWin7 = (regKey(66) \ 6) And 1
 regKey(66) = (regKey(66) And &HF7) Or ((isWin7 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 (isWin7 = 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
Сохраняете с расширением .vbs, запускаете этот файлик и смотрите.
__________________
Errare humanum est, stultum est in errore perseverare.
IronArgument вне форума   Ответить с цитированием
Ads

Яндекс

Member
 
Регистрация: 31.10.2006
Сообщений: 40200
Записей в дневнике: 0
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Репутация: 55070