Created
April 26, 2014 11:54
-
-
Save Ruzzz/11318260 to your computer and use it in GitHub Desktop.
Show WinXP activation info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
computer = "." ' Current | |
set wmiService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & computer & "\root\cimv2") | |
set products = wmiService.ExecQuery("Select * from Win32_WindowsProductActivation") | |
for each product in products | |
text = "Machine name: " & product.ServerName & vbCrLf & _ | |
"ProductID: " & product.ProductID & vbCrLf | |
if product.ActivationRequired = false then _ | |
text = text & "No activation required!" & vbCrLf | |
text = text & _ | |
product.RemainingGracePeriod & " days remaining before activation of the system is required" & vbCrLf & _ | |
product.RemainingEvaluationPeriod & " days remaining before expiration of the media" & vbCrLf & _ | |
"SettingID: " & product.SettingID & vbCrLf & _ | |
"Description: " & product.Description & vbCrLf & _ | |
"Caption: " & product.Caption | |
WScript.Echo text | |
'product.ActivateOnline() | |
'product.SetNotification(0) | |
'product.SetProductKey(XXXXX-XXXXX-XXXXX-XXXXX-XXXXX) | |
next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment