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-03 01:02
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Discussion] How to detect whether a certain software is installed according to the registry? View 1,575 Replies 4
Original Poster Posted 2006-12-19 00:51 ·  中国 广东 东莞 电信
银牌会员
★★★
Credits 1,179
Posts 442
Joined 2006-09-09 22:47
19-year member
UID 62249
Status Offline
Due to my need to make portable software, I need to detect whether a certain version of a program is installed. For example, if I want to install the green version of ACCESS 2003, I must know whether Office has been previously installed on the system, and if so, which version it is. Then, handle it according to different situations: if it hasn't been installed, I can directly set up the portable software; if it has been installed, setting it up will cause a conflict, so I need to back up the relevant items in the registry first.

Here comes a problem? How to use batch processing to detect whether a certain program is installed according to the registry. Detection? Here it is still a bit difficult, so it is suggested that everyone discuss it (I used to use a foreign tool called CHECKV to detect whether a specified program is installed, but it is not the command-line version, so it is very troublesome to use, and I need to extract the information from the generated HTML by myself.)
Floor 2 Posted 2006-12-19 05:28 ·  中国 广东 东莞 电信
银牌会员
★★★
Credits 1,179
Posts 442
Joined 2006-09-09 22:47
19-year member
UID 62249
Status Offline
It seems that no one has answered. I'll bump it up by myself.
Is it difficult?
My own idea is like this. I'm writing a program. I'll post it later.
Generally, after a software is installed, it will write some files in the registry or on the hard disk. There are generally two methods to know whether a certain software is installed. One method is to see whether the software writes the main program file and so on in the disk, but this can only judge whether the software is installed but cannot judge the version of the installed program, and it's not very accurate. Another method is to judge through the registry. Unless it's some small pure green software, generally, after a software is installed, a large amount of information will be written in the registry, then we can judge whether the program is installed and its version through the registry. But how to judge? Different programs write different things in the registry, so the difficulty is still very great. As for OFFICE, it can be judged by OFFICE under HKLM or by extracting characters in INSTALLER under HKCR.
Floor 3 Posted 2006-12-19 07:33 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 4 Posted 2006-12-20 01:29 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Floor 5 Posted 2007-01-07 05:47 ·  中国 山西 阳泉 联通
初级用户
Credits 125
Posts 49
Joined 2006-12-24 08:33
19-year member
UID 74424
Gender Male
Status Offline
I'm a newbie in this area, but I also make portable software. Can you explain this problem more clearly? Can you give an example?
Forum Jump: