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-06-25 01:28
中国DOS联盟论坛 » DOS汉化世界 & 中文系统 (中文化室) » How does ConfigP.Mnu v1.01 control autoexec.bat? View 2,265 Replies 14
Original Poster Posted 2006-10-21 07:29 ·  中国 江西 鹰潭 电信
中级用户
★★
Credits 244
Posts 92
Joined 2006-05-13 21:24
20-year member
UID 55477
Status Offline
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?
Floor 2 Posted 2006-10-21 09:25 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
Originally posted by sweetdreamlan at 2006-10-21 07:29:
How to control autoexec.bat with ConfigP.Mnu v1.01?

@ECHO OFF
IF "%config%"=="" GOTO QUIT
IF "%config%"=="" GOTO HELP

:help
pause

:quit
pause

== 吠...



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
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 3 Posted 2006-10-21 09:31 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
%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 ~ :)
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 4 Posted 2006-10-21 09:33 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
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:)
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 5 Posted 2006-10-21 10:38 ·  中国 浙江 衢州 电信
银牌会员
★★★
Credits 1,270
Posts 548
Joined 2004-05-31 00:00
22-year member
UID 25754
Gender Male
Status Offline
Originally posted by sweetdreamlan at 2006-10-21 07:29 AM:
How to control autoexec.bat with ConfigP.Mnu v1.01?

@ECHO OFF
IF "%config%"=="" GOTO QUIT
IF "%config%"=="" GOTO HELP

:help
pause

:quit
pause

== 吠...

Is it more concise to directly use GOTO %CONFIG%?
Floor 6 Posted 2006-10-21 11:12 ·  中国 江西 鹰潭 电信
中级用户
★★
Credits 244
Posts 92
Joined 2006-05-13 21:24
20-year member
UID 55477
Status Offline
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
Floor 7 Posted 2006-10-21 11:14 ·  中国 江西 鹰潭 电信
中级用户
★★
Credits 244
Posts 92
Joined 2006-05-13 21:24
20-year member
UID 55477
Status Offline
Originally posted by redtek at 2006-10-21 09:25:

I saw that you have ":help" and "quit" these two jump tags below,
so, the above %config% should be filled in as follows:

IF "%config%"== ...


But, the tags in config.sys are not like this
There are no help and quit tags
Floor 8 Posted 2006-10-21 11:15 ·  中国 江西 鹰潭 电信
中级用户
★★
Credits 244
Posts 92
Joined 2006-05-13 21:24
20-year member
UID 55477
Status Offline
Originally posted by redtek at 2006-10-21 09:31:
%config% is an environment variable. It determines the flow (jumping, etc.) of the batch processing by judging the content inside it through IF.


If a menu is defined in the Config.sys file and you select a certain menu...



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
Floor 9 Posted 2006-10-21 11:17 ·  中国 江西 鹰潭 电信
中级用户
★★
Credits 244
Posts 92
Joined 2006-05-13 21:24
20-year member
UID 55477
Status Offline
Originally posted by redtek at 2006-10-21 09:33:
If you are referring to the selection of system configurations using Config.sys being determined by the program flow in the Autoexec.bat file,
then to see the selection principle of Config.sys,
you can add an extra line in Autoexec.bat:

E ...


Hmm, thanks. I'll try it.
Floor 10 Posted 2006-10-21 11:31 ·  中国 江西 鹰潭 月湖区 电信
中级用户
★★
Credits 244
Posts 92
Joined 2006-05-13 21:24
20-year member
UID 55477
Status Offline
Originally posted by redtek at 2006-10-21 09:33:
If what you're saying is that the selection of the system configuration using Config.sys is determined by the Autoexec.bat file to determine the course of the program,
then to see the selection principle of Config.sys,
you can add an extra line in Autoexec.bat:

Echo %config.sys% ...


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
Floor 11 Posted 2006-10-21 11:40 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
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 : )
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 12 Posted 2006-10-21 21:37 ·  中国 山西 太原 联通
银牌会员
★★★
Credits 1,009
Posts 353
Joined 2003-09-04 00:00
22-year member
UID 9419
Gender Male
Status Offline
You need to set the environment variables yourself. Add "set config=quit" or "set config=help" in a certain control block of config.sys
Floor 13 Posted 2006-10-22 06:25 ·  中国 江西 鹰潭 电信
中级用户
★★
Credits 244
Posts 92
Joined 2006-05-13 21:24
20-year member
UID 55477
Status Offline
Originally posted by yaya at 2006-10-21 21:37:
You need to set the environment variables yourself
Add set config=quit or set config=help in a certain control block in config.sys


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?
Floor 14 Posted 2006-10-22 23:57 ·  中国 山西 太原 联通
银牌会员
★★★
Credits 1,009
Posts 353
Joined 2003-09-04 00:00
22-year member
UID 9419
Gender Male
Status Offline
Yes, but it should be placed in different control blocks
Floor 15 Posted 2007-09-20 22:58 ·  中国 重庆 长寿区 电信
初级用户
Credits 26
Posts 13
Joined 2007-09-20 21:30
18-year member
UID 97914
Gender Male
Status Offline
So rich, study and learn
Forum Jump: