中国DOS联盟论坛

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-09-28 21:35
47,813 topics / 349,918 posts / today 0 new / 48,278 members
DOS批处理 & 脚本技术(批处理室) » [Original] -------- bat and reg mixed programming (tested successfully under XP) --------
Printable Version  1,256 / 9
Floor1 s11ss Posted 2008-08-18 20:31
银牌会员 Posts 566 Credits 2,098
Floor2 pusofalse Posted 2008-08-18 20:41
银牌会员 Posts 646 Credits 1,604
Hard to understand... ^_^
Floor3 tempuser Posted 2008-08-20 10:31
高级用户 Posts 261 Credits 547
Originally posted by s11ss at 2008-8-18 20:31:
Floor4 yishanju Posted 2008-08-20 10:42
银牌会员 Posts 1,357 Credits 1,488
So cool, brilliant
Floor5 flyinspace Posted 2008-08-20 10:44
银牌会员 Posts 517 Credits 1,206
Not bad. Very excellent.
Floor6 szww Posted 2008-08-20 12:57
初级用户 Posts 28 Credits 59
I don't quite understand whether the content of the article is about reg or about bat.
The REG part isn't very clear either.
And the REGEDIT4 and REGEDIT5 headers are supposed to be for different operating system versions, right?

Hope someone who knows can explain.
Floor7 flyinspace Posted 2008-08-20 14:43
银牌会员 Posts 517 Credits 1,206
It just makes use of the characteristics of the header. (used quite cleverly)
Put the OP's thing into

1.bat and try it. Then you'll understand.
Floor8 luckboy45 Posted 2008-08-20 19:44
中级用户 Posts 212 Credits 487
Hehe, mixed programming? I'll show my support. I quite like using INF, VBS, BAT, and REG mixed programming...
Floor9 quya Posted 2008-08-20 20:51
高级用户 Posts 172 Credits 558 From 江苏
I didn't understand it. Although I know what it did, I still didn't understand it.

To sum up what I didn't understand:

1. REGEDIT4 isn't a command at all. In a batch file it would give an error message, but here it's gone in a flash, maybe covered up by the immediately following "CLS" command. But some people said the header was used cleverly, so I'm still a bit puzzled. Is that what they meant?

2. The ";" on the 2nd line, doesn't that normally mean it gets ignored? But here...?

3. Then the "/*" on the 3rd line, I understand even less.

4. Then after that the "#", now I'm completely dizzy.

5. To get the final result, doing it in BAT wasn't really difficult in the first place, so what is writing it like this supposed to show? Does it have any practical prospects? Because I completely can't understand it, I can't make sense of it.

Could post #4, #5, and everyone who gave it points clear up my confusion? Thanks.
Floor10 lxmxn Posted 2008-08-21 07:13
版主 Posts 4,938 Credits 11,386
Originally posted by quya at 2008-8-20 20:51:
I didn't understand it. Although I know what it did, I still didn't understand it.

To sum up what I didn't understand:

1. REGEDIT4 isn't a command at all. In a batch file it would give an error message, but here it's gone in a flash, ma ...

If you analyze the OP's code separately using the way of thinking for batch files and for registry scripts, you can understand it. The two scripts (actually integrated into one script) accomplish the same function of adding a registry key.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023