发新话题
打印

请教:我是双光驱怎样在“path=%RAMD%:\;a:\;%path%;%CDROM%:\”中

请教:我是双光驱怎样在“path=%RAMD%:\;a:\;%path%;%CDROM%:\”中

我是双光驱怎样在“path=%RAMD%:\;a:\;%path%;%CDROM%:\”中添加语句使之能用*.bat调用副光驱中boot文件中的程序?我现在制作的启动盘只能在主光驱中调用,启动盘放在在副光驱中就不能正常调用!请高手指点!!!

TOP

请教:我是双光驱怎样在“path=%RAMD%:\;a:\;%path%;%CDROM%:\”中

autoexec.bat文件
@ECHO OFF
LH MSCDEX /D:MSCD001
LH DOSKEY > NUL
LH SMARTDRV
LH CTMOUSE > NUL
LH FINDCD.exe > NUL
IF ERRORLEVEL 1 GOTO NOCDROM
CDA %CDROM% > NUL
IF ERRORLEVEL 1 GOTO NEXTCD
IF NOT EXIST %CDROM%\CD.PJK GOTO NEXTCD
GOTO CDBOOT
: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 CDBOOT
:NOCDROM
ECHO NOCDROM
GOTO END
rem 光盘启动
:CDBOOT
path a:\;%CDROM%\dos\;%CDROM%\ucdos\;
GOTO END
:END

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\CD.PJK GOTO CD
SET CDROM=%1
GOTO END
:ERROR
CLS
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.                           ERROR:   CD boot fail
ECHO.
ECHO            Your CD is not 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
GOTO END
:END

TOP

请教:我是双光驱怎样在“path=%RAMD%:\;a:\;%path%;%CDROM%:\”中

如果你会HexEditor会更简单!
直接修改windows98启动光盘中的 FindCD.exe 更方便!
未修改是的 FindCD 的原理就是到光盘上查找存在的文件,如图中是在光盘的 Win98 目录下找到 Setup.exe , 如果找到就在环境变量中指定该盘盘符;
要修改的就是选中的地方,替换 \WIN98\SETUP.EXE 成自己的文件,路径长度不要超过原来的长度,不足的地方用16进制 0 填充。
附件: 您所在的用户组无法下载或查看附件

TOP

请教:我是双光驱怎样在“path=%RAMD%:\;a:\;%path%;%CDROM%:\”中

下面是我的几个相关的bat文件:
CONFIG.sys文件:
@echo off
device=oakcdrom.sys /D:mscd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:mscd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:mscd001
devicehigh=ramdrive.sys /E 4096
files=15
buffers=20
dos=high,umb
stacks=9,256
lastdrive=z
AUTOEXEC.bat文件:
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
cls
call setramd.bat %LglDrv%
set temp=c:\
set tmp=c:\
path=%RAMD%:\;a:\;%path%;%CDROM%:\
copy command.com %RAMD%:\ > NUL
set comspec=%RAMD%:\command.com
copy extract.exe %RAMD%:\ > NUL
copy xxcopy.exe %RAMD%:\ > NUL
%RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NUL
LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CDROM%
mouse
cls
lwt
在AUTOEXEC.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 Millennium Edition has detected that drive C does not contain a valid
echo FAT or 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 Millennium Edition startup disk could not create a temporary drive
echo for the diagnostic tools. This may be because this computer has less than the
echo minimum required extended memory.
echo.
:success
应该怎样改才能使我的启动盘不管放在主光驱还是副光驱都能用*.bat调用启动盘中boot文件中的程序?(boot文件夹在启动光盘根目录)

TOP

发新话题