China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 15:43
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Why won't it load automatically in auotexec.bat.... View 1,113 Replies 10
Original Poster Posted 2003-06-16 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Why won't it load automatically in auotexec.bat....
I want the boot disk, when it starts, to let me choose to load a program from the CD (CD boot), so I set it in autoexec.bat,
but it doesn't work. When it switches to %CDROM% it says it can't find the drive,
but after I get in, that is, after the A:\> prompt appears, if I type it manually it works.
I've set up a virtual drive; if I first switch to the virtual drive and then switch to %CDROM% it also works, but it can't automatically switch directly to %CDROM%. Can anyone tell me how to do it? Many thanks
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 2 Posted 2003-06-16 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Below is the content of auotexec.bat
@ECHO OFF
PATH=A:\;%cdrom%:\system\

set temp=c:\
set tem=c:\

LH MSCDEX.EXE /D:mscd001
LH MOUSE.COM
LH FINDCD.EXE

cd %cdrom%:
cd system\ghost
ghost.exe
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 3 Posted 2003-06-16 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Try removing that "CD" command in front.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 4 Posted 2003-06-16 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
It should be:
%cdrom%
cd\
cd system
cd ghost
ghost
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 5 Posted 2003-06-17 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is quoted from 如是大师 at 2003-6-16 23:51:39:
It should be:
           cd\
           cd system
           cd ghost


Why make it so complicated? One line, "CD\SYSTEM\GHOST", is enough..
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 6 Posted 2003-06-17 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Explain it clearly..
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 7 Posted 2003-06-17 00:00 ·  中国 广东 佛山 禅城区 电信
元老会员
★★★★
Credits 5,170
Posts 1,637
Joined 2002-10-16 00:00
23-year member
UID 8
Gender Male
From 广东佛山
Status Offline
%cdrom% should be %cdrom%:
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
Floor 8 Posted 2003-06-17 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
I'll try it.......
Also, using LH and not using it seems to make no difference, right?



欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 9 Posted 2003-06-17 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Sorry, I posted the wrong batch file. It should be:
%cdrom%:
cd\
cd system
cd ghost
ghost.exe
This is correct, right? What I mean is: if I add these in autoexec.bat, it still won't work. When it executes to %cdrom%: it says it can't find the drive, but after entering, that is, after A:\> appears, executing commands like this works; or if I set it in autoexec.bat to switch to the virtual drive first and then to %cdrom%:, that also works. It just can't switch directly. What exactly is the problem?
But I'm using Virtual PC for testing, I haven't tried it on a real machine yet.....
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 10 Posted 2003-06-18 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
Which FINDCD.exe are you using? If it's the one written by WENGIER himself, then don't put a colon after %cdrom%, write it the way Master Rushi did. Because WENGIER's variable already includes the colon. You can use the SET command to check the value of CDROM.
Also, there's no need for your command to be written so complicated. GHOST seems to be just one file. Just do it directly like this:
%cdrom%\system\ghost\ghost.exe
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 11 Posted 2003-06-18 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Many thanks to everyone for the enthusiastic help.......
After many tests, it turned out to be a virtual machine problem; because the program was slow, the CD-ROM hadn't finished loading yet.......^^
By the way, I want to make a menu under DOS (an exe one). Is there any simpler tool for that?
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Forum Jump: