剩下的就是判断在哪个光驱里有你需要的文件了
下面是一个判断的批处理
@echo off
if exist %cdrom1%\tools\vc.ini goto cd1 (你的光盘里的一个文件)
if exist %cdrom2%\tools\vc.ini goto cd2
.......................................................
if exist %cdrom4%\tools\vc.ini goto cd4
:cd1
echo set cdr=%cdrom1%>%RAMDRIVE%(一个内存盘的变量)\cdpath.bat
goto end
:cd2
echo set cdr=%cdrom2%>%RAMDRIVE%\cdpath.bat
goto end
:end
在autoexec.bat最后调用上面的批处理.
ctty nul
command/f/c findcd.bat
call %RAMDRIVE%\cdpath.bat
del %RAMDRIVE%\cdpath.bat
ctty con
最后变量cdr就是你的光盘所在的光驱