Deep2007
13-10-2010, 18:52
Есть такой скрипт: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
При запуске под Windows XP отображает его серийный номер. Однако, из окна не удается его скопировать - приходиться переписывать самому. Как должен выглядеть скрипт, из окна которого можно скопировать SN?
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
При запуске под Windows XP отображает его серийный номер. Однако, из окна не удается его скопировать - приходиться переписывать самому. Как должен выглядеть скрипт, из окна которого можно скопировать SN?