Getting Activation Status Information

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anybody know how to programmatically determine Windows XP Activation status
I have a C++ application that runs in a Kiosk-type system
Normally the user never sees the desktop, so I need a way for my program to determine whether the system has been activated and how long they have to activate it.
 
Jeff said:
Does anybody know how to programmatically determine Windows XP
Activation status?
I have a C++ application that runs in a Kiosk-type system.
Normally the user never sees the desktop, so I need a way for my
program to determine whether the system has been activated and how
long they have to activate it.

Jeff

The command see the activation status would be:

%SYSTEMROOT%\system32\oobe\msoobe.exe /A

Which brings up the activation wizard and shows the activation status. This
can be initiated from a command prompt, run line or a shortcut.



--
Ronnie Vernon
Microsoft MVP
Windows Shell/User

Please reply to the newsgroup so all may benefit.
http://www.dts-l.org
http://www.mvps.org
 
Jeff said:
That's good to know.
Is there a way to determine status without brining up the activation
wizard? I want to be able to display that information inside my
application.

Thanks,

Jeff

Here is a script from Technet that will do this. It probably gives more info
than you are looking for, but can be tweaked to just give the current
activation status.

----------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colWPA = objWMIService.ExecQuery _
("Select * from Win32_WindowsProductActivation")
For Each objWPA in colWPA
Wscript.Echo "Activation Required: " & objWPA.ActivationRequired
Wscript.Echo "Description: " & objWPA.Description
Wscript.Echo "Product ID: " & objWPA.ProductID
Wscript.Echo "Remaining Evaluation Period: " & _
objWPA.RemainingEvaluationPeriod
Wscript.Echo "Remaining Grace Period: " & objWPA.RemainingGracePeriod
Wscript.Echo "Server Name: " & objWPA.ServerName
Next
-------------------------------

Save as ActivStat.vbs



--
Ronnie Vernon
Microsoft MVP
Windows Shell/User

Please reply to the newsgroup so all may benefit.
http://www.dts-l.org
http://www.mvps.org
 
Back
Top