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.ObjectReturns information about the Windows activation status.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOSInfo.Windows.Activation.StatusA list of Activation statuses that are the result of the methods in theOSInfo.Windows.Activationclass.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OSInfo.Windows.Activation.StatusgetStatusAsEnum()Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.static java.lang.StringgetStatusFromSLMGR()Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.static java.lang.StringgetStatusFromWMI()Identifies If Windows is Activated, uses WMI.static java.lang.StringgetStatusString()Identifies If Windows is Activated, uses the Software Licensing Manager Script, this is the quicker method.static booleanisActivated()Identifies if OS is activated.
-
-
-
Method Detail
-
isActivated
public static boolean isActivated() throws java.io.IOExceptionIdentifies 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.IOExceptionIdentifies 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.InterruptedExceptionIdentifies 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.IOExceptionIdentifies 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
-
-