|
[这个贴子最后由yulin在 2003/09/11 04:57pm 第 1 次编辑]
AUTOEXEC.BAT:
@ECHO OFF
PROMPT $P$G
set temp=c:\
set tmp=c:\
SET EXPAND=YES
SET DIRCMD=/O:N
set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15
set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C
call setramd.bat %LglDrv%
path=%RAMD%:\;%RAMD%:\BAT;%CDROM%:\;%CDROM%:\UCDOS;%CDROM%:\BOOT;A:\;C:\;
copy get.exe %RAMD%:\ > NUL
copy attrib.exe %RAMD%:\ > NUL
copy command.com %RAMD%:\ > NUL
copy edit.com %RAMD%:\ > NUL
copy format.com %RAMD%:\ > NUL
copy fdisk.exe %RAMD%:\ > NUL
copy deltree.exe %RAMD%:\ > NUL
copy restart.com %RAMD%:\ > NUL
copy readme.exe %RAMD%:\ > NUL
copy mouse.* %RAMD%:\ > NUL
copy xxcopy.exe %RAMD%:\ > NUL
rem copy extract.exe %RAMD%:\ > NUL
set comspec=%RAMD%:\command.com
LH MSCDEX.EXE /D:MSCD000 /L:%CDROM%
CDA %CDROM% > NUL
IF errorlevel 1 GOTO NEXTCD
IF NOT EXIST %CDROM%:\BOOT\TW.EXE GOTO NEXTCD
GOTO BOOT
:NEXTCD
CALL CHCDROM.BAT C D E F G H I J K L M N O P Q R S T U V W X Y Z
GOTO BOOT
:BOOT
LH SMARTDRV.EXE
LH DOSKEY.COM > NUL
Set LglDrv=
MD %RAMD%:\TEMP
XXCOPY /E /H %CDROM%:\BOOT\EBD %RAMD%:\ > NUL
%RAMD%:
CD \
LH MOUSE.COM > NUL
MENU.BAT
SETRAMD.BAT:
@echo off
set RAMD=
set CDROM=
echo.
echo Preparing to start your computer.
echo This may take a few minutes. Please wait...
echo.
a:\findramd
if errorlevel 255 goto no_ramdrive
if not errorlevel 3 goto no_ramdrive
goto do_shift
:loop
if errorlevel %1 goto no_shift
:do_shift
set cdrom=%2
shift
shift
if not %1*==* goto loop
goto no_ramdrive
:no_shift
set ramd=%2
if "%RAMD%"=="C" goto c_drive
goto success
:c_drive
echo Windows 98 has detected that drive C does not contain a valid FAT or
echo FAT32 partition. There are several possible causes.
echo.
echo 1. The drive may need to be partitioned. To create a partition on the drive,
echo run FDISK from the MS-DOS command prompt.
echo.
echo 2. You may be using third-party disk-partitioning software. If you are using
echo this type of software, remove the Emergency Boot Disk and restart your
echo computer. Then, follow the on-screen instructions to start your computer from
echo a floppy disk.
echo .
echo 3. Some viruses also cause your drive C to not register. You can use a virus
echo scanning program to check your computer for viruses.
echo.
goto success
:no_ramdrive
echo The Windows 98 startup disk could not create a temporary drive for the
echo diagnostic tools. This may be because this computer has less than the
echo minimum required extended memory.
echo.
:success
CHCDROM.BAT:
:LOOP
IF %CDROM%==%1 GOTO CD
shift
GOTO LOOP
:CD
IF %1==Z GOTO ERROR
shift
CDA %1 > NUL
IF errorlevel 1 GOTO CD
IF NOT EXIST %1:\BOOT\TW.EXE GOTO CD
SET CDROM=%1
GOTO END
:ERROR
CLS
ECHO.
ECHO.
ECHO.
ECHO.
ECHO. ERROR: CD boot fail
ECHO.
ECHO Your CD is not WuYou_BOOTCD or Your Driver is not supported .
ECHO.
ECHO Press any key to restart the computer or Press "Ctrl+C" to exit .
ECHO.
ECHO.
ECHO.
PAUSE > NUL
RESTART.COM
GOTO END
:END
RAMEXEC.BAT:
IF EXIST %CDROM%:\DISKEM1X.BIN GOTO DEMUMGR
IF EXIST %CDROM%:\DISKEMU.BIN GOTO DEMUMGR
GOTO MENUSTAR
:DEMUMGR
copy a:\demumgr.com > nul
demumgr /u > nul
del %RAMD%:\demumgr.com
GOTO MENUSTAR
:MENUSTAR
CALL MENU.BAT
GOTO END
:END
请大家讨论一下运行过程!其间我有几处不明很白! |
|