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-07-01 10:30
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » What's wrong with this autoexec.bat? View 1,953 Replies 26
Floor 16 Posted 2007-04-20 22:57 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
I tried it and found that your (A: C:) has a problem. Change it to (A: C:).
You're using full-width characters.
Windows 一键还原
http://www.yjhy.com
Floor 17 Posted 2007-04-20 23:00 ·  中国 江苏 苏州 联通
中级用户
★★
我是DOS学者
Credits 367
Posts 180
Joined 2006-05-14 10:53
20-year member
UID 55507
Gender Male
From 重庆
Status Offline
Then can the if exist above still be used to check a drive letter??
Floor 18 Posted 2007-04-20 23:03 ·  中国 江苏 苏州 联通
中级用户
★★
我是DOS学者
Credits 367
Posts 180
Joined 2006-05-14 10:53
20-year member
UID 55507
Gender Male
From 重庆
Status Offline
Originally posted by lianjiang2004 at 22:57:
I tried it and found that your (A: C:) has a problem. Change it to (A: C:).
You're using full-width characters.


I tested it myself.. it works..

Then the OP's problem is full-width vs. half-width.. :P
Floor 19 Posted 2007-04-20 23:08 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Ah? So that's what it was. Thanks, I'll go try it!
Floor 20 Posted 2007-04-20 23:41 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
I changed it; the problem is still there! So frustrating!
Floor 21 Posted 2007-04-20 23:48 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by terse at 2007-4-20 23:41:
I changed it; the problem is still there! So frustrating!

Is %ud% still empty?
I tested it and it has a value.
Windows 一键还原
http://www.yjhy.com
Floor 22 Posted 2007-04-20 23:49 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Otherwise, upload the related files needed and test it.
Windows 一键还原
http://www.yjhy.com
Floor 23 Posted 2007-04-20 23:54 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by lianjiang2004 at 2007-4-20 23:49:
Otherwise, upload the related files needed and test it.

By uploading the related files needed, you mean?
Floor 24 Posted 2007-04-20 23:57 ·  中国 黑龙江 哈尔滨 电信
高级用户
★★★
Credits 760
Posts 357
Joined 2005-10-10 22:33
20-year member
UID 43332
Status Offline
%ud% is empty. Why?

No need to test anymore, because this kind of check won't be recognized under the NT family, so give up this kind of checking (it can't be universal)!

You can work around it by using DIRT to get the variable value of the current drive letter!

[ Last edited by 0451lym on 2007-4-20 at 11:59 PM ]
Floor 25 Posted 2007-04-21 00:08 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by 0451lym at 2007-4-20 23:57:
%ud% is empty. Why?

No need to test anymore, because this kind of check won't be recognized under the NT family, so give up this kind of checking (it can't be universal)!

You can work around it by using DIRT to get the variable value of the current drive letter!

[ Last edited by 0451lym on 2007-4-20 at 11:59 PM ]


This kind of check won't be recognized under the NT family?
I'll just use VOL to check then, or CD> whichever is simpler
Floor 26 Posted 2007-04-21 00:11 ·  中国 黑龙江 哈尔滨 电信
高级用户
★★★
Credits 760
Posts 357
Joined 2005-10-10 22:33
20-year member
UID 43332
Status Offline
CD> is simple
Floor 27 Posted 2007-04-21 02:23 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Using the following below, OK! I just don't know how to explain it! Who can explain it?
if %comspec%==A:\CONFIG.SYS goto next|set ud=A:
if %comspec%==C:\CONFIG.SYS goto next|set ud=C:
Forum Jump: