home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / t / tsbat.zip / TSBAT.EXE / BOOT.BAT < prev    next >
DOS Batch File  |  1992-09-15  |  3KB  |  100 lines

  1. echo off
  2. echo.
  3. echo ┌─────────────────────────────────────────────────┐
  4. echo │ Choose the boot configuration for the next boot │
  5. echo │ By Prof. Timo Salmi, ts@uwasa.fi, Tue 15-Sep-92 │
  6. echo └─────────────────────────────────────────────────┘
  7. echo.
  8.  
  9. rem Put a line with the word "Description:" into your alternative
  10. rem autoexec.bat files to show which boot is now on, E.g.
  11. rem Description: LastByte upper memory manager boot
  12.  
  13. rem Prevent accidental booting with a program from TSTSR*.ZIP
  14. rem Also needs mark-release from Turbo Power TSRCOM*.ZIP
  15. if not exist c:\tuki\noboot.exe goto _checkpar
  16. mark bootd > nul
  17. c:\tuki\noboot > nul
  18.  
  19. rem If no parameter give help, and show the current boot choice
  20. :_checkpar
  21. if "%1"=="" goto _help
  22.  
  23. rem Turn off the read-only attribute
  24. attrib -r c:\autoexec.bat
  25. attrib -r c:\config.sys
  26.  
  27. rem Choose the next boot
  28. for %%f in (1 2 3 4 5 6) do if "%1"=="%%f" goto _%%f
  29. echo Unknown option %1
  30. echo.
  31. goto :_help
  32.  
  33. :_1
  34. copy c:\confnorm.sys c:\config.sys > nul
  35. copy c:\autonorm.bat c:\autoexec.bat > nul
  36. goto _common
  37.  
  38. :_2
  39. copy c:\conftlb.sys c:\config.sys > nul
  40. copy c:\autotlb.bat c:\autoexec.bat > nul
  41. goto _common
  42.  
  43. :_3
  44. copy c:\confcd.sys c:\config.sys > nul
  45. copy c:\autocd.bat c:\autoexec.bat > nul
  46. goto _common
  47.  
  48. :_4
  49. copy c:\conftest.sys c:\config.sys > nul
  50. copy c:\autotest.bat c:\autoexec.bat > nul
  51. goto _common
  52.  
  53. :_5
  54. copy c:\confntsr.sys c:\config.sys > nul
  55. copy c:\autontsr.bat c:\autoexec.bat > nul
  56. goto _common
  57.  
  58. :_6
  59. copy c:\confansi.sys c:\config.sys > nul
  60. copy c:\autoansi.bat c:\autoexec.bat > nul
  61. goto _common
  62.  
  63. rem Instructions to the user
  64. :_common
  65. set _return=_altcd
  66. goto _subru
  67. :_altcd
  68. echo.
  69. echo ALT-CTRL-DEL to boot
  70.  
  71. rem Turn on the read-only attribute for safety
  72. attrib +r c:\autoexec.bat
  73. attrib +r c:\config.sys
  74. goto :_out
  75.  
  76. rem Help for the user.  Customize as appropriate. If you have a number
  77. rem of options from mine, also edit the "for" statement earlier
  78. :_help
  79. echo Usage: BOOT [Choice]
  80. echo.
  81. echo 1 = My normal MsDos 3.3 boot
  82. echo 2 = LastByte upper memory manager boot
  83. echo 3 = CDROM boot
  84. echo 4 = Test configuration
  85. echo 5 = MsDos 3.3 boot with no TSRs loaded
  86. echo 6 = LastByte upper memory manager boot with ansi
  87. echo.
  88. set _return=_out
  89.  
  90. :_subru
  91. rem Batch subroutine to show which boot choice is the currently selected
  92. echo The current boot is
  93. find "Description:" c:\autoexec.bat
  94. goto %_return%
  95.  
  96. :_out
  97. set _return=
  98. if exist c:\tuki\noboot.exe release bootd > nul
  99. echo on
  100.