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-01 13:22
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Urgent][Help] Brothers passing by, please give this little brother some guidance! View 3,891 Replies 27
Original Poster Posted 2004-01-13 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
Introduction: The unit I work for is responsible for developing tax filing software. During the upgrade process (mainly in the form of downloading patches, using WINRAR self-extracting format), it often happens that customers operate it themselves and the upgrade fails!! (All the ABC directories are hypothetical; in reality it is the RIGHTIUM directory)
For example: our software is installed by default in the C:\ABC directory, but all files are placed in C:\ABC\123456( (each enterprise has its own six-digit enterprise code), while the default installation directory of the self-extracting file is C:\ABC. Because each enterprise code is different, the user needs to manually add \123456 (that enterprise's own enterprise code) after C:\ABC, but quite a lot of users just click install without adding \123456 (that enterprise's own enterprise code), and in the end the upgrade fails!!!
How do I write such a batch file!!!! (It must work in both WIN98 and WIN2000)
1. First automatically search every partition on the hard disk for the ABC directory (considering that some users may change the default installation directory);
2. Then search all directories under this directory that are named with six-digit numbers (enterprise codes) (because some accountants work part-time and may install several enterprises);
3. Then list the directories named with the found six-digit numbers (enterprise codes), and let the user choose which enterprise code to patch!!!
Note: 1. The patch file can be made into a self-extracting format, and then used together with a batch file!!!

2. Or could some teacher explain how to use one of the currently popular installers to directly search the registry, then list the directories found that are named with six-digit numbers (enterprise codes), and let the user choose which enterprise code to patch!!!
====================================================
At present I have made a batch file together with WBAT (not finished yet), but I have a few questions:
1. How can I make the JBSB and BAK directories under the ABC directory not appear in the list (have the batch file judge automatically)
2. How can I make it automatically extract to the selected code directory after clicking the required enterprise code!
3. Can the dready file be omitted, and use DIR directly!
Note: The above operations are all used under WIN98 and WIN2000, not under DOS. Everyone is welcome to make suggestions!
Below is my unfinished batch file. Please give me some guidance, brothers! Thanks again!







Floor 2 Posted 2004-01-13 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
Floor 3 Posted 2004-01-13 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
There are still many imperfect parts in the above batch file, so please point them out one by one!
Floor 4 Posted 2004-01-13 00:00 ·  中国 辽宁 抚顺 联通
银牌会员
★★★
论坛候鸟
Credits 1,131
Posts 332
Joined 2003-11-27 00:00
22-year member
UID 13461
Gender Male
Status Offline
To:pizigao
Hehe.

Floor 5 Posted 2004-01-13 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline

Floor 6 Posted 2004-01-13 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
This is the interface running under WINDOWS!



Floor 7 Posted 2004-01-13 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
Is there any Chinese character support system that can be used under WINDOWS!?
Not like the situation below:
Floor 8 Posted 2004-01-14 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
Waiting online! Please help me!
Floor 9 Posted 2004-01-14 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Since "the above operations are all used under WIN98 and WIN2000, not under DOS," then I suggest posting it in the forum's "WIN and Other Operating Systems" section.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 10 Posted 2004-01-14 00:00 ·  中国 河北 石家庄 联通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
Re pizigao:

Question 1: You can use FIND with the parameter /V, for example:

FIND /V "JBSB" %temp%\tmp1.txt
FIND /V "BAK" %temp%\tmp.txt

Question 2: I'm not very familiar with WBAT, but it should support mouse click events. Carefully check the help documentation that comes with it, and the problem should be solvable by using the corresponding environment variables. But personally I think, since you've already decided to solve the problem in a DOS way, why care so much about the interface? Using CHOICE to let the user enter their own selection wouldn't that be very simple? There are neither compatibility problems nor garbled tab problems, and it uses one less external program.

Question 3: DREADY is a tool to detect whether floppy drives and CD-ROM drives exist and are ready. Of course you can choose not to use it, but you need to guard against potentially fatal errors when it accesses a CD-ROM drive with no disc in it.
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 11 Posted 2004-01-14 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
willsort brother! Sorry to bother you again!!
Please, when you have time, write out your approach as a batch file for me to use as a reference (1. use CHOICE to let the user enter their own selection; 2. don't use the DREADY program; 3. don't use WBAT)! I really want to learn! I would be extremely grateful!!

Floor 12 Posted 2004-01-14 00:00 ·  中国 河北 石家庄 联通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
Re pizigao:

If the program you want is really urgent, I will make a reply as soon as possible, it's just that I don't have a very good debugging environment around me at the moment, so you may not receive my reply for at least three days. I'm mentioning this in advance so as not to delay your time.

Actually, I don't have the habit of writing complete source code for others. More often I provide some code prototypes or written suggestions, because that is more conducive to exchange of ideas and interaction of inspiration. So if you really are interested in this, I hope you will look up more materials and build up more basic knowledge. Advancing step by step is the proper way.

If, however, you only want to solve a real-world problem, I am naturally also willing to help. Everyone on the forum is a friend, there is no need to use too many honorifics. I may in fact be younger than you, so being called "big brother" really makes me uneasy; from now on just call me by my name.

Perhaps I am a bit too stiff as a person, which makes everyone feel some distance from me. I'll pay attention to correcting that in the future:)



※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 13 Posted 2004-01-15 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
willsort, to tell the truth: I have always kept studying batch files. It's just that this upgrade program is needed rather urgently! Because my knowledge is limited, I still haven't had time to properly summarize what I learned before, so I can only trouble you to give me some guidance (I have always had a strong interest in DOS, it's just that on some problems I haven't had guidance from experts. I'm very happy to get to know you)!
Could you provide an email address of yours, so it will be convenient for us to communicate in the future!
My email is: PIZIGAO@HANGJIAHU.COM
Website HTTP://PIZIGAO.5188.ORG
Floor 14 Posted 2004-01-15 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
There are a few requirements as follows:
1. Search the RIGHTIUM directory on hard disk partitions C, D, E, F, G, and list the directories under the RIGHT directory that are named with six-digit enterprise codes (JBSB and BAK should not be shown in the list)
2. Let the user choose the enterprise code to patch by themselves (CHOICE can also be used to let the user enter their selection). After the selection, automatically run the WINRAR self-extracting file (under WINDOWS), and extract it into the selected directory!!!


Floor 15 Posted 2004-01-15 00:00 ·  中国 浙江 杭州 电信
银牌会员
★★
三生缘里笑红尘
Credits 1,063
Posts 292
Joined 2003-03-09 00:00
23-year member
UID 1073
Gender Male
Status Offline
Provide initialization information and key files for two enterprises! (attachment)
Open attachment
Installer download address (31M):http://www.21ei.net/download/E3.20.018.exe
Patch download address (1.3M):http://www.21ei.net/download/up021.exe
Forum Jump: