TheTechGuide Forum
General Category => Software => Topic started by: tungnt on July 08, 2003, 03:13:10 AM
-
Dear everybody,
Please help me to declare in autoexec.bat.
I plan to make a bootable Win98SE Cd that when it boots, it will automatically run a program. I know how to make a bootable CD but I don't know how to declare in autoexec.bat because this CD when run on this PC, the CD drive may be drive E but when run on other PC, the CD drive may be F.
Therefore, I don't know how guide the CD to define exactly the execute file located.
I don't use the image file because this program is bigger than 5 MB.
Anybody knows, please help me
Thanks a lot
Tung
-
try FINDCD.EXE (search for it). it basically debug's the system and sets a %CDROM% to whatever it ....well finds
you could do it the old generic way, slow but since your cdrom will be probably D:-H: you could make a file somewhere on the cd and do...
IF EXIST "E:\thiscd.txt" SET %CDROM% = E:
IF EXIST "E:\thiscd.txt" SET %CDROM% = F:
IF EXIST "E:\thiscd.txt" SET %CDROM% = G:
IF EXIST "E:\thiscd.txt" SET ...
get the picture? If not search and read.
-
errr..
IF EXIST "E:\thiscd.txt" SET CDROM=E:
IF EXIST "E:\thiscd.txt" SET CDROM=F:
IF EXIST "E:\thiscd.txt" SET CDROM=G:
IF EXIST "E:\thiscd.txt" SET ...
get the picture? If not search and read.
-
errr AGAIN!!!
IF EXIST "E:\thiscd.txt" SET CDROM=E:
IF EXIST "F:\thiscd.txt" SET CDROM=F:
IF EXIST "G:\thiscd.txt" SET CDROM=G:
IF EXIST "H:\thiscd.txt" SET ...
get the picture? If not search and read.
-
Is the program that you want to run on the CD?
just declare it after loading CD drivers without mentioning any CD drive letter, ie:
@echo off
smartdrv.exe
MSCDEX.EXE /D:tomato /L:X
ghost.exe
I use this on my recovery CD, to run Ghost, without having to type anything.