Package com.jgcomptech.tools
Class OSInfo.Windows.Activation
- java.lang.Object
-
- com.jgcomptech.tools.OSInfo.Windows.Activation
-
- Enclosing class:
- OSInfo.Windows
public static final class OSInfo.Windows.Activation extends java.lang.Object
Returns information about the Windows activation status.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OSInfo.Windows.Activation.Status
A list of Activation statuses that are the result of the methods in theOSInfo.Windows.Activation
class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OSInfo.Windows.Activation.Status
getStatusAsEnum()
Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.static java.lang.String
getStatusFromSLMGR()
Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.static java.lang.String
getStatusFromWMI()
Identifies If Windows is Activated, uses WMI.static java.lang.String
getStatusString()
Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.static boolean
isActivated()
Identifies if OS is activated.
-
-
-
Method Detail
-
isActivated
public static boolean isActivated() throws java.io.IOException
Identifies if OS is activated.- Returns:
- true if activated, false if not activated
- Throws:
java.io.IOException
- if error occurs
-
getStatusAsEnum
public static OSInfo.Windows.Activation.Status getStatusAsEnum() throws java.io.IOException
Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.- Returns:
- "Licensed" If Genuinely Activated as enum
- Throws:
java.io.IOException
- if error occurs
-
getStatusString
public static java.lang.String getStatusString() throws java.io.IOException
Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.- Returns:
- "Licensed" If Genuinely Activated
- Throws:
java.io.IOException
- if an error occurs
-
getStatusFromWMI
public static java.lang.String getStatusFromWMI() throws java.io.IOException, java.lang.InterruptedException
Identifies If Windows is Activated, uses WMI.- Returns:
- Licensed If Genuinely Activated
- Throws:
java.io.IOException
- if error occursjava.lang.InterruptedException
- if command is interrupted
-
getStatusFromSLMGR
public static java.lang.String getStatusFromSLMGR() throws java.io.IOException
Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.- Returns:
- Licensed If Genuinely Activated
- Throws:
java.io.IOException
- if an error occurs
-
-