home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / desktop / iat103b.arj / DEMO.BAT next >
DOS Batch File  |  1992-01-25  |  2KB  |  68 lines

  1. @echo off
  2. cls
  3. echo.
  4. echo    This batch file will demonstrate how your system time is automatically
  5. echo changed.  In order for this to work, we have saved today's date in a file
  6. echo called TODAY.TXT, so we can change it back in a moment. HOWEVER, if you are a
  7. echo slow reader and the time is after 11PM, it might be a good idea to wait until
  8. echo it is past 12 midnight, just to be safe.
  9. echo.
  10. echo This demo assumes your system date is prior to April 4, 1992. We'll declare
  11. echo today to be March 7 and temporarily change the system date to 03-07-92.
  12. echo.
  13. savedate
  14. tz-check  :\  > nul
  15. date 03-07-92
  16. pause
  17. tz-check  :\
  18. echo.
  19. echo date 04-15-1992
  20. date 04-15-1992
  21. echo.
  22. echo Now we have changed your system date to April 15, 1992, which is 10 days
  23. echo after Daylight Savings Time begins this year.
  24. echo.
  25. echo Hope this isn't too taxing on you. (Sorry, Couldn't resist.)
  26. echo.
  27. echo Don't worry, we'll put back the correct date as soon as you...
  28. echo.
  29. pause
  30. tz-check  :\
  31. echo.
  32. echo And once we change the date back to the correct date...
  33. echo.
  34. date 03-07-92
  35. echo.
  36. echo ...we'll run the program again, and the time is now also corrected...
  37. echo.
  38. pause
  39. tz-check  :\
  40. echo.
  41. echo ...and one last time, after we restore the REAL current date.
  42. date < today.txt
  43. echo.
  44. pause
  45. set tz=Standard
  46. tz-check  :\
  47. if errorlevel 1 set tz=Daylight
  48. call iprompt.bat
  49. echo.
  50. pause
  51. cls
  52. echo.
  53. echo There.  Your system date and time have been reset to what they were.
  54. echo.
  55. ilicense         
  56. echo.
  57. echo    Something else you may like -- We have also saved your current DOS prompt   
  58. echo and, for now, replaced it with one that makes use of the time zone (located in 
  59. echo IPROMPT.BAT).  We have to end this demo now in order for you to see it. To     
  60. echo change it back, just type MYPROMPT and press Enter.  If it displays gibberish  
  61. echo characters, then you need to install the ANSI.SYS module as a device driver    
  62. echo in your CONFIG.SYS file; consult your MS/DOS manual for instructions.          
  63. echo                                                                                
  64. echo.
  65. pause
  66. cls
  67. if exist vid-mode.bat vid-mode
  68.