sov44
10-03-2011, 09:13
Нашел в инете скрипт по определению регистрационного кода Windows. Хотелось узнать, верно ли он определяет? Возможно ли кроме информации о ключе вывести версию Windows, сведения о ключе (OEM, VL, Retail) и пр. с опросом компьютеров в домене.
Key = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
set wshshell=createobject("wscript.shell")
Value=wshshell.regread("HKLM\" & Key)
msgbox GetKey(Value)
Function GetKey(byval p)
pc="BCDFGHJKMPQRTVWXY2346789"
for i=0 to 28
a=0
for j=0 to 14
a=p(66-j)+a*256
p(66-j)=(a\24) and 255
a=a Mod 24
next
ProductKey=mid(pc,a+1,1) & ProductKey
if (((i+2) Mod 6)=0) and (i<28) then
i=i+1
ProductKey="-" & ProductKey
End If
next
GetKey=ProductKey
End Function
Key = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
set wshshell=createobject("wscript.shell")
Value=wshshell.regread("HKLM\" & Key)
msgbox GetKey(Value)
Function GetKey(byval p)
pc="BCDFGHJKMPQRTVWXY2346789"
for i=0 to 28
a=0
for j=0 to 14
a=p(66-j)+a*256
p(66-j)=(a\24) and 255
a=a Mod 24
next
ProductKey=mid(pc,a+1,1) & ProductKey
if (((i+2) Mod 6)=0) and (i<28) then
i=i+1
ProductKey="-" & ProductKey
End If
next
GetKey=ProductKey
End Function