-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
BOOTDISK.BAT
101 lines (82 loc) · 2 KB
/
BOOTDISK.BAT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
@echo off
set DefFloppyDrive1=A:
set DefFloppyDrive1_L=a:
set DefFloppyDrive2=B:
set DefFloppyDrive2_L=b:
set DefFloppyDrive=%1
cls
:CHECK
if not exist EBD\NUL goto NODIR
if "%1"=="/?" GOTO USAGE
if "%1"=="%DefFloppyDrive1%" goto FORMAT
if "%1"=="%DefFloppyDrive1_L%" goto FORMAT
if "%1"=="%DefFloppyDrive2%" goto FORMAT
if "%1"=="%DefFloppyDrive2_L%" goto FORMAT
:SET_FLOPPY
echo Please specify the drive letter of your floppy drive.
echo Press 1 for %DefFloppyDrive1%
echo or
echo Press 2 for %DefFloppyDrive2%
echo.
choice /c:12 Choose an option
if errorlevel 2 goto BDRIVE
if errorlevel 1 goto ADRIVE
:ADRIVE
set DefFloppyDrive=%DefFloppyDrive1%
goto FORMAT
:BDRIVE
set DefFloppyDrive=%DefFloppyDrive2%
goto FORMAT
:FORMAT
echo.
echo To make a Startup Disk
echo Label a disk "Windows 98 Startup Disk" and insert it into drive %DefFloppyDrive%
echo Caution: Setup will delete any existing files on this floppy disk.
echo.
pause
format %DefFloppyDrive% /u /v:EBD /autotest
if not errorlevel 0 goto FORMAT_ERROR
:COPY
echo.
echo Copying files to %DefFloppyDrive% ...
copy .\EBD\*.* %DefFloppyDrive% > NUL
echo.
echo Transfering system files...
sys %DefFloppyDrive% > NUL
echo.
echo Startup disk is ready.
echo.
goto END
:FORMAT_ERROR
echo.
echo There was a error formatting the specified drive.
echo Press Y to retry or N to cancel
choice /c:yn
if errorlevel 2 goto FORMAT_CANCEL
if errorlevel 1 goto FORMAT
:FORMAT_CANCEL
echo .
echo Exiting
goto END
:USAGE
echo.
echo Usage: bootdisk [drive letter:]
echo e.g: bootdisk
echo or
echo bootdisk %DefFloppyDrive1%
echo.
echo This command should be run from the WINDOWS\COMMAND directory.
echo.
goto END
:NODIR
echo.
echo The EBD directory does not exist.
echo Change to the WINDOWS\COMMAND directory and try again.
echo.
goto END
:END
set DefFloppyDrive=
set DefFloppyDrive1=
set DefFloppyDrive1_L=
set DefFloppyDrive2=
set DefFloppyDrive2_L=