Retrieves a value that specifies how the system was started.
public static final int getCleanBoot()
Returns an integer value that indicates how the system was started.
Use the getCleanBoot method to determine how the user started the system. For applications running on Windows 95/98, you can use this method to determine whether the system is in fail-safe mode. Your application uses this information to operate appropriately when accessing system services and hardware.
The value returned by getCleanBoot can be one of the following values.
Value | Description |
0 | Normal boot |
1 | Fail-safe boot |
2 | Fail-safe boot with network connections |
Note Fail-safe boot (also called SafeBoot) bypasses the user's startup files.