Bonjour,
Voilà où ce trouve la ProductKey/
Option Strict On
Imports Microsoft.Win32
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim Macle As String = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Win8" 'chemin de la clé
Dim var As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Applets\Regedit", True) 'ouvre la clé
var.SetValue("Lastkey", Macle, RegistryValueKind.String) 'ajoute la valeur
var.Close() 'Fermeture du registre
Process.Start("C:\Windows\regedit.exe")
End Sub
End Class
J'ai essayé de lire la valeur, cela ne fonctionne pas pour cette clé!
MsgBox(CStr(My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Win8", "ProductKey", "")))
--
@+ Le Pivert
24 avril 2014 à 18:35
Selon ce que je sais :
- cette clé est créée à la première activation (après avoir été entrée une 1ère fois, donc)
- même après cette première activation, cette clé est "cryptée" sous Windows 8