Topic: [IMP] PreSetup.cmd - add on success/exit to drive letter search loop
Under some circumstances the presetup.cmd causes an error messagebox: Windows Kein Datenträger (Windows no disk), Exception Processing Message C0000013 ... Abrechen, Wiederholen, Weiter (Abort, Retry, Continue) when it is trying to find the CD/DVD drive.
The following code causes the problem if there are card readers present.
REM +==========================================================================+
REM | Finding CD/DVD driveletter. |
REM |--------------------------------------------------------------------------|
SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:%TAGFILE%" SET CDDRIVE=%%i:
The problem is that the for loop continues searching (trying to read the root directory) even if it has already found the CD/DVD drive.
So I would suggest to change this code to abort the search after the CD/DVD has been found, which can be done in this way:
REM +==========================================================================+
REM | Finding CD/DVD driveletter. |
REM |--------------------------------------------------------------------------|
SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:%TAGFILE%" (
SET CDDRIVE=%%i:
GOTO CDFOUND
)
:CDFOUND
This helps at least if the drive letters of the card reader are behind the letter of the CD/DVD drive. Otherwise my solution does not work, but in this case also other problems exist.
Update title - jeff
Last edited by OverFlow (2008-09-28 14:43:49)