Package com.install4j.api.windows
Enum ElevationState
- java.lang.Object
-
- java.lang.Enum<ElevationState>
-
- com.install4j.api.windows.ElevationState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ElevationState>
public enum ElevationState extends java.lang.Enum<ElevationState>
Enumeration class for the different elevation states the current process can be in.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ELEVATION_STATE_DEFAULT
The current process is not limited and not elevated on Vista or higher.ELEVATION_STATE_FULL
The current process was elevated and runs with full rights.ELEVATION_STATE_LIMITED
The current process runs with limited rights.ELEVATION_STATE_NOT_APPLICABLE
All processes on a system with a Windows version previous to Vista.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
static ElevationState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ElevationState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ELEVATION_STATE_NOT_APPLICABLE
public static final ElevationState ELEVATION_STATE_NOT_APPLICABLE
All processes on a system with a Windows version previous to Vista.
-
ELEVATION_STATE_DEFAULT
public static final ElevationState ELEVATION_STATE_DEFAULT
The current process is not limited and not elevated on Vista or higher. This can be a process of a non-admin user, or of an admin user when UAC is turned off. You can differentiate between those two withUtil.hasFullAdminRights()
.
-
ELEVATION_STATE_LIMITED
public static final ElevationState ELEVATION_STATE_LIMITED
The current process runs with limited rights. UAC is turned on.
-
ELEVATION_STATE_FULL
public static final ElevationState ELEVATION_STATE_FULL
The current process was elevated and runs with full rights. UAC is turned on.
-
-
Method Detail
-
values
public static ElevationState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ElevationState c : ElevationState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ElevationState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<ElevationState>
-
-