Package com.jgcomptech.tools
Class OSInfo.Windows.UserInfo
- java.lang.Object
-
- com.jgcomptech.tools.OSInfo.Windows.UserInfo
-
- Enclosing class:
- OSInfo.Windows
public static final class OSInfo.Windows.UserInfo extends java.lang.ObjectReturns info about the currently logged in user account.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringCurrentDomainName()Returns the network domain name associated with the current user.static java.lang.StringCurrentMachineName()Returns the current host name for the system.static java.lang.StringLoggedInUserName()Returns the user name of the person who is currently logged on to the Windows operating system.static java.lang.StringRegisteredOrganization()Returns the current Registered Organization.static java.lang.StringRegisteredOwner()Returns the current Registered Owner.
-
-
-
Method Detail
-
RegisteredOrganization
public static java.lang.String RegisteredOrganization()
Returns the current Registered Organization.- Returns:
- Registered Organization as string
-
RegisteredOwner
public static java.lang.String RegisteredOwner()
Returns the current Registered Owner.- Returns:
- Registered Owner as string
-
LoggedInUserName
public static java.lang.String LoggedInUserName()
Returns the user name of the person who is currently logged on to the Windows operating system.- Returns:
- Logged in username as string
- Throws:
java.lang.IllegalStateException- if cannot retrieve the logged-in username
-
CurrentDomainName
public static java.lang.String CurrentDomainName()
Returns the network domain name associated with the current user.- Returns:
- Current domain name as string
- Throws:
java.lang.IllegalStateException- if cannot retrieve the joined domain
-
CurrentMachineName
public static java.lang.String CurrentMachineName() throws java.net.UnknownHostExceptionReturns the current host name for the system.- Returns:
- Current domain name as string
- Throws:
java.net.UnknownHostException- if error occurs
-
-