home *** CD-ROM | disk | FTP | other *** search
- echo off
- echo.
- echo ┌───────────────────────────────────────────────────┐
- echo │ Date and time of the previous boot │
- echo │ By Prof. Timo Salmi, ts@chyde.uwasa.fi, 21-Oct-90 │
- echo └───────────────────────────────────────────────────┘
-
- if "%1"=="" goto _help
-
- rem Record time and date of the current boot
- echo.|date > newboot.$$$
- echo.|time >> newboot.$$$
-
- rem Display the last boot and replace
- if exist oldboot.$$$ find "Current" oldboot.$$$
- if not exist oldboot.$$$ echo Boot date and time recorded
- if exist oldboot.$$$ echo Where "Current" refers to the previous boot
- copy newboot.$$$ oldboot.$$$ > nul
- del newboot.$$$ > nul
- goto _out
-
- :_help
- echo.
- echo To get the information when your system was last booted put the
- echo following line in your autoexec.bat:
- echo.
- echo call LASTBOOT YourInitialsOrWhatever
- echo or
- echo %comspec% /e:1024 /c LASTBOOT YourInitialsOrWhatever
- goto _out
-
- :_out
- echo on
-