smaharbA
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору [more] Set WshShell = CreateObject("WScript.Shell") MicroSoft="HKLM\SOFTWARE\Microsoft" DigitalProductIdWindows=MicroSoft & "\Windows NT\CurrentVersion\DigitalProductId" on error resume next Set word=CreaTEoBJECT("Word.Application") DigitalProductIdOffice=MicroSoft & "\Office\" & word.Version & "\Registration\" & word.ProductCode & "\DigitalProductId" offset=66 if left(word.Version,2)="14" then offset=822 if err.number=0 then word.quit OfficeKey=GetKey(WshShell.RegRead(DigitalProductIdOffice),offset) s="Ключ Офиса == " & OfficeKey else s="Офиса нема..." end if on error goto 0 offset=66 WindowsKey=GetKey(WshShell.RegRead(DigitalProductIdWindows),offset) s=s & vbcrlf & "Ключ Виндуз == " & WindowsKey createobject("scripting.filesystemobject").opentextfile("numb.txt",2,-1).writeline(s) msgbox s Function GetKey(byval p, offset) pc="BCDFGHJKMPQRTVWXY2346789" for i=0 to 28 a=0 for j=0 to 14 a=p(offset-j)+a*256 p(offset-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 | Всего записей: 8 | Зарегистр. 08-04-2012 | Отправлено: 15:34 08-04-2012 | Исправлено: smaharbA, 15:34 08-04-2012 |
|