![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 16:31 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Why won't it load automatically in auotexec.bat.... |
| Printable Version 1,114 / 10 |
| Floor1 电吉入侵 | Posted 2003-06-16 00:00 |
| 初级用户 Posts 377 Credits 1,480 | |
|
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 |
|
| Floor2 电吉入侵 | Posted 2003-06-16 00:00 |
| 初级用户 Posts 377 Credits 1,480 | |
|
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 |
|
| Floor3 Wengier | Posted 2003-06-16 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
Try removing that "CD" command in front.
|
|
| Floor4 如是大师 | Posted 2003-06-16 00:00 |
| 元老会员 Posts 3,351 Credits 9,654 From 湖北 | |
|
It should be:
%cdrom% cd\ cd system cd ghost ghost |
|
| Floor5 Wengier | Posted 2003-06-17 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
The following is quoted from 如是大师 at 2003-6-16 23:51:39: Why make it so complicated? One line, "CD\SYSTEM\GHOST", is enough.. |
|
| Floor6 如是大师 | Posted 2003-06-17 00:00 |
| 元老会员 Posts 3,351 Credits 9,654 From 湖北 | |
|
Explain it clearly..
|
|
| Floor7 MYS | Posted 2003-06-17 00:00 |
| 元老会员 Posts 1,637 Credits 5,170 From 广东佛山 | |
|
%cdrom% should be %cdrom%:
|
|
| Floor8 电吉入侵 | Posted 2003-06-17 00:00 |
| 初级用户 Posts 377 Credits 1,480 | |
|
I'll try it.......
Also, using LH and not using it seems to make no difference, right? |
|
| Floor9 电吉入侵 | Posted 2003-06-17 00:00 |
| 初级用户 Posts 377 Credits 1,480 | |
|
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..... |
|
| Floor10 yiyesong | Posted 2003-06-18 00:00 |
| 元老会员 Posts 632 Credits 1,987 | |
|
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 |
|
| Floor11 电吉入侵 | Posted 2003-06-18 00:00 |
| 初级用户 Posts 377 Credits 1,480 | |
|
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? |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |