home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
-
- @REM Batch file support:
-
- @REM YMark2000 returns an error level that can be used in batch files.
- @REM The error levels returned are:
- @REM
- @REM 0 The system is Year 2000 compliant
- @REM 1 The hardware clock is not compatible to the MC146818
- @REM 2 Progression to the next century is not supported
- @REM 3 Progression to the next century is not supported and
- @REM the hardware clock is not compatible to the MC146818
- @REM 6 The year 2000 is not supported
- @REM 7 The year 2000 is not supported and
- @REM the hardware clock is not compatible to the MC146818
- @REM 8 The leap year of 2000 is not supported
- @REM 16 The BIOS potentially fails a reboot test.
- @REM A manual reboot test is highly recommended.
- @REM 17 BadRTC & bad reboot BIOS
- @REM 18 BadProgression & bad reboot BIOS
- @REM 19 BadProgression & BadRTC & bad reboot BIOS
- @REM 22 BadY2K & bad reboot BIOS
- @REM 23 BadY2K & BadRTC & bad reboot BIOS
- @REM 26 BadLeapYear & BadProgression & bad reboot BIOS
- @REM 27 BadLeapYear & BadProgression & BadRTC & bad reboot BIOS
- @REM
- @REM 255 The program failed to execute. Either the license agreement was not
- @REM accepted, the RTC is not running, or an unknown command line
- @REM parameter was issued.
- @REM
- @REM
- @REM An explanation for the programmers. Error levels are indicated by bit
- @REM fields. Since multiple errors can be detected, the sum of the error
- @REM bits are returned. For example, error level 6 (The Year 2000 is not
- @REM supported) is a combination of BadProgression and BadManualSet (2+4).
- @REM
- @REM struct {
- @REM int BadRTC :1; // 1, The hardware clock is bad
- @REM int BadProgression :1; // 2, Progression to 2000 does not occur
- @REM int BadManualSet :1; // 4, Cannot manually set 2000
- @REM int BadLeapYear :1; // 8, Error in leap year support
- @REM int RebootBIOS :1; // 16, BIOS is known to fail reboot tests
- @REM };
-
-
- REM Execute YMark2000
- 2000.exe
-
- REM An error code has been returned.
- REM Starting at the highest allowable code, dispatch
- REM to the corresponding result.
- if errorlevel == 255 goto Reject
- if errorlevel == 16 goto Level16
- if errorlevel == 8 goto Level8
- if errorlevel == 7 goto Level7
- if errorlevel == 6 goto Level6
- if errorlevel == 3 goto Level3
- if errorlevel == 2 goto Level2
- if errorlevel == 1 goto Level1
- if errorlevel == 0 goto Level0
-
- :Unknown
- REM In theory and practice, the "Unknown Errorlevel" should never be executed
- ECHO ******************************
- ECHO "UNKNOWN ERRORLEVEL"
- ECHO ******************************
- GOTO END
-
- :Level0
- ECHO ******************************
- ECHO "Year 2000 Compliant System"
- ECHO ******************************
- GOTO END
-
- :Level1
- ECHO ******************************
- ECHO "The hardware clock is not compatible to the MC146818"
- ECHO ******************************
- GOTO END
-
- :Level2
- ECHO ******************************
- ECHO "Real-time progression to the next century is not supported"
- ECHO ******************************
- GOTO END
-
- :Level3
- ECHO ******************************
- ECHO "Real-time progression to the next century is not supported and the hardware clock is not compatible to the MC146818"
- ECHO ******************************
- GOTO END
-
- :Level6
- ECHO ******************************
- ECHO "The year 2000 is not supported"
- ECHO ******************************
- GOTO END
-
- :Level7
- ECHO ******************************
- ECHO "The year 2000 is not supported and the hardware clock is not compatible to the MC146818"
- ECHO ******************************
- GOTO END
-
- :Level8
- ECHO ******************************
- ECHO "The leap year of 2000 is not supported"
- ECHO ******************************
- GOTO END
-
- :Level16
- ECHO ******************************
- ECHO "A BIOS that may fail a Y2K reboot test is detected."
- ECHO "A manual reboot test is highly recommended."
- ECHO ******************************
- GOTO END
-
-
-
- :Reject
- ECHO ******************************
- ECHO "The license agreement has been rejected"
- ECHO ******************************
- GOTO END
-
-
- :end
-