Come visualizzare il codice Product Key di Windows 10 utilizzando Script

Esistono molti strumenti per estrarre il codice Product Key da un sistema attivo o dall'hive del registro di un computer offline. Inoltre, ecco un piccolo Vbscript che ottiene la chiave del prodotto della tua attuale installazione di Windows, non è necessario alcun programma di terze parti. Lo script funziona su Windows 7, 8 e Windows 10.

Visualizza il codice Product Key di Windows 10 tramite script

Copia il seguente codice su Blocco note e salva il file come GetProductKey.vbs.

 Opzione Dim objshell esplicito, percorso, DigitalID, Set di risultati objshell = CreateObject ("WScript.Shell") 'Imposta percorso chiave di registro Percorso = "HKLM \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \"' Valore chiave di registro DigitalID = objshell.RegRead (Path & "DigitalProductId") Dim ProductName, ProductID, ProductKey, ProductData 'Ottieni ProductName, ProductID, ProductKey ProductName = "Nome prodotto:" & objshell.RegRead (Path & "ProductName") ProductID = "ID prodotto:" & objshell. RegRead (Path & "ProductID") ProductKey = "Chiave installata:" & ConvertToKey (DigitalID) ProductData = ProductName & vbNewLine & ProductID & vbNewLine & ProductKey "Mostra messbox se salva su un file Se vbYes = MsgBox (ProductData & vblf & vblf & "Salva in un file?", VbYesNo + vbQuestion, "BackUp Windows Key Information") quindi Salva ProductData End If 'Converti binario in caratteri Funzione ConvertToKey (Key) Const KeyOffset = 52 Dim isWin8, Maps, i, j, Current, KeyOutput, Ultimo, keypart1, inserisci 'Controlla se il sistema operativo è Windows 8 isWin8 = (Key (66) \ 6) E 1 Key (66) = (Key (66) And & HF7) Oppure ((isWin8 And 2) * 4) i = 24 Maps = "BCDFGHJKMPQRTVWXY2346789" Do Current = 0 j = 14 Do Current = Current * 256 Current = Key (j + KeyOffset) + Current Key (j + KeyOffset) = (Current \ 24) Current = Current Mod 24 j = j -1 Loop While j> = 0 i = i -1 KeyOutput = Mid (Maps, Current + 1, 1) & KeyOutput Last = Current Loop Mentre i> = 0 If (isWin8 = 1) Quindi keypart1 = Mid (KeyOutput, 2, Last) insert = "N" KeyOutput = Sostituisci (KeyOutput, keypart1, keypart1 & insert, 2, 1, 0) Se Last = 0 Allora KeyOutput = insert & KeyOutput End Se ConvertToKey = Mid (KeyOutput, 1, 5) & "-" & Mid (KeyOutput, 6, 5) & "-" & Mid (KeyOutput, 11, 5) & "-" & Mid ( KeyOutput, 16, 5) & "-" & Mid (KeyOutput, 21, 5) End Function 'Salva i dati in un file Function Save (Data) Dim fso, fName, txt, objshell, UserName Set objshell = CreateObject ("wscript. shell ") 'Ottieni nome utente corrente UserName = objshell.ExpandEnvironmentStrings ("% UserName% ")' Crea un file di testo sul desktop fName =" C: \ Users \ "& UserName &" \ Desktop \ WindowsKeyI nfo.txt "Set fso = CreateObject (" Scripting.FileSystemObject ") Set txt = fso.CreateTextFile (fName) txt.Writeline Data txt.Close End Function 

Fonte: recuperare il codice Product Key di Windows · GitHub

Fare doppio clic per eseguire lo script per scoprire la chiave del prodotto dell'installazione di Windows.

Chiave del prodotto recuperata utilizzando Vbscript

Articoli Correlati