home *** CD-ROM | disk | FTP | other *** search
- @echo off
- goto start
- :start
- %fdosroot%\bin\whichfat C:
- if "%errorlevel%"=="1" set opt=fdisk
- if "%errorlevel%"=="12" set opt=format
- if errorlevel 16 set opt=install
- goto begin
-
- :quit
- SET TEXTMENU=QUIT
- goto end
-
- :begin
- cls
- for %%x in ( 0 1 2 3 ) do localize 2.%%x
- if "%cdrom%"=="C:" goto choices
- for %%x in ( 4 5 ) do if not "%opt%"=="fdisk" localize 2.%%x
- for %%x in ( install format ) do if "%opt%"=="%%x" localize 2.6
- for %%x in ( 7 8 9 10 ) do localize 2.%%x
- goto choices
-
- :choices
- set form_opt=/U
- %fdosroot%\bin\choice /N /C:1234qQrR %menu2txt%
- if "%errorlevel%"=="5" goto quit
- if "%errorlevel%"=="6" goto quit
- if "%errorlevel%"=="7" FDISK /REBOOT
- if "%errorlevel%"=="8" FDISK /REBOOT
- if "%cdrom%"=="C:" goto fdisk
- if "%errorlevel%"=="1" goto fdisk
- if "%errorlevel%"=="2" goto askdrvs
- if "%errorlevel%"=="3" set form_opt=/U
- if "%errorlevel%"=="3" goto askdrvs
- if "%errorlevel%"=="4" goto setupDOS
- goto start
-
- :fdisk
- FDISK /MONO
- if not "%errorlevel%"=="6" goto start
- cls
- echo Warning: No (IDE-)harddisk detected, FreeDOS cannot be installed until
- echo a primary partition has been created on a detected harddisk.
- echo.
- echo In case of a non standard harddisk or a harddisk on a non-
- echo standard interface (SCSI for example) you may need to load
- echo a driver to access it.
- echo.
- pause
- goto start
-
- :askdrvs
- set /p wipedrv=Which drive(s) do you want to format (example. C: D:)?
- echo Please type the complete word 'YES' or 'NO' below at the following question(s):
- for %%x in ( %wipedrv% ) do if exist %%x\nul format %%x %form_opt% /Q /V:FREEDOS9RC5
- for %%x in ( %wipedrv% ) do if exist %%x:\nul format %%x: %form_opt% /Q /V:FREEDOS_%%x95
- if not "%errorlevel%"=="10" set msg=Format completed on drive(s) %wipedrv%.
- if "%errorlevel%"=="10" set msg=Format failed on drive(s)
- echo %msg%
- pause
- goto start
-
- :setupDOS
- if "%opt%"=="format" format C: %form_opt% /Z:SERIOUSLY /Q /V:FREEDOS_C95
- if "%opt%"=="format" SYS C: C: C:\BOOTSECT.BIN BOOTONLY BOTH
- if "%opt%"=="format" set opt=install
- if not "%opt%"=="install" goto begin
- set instparm=
- if "%color%"=="Mono" set instparm=%instparm% /mono
- if "%instmode%"=="Full" set instparm=%instparm% /df %fdosroot%\install\INSTALL.DAT
- if "%instmode%"=="Mini" set instparm=%instparm% /df %fdosroot%\install\INSTALL.MIN
-
- set instparm=%instparm% /src %cdrom%FREEDOS\PACKAGES
- CDD %fdosroot%\install\
- if exist c:\fdconfig.sys ren c:\fdconfig.sys fdconfig.old
- if exist c:\fdauto.bat ren c:\fdauto.bat fdauto.old
- for %%x in ( Mono ) do if "%color%"=="%%x" goto setuptxt
- for %%x in ( 8086 80186 80286 ) do if "%cputype%"=="%%x" goto setuptxt
- goto setupGUI
-
- :setupGUI
- if exist a:\driver\ctmouse.exe a:\driver\ctmouse.exe
- echo Mouse loaded.
- if exist %fdosroot%\bin\cwsdpmi.exe %fdosroot%\bin\cwsdpmi.exe -p -sc:\fdosswap.tmp
- echo CWSDPMI loaded
- install.exe %instparm% /overwrite /noask
- if not "%errorlevel%"=="0" pause Warning: error %errorlevel% occurred! Press a key to continue
- if exist c:\fdconfig.sys goto end
- echo Fatal Error: GUI installer crashed or exited without installing
- echo falling back to text installer.
- pause
- goto setupTXT
-
- :setupTXT
- textinst.exe %instparm%
- if not %errorlevel%==0 pause Warning: error %errorlevel% occurred! Press a key to continue
- goto end
-
- :end
-