Class OSInfo.Windows.CheckIf

  • Enclosing class:
    OSInfo.Windows

    public static final class OSInfo.Windows.CheckIf
    extends java.lang.Object
    Contains boolean functions to check if certain conditions are true.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isActivated()
      Identifies if OS is activated.
      static boolean isCurrentUserAdmin()
      Identifies if the current user is an account administrator.
      static boolean isDomainJoined()
      Identifies if computer has joined a domain.
      static boolean isWin10OrLater()
      Identifies if OS is Windows 10 or later.
      static boolean isWin7OrLater()
      Identifies if OS is Windows 7 or later.
      static boolean isWin81OrLater()
      Identifies if OS is Windows 8.1 or later.
      static boolean isWin8OrLater()
      Identifies if OS is Windows 8 or later.
      static boolean isWindowsDomainController()
      Identifies if OS is a Windows Domain Controller.
      static boolean isWindowsServer()
      Identifies if OS is a Windows Server OS.
      static boolean isWinVistaOrLater()
      Identifies if OS is Vista or later.
      static boolean isWinXP64OrLater()
      Identifies if OS is XP x64 or later.
      static boolean isWinXPOrLater()
      Identifies if OS is XP or later.
      • 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
      • isWindowsServer

        public static boolean isWindowsServer()
        Identifies if OS is a Windows Server OS.
        Returns:
        true if OS is a Windows Server OS
      • isWindowsDomainController

        public static boolean isWindowsDomainController()
        Identifies if OS is a Windows Domain Controller.
        Returns:
        true if OS is a Windows Server OS
      • isDomainJoined

        public static boolean isDomainJoined()
                                      throws java.net.UnknownHostException
        Identifies if computer has joined a domain.
        Returns:
        true if computer has joined a domain
        Throws:
        java.net.UnknownHostException - if error occurs
      • isCurrentUserAdmin

        public static boolean isCurrentUserAdmin()
        Identifies if the current user is an account administrator.
        Returns:
        true if current user is an account administrator
      • isWinXPOrLater

        public static boolean isWinXPOrLater()
                                      throws java.io.IOException,
                                             java.lang.InterruptedException
        Identifies if OS is XP or later.
        Returns:
        true if XP or later, false if 2000 or previous
        Throws:
        java.io.IOException - if error occurs
        java.lang.InterruptedException - if command is interrupted
      • isWinXP64OrLater

        public static boolean isWinXP64OrLater()
                                        throws java.io.IOException,
                                               java.lang.InterruptedException
        Identifies if OS is XP x64 or later.
        Returns:
        true if XP x64 or later, false if XP or previous
        Throws:
        java.io.IOException - if error occurs
        java.lang.InterruptedException - if command is interrupted
      • isWinVistaOrLater

        public static boolean isWinVistaOrLater()
                                         throws java.io.IOException,
                                                java.lang.InterruptedException
        Identifies if OS is Vista or later.
        Returns:
        true if Vista or later, false if XP or previous
        Throws:
        java.io.IOException - if error occurs
        java.lang.InterruptedException - if command is interrupted
      • isWin7OrLater

        public static boolean isWin7OrLater()
                                     throws java.io.IOException,
                                            java.lang.InterruptedException
        Identifies if OS is Windows 7 or later.
        Returns:
        true if Windows 7 or later, false if Vista or previous
        Throws:
        java.io.IOException - if error occurs
        java.lang.InterruptedException - if command is interrupted
      • isWin8OrLater

        public static boolean isWin8OrLater()
                                     throws java.io.IOException,
                                            java.lang.InterruptedException
        Identifies if OS is Windows 8 or later.
        Returns:
        true if Windows 8 or later, false if Windows 7 or previous
        Throws:
        java.io.IOException - if error occurs
        java.lang.InterruptedException - if command is interrupted
      • isWin81OrLater

        public static boolean isWin81OrLater()
                                      throws java.io.IOException,
                                             java.lang.InterruptedException
        Identifies if OS is Windows 8.1 or later.
        Returns:
        true if Windows 8.1 or later, false if Windows 8 or previous
        Throws:
        java.io.IOException - if error occurs
        java.lang.InterruptedException - if command is interrupted
      • isWin10OrLater

        public static boolean isWin10OrLater()
                                      throws java.io.IOException,
                                             java.lang.InterruptedException
        Identifies if OS is Windows 10 or later.
        Returns:
        true if Windows 10 or later, false if Windows 10 or previous
        Throws:
        java.io.IOException - if error occurs
        java.lang.InterruptedException - if command is interrupted