Log in

View Full Version : A DOS maniac needed to help me with an autoexec.bat file


Fotis_Greece
12th February 2005, 02:05
Hello to all.
I have made a super boot cd to based on the win98 startup disk where I can load symantec ghost from the cd. I have configured the autoexec.bat file to name the cdrom drives that will find starting from the letter K.
I have also configured like this: If there is a cd with ghost in drive letter K execute it or else go to search in drive letter L, and then M.
(I made it this way because I have 3 cd rom drives in my PC)

Everything works ok but the problem is that when the cd is not in the first drive K there is this warning NOT READY READING FROM DRIVE K, ABORT, RETRY, FAIL

All I have to do is press F and then it searches the other drive till it finds it and loads ok.

Is there a way to make a command that will force a fail response and I don't have to press the F key? I have found out that if there is a command switch for command.com /F that forces fail response.
How can I make it work.
Thanks in advance

Have a look at the code also

LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:K
IF "%config%"=="GHOST" GOTO GHST
IF "%config%"=="PQMAGIC" GOTO PQM
echo.
GOTO QUIT

:GHST
MOUSE.COM
echo.
echo Loading Symantec Ghost...
echo.
echo Wait a little please Fotis
echo.
if exist k:\ghost\ghost.exe goto GHSTK
if exist L:\ghost\ghost.exe goto GHSTL
if exist M:\ghost\ghost.exe goto GHSTM
goto QUIT

:GHSTK
K:
cd \ghost
AUTOEXEC.BAT

:GHSTL
echo. Changing drives to locate Ghost Environment....
L:
cd \ghost
AUTOEXEC.BAT

:GHSTM
echo. Changing drives to locate Ghost Environment....
M:
cd \ghost
AUTOEXEC.BAT

E-Male
12th February 2005, 02:54
could
echo F | *command that shoudl recieve the f*
do the job??

MaxT
12th February 2005, 03:06
for /F %%i in ("K L M") do if exist %%i:\ghost\ghost.exe goto GHSTM

Fotis_Greece
12th February 2005, 03:26
could you be more specific?

Is there a way to run the command "command.com /F" and then go on with another command such as "cls" (clear screen) and then go on run my configuration?

E-Male
12th February 2005, 03:57
i found some results via google (you could have done the same):

http://www.robvanderwoude.com/index.html
modify
------
COMMAND /F /C DIR F:\ ¦ FIND "F:" > NUL
IF ERRORLEVEL 1 ECHO Drive F: is not ready
IF NOT ERRORLEVEL 1 ECHO Drive F: is ready
------
to suit your needs

or

http://www.activewin.com/tips/dos_tips_12.shtml
try
------
SHELL=C:\COMMAND.COM C:\ /E:512 /F /P
------
in config.sys

hope that helps