Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 occurs
        java.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