ok, this is what i am running:
Code:
$Return = ChangeVLKey("VP6K44HMRQ86W8YH78DXD2YBQ"); HP1
;$Return = ChangeVLKey("W789C42CGQGPXHRHV4DJCMG4Y"); HP2
;$Return = ChangeVLKey("HPMV67JGMXWMJXRHT3JYGYB4Q"); HP3
? $Return
Get $a
Function ChangeVLKey($VOL_PROD_KEY)
Dim $obj, $objects, $result
;Key is without hyphens (ABCDEFGHIJKLMNOPQRSTUVWXY)
$objects = GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("win32_WindowsProductActivation")
If Not @ERROR
For Each $obj in $objects
$result = $obj.SetProductKey($VOL_PROD_KEY)
$ChangeVLKey = @error
; ? "ActivationRequired: " + $obj.ActivationRequired
; ? "Caption: " + $obj.Caption
; ? "Description: " + $obj.Description
; ? "IsNotificationOn: " + $obj.IsNotificationOn
; ? "ProductID: " + $obj.ProductID
; ? "RemainingEvaluationPeriod: " + $obj.RemainingEvaluationPeriod
; ? "RemainingGracePeriod: " + $obj.RemainingGracePeriod
; ? "ServerName: " + $obj.ServerName
; ? "SettingID: " + $obj.SettingID
Next
EndIf
$ChangeVLKey = @error
Exit $ChangeVLKey
EndFunction