Cómo ver la clave de producto de Windows 10 usando un script

2019-09-25 18:27:05
Principal·Microsoft·Cómo ver la clave de producto de Windows 10 usando un script

Hay muchas herramientas para extraer la clave de producto de un sistema en vivo o de la sección de registro de una computadora fuera de línea. Además, aquí hay un pequeño Vbscript ordenado que obtiene la clave de producto de su instalación actual de Windows, no se requiere ningún programa de terceros. El script funciona en Windows 7, 8 y Windows 10.

Ver la clave de producto de Windows 10 usando script

Copie el siguiente código en el Bloc de notas y guarde el archivo como GetProductKey.vbs.

 Opción explícito Dim objshell, ruta, ID digital, conjunto de resultados objshell = CreateObject ("WScript.Shell") 'Establecer ruta de clave de registro Ruta = "HKLM \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \"' Valor de clave de registro DigitalID = objshell.RegRead (Path & "DigitalProductId") Dim ProductName, ProductID, ProductKey, ProductData 'Obtener ProductName, ProductID, ProductKey ProductName = "Nombre del producto:" & objshell.RegRead (Path & "ProductName") ProductID = "ID del producto:" & objshell. RegRead (Path & "ProductID") ProductKey = "Clave instalada:" & ConvertToKey (DigitalID) ProductData = ProductName & vbNewLine & ProductID & vbNewLine & ProductKey 'Mostrar messbox si se guarda en un archivo If vbYes = MsgBox (ProductData & vblf & vblf & "¿Guardar en un archivo?", VbYesNo + vbQuestion, "Copia de seguridad de la información de la clave de Windows") y luego guardar la información del producto Fin Si 'Convertir binario en caracteres Función ConvertToKey (Key) Const KeyOffset = 52 Dim isWin8, Maps, i, j, Current, KeyOutput, Por último, keypart1, inserte 'Compruebe si el sistema operativo es Windows 8 isWin8 = (Clave (66) \ 6) Y 1 Clave (66) = (Clave (66) y & HF7) O ((isWin8 y 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 Mientras i> = 0 If (isWin8 = 1) Entonces keypart1 = Mid (KeyOutput, 2, Last) insert = "N" KeyOutput = Reemplazar (KeyOutput, keypart1, keypart1 & insert, 2, 1, 0) If Last = 0 Entonces KeyOutput = insert & KeyOutput End If ConvertToKey = Mid (KeyOutput, 1, 5) & "-" & Mid (KeyOutput, 6, 5) & "-" & Mid (KeyOutput, 11, 5) & "-" & Mid ( KeyOutput, 16, 5) & "-" & Mid (KeyOutput, 21, 5) End Function 'Guardar datos en un archivo Función Save (Data) Dim fso, fName, txt, objshell, UserName Set objshell = CreateObject ("wscript. shell ") 'Obtener el nombre de usuario actual UserName = objshell.ExpandEnvironmentStrings ("% UserName% ")' Crear un archivo de texto en el escritorio fName =" C: \ Users \ "& UserName &" \ Desktop \ WindowsKeyInf o.txt "Establecer fso = CreateObject (" Scripting.FileSystemObject ") Establecer txt = fso.CreateTextFile (fName) txt.Writeline Data txt.Close End Function 

Fuente: Recuperar clave de producto de Windows · GitHub

Haga doble clic para ejecutar el script para encontrar la clave de producto de su instalación de Windows.

La Elección Del Editor