Author Topic: how to declare the autoexec.bat  (Read 1174 times)

tungnt

  • Guest
how to declare the autoexec.bat
« 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

Space Between

  • Guest
how to declare the autoexec.bat
« Reply #1 on: July 10, 2003, 04:15:24 AM »
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.

Space Between

  • Guest
how to declare the autoexec.bat
« Reply #2 on: July 10, 2003, 04:16:06 AM »
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.

Space Between

  • Guest
how to declare the autoexec.bat
« Reply #3 on: July 10, 2003, 04:17:01 AM »
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.

IGNORANT

  • Guest
how to declare the autoexec.bat
« Reply #4 on: August 20, 2003, 03:57:18 PM »
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.