![]() |
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-26 18:54 |
47,812 topics / 349,912 posts / today 2 new / 48,264 members |
| DOS汉化世界 & 中文系统 (中文化室) » How does ConfigP.Mnu v1.01 control autoexec.bat? |
| Printable Version 2,398 / 14 |
| Floor1 sweetdreamlan | Posted 2006-10-21 07:29 |
| 中级用户 Posts 92 Credits 244 | |
|
How to control autoexec.bat with ConfigP.Mnu v1.01?
@ECHO OFF IF "%config%"=="" GOTO QUIT IF "%config%"=="" GOTO HELP :help pause :quit pause == What should be filled in the double quotes behind? |
|
| Floor2 redtek | Posted 2006-10-21 09:25 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
Originally posted by sweetdreamlan at 2006-10-21 07:29: I see there are two jump labels ":help" and "quit" below, so the above %config% should be filled in as follows: IF "%config%"=="quit" GOTO QUIT IF "%config%"=="help" GOTO HELP |
|
| Floor3 redtek | Posted 2006-10-21 09:31 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
%config% is an environment variable. Its content is judged by an IF to determine the flow (such as jumping) of the batch processing.
If a menu is defined in the Config.sys file and you select a menu item, then the value (defined by yourself) of this menu item will be passed to the environment variable %config%. In your batch processing's autoexec.bat file, the content of %config% is obtained (usually judged by IF), and then the direction of Goto jump is determined :) ) Sorry, I don't know what "ConfigP.Mnu v1.01" you mentioned is, and what exactly v1.01 is? I don't know if you mean the config.sys file or something more advanced (I haven't seen ConfigP.Mnu), If the explanation is off-topic, please forgive me ~ :) |
|
| Floor4 redtek | Posted 2006-10-21 09:33 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
If what you said is that the choice of the system configuration using Config.sys is determined by the Autoexec.bat file to decide the direction of the program, then to see the selection principle of Config.sys, you can add an extra line in Autoexec.bat:
Echo %config% In this way, you can see what the content of the %config% environment variable is, and you can see its principle and do more interesting things:) |
|
| Floor5 weilong888 | Posted 2006-10-21 10:38 |
| 银牌会员 Posts 548 Credits 1,270 | |
Originally posted by sweetdreamlan at 2006-10-21 07:29 AM: Is it more concise to directly use GOTO %CONFIG%? |
|
| Floor6 sweetdreamlan | Posted 2006-10-21 11:12 |
| 中级用户 Posts 92 Credits 244 | |
|
Configp.mnu is posted by yaya in the forum.
It has more powerful functions than the original config.sys. http://www.cn-dos.net/forum/viewthread.php?tid=19057&fpage=1 |
|
| Floor7 sweetdreamlan | Posted 2006-10-21 11:14 |
| 中级用户 Posts 92 Credits 244 | |
Originally posted by redtek at 2006-10-21 09:25: But, the tags in config.sys are not like this There are no help and quit tags |
|
| Floor8 sweetdreamlan | Posted 2006-10-21 11:15 |
| 中级用户 Posts 92 Credits 244 | |
Originally posted by redtek at 2006-10-21 09:31: Hehe Look here http://www.cn-dos.net/forum/viewthread.php?tid=19057&fpage=1 configp.mnu is more powerful than the original config.sys function |
|
| Floor9 sweetdreamlan | Posted 2006-10-21 11:17 |
| 中级用户 Posts 92 Credits 244 | |
Originally posted by redtek at 2006-10-21 09:33: Hmm, thanks. I'll try it. |
|
| Floor10 sweetdreamlan | Posted 2006-10-21 11:31 |
| 中级用户 Posts 92 Credits 244 | |
Originally posted by redtek at 2006-10-21 09:33: No, it doesn't work It displays echo is on Then I add a @echo off It displays echo if off Using type doesn't work either |
|
| Floor11 redtek | Posted 2006-10-21 11:40 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
I'm sorry I made a mistake. It's:
It's not adding Echo %config.sys% but adding a line: ECHO %CONFIG% However, the link you wrote for Configp.mnu I just went to see, it's very wonderful! Just don't have time to read it slowly, I'll also download one and try first : ) (So, can't be sure what that configp.mnu passes to autoexec.bat... echo %config% Let's take a look at this sentence first : ) |
|
| Floor12 yaya | Posted 2006-10-21 21:37 |
| 银牌会员 Posts 353 Credits 1,009 | |
|
You need to set the environment variables yourself. Add "set config=quit" or "set config=help" in a certain control block of config.sys
|
|
| Floor13 sweetdreamlan | Posted 2006-10-22 06:25 |
| 中级用户 Posts 92 Credits 244 | |
Originally posted by yaya at 2006-10-21 21:37: Thank you, I carefully read your post again I saw that it wrote set cm=cdrom this sentence I didn't see it before, sorry Can this set several variables at the same time? Such as set config=quit set config=help set config=dos Is this possible? |
|
| Floor14 yaya | Posted 2006-10-22 23:57 |
| 银牌会员 Posts 353 Credits 1,009 | |
|
Yes, but it should be placed in different control blocks
|
|
| Floor15 d590520 | Posted 2007-09-20 22:58 |
| 初级用户 Posts 13 Credits 26 | |
|
So rich, study and learn
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |