Mit dieser kleinen Funktion kann man den Windows XP Key ändern. Funktioniert ab SP1
Public Sub ChangeXPKey(ByVal Key As String)
Dim WSH As Object
Key = Replace(Key, "-", "")
WSH = CreateObject("WScript.Shell")
WSH.RegDelete("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer")
For Each Obj As Object In GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("win32_WindowsProductActivation")
Obj.SetProductKey(Key)
Next
End Sub
5 Kommentare zum Snippet