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-07 03:48
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Check document contents (quite a lot): if present then exit, if not then continue View 840 Replies 5
Original Poster Posted 2008-01-05 12:50 ·  中国 广东 中山 电信
初级用户
Credits 22
Posts 9
Joined 2007-04-26 08:25
19-year member
UID 86526
Gender Male
Status Offline
1: Need to check whether there is an a.ini file under the c:\WINDOWS directory. If there is, give a prompt and exit; if not, continue to the next step.
2: Then check whether the c:\WINDOWS\b.xml document also does not contain the string abc. If it does, give a prompt and exit; if not, continue to the next step.
3: Check whether the mysql service exists. As long as it exists, regardless of whether it is started or not, give a prompt and exit. If it does not exist, continue to the next step.
4: Check whether the system is Windows 2003. If not, give a prompt and exit. If yes, continue to the next step.
5: Check whether the current bat directory is in NTFS format. If not, give a prompt and exit. If yes, continue to the next step.




This newbie has been messing with it for ages and still doesn't understand, so I'm asking everyone for advice. Thanks!

[ Last edited by ygwhm on 2008-1-5 at 12:54 PM ]
Floor 2 Posted 2008-01-05 19:28 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
if exist C:\windows\a.ini (echo yes) else (echo no)
Floor 3 Posted 2008-01-05 19:32 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
findstr /c:"abc" C:\windows\b.xml>nul&&echo yes||echo no
Floor 4 Posted 2008-01-05 19:33 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
sc query mysql|find "1060">nul&&echo yes||echo no
Floor 5 Posted 2008-01-05 19:49 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
type nul>"%temp%\isntfs.txt"&&cacls "%temp%\isntfs.txt" /g everyone:f /e>nul&&echo NTFS partition||echo non-NTFS partition
Floor 6 Posted 2008-01-05 20:21 ·  中国 广东 中山 电信
初级用户
Credits 22
Posts 9
Joined 2007-04-26 08:25
19-year member
UID 86526
Gender Male
Status Offline
Thanks.
hat, help me take a look at how to handle this.
http://www.cn-dos.net/forum/viewthread.php?tid=36777&fpage=1&highlight=
Forum Jump: