home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Complet / FreeDOS / fdbootcd.iso / FREEDOS / SETUP / BATCH / AUTORUN.BAT next >
DOS Batch File  |  2004-04-09  |  3KB  |  104 lines

  1. @echo off
  2. set fdosroot=%cdrom%freedos\setup
  3. set path=A:\freedos;%fdosroot%\bin;%fdosroot%\install
  4. cls
  5. for %%x in ( [%lang%] [%color%] [%key%] [%instmode%] [%display%] ) do if %%x==[] goto defaults
  6. goto optmenu1
  7.  
  8. :optmenu1
  9. set menu1_nr=
  10. call %fdosroot%\batch\menu1.bat
  11. echo.
  12. if "%menu1_nr%"=="INSTFDOS" goto optmenu2
  13. if "%menu1_nr%"=="BOOTDISK" call %fdosroot%\batch\bootdisk.bat
  14. if "%menu1_nr%"=="QUIT" LOCALIZE 0.17
  15. if "%menu1_nr%"=="QUIT" goto end
  16. if "%menu1_nr%"=="VIEW" %fdosroot%\bin\pg %cdrom%freedos\docs\install3.txt
  17. if "%menu1_nr%"=="REBOOT" FDISK /REBOOT
  18. cls
  19. goto optmenu1
  20.  
  21. :defaults
  22. alias menu=%fdosroot%\batch\autorun.bat
  23. set nlspath=%fdosroot%\nls
  24. set lang=EN
  25. set color=Color
  26. for %%x in ( 8086 80186 80286 ) do if "%cputype%"=="%%x" set color=Mono
  27. set display=yes
  28. set instmode=Mini
  29. if not "%disksrc%"=="B:" goto optmenu1
  30. if exist A:\freedos\localize.%lang% goto optmenu1
  31. if exist %fdosroot%\nls\localize.%lang% copy /y %fdosroot%\nls\localize.%lang% A:\freedos\localize.%lang%
  32. if exist A:\freedos\localize.%lang% set nlspath=A:\freedos
  33. cls
  34. goto optmenu1
  35.  
  36. :optmenu2
  37. set menu2_nr=
  38. call %fdosroot%\batch\menu2.bat
  39. echo.
  40. if "%menu2_nr%"=="INSTFDOS" goto installr
  41. if "%menu2_nr%"=="SETLANG"  goto sel_lang
  42. if "%menu2_nr%"=="SETSCRN"  goto sel_scrn
  43. if "%menu2_nr%"=="SETKEYB"  goto sel_keyb
  44. if "%menu2_nr%"=="SETSIZE"  goto sel_mode
  45. if "%menu2_nr%"=="QUIT"     goto optmenu1
  46. goto optmenu2
  47.  
  48. :installr
  49. rem ## provide general information
  50. cls
  51. for %%x in ( %fdosroot%\LANGUAGE\%LANG%\BETA*.TXT ) DO if exist %%x TYPE %%x 
  52. echo.
  53. pause 
  54. rem ## provide installation notes.
  55. for %%x in ( %fdosroot%\LANGUAGE\%LANG%\INST.TXT ) DO if exist %%x %cdrom%\freedos\setup\bin\pg %%x 
  56.  
  57. set TEXTMENU=
  58. call %fdosroot%\batch\textmenu.bat
  59. if "%TEXTMENU%"=="QUIT" goto optmenu2
  60. if "%TEXTMENU%"=="QUIT" goto optmenu2
  61. rem Do not CALL this, but let it be the end-option.
  62. rem But what about the INSTALLER not being run? how to solve that?
  63. if exist %fdosroot%\batch\postinst.bat %fdosroot%\batch\postinst.bat
  64. goto optmenu2
  65.  
  66. :sel_lang
  67. set LANG=EN
  68. cls
  69. goto optmenu2
  70.  
  71. :sel_scrn
  72. echo What kind of monitor do you have?
  73. echo 1) Color     
  74. echo 2) Monochrome
  75. echo.
  76. echo  NB: if graphical installer does not work properly, please pick monochrome
  77. %fdosroot%\bin\choice /C:12 "                "
  78. if errorlevel 1 set color=Color
  79. if errorlevel 2 set color=Mono
  80. goto optmenu2
  81.  
  82. :sel_keyb
  83. cls
  84. type %fdosroot%\language\regional.txt
  85. echo.
  86. echo.
  87. echo Please enter the number corresponding to the name which best described
  88. set /P choice=your current location (confirm input by pressing ENTER):
  89. if "%choice%"=="" goto optmenu2
  90. if not "%display%"=="" LH %fdosroot%\bin\DISPLAY CON=(EGA,,1)
  91. call %fdosroot%\batch\regional.bat %choice%
  92. set display=
  93. goto optmenu2
  94.  
  95. :sel_mode
  96. echo What kind of install do you want?
  97. echo 1) Full install
  98. echo 2) Minimal install
  99. %fdosroot%\bin\choice /C:12 "         "
  100. if errorlevel 1 set instmode=Full
  101. if errorlevel 2 set instmode=Mini
  102. goto optmenu2
  103.  
  104. :end