两个批处理分别这样写的:
AUTOEXEC.BAT
@ECHO OFF
LH MSCDEX.EXE /D:mscd000>nul
findcd /s>nul
call findcdr "ghost.exe" C D E F G H I J K L M N O P Q R S T U V W X Y Z
%CDROM%:
mouse.exe
ghost.exe
findcdr.bat
@echo off
set file=%1
:FCDR
if "%CDROM1%"=="%2:" goto SCDR
shift
goto FCDR
:SCDR
cda %2:>nul
IF errorlevel 1 goto next
if not exist %2:\%FILE% goto next
set cdrom=%2
goto end
:next
if "%2"=="Z" goto end
shift
goto SCDR
:end