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-12 18:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Question about comparing 2000 system update patches, looking for a command View 979 Replies 9
Original Poster Posted 2010-04-06 19:09 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 6
Posts 7
Joined 2010-02-26 16:39
16-year member
UID 161245
Gender Male
Status Offline
Under XP there is the REG QUERY registry query command, which makes compare-and-update easy.

Under 2000 there is only the regedit /e registry export command, no query

Right now I want to compare and update the patch files in the same folder, like Windows2000-KB899587-x86-CHT.EXE, against the registry, but I don't know who has a way to do it..
regedit /e 323.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix"

If it's in the registry then don't install it, if it's not then install it???????????????????????
Floor 2 Posted 2010-04-07 16:00 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 6
Posts 7
Joined 2010-02-26 16:39
16-year member
UID 161245
Gender Male
Status Offline
Does nobody know?
Or does anyone know how to extract the KB823559 text from the registry



[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB823559]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB824105]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB825119]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB826232]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB828035]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB828749]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB832353]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB841356]
"Installed"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\KB842773]
Floor 3 Posted 2010-04-08 11:23 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 6
Posts 7
Joined 2010-02-26 16:39
16-year member
UID 161245
Gender Male
Status Offline
Does nobody know? Do all the experts like to stay hidden/////////////////?????????????????????????
Floor 4 Posted 2010-04-08 13:23 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Floor 5 Posted 2010-04-08 14:26 ·  中国 广东 深圳 电信
初级用户
★★
游手好闲 + 无所事事 ..
Credits 194
Posts 167
Joined 2007-04-30 09:43
19-year member
UID 87022
Gender Male
Status Offline
Right, just type reg /? at CMD and you'll know, it can query, add, and delete, all of that is possible
Floor 6 Posted 2010-04-08 16:08 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 6
Posts 7
Joined 2010-02-26 16:39
16-year member
UID 161245
Gender Male
Status Offline
Originally posted by woxizishen at 2010-4-8 11:23:
Does nobody know? Do all the experts like to stay hidden/////////////////?????????????????????????




Thanks, moderator, but the 2000 system doesn't have the reg command............................ only regedit /e /s and so on





I want to ask whether it's possible to use a batch file to extract the kb824105 above
That way I can compare it more easily
Floor 7 Posted 2010-04-08 22:00 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
On 2000, use VBS, BAT won't do.
Floor 8 Posted 2010-04-09 12:04 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 6
Posts 7
Joined 2010-02-26 16:39
16-year member
UID 161245
Gender Male
Status Offline
Originally posted by HAT at 2010-4-8 22:00:
On 2000, use VBS, BAT won't do.


Moderator, can you give me a piece of vb code?

I'm not good with vb

regedit /e 323.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix"

It's just comparing the main keys of the system patches under hotfix
For example:




Compare them with the patches stored in my current directory

Windows2000-KB824105-x86-CHT.EXE

Windows2000-KB893756-x86-CHT.EXE
Floor 9 Posted 2010-04-10 01:25 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
I know a little VBS, not VB.
Floor 10 Posted 2010-04-10 04:37 ·  中国 台湾 台湾宽频通讯顾问股份有限公司
初级用户
★★
Credits 68
Posts 64
Joined 2009-05-23 20:43
17-year member
UID 145803
Gender Male
Status Offline
OP, do you want VB code or VBS code?
Forum Jump: