@echo off :START cls echo **************************** echo Install image to a new drive echo **************************** echo . echo For more information on an image, read the file !README.TXT echo in each folder in IMAGES on this CD echo . echo . The TARGET drive should be formated, but should not contain echo any files and SHOULD NOT be bootable echo . set drive=%1 if "drive"=="" goto FINDDRIVE if not exist %drive%:\NUL goto FINDDRIVE goto GOTDRIVE :FINDDRIVE strings drive=ask Enter TARGET drive letter & press ENTER ,1 :GOTDRIVE if not exist %drive%:\NUL goto NODRIVE md %drive%:\install md %drive%:\installed echo Image will be copied to %drive%:\install
Display a list of the various collections of operating system files that can be copied.
:IMAGE
if not exist %drive%:\NUL goto NODRIVE
echo .
echo (1)XT/286 OPENDOS image, 17mb
echo (2)W31, Win3.1 minimum install, 16mb
echo (3)W31_286,Win3.1 286 system install, 25mb
echo (4)W31_95, Win3.1, 95 lookalike, 18mb
echo (5)W95a, Win95a, 45mb
echo (6)W95a w/602Pro0ffice & AntiVir, 80mb
echo (7)W95b, Win95b, 80mb
echo (8)W98 w/Iview, Pstudio, 195mb
echo .
echo . (H)elp w/selection
echo .
echo ****Press number to choose image****
Prompt for a character to be entered, and based on the character entered, the errorlevel will be set to a particular value, which indicates what character was entered. Based on the errorlevel, branch to the appropriate code to do the copying.
choice /c:12345678H /n
if errorlevel 9 goto Help
if errorlevel 8 goto 8
if errorlevel 7 goto 7
if errorlevel 6 goto 6
if errorlevel 5 goto 5
if errorlevel 4 goto 4
if errorlevel 3 goto 3
if errorlevel 2 goto 2
if errorlevel 1 goto 1
goto NOT
This HELP table shows the recommended operating system based on processor type and minimum hard drive and minimum RAM
:Help
cls
echo .
echo Image Type Processor Hard Disk Ram Video
echo (minimum) (minimum)(minimum)(minimum)
echo 1OPENDOS 8088(XT) 20mb 640kb Any (VGA Prefered)
echo 2 W3.1 286 30mb 2mb EGA
echo 3 W3.1 286 40mb 3mb EGA
echo 4 W3.1 386 40mb 4mb VGA
echo 5 W95a 486-33 80mb 8mb VGA
echo 6 W95a 486-33 120mb 8mb VGA
echo 7 W95b 486-33 170mb 8mb VGA
echo 8 W98 P133 800mb 32mb VGA
echo .
pause
goto IMAGE
:1
echo OPEN DOS requires you to format the target drive using
echo the OPEN DOS format program. You cannot use MSDOS. You must
echo use the following command line FORMAT D: /U /X, where D:
echo is the drive being formatted.
echo .
echo Install XT/286 image to %drive%:\
echo .
echo Press CTRL C to quit or ENTER to continue
pause>NUL
lharc x /a2 \IMAGES\XT\XT286.lzh %drive%:\
goto END
:2
echo Install W31 image to %drive%:\
pause
lharc x /a2 \IMAGES\W31\W31.lzh %drive%:\
goto END
:3
echo Install W31_286 image to %drive%:\
pause
lharc x /a2 \IMAGES\W31_286\W31_286.lzh %drive%:\
goto END
:4
echo Install W31_95 image to %drive%:\
pause
lharc x /a2 \IMAGES\W31_95\W31_95.lzh %drive%:\
goto END
:5
echo Install W95a image to %drive%:\
pause
cls
echo .
echo Do you want to copy the Windows installation (CAB) files
echo to the drive (requires additional 32mb of space)
echo .
set cab=
choice /c:YN
if errorlevel 2 goto 95a
if errorlevel 1 set cab=y
set whatcab=win95a
:95a
copy \first.001 %drive%:\first.bat
lharc x /a2 \IMAGES\W95a\W95a.lzh %drive%:\
if "%cab%"=="y" goto COPYCAB
goto END
:6
echo Install W95a w/602Pro0ffice & AntiVir image to %drive%:\
pause
cls
echo .
echo Do you want to copy the Windows installation (CAB) files
echo to the drive (requires additional 32mb of space)
echo .
set cab=
choice /c:YN
if errorlevel 2 goto 95ao
if errorlevel 1 set cab=y
set whatcab=win95a
:95ao
copy \first.001 %drive%:\first.bat
lharc x /a2 \IMAGES\W95a\W95ao.lzh %drive%:\
if "%cab%"=="y" goto COPYCAB
goto END
:7
echo Install W95b image to %drive%:\
pause
cls
echo .
echo Do you want to copy the Windows installation (CAB) files
echo to the WIN95B folder (requires additional 56mb of space)?
echo .
set cab=
choice /c:YN
if errorlevel 2 goto 95b
if errorlevel 1 set cab=y
set whatcab=win95b
:95b
copy \first.001 %drive%:\first.bat
lharc x /a2 \IMAGES\W95b\W95b.lzh %drive%:\
if "%cab%"=="y" goto COPYCAB
goto END
This is the most often used set of OS files; they are for Win98SE
:8
echo Install W98 image to %drive%:\
pause
cls
echo .
echo Do you want to copy the Windows installation (CAB) files
echo to the WIN98 folder (requires additional 110mb of space)?
echo .
set cab=
choice /c:YN
if errorlevel 2 goto 98
if errorlevel 1 set cab=y
set whatcab=win98
:98
copy \first.001 %drive%:\first.bat
lharc x /a2 \IMAGES\W98\W98.lzh %drive%:\
if "%cab%"=="y" goto COPYCAB
goto END
If CAB files were requested, copy the appropriate CAB files
:COPYCAB
md %drive%:\%whatcab%
copy \%whatcab%\*.* %drive%:\%whatcab%
goto END
:NODRIVE
echo Drive not found, cannot continue
pause
goto exit
:NOT
echo File CHOICE.COM not found, cannot continue
echo .
goto exit
:END
set cab=
set whatcab=
if %2==transfer goto exit
set drive=
cls
echo .
echo DONE!!
echo .
echo Install the new drive as the C: in a system. Remove any disk
echo from the A: drive and reboot the system.
echo If the system does not boot, you should boot from a floppy
echo containing the operating system of the image and use the
echo SYS C: command to make the drive bootable.
:exit