![]() |
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-08-03 01:59 |
48,038 topics / 350,123 posts / today 1 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » [Discussion] How to detect whether a certain software is installed according to the registry? |
| Printable Version 1,576 / 4 |
| Floor1 HUNRYBECKY | Posted 2006-12-19 00:51 |
| 银牌会员 Posts 442 Credits 1,179 | |
|
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.) |
|
| Floor2 HUNRYBECKY | Posted 2006-12-19 05:28 |
| 银牌会员 Posts 442 Credits 1,179 | |
|
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. |
|
| Floor3 electronixtar | Posted 2006-12-19 07:33 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office
|
|
| Floor4 vkill | Posted 2006-12-20 01:29 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
| Floor5 qpmgljf | Posted 2007-01-07 05:47 |
| 初级用户 Posts 49 Credits 125 | |
|
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?
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |