Ten skrypt vbs czyta ten produkt klucz, WindowsKeyInfo
[ Pobierz całość w formacie PDF ]
Ten skrypt vbs czyta ten produkt klucz zapisujemy jako rozsze¿enie .vbsSet WshShell = CreateObject("WScript.Shell")Key = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"DigitalID = WshShell.RegRead(key & "DigitalProductId")ProductName = "Product Name: " & WshShell.RegRead(Key & "ProductName") & vbNewLineProductID = "Product ID: " & WshShell.RegRead(Key & "ProductID") & vbNewLineProductKey = "Installed Key: " & ConvertToKey(DigitalID)ProductID = ProductName & ProductID & ProductKeyIf vbYes = MsgBox(ProductId & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "Windows Key Information") thenSave ProductIDEnd ifFunction ConvertToKey(Key)Const KeyOffset = 52isWin8 = (Key(66) \ 6) And 1Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4)i = 24Chars = "BCDFGHJKMPQRTVWXY2346789"DoCur = 0X = 14DoCur = Cur * 256Cur = Key(X + KeyOffset) + CurKey(X + KeyOffset) = (Cur \ 24)Cur = Cur Mod 24X = X -1Loop While X >= 0i = i -1KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutputLast = CurLoop While i >= 0If (isWin8 = 1) Thenkeypart1 = Mid(KeyOutput, 2, Last)insert = "N"KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0)If Last = 0 Then KeyOutput = insert & KeyOutputEnd Ifa = Mid(KeyOutput, 1, 5)b = Mid(KeyOutput, 6, 5)c = Mid(KeyOutput, 11, 5)d = Mid(KeyOutput, 16, 5)e = Mid(KeyOutput, 21, 5)ConvertToKey = a & "-" & b & "-" & c & "-" & d & "-" & eEnd FunctionFunction Save(Data)Const ForWRITING = 2Const asASCII = 0Dim fso, f, fName, tsfName = "Windows Key.txt"Set fso = CreateObject("Scripting.FileSystemObject")fso.CreateTextFile fNameSet f = fso.GetFile(fName)Set f = f.OpenAsTextStream(ForWRITING, asASCII)f.Writeline Dataf.CloseEnd Function
[ Pobierz całość w formacie PDF ]