WO2011085647A1 - Method and apparatus for detecting software installation - Google Patents

Method and apparatus for detecting software installation Download PDF

Info

Publication number
WO2011085647A1
WO2011085647A1 PCT/CN2011/070025 CN2011070025W WO2011085647A1 WO 2011085647 A1 WO2011085647 A1 WO 2011085647A1 CN 2011070025 W CN2011070025 W CN 2011070025W WO 2011085647 A1 WO2011085647 A1 WO 2011085647A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
detected
detection
version number
detecting
Prior art date
Application number
PCT/CN2011/070025
Other languages
French (fr)
Chinese (zh)
Inventor
王宝剑
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2011085647A1 publication Critical patent/WO2011085647A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method and apparatus for detecting software installation. Background of the invention
  • client software including instant messaging, audio and video playback, resource downloading, web browsing, input method, system assistance and so on.
  • the upgraded version of the client software adds new features and addresses bugs and vulnerabilities in older versions. Users can experience the latest features with the latest version and avoid the security threats that are known to vulnerabilities of older versions.
  • Existing software manager-related applications currently allow users to obtain upgraded versions of installed client software. For example, the basic and core function of the software manager is how to accurately detect if a piece of software is installed on the user's computer, if it is installed, obtain its version number, and determine if the software needs to be upgraded.
  • the software manager can use the following techniques to detect whether the software has been installed. For example, in the Windows Add or Remove Program shown in Figure 1, each installed software and its version information is passed through the registry.
  • the inventors have found that the prior art has at least the following disadvantages: Since the detection method of the software installation in the prior art can only detect the software under the Uninstall node of the registry, the software that is not normally registered in the system Or the software whose registry information is partially destroyed or the green software cannot be detected normally. In addition, the format of the version number of the software under the Uninstall node of the registry may be irregular, which is not suitable for the version number of the upgrade version of the software. Contrast, resulting in a single detection method of the existing software installation, and thus prone to misjudgment, poor adaptability and other issues. Summary of the invention
  • the embodiment of the present invention provides a method and apparatus for detecting software installation.
  • the technical solution is as follows:
  • a method of detecting software installation including:
  • the detection strategy corresponding to the software to be detected is at least one;
  • the detecting method further includes: the server assigning an ID to the collected software and configuring a corresponding detection policy; sending the ID and the detection policy corresponding to the collected software to the client; the client receiving The ID and the detection policy corresponding to the collected software are saved in the detection policy file.
  • a software installed detection device comprising:
  • the acquiring module is configured to obtain the software to be detected and the corresponding detection policy from the detection policy file saved by the client where the detecting device is located, and the detection strategy corresponding to the software to be detected is at least one;
  • the detecting module is configured to determine, according to the detection policy corresponding to the software to be detected acquired by the acquiring module, whether the software to be detected is installed.
  • the detecting device further includes:
  • the detection policy file obtaining module is configured to receive an ID and a configured detection policy allocated by the server delivered by the server for the collected software, and save the detection policy in the detection policy file.
  • the server sends the ID of the software collected by the server and the detection policy corresponding to the collected software to the client, and the client saves the detection policy file; the client detects the policy.
  • the software corresponding to each ID saved in the file is used as the software to be detected, and the software to be detected is detected according to the detection policy corresponding to the software to be detected stored in the detection policy file, and it is determined whether the software to be detected is installed, thereby The software installation is detected accurately and reliably.
  • the ID of the software and the detection strategy corresponding to the software are sent by the server to the client.
  • One server can send the above information to multiple clients, which saves the time for the client to configure the detection strategy. Improve the detection efficiency of software installation and avoid waste of resources.
  • FIG. 1 is a schematic diagram of a Windows add or delete program in the prior art
  • FIG. 2 is a schematic diagram of a key value scan result of a Windows add or delete program in the prior art
  • FIG. 3 is a flowchart of a method for detecting a software installation according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart of a method for acquiring a detection policy file according to Embodiment 2 of the present invention
  • FIG. 6 is a schematic diagram of an installation path of acquiring software from a registry according to Embodiment 2 of the present invention
  • FIG. 7 is a schematic diagram of a storage path for acquiring software by a shortcut according to Embodiment 2 of the present invention
  • FIG. 8 is a schematic diagram of obtaining a version number of a software from an Uninstall node of a registry according to Embodiment 2 of the present invention.
  • FIG. 9 is a schematic diagram of obtaining a version number of software from other paths of the registry according to Embodiment 2 of the present invention.
  • FIG. 10 is a flowchart of a software installation detection method according to Embodiment 2 of the present invention.
  • FIG. 11 is a schematic structural diagram of a software installation detection apparatus according to Embodiment 3 of the present invention. Mode for carrying out the invention
  • the embodiment 1 of the present invention provides a software installation detection method.
  • the detection method includes: an application detection strategy, where the software to be detected corresponds to At least one detection strategy;
  • the method for obtaining the detection policy file includes: the server allocates an ID and a corresponding detection policy for the software collected by the server; and sends the detection policy corresponding to the ID and the collected software to the client; the ID that the client will receive The detection strategy corresponding to the collected software is saved in the detection policy file.
  • Step 302 Determine, according to a detection policy of the software to be detected, whether the software to be detected is installed.
  • the step 302 may be specifically: detecting, according to a detection policy corresponding to the software to be detected, whether a version number of the software to be detected exists; If the version number of the software to be detected is detected, it is determined that the software to be detected is installed; if the version number of the software to be detected is not detected, it is determined that the software to be detected is not installed.
  • the detection strategy of the software to be detected may include:
  • PE Portable Executable
  • the obtaining the specified PE file of the software to be detected includes:
  • Obtain the shortcut of the software to be detected obtain the installation path of the software to be detected from the properties of the shortcut, and obtain the specified PE file of the software to be detected according to the installation path.
  • obtaining the version number of the software to be detected from the registry includes: obtaining the Display Version from the Uninstall node under LocalMachine (local computer) and CurrentUser (current user) in the registry.
  • the step 302 includes: acquiring, in the multiple detection policies corresponding to the software to be detected, an undetected detection policy as the current detection policy, and detecting according to the current detection policy. Whether the version number of the software to be tested exists?
  • the detection policy that has not been executed cannot be obtained, it is determined that the detection result is that the version number of the software to be detected is not detected.
  • the server sends the ID of the software collected by the server and the detection policy corresponding to the collected software to the client, and is saved by the client in the detection policy file;
  • the client detects the software corresponding to each ID saved in the policy file as the software to be detected, and saves the pending check according to the detection policy file.
  • the detection strategy corresponding to the test software detects the software to be detected, and determines whether the software to be detected is installed, so that the software installation can be detected accurately and reliably; meanwhile, the ID of the software and the detection strategy corresponding to the software are sent by the server.
  • a server can send the above information to multiple clients, which saves the time for the client to configure the detection policy by itself, improves the detection efficiency of the software installation, and avoids waste of resources; and, the server is for each software to be tested. At least one detection policy is configured, so that the software manager can detect the software installation by using multiple detection strategies.
  • Embodiment 2 of the present invention provides a software installation detection method.
  • the detection method is described by using a commonly used software manager as an execution subject, but this is not intended to limit the scope of protection of the present invention.
  • the embodiment mainly includes a detection policy file acquisition method and a software installation detection method.
  • Step 401 The server collects related information of various types of software
  • the server can collect related information of various softwares through the network, and can also collect related information of various softwares through information exchanged between the servers.
  • the collection process of the server may be timed or event triggered, and the advantages of this are: once a certain version of the software is released, or the registry location of the new version of the software is different from the old version, or new A software, or disappeared a software, the software's detection strategy is likely to change, and the server can collect the above information in a timely manner.
  • the server is set to collect the above information every fixed time (for example, every other day or other time), or the server administrator triggers the server's collection software function.
  • Step 402 The server allocates an ID for each software collected and saves it;
  • the ID assigned to each piece of software collected can uniquely identify the software in the server (or server system).
  • the assigned ID can be a number, a letter, a symbol, or a combination of one or more of the above.
  • the process by which the server assigns an ID to the software can be either manual or automated.
  • step 402 and step 403 can be exchanged or simultaneously.
  • Step 403 Configure a corresponding detection strategy for each software collected
  • the detection of the software installation is actually to detect the software installed on the computer and its version number. Therefore, configuring the corresponding detection strategy for the software can be considered as providing how to detect the software installed on the computer. And the method of detecting the version number of the software.
  • the software installed on the detection computer is completed by the client where the software manager is located. Therefore, in step 403, configuring the corresponding detection policy for the software is to provide a version number of how to detect the software.
  • the specific detection strategy can be configured according to different softwares.
  • the detection strategies of several types of packages are taken as an example, but the scope of protection of the present invention is not limited.
  • the version number of the software can be obtained through the specified PE file of the software.
  • the PE file refers to the software EXE (executable) file or DLL (dynamic link library) file.
  • the specified PE file is applicable to the case where a software contains multiple EXE files or DLL files.
  • the server will specify the PE file of the software in the issued detection policy.
  • the specified PE file is the main EXE file of the software. .
  • the storage path of the specified PE file of the software may include:
  • the registry may contain the installation path of the software, as shown in Figure 6, if the installation path of the software can be obtained from the registry, the main software can be obtained according to the installation path.
  • the storage path of the software's main EXE file can be located through the shortcut attribute of the main EXE file, as shown in Figure 7, the storage path of the software's main EXE file can be obtained directly through the shortcut of the main EXE file.
  • the location of the shortcut of the software's main EXE file including but not limited to the following: a) Start - program menu shortcut, under the current user
  • the storage path of the main EXE file of the software obtained by the shortcut of the main EXE file of the software can also support: The path synthesis corresponding to the file pointed to by the shortcut.
  • the version number of the software can be obtained from the registry.
  • the registry path is:
  • HKEY_LOCAL_MACHINE Software ⁇ Microsoft ⁇ Windows ⁇ CurrentVersion ⁇ Uninstall and HKEY_CURRENT_USER ⁇ Software ⁇ Microsoft ⁇ Windows ⁇ CurrentVersion ⁇ Uninstall.
  • HKEY_LOCAL_MACHINE ⁇ SOFTWARE ⁇ TENCENT ⁇ QQDownload ⁇ Version the version number of the software obtained from the registry path is HKEY_LOCAL_MACHINE ⁇ SOFTWARE ⁇ TENCENT ⁇ QQDownload under the name Version.
  • Step 404 The server sends the ID of the software and the detection policy corresponding to the software to the client where each software manager is located;
  • the information may be sent to the client where each software manager is located by using a notification message or other commonly used message body; if the information is not sent for the first time, the message may be updated or other commonly used
  • the message body sends the above information to the client where each software manager is located.
  • the above information may be delivered by using a full update or an incremental update.
  • the server may adopt the incremental update method, that is, the data not included in the data that was recently delivered, Or the changed data is sent to the client, and the unchanged data is not sent to the client; or the server can use the full update method, that is, all the data (including the changed and unchanged) is sent to the client.
  • the server may adopt the incremental update method, that is, the data not included in the data that was recently delivered, Or the changed data is sent to the client, and the unchanged data is not sent to the client; or the server can use the full update method, that is, all the data (including the changed and unchanged) is sent to the client.
  • the server may adopt the incremental update method, that is, the data not included in the data that was recently delivered, Or the changed data is sent to the client, and the unchanged data is not sent to the client; or the server can use the full update method, that is, all the data (including the changed and unchanged) is sent to the client.
  • the full update method that is, all the data (including the changed and unchanged) is sent to the client.
  • the delivery time of the above data may be timed or instantaneous.
  • the timing may be that the data is sent at regular intervals (for example, every other day or other time), and the instant situation may be that the server collects new software, or a new version of the software, or software at a time.
  • the data is started to be delivered.
  • the delivered data can be interpreted and executed by the client.
  • the data sent by the server to the client can be represented by an Extensible Markup Language (XML).
  • Step 405 The client receives the ID of the software delivered by the server and the detection policy corresponding to the software, and interprets and saves the same.
  • the client uses a data file to save the data.
  • the data file is referred to as a detection policy file (or, feature Library file).
  • the reason why the data file is used to save the ID of the software and the corresponding detection strategy of the software instead of hard coding the software ID and the corresponding detection strategy of the software in the program code of the software manager, the corresponding detection strategy of the software may be updated in real time. If hard coded in the program code, you need to modify the program code of the software manager frequently, and the modification of the program code is more complicated, but the data file is very convenient and quick to modify, and can save multiple detection strategies corresponding to multiple softwares. .
  • the basic structure of the detection policy file saved by the client can be as shown in Table 1. In the detection policy file, the detection policy configured for each software is described in turn, and the detection strategy of each software can be Includes one or more.
  • the client receives the data sent by the server, and parses out the ID of the software and the corresponding software.
  • test strategy file shown is for illustrative purposes only and is not intended to be used as a reference for actual documentation. ⁇ 2
  • HKEY_LOCAL_MACHINE Software ⁇ Microsoft ⁇ Windows ⁇ CurrentVersion ⁇ Uninstall ⁇ 052CFB79-9D62-42E3-8A15-DE66C2C97C3E ⁇ under the folder to get the key name named InstallLocation, this value corresponds to the installation path of QQ2009, from the installation path of QQ2009 Obtain the specified PE file QQ.exe of QQ2009 under the folder bin, and obtain the version number of the software from the properties of QQ.exe;
  • Strategy 2 Find the shortcut of Tencent Software ⁇ QQ2OO9 ⁇ News QQ2009.1nk, and get the installation path of the software according to the properties of the shortcut, and get the specified PE file QQ.exe according to the installation path, and from the properties of QQ.exe Get the version number of the software.
  • Uninstall folder QQPlayer obtains the key name corresponding to Displaylcon, the value corresponds to the installation path of QQ video and audio, and the specified PE file of the software is obtained under the installation path of QQ video and audio.
  • Strategy 2 Find Tencent Software ⁇ QQ Video/QQ Video. Ink shortcut, and get the software installation path according to the shortcut property, and get the specified PE file QQ video.exe according to the installation path, and from QQ video. exe Get the version number of the software in the properties;
  • Strategy 3 Find the shortcut for Tencent ⁇ QQPlayer ⁇ QQPlayer.lnk, and get the installation path of the software according to the shortcut property, and get the specified PE file according to the installation path.
  • the value of Version which corresponds to the version number of the QQ video: ⁇
  • the basis of the method for obtaining the detection policy file described in steps 401 to 405 The software corresponding to each ID saved in the measurement policy file detects the software name and its version number.
  • the method for detecting whether each software is installed in the process is similar. Therefore, in this embodiment, the detection method of the present invention is described by taking as an example whether the software corresponding to any ID stored in the policy file is installed. Referring to FIG. 10, the method for detecting software installation provided by this embodiment may specifically include:
  • Step 1001 The software manager of the client receives the trigger signal detected by the software.
  • the trigger signal of the software detection may include, but is not limited to, the software manager detects that the software starts running, the user initiates the software detection function, and the software manager detects the timing detection. The time of the software is detected, and one of the detection policy files (not the last one) is executed. a detection policy that is not executed, and detects whether the software to be detected is installed according to the acquired detection policy;
  • the QQ video and audio software identified by the ID2 is used as the software to be detected, and the software manager obtains the unexecuted detection strategy corresponding to the QQ video software, such as the policy 1, according to the policy 1 , the path from the registry is
  • the unexecuted detection policies may be acquired by the software manager one by one according to the save order of the detection policy files, or may be randomly obtained by the software manager from the saved detection policy files.
  • Step 1003 Determine whether the version number of the software to be detected is detected. If yes, go to step 1006;
  • step 1004 is performed.
  • Step 1004 Determine whether the detection software of the to-be-detected software in the detection policy file is not executed.
  • step 1002 is performed
  • step 1005 is performed.
  • Step 1005 After the detection is completed, it is determined that the software to be detected is software not installed;
  • Step 1006 After the detection is completed, it is determined that the software to be detected is the installed software, and the version number is the version number obtained in step 1002.
  • the software manager may perform the method shown in the foregoing steps 1001 to 1006 on the software corresponding to each ID saved in the detection policy file, and the present invention is not described herein.
  • step 1005 there is a special case for both step 1005 and step 1006.
  • the special case of the step 1005 is: the software manager does not detect the version number of the software, but the software is already installed on the client.
  • the step 1004 and the step 1005 of the embodiment may further include:
  • step 1006 that is, the detection is completed, and the software to be detected is determined to be installed software, and the version number is in a customized form, such as 0.0.0.0 and the like;
  • step 1005 is performed, that is, the detection is completed, and it is determined that the software to be detected is software not installed.
  • step 1006 The special case in step 1006 is that the software manager detects the version number of the software, but the version number may be a version number left by some special operations (such as an error when deleting the software), in order to overcome the above-mentioned special case problem,
  • the step 1003 and the step 1006 of the embodiment may further include: Determining whether a specified PE file of the software to be detected exists;
  • step 1006 is performed, that is, the detection is completed, and it is determined that the software to be detected is the installed software, and the version number is the version number obtained in step 1002;
  • step 1005 is performed, that is, the detection is completed, and it is determined that the software to be detected is software not installed.
  • the server sends the ID of the software it searches for and the detection policy corresponding to the searched software to the client, and the client saves the detection policy file;
  • the client detects the software corresponding to each ID saved in the policy file as the software to be detected, and detects the software to be detected according to the detection policy corresponding to the software to be detected stored in the detection policy file, and determines whether the software to be detected is It has been installed so that the software installation can be detected accurately and reliably.
  • the ID of the software and the detection strategy corresponding to the software are sent by the server to the client.
  • One server can send the above information to multiple clients, saving the client itself.
  • the time for configuring the detection policy improves the detection efficiency of the software installation and avoids waste of resources.
  • the server configures at least one detection policy for each software to be tested, so that the software manager can use multiple detection strategies for software. Installation detection.
  • an embodiment of the present invention provides a software installation detection apparatus. It should be noted that the operation method of the detection apparatus can be referred to the detection methods provided in Embodiment 1 and Embodiment 2, and details are not described herein.
  • the detection device comprises:
  • the obtaining module 1101 is configured to obtain the software to be detected and the corresponding detection policy from the detection policy file saved by the client where the detection device is located, where the detection strategy corresponding to the software to be detected is at least one;
  • the detecting module 1102 is configured to determine, according to the detection policy corresponding to the software to be detected acquired by the acquiring module 1101, whether the software to be detected is installed. Further, the detecting device further includes:
  • the detection policy file obtaining module is configured to receive an ID assigned by the server and a configured detection policy of the software that is sent by the server, and save the detection policy in the detection policy file.
  • the detecting module 1102 specifically includes:
  • the version number detecting unit is configured to detect whether a version number of the software to be detected exists according to a detection policy corresponding to the software to be detected acquired by the obtaining module 1101;
  • the determining unit is configured to determine that the software to be detected is installed if the version number detecting unit detects the version number of the software to be detected; and if the version number detecting unit does not detect the version number of the software to be detected, determine that the software to be detected is not installed.
  • the version number detecting unit includes:
  • Obtaining a sub-unit configured to obtain an undetected detection policy as a current detection policy among the multiple detection policies corresponding to the software to be detected; whether the version number of the software exists;
  • the determining subunit is configured to determine that the detection result is that the version number of the software to be detected is not detected if the acquiring subunit cannot acquire the unchecked detection policy.
  • the detecting device further includes:
  • an output module configured to output a version number of the software to be detected detected by the version number detecting unit when the determining unit determines that the software to be detected is installed.
  • the server sends the ID of the software it searches for and the detection policy corresponding to the searched software to the client, and the client saves the detection policy file;
  • the client detects the software corresponding to each ID saved in the policy file as the software to be detected, and detects the software to be detected according to the detection policy corresponding to the software to be detected stored in the detection policy file, and determines the software to be detected. Whether it is installed, so that the software installation can be detected accurately and reliably; at the same time, the server sends the software ID and the software corresponding detection policy to the client, and one server can send the above information to multiple clients, saving the client.
  • the server configures at least one detection policy for each software to be detected, so that the software manager can adopt multiple detection strategies. Detection of software installation.

Abstract

The present invention discloses a method and an apparatus for detecting software installation, which belong to the field of computer technology. The method includes: obtaining the software to be detected and its corresponding detection strategy from a detection strategy file saved in a client, wherein there is at least one detection strategy corresponding to the software to be detected; according to the detection strategy corresponding to the software to be detected, judging whether the software to be detected has already been installed. The apparatus includes an obtainment module and a detection module. By using the software corresponding to each Identifier (ID) stored in the detection strategy file saved in the client as the software to be detected, and performing the detection for the software to be detected according to the detection strategy corresponding to the software to be detected saved in the detection strategy file, it can be judged whether the software to be detected has already been installed, and thus an accurate and reliable method for detecting software installation is provided.

Description

一种软件安装的检测方法和装置  Method and device for detecting software installation
技术领域 Technical field
本发明涉及计算机技术领域, 特别涉及一种软件安装的检测方法和 装置。 发明背景  The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for detecting software installation. Background of the invention
随着计算机技术的发展, 客户端软件越来越多, 遍及即时通信、 音 视频播放、 资源下载、 网页浏览、 输入法、 系统辅助等各个门类。 随着 互联网的普及, 客户端软件的获取已经从十年前光盘分发为主的方式, 转变成网络下载为主的方式,这大大方便了用户获取客户端软件。 同时, 如今的每月一次甚至几天一次。 客户端软件的升级版本会增加新功能, 并解决旧版本中的缺陷和漏洞, 用户使用最新版本可以体验最新功能, 并避免旧版本的已知漏洞对计算机带来的安全威胁。 目前现有的与软件 管理器相关的应用程序, 可以让用户获取已安装客户端软件的升级版 本。 例如, 软件管理器的基础且核心的功能就是如何准确地检测到在用 户计算机上某一款软件是否已安装, 如果已安装, 获取其版本号, 并判 断该软件是否需要升级。  With the development of computer technology, there are more and more client software, including instant messaging, audio and video playback, resource downloading, web browsing, input method, system assistance and so on. With the popularity of the Internet, the acquisition of client software has changed from a way of distributing CDs to a network-based approach ten years ago, which greatly facilitates users to obtain client software. At the same time, it is once a month or even once a few days. The upgraded version of the client software adds new features and addresses bugs and vulnerabilities in older versions. Users can experience the latest features with the latest version and avoid the security threats that are known to vulnerabilities of older versions. Existing software manager-related applications currently allow users to obtain upgraded versions of installed client software. For example, the basic and core function of the software manager is how to accurately detect if a piece of software is installed on the user's computer, if it is installed, obtain its version number, and determine if the software needs to be upgraded.
在现有技术中,软件管理器可以利用如下技术检测软件是否已安装。 例如, 在图 1所示的 Windows的添加或删除程序中, 各个已安装的软件 及其版本信息都是通过在注册表的  In the prior art, the software manager can use the following techniques to detect whether the software has been installed. For example, in the Windows Add or Remove Program shown in Figure 1, each installed software and its version information is passed through the registry.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall和 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall 下 进行键值扫描获取的。参见图 2 ,通过键值扫描,获取到软件名称为 "腾 讯 QQ2009" 的软件已安装, 且该软件的版本为 1.23.375.0。 Key-value scans obtained under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall and HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall. See Figure 2, through the key value scan, get the software name as "Teng The software of QQ2009 has been installed, and the version of the software is 1.23.375.0.
在实现本发明的过程中, 发明人发现现有技术至少存在以下缺点: 由于现有技术中软件安装的检测方法只能检测注册表的 Uninstall节 点下的软件, 对于没有正常注册到系统中的软件、 或者注册表信息被部 分破坏的软件、 或者绿色软件等都不能正常地检测; 另外, 注册表的 Uninstall节点下软件的版本号的格式可能会不规范, 不适合与该软件升 级版本的版本号进行对比, 导致现有的软件安装的检测方法单一、 进而 容易出现误判、 适应性不好等问题。 发明内容  In the process of implementing the present invention, the inventors have found that the prior art has at least the following disadvantages: Since the detection method of the software installation in the prior art can only detect the software under the Uninstall node of the registry, the software that is not normally registered in the system Or the software whose registry information is partially destroyed or the green software cannot be detected normally. In addition, the format of the version number of the software under the Uninstall node of the registry may be irregular, which is not suitable for the version number of the upgrade version of the software. Contrast, resulting in a single detection method of the existing software installation, and thus prone to misjudgment, poor adaptability and other issues. Summary of the invention
为了准确地检测出软件是否已经安装到计算机中, 本发明实施例提 供了一种软件安装的检测方法和装置。 所述技术方案如下:  In order to accurately detect whether the software has been installed in a computer, the embodiment of the present invention provides a method and apparatus for detecting software installation. The technical solution is as follows:
一种软件安装的检测方法, 包括:  A method of detecting software installation, including:
在客户  At the customer
略, 所述待检测软件对应的检测策略至少为一条; 装。 The detection strategy corresponding to the software to be detected is at least one;
所述检测方法进一步包括:服务器为搜集到的软件分配 ID和配置对 应的检测策略; 将所述 ID及所述搜集到的软件对应的检测策略发送至 所述客户端; 所述客户端将接收到的 ID及所述搜集到的软件对应的检 测策略保存在检测策略文件中。  The detecting method further includes: the server assigning an ID to the collected software and configuring a corresponding detection policy; sending the ID and the detection policy corresponding to the collected software to the client; the client receiving The ID and the detection policy corresponding to the collected software are saved in the detection policy file.
一种软件安装的检测装置, 包括:  A software installed detection device, comprising:
获取模块, 用于从所述检测装置所在的客户端保存的检测策略文件 中获取待检测软件及其对应的检测策略, 所述待检测软件对应的检测策 略至少为一条; 检测模块, 用于根据所述获取模块获取的所述待检测软件对应的检 测策略判断所述待检测软件是否已安装。 The acquiring module is configured to obtain the software to be detected and the corresponding detection policy from the detection policy file saved by the client where the detecting device is located, and the detection strategy corresponding to the software to be detected is at least one; The detecting module is configured to determine, according to the detection policy corresponding to the software to be detected acquired by the acquiring module, whether the software to be detected is installed.
所述检测装置还包括:  The detecting device further includes:
检测策略文件获取模块, 用于接收服务器下发的所述服务器为搜集 到的软件分配的 ID和配置的检测策略, 并将其保存在检测策略文件中。  The detection policy file obtaining module is configured to receive an ID and a configured detection policy allocated by the server delivered by the server for the collected software, and save the detection policy in the detection policy file.
本发明实施例提供的技术方案带来的有益效果是:  The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
从本发明实施例提供的技术方案可以看出, 服务器将其搜集的软件 的 ID及所搜集软件对应的检测策略发送给客户端, 并由客户端保存在 检测策略文件中; 客户端将检测策略文件中保存的每一个 ID对应的软 件作为待检测软件, 按照检测策略文件中保存的该待检测软件对应的检 测策略对该待检测软件进行检测, 并判断该待检测软件是否已安装, 从 而可以准确、 可靠地进行软件安装的检测; 同时, 由服务器发送软件的 ID及软件对应的检测策略给客户端,一个服务器可以为多个客户端发送 上述信息, 节省了客户端自行配置检测策略的时间, 提高了软件安装的 检测效率, 避免了资源的浪费。 附图简要说明  It can be seen from the technical solution provided by the embodiment of the present invention that the server sends the ID of the software collected by the server and the detection policy corresponding to the collected software to the client, and the client saves the detection policy file; the client detects the policy. The software corresponding to each ID saved in the file is used as the software to be detected, and the software to be detected is detected according to the detection policy corresponding to the software to be detected stored in the detection policy file, and it is determined whether the software to be detected is installed, thereby The software installation is detected accurately and reliably. At the same time, the ID of the software and the detection strategy corresponding to the software are sent by the server to the client. One server can send the above information to multiple clients, which saves the time for the client to configure the detection strategy. Improve the detection efficiency of software installation and avoid waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS
图 1是现有技术中 Windows的添加或删除程序的示意图;  1 is a schematic diagram of a Windows add or delete program in the prior art;
图 2是现有技术中 Windows的添加或删除程序的键值扫描结果的示 意图;  2 is a schematic diagram of a key value scan result of a Windows add or delete program in the prior art;
图 3是本发明实施例 1提供的软件安装的检测方法的流程图; 图 4是本发明实施例 2提供的检测策略文件的获取方法流程图; 图 5是本发明实施例 2提供的软件的主 EXE文件的属性的示意图; 图 6是本发明实施例 2提供的从注册表中获取软件的安装路径的示 意图; 图 7是本发明实施例 2提供的通过快捷方式获取软件的存储路径的 示意图; 3 is a flowchart of a method for detecting a software installation according to Embodiment 1 of the present invention; FIG. 4 is a flowchart of a method for acquiring a detection policy file according to Embodiment 2 of the present invention; FIG. FIG. 6 is a schematic diagram of an installation path of acquiring software from a registry according to Embodiment 2 of the present invention; FIG. 7 is a schematic diagram of a storage path for acquiring software by a shortcut according to Embodiment 2 of the present invention;
图 8是本发明实施例 2提供的从注册表的 Uninstall节点下获取软件 的版本号的示意图;  8 is a schematic diagram of obtaining a version number of a software from an Uninstall node of a registry according to Embodiment 2 of the present invention;
图 9是本发明实施例 2提供的从注册表的其他路径中获取软件的版 本号的示意图;  9 is a schematic diagram of obtaining a version number of software from other paths of the registry according to Embodiment 2 of the present invention;
图 10是本发明实施例 2提供的软件安装的检测方法的流程图; 图 11是本发明实施例 3提供的软件安装的检测装置的结构示意图。 实施本发明的方式  10 is a flowchart of a software installation detection method according to Embodiment 2 of the present invention; and FIG. 11 is a schematic structural diagram of a software installation detection apparatus according to Embodiment 3 of the present invention. Mode for carrying out the invention
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对 本发明实施方式作进一步地详细描述。  The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
实施例 1  Example 1
为了更加准确地检测出已安装的软件及其版本信息, 本发明实施例 1提供了一种软件安装的检测方法, 参见图 3, 该检测方法包括: 应的检测策略, 其中, 待检测软件对应的检测策略至少为一条;  In order to more accurately detect the installed software and its version information, the embodiment 1 of the present invention provides a software installation detection method. Referring to FIG. 3, the detection method includes: an application detection strategy, where the software to be detected corresponds to At least one detection strategy;
其中, 检测策略文件的获取方法包括: 服务器为其搜集到的软件分 配 ID和配置对应的检测策略; 将上述 ID及搜集到的软件对应的检测策 略发送至客户端; 客户端将接收到的 ID及搜集到的软件对应的检测策 略保存在检测策略文件中。  The method for obtaining the detection policy file includes: the server allocates an ID and a corresponding detection policy for the software collected by the server; and sends the detection policy corresponding to the ID and the collected software to the client; the ID that the client will receive The detection strategy corresponding to the collected software is saved in the detection policy file.
步骤 302: 根据待检测软件的检测策略, 判断该待检测软件是否已 安装;  Step 302: Determine, according to a detection policy of the software to be detected, whether the software to be detected is installed.
其中, 步骤 302具体可以为: 根据待检测软件对应的检测策略, 检 测待检测软件的版本号是否存在; 如果检测到待检测软件的版本号, 则判定待检测软件已安装; 如果未检测到待检测软件的版本号, 则判定待检测软件未安装。 其中, 待检测软件的检测策略可以包括: The step 302 may be specifically: detecting, according to a detection policy corresponding to the software to be detected, whether a version number of the software to be detected exists; If the version number of the software to be detected is detected, it is determined that the software to be detected is installed; if the version number of the software to be detected is not detected, it is determined that the software to be detected is not installed. The detection strategy of the software to be detected may include:
获取待检测软件的指定可移植的可执行(PE, Portable Executable ) 文件, 从指定 PE文件的属性中获取该待检测软件的版本号;  Obtaining a specified portable executable (PE, Portable Executable) file of the software to be detected, and obtaining a version number of the software to be detected from an attribute of the specified PE file;
和 /或, 从注册表中获取待检测软件的版本号。  And / or, get the version number of the software to be tested from the registry.
具体地, 获取待检测软件的指定 PE文件, 具体包括:  Specifically, the obtaining the specified PE file of the software to be detected includes:
从注册表中获取待检测软件的安装路径, 并根据安装路径获取待检 测软件的指定 PE文件; 或  Obtaining the installation path of the software to be detected from the registry, and obtaining the specified PE file of the software to be tested according to the installation path; or
获取待检测软件的快捷方式, 从快捷方式的属性中获取待检测软件 的安装路径, 并根据安装路径获取待检测软件的指定 PE文件。  Obtain the shortcut of the software to be detected, obtain the installation path of the software to be detected from the properties of the shortcut, and obtain the specified PE file of the software to be detected according to the installation path.
具体地, 从注册表中获取待检测软件的版本号, 具体包括: 从注册表中 LocalMachine (本地计算机 )和 CurrentUser (当前用户) 下的 Uninstall (卸载 )节点下获取 Display Version (版本号 )。  Specifically, obtaining the version number of the software to be detected from the registry includes: obtaining the Display Version from the Uninstall node under LocalMachine (local computer) and CurrentUser (current user) in the registry.
需要说明的是, 当检测策略为多条时, 步骤 302具体包括: 在待检测软件对应的多条检测策略中, 获取一条未被执行过的检测 策略作为当前检测策略, 并根据当前检测策略检测待检测软件的版本号 是否存在;  It should be noted that, when the detection policy is multiple, the step 302 includes: acquiring, in the multiple detection policies corresponding to the software to be detected, an undetected detection policy as the current detection policy, and detecting according to the current detection policy. Whether the version number of the software to be tested exists?
如果无法获取未被执行过的检测策略, 则判定检测结果为未检测到 待检测软件的版本号。  If the detection policy that has not been executed cannot be obtained, it is determined that the detection result is that the version number of the software to be detected is not detected.
其中, 当判定待检测软件已安装时,输出所述待检测软件的版本号。 由此可见, 在本发明实施例提供的软件安装的检测方法中, 服务器 将其搜集的软件的 ID及所搜集软件对应的检测策略发送给客户端, 并 由客户端保存在检测策略文件中; 客户端将检测策略文件中保存的每一 个 ID对应的软件作为待检测软件, 按照检测策略文件中保存的该待检 测软件对应的检测策略对该待检测软件进行检测, 并判断该待检测软件 是否已安装, 从而可以准确、 可靠地进行软件安装的检测; 同时, 由服 务器发送软件的 ID及软件对应的检测策略给客户端, 一个服务器可以 为多个客户端发送上述信息, 节省了客户端自行配置检测策略的时间, 提高了软件安装的检测效率, 避免了资源的浪费; 并且, 服务器为每一 个待检测软件都配置了至少一种检测策略, 使得软件管理器可以采用多 种检测策略进行软件安装的检测。 Wherein, when it is determined that the software to be detected is installed, the version number of the software to be detected is output. It can be seen that, in the software installation detection method provided by the embodiment of the present invention, the server sends the ID of the software collected by the server and the detection policy corresponding to the collected software to the client, and is saved by the client in the detection policy file; The client detects the software corresponding to each ID saved in the policy file as the software to be detected, and saves the pending check according to the detection policy file. The detection strategy corresponding to the test software detects the software to be detected, and determines whether the software to be detected is installed, so that the software installation can be detected accurately and reliably; meanwhile, the ID of the software and the detection strategy corresponding to the software are sent by the server. To the client, a server can send the above information to multiple clients, which saves the time for the client to configure the detection policy by itself, improves the detection efficiency of the software installation, and avoids waste of resources; and, the server is for each software to be tested. At least one detection policy is configured, so that the software manager can detect the software installation by using multiple detection strategies.
实施例 2  Example 2
为了更加准确地检测出已安装的软件及其版本信息, 本发明实施例 2提供了一种软件安装的检测方法。 在该实施例中, 以常用的软件管理 器作为执行主体对该检测方法进行说明, 但这并不用以限制本发明的保 护范围。 具体地, 该实施例主要包括检测策略文件获取方法和软件安装 的检测方法。  In order to more accurately detect the installed software and its version information, Embodiment 2 of the present invention provides a software installation detection method. In this embodiment, the detection method is described by using a commonly used software manager as an execution subject, but this is not intended to limit the scope of protection of the present invention. Specifically, the embodiment mainly includes a detection policy file acquisition method and a software installation detection method.
参见图 4, 首先介绍检测策略文件的获取方法。  Referring to Figure 4, the method of obtaining the detection policy file is first introduced.
步骤 401: 服务器搜集各类软件的相关信息;  Step 401: The server collects related information of various types of software;
其中, 服务器可以通过网络来搜集各类软件的相关信息, 也可以通 过各个服务器之间相互交换的信息来搜集各类软件的相关信息。  The server can collect related information of various softwares through the network, and can also collect related information of various softwares through information exchanged between the servers.
进一步地, 服务器的搜集过程可以是定时的或者事件触发的, 这样 做的好处在于: 一旦某一软件发布了一个新的版本, 或者软件新版本的 注册表位置与旧版本的不同, 或者新出了一种软件, 或者消失了一种软 件, 软件的检测策略就有可能发生变化, 而服务器就可以及时地搜集到 上述信息。 例如, 设定服务器每隔某一固定时间 (例如每隔一天或者其 它时间 )搜集上述信息, 或者服务器的管理人员触发服务器的搜集软件 功能等。  Further, the collection process of the server may be timed or event triggered, and the advantages of this are: once a certain version of the software is released, or the registry location of the new version of the software is different from the old version, or new A software, or disappeared a software, the software's detection strategy is likely to change, and the server can collect the above information in a timely manner. For example, the server is set to collect the above information every fixed time (for example, every other day or other time), or the server administrator triggers the server's collection software function.
步骤 402: 服务器为搜集到的每一款软件分配 ID并保存; 为搜集到的每一个软件所分配的 ID在服务器(或服务器系统)中可 以唯一标识该软件。 分配的 ID可以是数字、 字母、 符号、 或者上述一 种或几种的组合。 Step 402: The server allocates an ID for each software collected and saves it; The ID assigned to each piece of software collected can uniquely identify the software in the server (or server system). The assigned ID can be a number, a letter, a symbol, or a combination of one or more of the above.
服务器为软件分配 ID的过程可以是人工操作,也可以是服务器自动 执行。  The process by which the server assigns an ID to the software can be either manual or automated.
需要说明的是, 步骤 402和步骤 403的执行顺序可以进行交换, 或 同时进行。  It should be noted that the execution order of step 402 and step 403 can be exchanged or simultaneously.
步骤 403: 为搜集到的每一款软件配置相应的检测策略;  Step 403: Configure a corresponding detection strategy for each software collected;
需要说明的是, 对于软件安装的检测, 实际是为了检测计算机上所 安装的软件及其版本号, 所以, 为软件配置相应的检测策略即可以认为 是提供如何检测出计算机上所安装的软件, 并检测出软件的版本号的方 法。 由于在本发明实施例中, 检测计算机上所安装的软件是由软件管理 器所在的客户端完成的, 因此, 在步骤 403中, 为软件配置相应的检测 策略即为提供如何检测软件的版本号的方法。  It should be noted that the detection of the software installation is actually to detect the software installed on the computer and its version number. Therefore, configuring the corresponding detection strategy for the software can be considered as providing how to detect the software installed on the computer. And the method of detecting the version number of the software. In the embodiment of the present invention, the software installed on the detection computer is completed by the client where the software manager is located. Therefore, in step 403, configuring the corresponding detection policy for the software is to provide a version number of how to detect the software. Methods.
具体的检测策略可以依据不同的软件进行配置, 这里以几种筒单的 检测策略为例进行说明, 但不用以限制本发明的保护范围。  The specific detection strategy can be configured according to different softwares. Here, the detection strategies of several types of packages are taken as an example, but the scope of protection of the present invention is not limited.
1、 参见图 5 , 可以通过软件的指定 PE文件获取软件的版本号。 其中, 需要说明的是, PE文件指的是软件的 EXE (可执行)文件 或 DLL (动态链接库)文件。 指定的 PE文件适用于一个软件包含多个 EXE文件或 DLL文件的情况, 服务器会在下发的检测策略中对软件的 PE文件进行指定, 在图 5中, 指定的 PE文件为软件的主 EXE文件。  1. Referring to Figure 5, the version number of the software can be obtained through the specified PE file of the software. Among them, it should be noted that the PE file refers to the software EXE (executable) file or DLL (dynamic link library) file. The specified PE file is applicable to the case where a software contains multiple EXE files or DLL files. The server will specify the PE file of the software in the issued detection policy. In Figure 5, the specified PE file is the main EXE file of the software. .
一般来说, 软件的 PE文件的属性中都会有一项用于指示此款软件 的版本, 因此, 可以先获取软件的指定 PE文件的存储路径, 从存储路 径中获取软件的指定 PE文件,并从指定 PE文件的属性中获取软件的版 本号。 具体地, 获取软件的指定 PE文件 (以软件的主 EXE文件为例) 的 存储路径可以包括: Generally, there is a version of the software PE file that indicates the version of the software. Therefore, you can first obtain the storage path of the specified PE file of the software, obtain the specified PE file of the software from the storage path, and Specify the version number of the software in the properties of the specified PE file. Specifically, the storage path of the specified PE file of the software (taking the main EXE file of the software as an example) may include:
( 1 )从注册表中获取软件的主 EXE文件的存储路径  (1) Obtain the storage path of the main EXE file of the software from the registry
由于注册表中可能含有软件的安装路径, 如图 6所示, 如果能够从 注册表中获取到软件的安装路径, 则可以根据安装路径获取软件的主 Since the registry may contain the installation path of the software, as shown in Figure 6, if the installation path of the software can be obtained from the registry, the main software can be obtained according to the installation path.
EXE文件的存储路径。 The storage path of the EXE file.
( 2 )通过快捷方式获取软件的主 EXE文件的存储路径  (2) Obtain the storage path of the main EXE file of the software through a shortcut
由于可以通过主 EXE文件的快捷方式的属性定位到软件的主 EXE 文件的存储路径,如图 7所示,所以可以直接通过主 EXE文件的快捷方 式获取软件的主 EXE文件的存储路径。  Since the storage path of the software's main EXE file can be located through the shortcut attribute of the main EXE file, as shown in Figure 7, the storage path of the software's main EXE file can be obtained directly through the shortcut of the main EXE file.
其中, 需要说明的是, 软件的主 EXE文件的快捷方式的位置, 包括 但不限于如下几个: a) 开始-程序菜单快捷方式, 当前用户下  Among them, it should be noted that the location of the shortcut of the software's main EXE file, including but not limited to the following: a) Start - program menu shortcut, under the current user
b) 开始-程序菜单快捷方式, 所有用户下  b) Start - Program Menu Shortcut, under all users
c) 桌面快捷方式, 当前用户下  c) desktop shortcut, under the current user
d) 桌面快捷方式, 所有用户下  d) desktop shortcuts, under all users
e) 快速启动栏快捷方式, 当前用户下  e) Quick launch bar shortcut, under the current user
f) 快速启动栏快捷方式, 所有用户下  f) Quick launch bar shortcuts, under all users
当然, 通过软件的主 EXE文件的快捷方式获取软件的主 EXE文件 的存储路径还可以支持: 与快捷方式指向的文件相对的路径合成。  Of course, the storage path of the main EXE file of the software obtained by the shortcut of the main EXE file of the software can also support: The path synthesis corresponding to the file pointed to by the shortcut.
2、 可以从注册表中获取软件的版本号。  2. The version number of the software can be obtained from the registry.
( 1 )如图 8所示, 获取注册表中 LocalMachine和 CurrentUser下的 (1) As shown in Figure 8, get the localMachine and CurrentUser in the registry
Uninstall节点下的 Display Version的值, 注册表路径为: The value of Display Version under the Uninstall node. The registry path is:
HKEY_LOCAL_MACHINE\ Software \Microsoft\Windows\CurrentVersion\Uninstall 和 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall。 ( 2 )如图 9所示, 根据不同软件的不同设置, 获取注册表的其他路 径中包含的软件的版本号, 例如: 从注册表路径为 HKEY_LOCAL_MACHINE\ Software \Microsoft\Windows\CurrentVersion\Uninstall and HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall. (2) As shown in Figure 9, according to the different settings of different software, get the version number of the software included in the other path of the registry, for example: From the registry path
HKEY_LOCAL_MACHINE\SOFTWARE\TENCENT\QQDownload\\Version中, 即从 注册表路径为 HKEY_LOCAL_MACHINE\SOFTWARE\TENCENT\QQDownload 下键名为 Version中获取软件的版本号。  In HKEY_LOCAL_MACHINE\SOFTWARE\TENCENT\QQDownload\\Version, the version number of the software obtained from the registry path is HKEY_LOCAL_MACHINE\SOFTWARE\TENCENT\QQDownload under the name Version.
3、根据软件的不同, 可以在软件的安装目录下的某数据文件中, 获 取软件的版本号。  3. Depending on the software, you can obtain the version number of the software in a data file in the software installation directory.
步骤 404:服务器将软件的 ID及软件对应的检测策略下发给各个软 件管理器所在的客户端;  Step 404: The server sends the ID of the software and the detection policy corresponding to the software to the client where each software manager is located;
其中, 如果上述信息是首次下发, 可以利用通知消息或其它常用的 消息体将上述信息发送给各个软件管理器所在的客户端; 如果上述信息 非首次下发, 可以通过更新消息或其它常用的消息体将上述信息下发给 各个软件管理器所在客户端。在上述信息非首次下发时,需要说明的是, 可以采用全量更新或者增量更新的方式下发上述信息。  If the information is sent for the first time, the information may be sent to the client where each software manager is located by using a notification message or other commonly used message body; if the information is not sent for the first time, the message may be updated or other commonly used The message body sends the above information to the client where each software manager is located. When the above information is not issued for the first time, it should be noted that the above information may be delivered by using a full update or an incremental update.
例如, 在上述信息非首次下发的情况下, 服务器默认客户端已经具 有其最近一次下发的数据, 则服务器可以采用增量更新的方式, 即将最 近一次下发的数据中没有包括的数据、 或者发生变化的数据下发给客户 端, 而未发生变化的数据不下发给客户端; 或者, 服务器可以采用全量 更新的方式, 即将全部(包括发生变化的和未发生变化的)数据下发给 客户端。  For example, in the case that the above information is not delivered for the first time, the server default client already has the data that was sent last time, the server may adopt the incremental update method, that is, the data not included in the data that was recently delivered, Or the changed data is sent to the client, and the unchanged data is not sent to the client; or the server can use the full update method, that is, all the data (including the changed and unchanged) is sent to the client. Client.
上述数据的下发时间可以是定时的, 也可以是即时的。 定时的情况 可以是每隔固定的时间 (例如每隔一天或者其它时间)将上述数据进行 下发, 即时的情况可以是在服务器每次搜集到新的软件、 或软件的新版 本、 或软件的任何变化从而导致检测策略的配置发生变化时, 即开始进 行数据的下发。 下发的数据可以被客户端解释并执行。 其中,服务器下发给客户端的数据可以通过可扩展标记语言( XML, Extensible Markup Language )进行表示。 The delivery time of the above data may be timed or instantaneous. The timing may be that the data is sent at regular intervals (for example, every other day or other time), and the instant situation may be that the server collects new software, or a new version of the software, or software at a time. When any change causes the configuration of the detection policy to change, the data is started to be delivered. The delivered data can be interpreted and executed by the client. The data sent by the server to the client can be represented by an Extensible Markup Language (XML).
步骤 405:客户端接收服务器下发的软件的 ID及软件对应的检测策 略, 并对其进行解释和保存。  Step 405: The client receives the ID of the software delivered by the server and the detection policy corresponding to the software, and interprets and saves the same.
需要说明的是,客户端接收到服务器下发的软件的 ID及软件对应的 检测策略后, 使用一个数据文件来保存上述数据, 本实施例中将该数据 文件称为检测策略文件 (或者, 特征库文件)。 之所以使用数据文件保 存软件的 ID及软件对应的检测策略, 而不是将软件的 ID及软件对应的 检测策略硬编码在软件管理器的程序代码中, 是因为软件对应的检测策 略可能会实时更新, 如果硬编码在程序代码中, 就需要经常修改软件管 理器的程序代码, 而程序代码的修改比较复杂, 但数据文件修改起来就 非常方便快捷, 而且可以保存多种软件对应的多种检测策略。 客户端保 存的检测策略文件的基本结构可以如表 1所示, 其中, 需要说明的是, 在检测策略文件中, 依次描述针对每一款软件配置的检测策略, 每一款 软件的检测策略可以包括一种或多种。  It should be noted that after receiving the ID of the software sent by the server and the detection policy corresponding to the software, the client uses a data file to save the data. In this embodiment, the data file is referred to as a detection policy file (or, feature Library file). The reason why the data file is used to save the ID of the software and the corresponding detection strategy of the software, instead of hard coding the software ID and the corresponding detection strategy of the software in the program code of the software manager, the corresponding detection strategy of the software may be updated in real time. If hard coded in the program code, you need to modify the program code of the software manager frequently, and the modification of the program code is more complicated, but the data file is very convenient and quick to modify, and can save multiple detection strategies corresponding to multiple softwares. . The basic structure of the detection policy file saved by the client can be as shown in Table 1. In the detection policy file, the detection policy configured for each software is described in turn, and the detection strategy of each software can be Includes one or more.
表 1  Table 1
I I  I I
Figure imgf000012_0001
以客户端接收到服务器下发的数据 ,解析出软件的 ID及软件对应的
Figure imgf000012_0001
The client receives the data sent by the server, and parses out the ID of the software and the corresponding software.
示的检测策略文件仅供说明方便之用, 不用以做实际文件的参考。 ^ 2 The test strategy file shown is for illustrative purposes only and is not intended to be used as a reference for actual documentation. ^ 2
软件 ID1 ( QQ2009 ) : Software ID1 (QQ2009):
策略 1 : 从注册表的路径为 Strategy 1: The path from the registry is
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ Uninstall\{052CFB79-9D62-42E3-8A15-DE66C2C97C3E}的文件夹下获 取键名为 InstallLocation对应的值, 该值对应 QQ2009的安装路径, 从 QQ2009的安装路径的文件夹 bin下获取 QQ2009的指定 PE文件 QQ.exe ,并 从 QQ.exe的属性中获取软件的版本号;  HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ Uninstall\{052CFB79-9D62-42E3-8A15-DE66C2C97C3E} under the folder to get the key name named InstallLocation, this value corresponds to the installation path of QQ2009, from the installation path of QQ2009 Obtain the specified PE file QQ.exe of QQ2009 under the folder bin, and obtain the version number of the software from the properties of QQ.exe;
策略 2: 找到腾讯软件 \QQ2OO9\ 讯 QQ2009.1nk的快捷方式, 并根据快 捷方式的属性获取软件的安装路径, 并根据安装路径获取指定的 PE文 件 QQ.exe, 并从 QQ.exe的属性中获取软件的版本号。 Strategy 2: Find the shortcut of Tencent Software\QQ2OO9\ News QQ2009.1nk, and get the installation path of the software according to the properties of the shortcut, and get the specified PE file QQ.exe according to the installation path, and from the properties of QQ.exe Get the version number of the software.
软件 ID2 ( QQ影音) : Software ID2 (Qin Video):
策略 1 : 从注册表的路径为 Strategy 1: The path from the registry is
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
Uninstall的文件夹 QQPlayer下获取键名为 Displaylcon对应的值, 该值对 应 QQ影音的安装路径, 到 QQ影音的安装路径下获取软件的指定 PE文件Uninstall folder QQPlayer obtains the key name corresponding to Displaylcon, the value corresponds to the installation path of QQ video and audio, and the specified PE file of the software is obtained under the installation path of QQ video and audio.
QQ影音. exe, 并从 QQ影音. exe的属性中获取软件的版本号; QQ video.exe, and obtain the version number of the software from the properties of QQ video.exe;
策略 2: 找到腾讯软件 \QQ影音 \QQ影音. Ink的快捷方式, 并根据快捷方 式的属性获取软件的安装路径, 并根据安装路径获取指定的 PE文件 QQ 影音. exe, 并从 QQ影音. exe的属性中获取软件的版本号; Strategy 2: Find Tencent Software\QQ Video/QQ Video. Ink shortcut, and get the software installation path according to the shortcut property, and get the specified PE file QQ video.exe according to the installation path, and from QQ video. exe Get the version number of the software in the properties;
策略 3: 找到 Tencent\QQPlayer\QQPlayer.lnk的快捷方式, 并根据快捷方 式的属性获取软件的安装路径, 并根据安装路径获取指定的 PE文件Strategy 3: Find the shortcut for Tencent\QQPlayer\QQPlayer.lnk, and get the installation path of the software according to the shortcut property, and get the specified PE file according to the installation path.
QQPlayer.exe , 并从 QQPlayer.exe的属性中获取软件的版本号; QQPlayer.exe, and obtain the version number of the software from the properties of QQPlayer.exe;
策略 4 : 从注册表的路径为 HKEY_LOCAL_MACHINE 的文件夹 Strategy 4: The path from the registry to the HKEY_LOCAL_MACHINE folder
Version的值, 该键值对应 QQ影音的版本号: ^ 在步骤 401 至步骤 405 所描述的检测策略文件的获取方法的基础 测策略文件中保存的每一个 ID对应的软件检测出软件名称及其版本号。 由于在流程上检测每一个软件是否安装的方法均是类似的, 故在本实施 例中, 以检测策略文件中保存的任一个 ID对应的软件是否安装为例对 本发明的检测方法进行说明。 参见图 10, 本实施例提供的软件安装的检 测方法具体可以包括: The value of Version, which corresponds to the version number of the QQ video: ^ The basis of the method for obtaining the detection policy file described in steps 401 to 405 The software corresponding to each ID saved in the measurement policy file detects the software name and its version number. The method for detecting whether each software is installed in the process is similar. Therefore, in this embodiment, the detection method of the present invention is described by taking as an example whether the software corresponding to any ID stored in the policy file is installed. Referring to FIG. 10, the method for detecting software installation provided by this embodiment may specifically include:
步骤 1001: 客户端的软件管理器接收软件检测的触发信号; 其中, 软件检测的触发信号可以包括但不限于: 软件管理器检测到 软件启动运行、 用户启动软件检测功能、 软件管理器检测到定时检测软 件的时间到、 检测策略文件中的某一个(非最后一个)软件执行完检测 等。 未被执行的一条检测策略, 并根据获取的检测策略检测该待检测软件是 否已安装;  Step 1001: The software manager of the client receives the trigger signal detected by the software. The trigger signal of the software detection may include, but is not limited to, the software manager detects that the software starts running, the user initiates the software detection function, and the software manager detects the timing detection. The time of the software is detected, and one of the detection policy files (not the last one) is executed. a detection policy that is not executed, and detects whether the software to be detected is installed according to the acquired detection policy;
例如, 以步骤 405中给出的表 2为例, 将 ID2所标识的 QQ影音软 件作为待检测软件, 软件管理器获取 QQ影音软件对应的未被执行的检 测策略, 如策略 1 , 根据策略 1 , 从注册表中路径为  For example, taking the table 2 given in step 405 as an example, the QQ video and audio software identified by the ID2 is used as the software to be detected, and the software manager obtains the unexecuted detection strategy corresponding to the QQ video software, such as the policy 1, according to the policy 1 , the path from the registry is
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall 下 的文件夹 QQPlayer下获取键名为 Displaylcon的值,通过该键值获取 ID2 所标识的 QQ影音软件的主 EXE文件, 并从主 EXE文件的属性中获取 QQ影音软件的版本号。  Under the folder QQPlayer under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall, obtain the value of the key name Displaylcon, and obtain the main EXE file of the QQ video software identified by ID2, and from the properties of the main EXE file. Get the version number of the QQ video software.
其中, 需要说明的是, 未被执行的检测策略可以由软件管理器按照 检测策略文件的保存顺序逐个获取, 也可以由软件管理器从保存的检测 策略文件中随机获取。  It should be noted that the unexecuted detection policies may be acquired by the software manager one by one according to the save order of the detection policy files, or may be randomly obtained by the software manager from the saved detection policy files.
步骤 1003: 判断是否检测到该待检测软件的版本号; 如果是, 则执行步骤 1006; Step 1003: Determine whether the version number of the software to be detected is detected. If yes, go to step 1006;
如果否, 则执行步骤 1004。  If no, step 1004 is performed.
步骤 1004:判断检测策略文件中该待检测软件是否还有检测策略没 有被执行;  Step 1004: Determine whether the detection software of the to-be-detected software in the detection policy file is not executed.
如果是, 则执行步骤 1002;  If yes, step 1002 is performed;
如果否, 则执行步骤 1005。  If no, step 1005 is performed.
步骤 1005: 检测完毕, 判定该待检测软件为未安装软件;  Step 1005: After the detection is completed, it is determined that the software to be detected is software not installed;
步骤 1006: 检测完毕, 判定该待检测软件为已安装软件, 版本号为 步骤 1002中获取的版本号。  Step 1006: After the detection is completed, it is determined that the software to be detected is the installed software, and the version number is the version number obtained in step 1002.
需要说明的是,软件管理器可以对检测策略文件中保存的每一个 ID 对应的软件执行上述步骤 1001至步骤 1006所示的方法, 本发明在此不 做赘述。  It should be noted that the software manager may perform the method shown in the foregoing steps 1001 to 1006 on the software corresponding to each ID saved in the detection policy file, and the present invention is not described herein.
还需要说明的是, 步骤 1005和步骤 1006均存在一个特例。  It should also be noted that there is a special case for both step 1005 and step 1006.
其中, 步骤 1005的特例为: 软件管理器没有检测到软件的版本号, 但软件确实已经安装到了客户端, 为了克服上述特例的问题, 本实施例 的步骤 1004和步骤 1005之间可以进一步包括:  The special case of the step 1005 is: the software manager does not detect the version number of the software, but the software is already installed on the client. To overcome the problem of the special case, the step 1004 and the step 1005 of the embodiment may further include:
判断该待检测软件的指定 PE文件是否存在;  Determining whether a specified PE file of the software to be detected exists;
如果存在, 则执行步骤 1006, 即检测完毕, 判定该待检测软件为已 安装软件, 版本号采用自定义的形式, 如 0.0.0.0等等;  If yes, step 1006 is performed, that is, the detection is completed, and the software to be detected is determined to be installed software, and the version number is in a customized form, such as 0.0.0.0 and the like;
如果不存在, 则执行步骤 1005, 即检测完毕, 判定该待检测软件为 未安装软件。  If it does not exist, step 1005 is performed, that is, the detection is completed, and it is determined that the software to be detected is software not installed.
步骤 1006 中的特例为, 软件管理器检测到软件的版本号, 但该版 本号可能是由于某些特殊操作(如删除软件时发生错误) 而遗留下的版 本号, 为了克服上述特例的问题, 本实施例的步骤 1003和步骤 1006之 间可以进一步包括: 判断该待检测软件的指定 PE文件是否存在; The special case in step 1006 is that the software manager detects the version number of the software, but the version number may be a version number left by some special operations (such as an error when deleting the software), in order to overcome the above-mentioned special case problem, The step 1003 and the step 1006 of the embodiment may further include: Determining whether a specified PE file of the software to be detected exists;
如果存在, 则执行步骤 1006, 即检测完毕, 判定该待检测软件为已 安装软件, 版本号为步骤 1002中获取的版本号;  If yes, step 1006 is performed, that is, the detection is completed, and it is determined that the software to be detected is the installed software, and the version number is the version number obtained in step 1002;
如果不存在, 则执行步骤 1005, 即检测完毕, 判定该待检测软件为 未安装软件。  If it does not exist, step 1005 is performed, that is, the detection is completed, and it is determined that the software to be detected is software not installed.
由此可见, 在本发明实施例提供的软件安装的检测方法中, 服务器 将其搜索的软件的 ID及所搜索软件对应的检测策略发送给客户端, 并 由客户端保存在检测策略文件中; 客户端将检测策略文件中保存的每一 个 ID对应的软件作为待检测软件, 按照检测策略文件中保存的该待检 测软件对应的检测策略对该待检测软件进行检测, 并判断该待检测软件 是否已安装, 从而可以准确、 可靠地进行软件安装的检测; 同时, 由服 务器发送软件的 ID及软件对应的检测策略给客户端, 一个服务器可以 为多个客户端发送上述信息, 节省了客户端自行配置检测策略的时间, 提高了软件安装的检测效率, 避免了资源的浪费; 并且, 服务器为每一 个待检测软件都配置了至少一种检测策略, 使得软件管理器可以采用多 种检测策略进行软件安装的检测。  It can be seen that, in the software installation detection method provided by the embodiment of the present invention, the server sends the ID of the software it searches for and the detection policy corresponding to the searched software to the client, and the client saves the detection policy file; The client detects the software corresponding to each ID saved in the policy file as the software to be detected, and detects the software to be detected according to the detection policy corresponding to the software to be detected stored in the detection policy file, and determines whether the software to be detected is It has been installed so that the software installation can be detected accurately and reliably. At the same time, the ID of the software and the detection strategy corresponding to the software are sent by the server to the client. One server can send the above information to multiple clients, saving the client itself. The time for configuring the detection policy improves the detection efficiency of the software installation and avoids waste of resources. Moreover, the server configures at least one detection policy for each software to be tested, so that the software manager can use multiple detection strategies for software. Installation detection.
实施例 3  Example 3
参见图 11 , 本发明实施例提供了一种软件安装的检测装置, 需要说 明的是, 该检测装置的工作方法可以参见实施例 1和实施例 2中提供的 检测方法, 此处不做赘述。 该检测装置包括:  Referring to FIG. 11, an embodiment of the present invention provides a software installation detection apparatus. It should be noted that the operation method of the detection apparatus can be referred to the detection methods provided in Embodiment 1 and Embodiment 2, and details are not described herein. The detection device comprises:
获取模块 1101 ,用于从检测装置所在的客户端保存的检测策略文件 中获取待检测软件及其对应的检测策略, 其中, 待检测软件对应的检测 策略至少为一条;  The obtaining module 1101 is configured to obtain the software to be detected and the corresponding detection policy from the detection policy file saved by the client where the detection device is located, where the detection strategy corresponding to the software to be detected is at least one;
检测模块 1102, 用于根据获取模块 1101获取的待检测软件对应的 检测策略, 判断待检测软件是否已安装。 进一步地, 该检测装置还包括: The detecting module 1102 is configured to determine, according to the detection policy corresponding to the software to be detected acquired by the acquiring module 1101, whether the software to be detected is installed. Further, the detecting device further includes:
检测策略文件获取模块, 用于接收服务器下发的所述服务器为其搜 集到的软件分配的 ID和配置的检测策略, 并将其保存在检测策略文件 中。  The detection policy file obtaining module is configured to receive an ID assigned by the server and a configured detection policy of the software that is sent by the server, and save the detection policy in the detection policy file.
其中, 检测模块 1102具体包括:  The detecting module 1102 specifically includes:
版本号检测单元, 用于根据获取模块 1101 获取的待检测软件对应 的检测策略检测待检测软件的版本号是否存在;  The version number detecting unit is configured to detect whether a version number of the software to be detected exists according to a detection policy corresponding to the software to be detected acquired by the obtaining module 1101;
判定单元, 用于如果版本号检测单元检测到待检测软件的版本号, 则判定待检测软件已安装; 如果版本号检测单元未检测到待检测软件的 版本号, 则判定待检测软件未安装。  The determining unit is configured to determine that the software to be detected is installed if the version number detecting unit detects the version number of the software to be detected; and if the version number detecting unit does not detect the version number of the software to be detected, determine that the software to be detected is not installed.
其中, 当检测策略为多条时, 版本号检测单元包括:  Wherein, when the detection strategy is multiple, the version number detecting unit includes:
获取子单元, 用于在待检测软件对应的多条检测策略中, 获取一条 未被执行过的检测策略作为当前检测策略; 软件的版本号是否存在;  Obtaining a sub-unit, configured to obtain an undetected detection policy as a current detection policy among the multiple detection policies corresponding to the software to be detected; whether the version number of the software exists;
判定子单元, 用于如果获取子单元无法获取未被执行过的检测策 略, 判定检测结果为未检测到待检测软件的版本号。  The determining subunit is configured to determine that the detection result is that the version number of the software to be detected is not detected if the acquiring subunit cannot acquire the unchecked detection policy.
进一步地, 检测装置还包括:  Further, the detecting device further includes:
输出模块, 用于当判定单元判定待检测软件已安装时, 输出版本号 检测单元检测到的待检测软件的版本号。  And an output module, configured to output a version number of the software to be detected detected by the version number detecting unit when the determining unit determines that the software to be detected is installed.
由此可见, 在本发明实施例提供的软件安装的检测装置中, 服务器 将其搜索的软件的 ID及所搜索软件对应的检测策略发送给客户端, 并 由客户端保存在检测策略文件中; 客户端将检测策略文件中保存的每一 个 ID对应的软件作为待检测软件, 按照检测策略文件中保存的该待检 测软件对应的检测策略对该待检测软件进行检测, 并判断该待检测软件 是否已安装, 从而可以准确、 可靠地进行软件安装的检测; 同时, 由服 务器发送软件的 ID及软件对应的检测策略给客户端, 一个服务器可以 为多个客户端发送上述信息, 节省了客户端自行配置检测策略的时间, 提高了软件安装的检测效率, 避免了资源的浪费; 并且, 服务器为每一 个待检测软件都配置了至少一种检测策略, 使得软件管理器可以采用多 种检测策略进行软件安装的检测。 It can be seen that, in the software installation detecting apparatus provided by the embodiment of the present invention, the server sends the ID of the software it searches for and the detection policy corresponding to the searched software to the client, and the client saves the detection policy file; The client detects the software corresponding to each ID saved in the policy file as the software to be detected, and detects the software to be detected according to the detection policy corresponding to the software to be detected stored in the detection policy file, and determines the software to be detected. Whether it is installed, so that the software installation can be detected accurately and reliably; at the same time, the server sends the software ID and the software corresponding detection policy to the client, and one server can send the above information to multiple clients, saving the client. By configuring the detection policy time, the detection efficiency of the software installation is improved, and the waste of resources is avoided. Moreover, the server configures at least one detection policy for each software to be detected, so that the software manager can adopt multiple detection strategies. Detection of software installation.
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本 发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包 含在本发明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权利要求书 Claim
1、 一种软件安装的检测方法, 其特征在于, 所述检测方法包括: 在客户 ^  A method for detecting software installation, characterized in that the detection method comprises:
略, 所述待检测软件对应的检测策略至少为一条; 装。 The detection strategy corresponding to the software to be detected is at least one;
2、如权利要求 1所述的软件安装的检测方法, 其特征在于, 所述检 测方法进一步包括:  The method of detecting software installation according to claim 1, wherein the detecting method further comprises:
服务器为搜集到的软件分配 ID和配置对应的检测策略; 将所述 ID 及所述搜集到的软件对应的检测策略发送至所述客户端; 所述客户端将 接收到的 ID及所述搜集到的软件对应的检测策略保存在检测策略文件 中。  The server allocates an ID and a corresponding detection policy for the collected software; and sends the ID and the detection policy corresponding to the collected software to the client; the client receives the ID and the collection The detection strategy corresponding to the obtained software is saved in the detection policy file.
3、如权利要求 1或 2所述的软件安装的检测方法, 其特征在于, 所 L据所述待.  3. The method of detecting software installation according to claim 1 or 2, characterized in that:
装, 具体包括: Loading, specifically including:
根据所述待检测软件对应的检测策略, 检测所述待检测软件的版本 号是否存在;  Detecting whether a version number of the software to be detected exists according to a detection policy corresponding to the software to be detected;
如果检测到所述待检测软件的版本号, 则判定所述待检测软件已安 装;  If the version number of the software to be detected is detected, it is determined that the software to be detected has been installed;
如果未检测到所述待检测软件的版本号, 则判定所述待检测软件未 安装。  If the version number of the software to be detected is not detected, it is determined that the software to be detected is not installed.
4、如权利要求 3所述的软件安装的检测方法, 其特征在于, 所述检 测策略包括:  4. The method of detecting software installation according to claim 3, wherein the detecting strategy comprises:
获取待检测软件的指定可移植的可执行(PE, Portable Executable ) 文件, 从所述指定 PE文件的属性中获取所述待检测软件的版本号; 和 / 或 Obtain the specified portable executable (PE, Portable Executable) of the software to be tested a file, obtaining a version number of the software to be detected from an attribute of the specified PE file; and/or
从注册表中获取所述待检测软件的版本号。  Obtaining the version number of the software to be detected from the registry.
5、如权利要求 4所述的软件安装的检测方法, 其特征在于, 所述获 取待检测软件的指定 PE文件, 具体包括:  The method for detecting a software installation according to claim 4, wherein the obtaining the specified PE file of the software to be detected includes:
从注册表中获取所述待检测软件的安装路径, 并根据所述安装路径 获取所述待检测软件的指定 PE文件; 或  Obtaining an installation path of the software to be detected from a registry, and acquiring a specified PE file of the software to be detected according to the installation path; or
获取所述待检测软件的快捷方式, 从所述快捷方式的属性中获取所 述待检测软件的安装路径, 并根据所述安装路径获取所述待检测软件的 指定 PE文件。  Obtaining a shortcut of the software to be detected, obtaining an installation path of the software to be detected from the attribute of the shortcut, and acquiring a specified PE file of the software to be detected according to the installation path.
6、如权利要求 4所述的软件安装的检测方法, 其特征在于, 所述从 注册表中获取所述待检测软件的版本号, 具体包括:  The method for detecting the software installation according to claim 4, wherein the obtaining the version number of the software to be detected from the registry comprises:
从注册表中本地计算机( LocalMachine)和当前用户 ( CurrentUser ) 下的卸载 (Uninstall) 节点下获取所述待检测软件的版本号。  Obtain the version number of the software to be detected from the Uninstall node under the local computer (LocalMachine) and the current user (CurrentUser) in the registry.
7、如权利要求 3所述的软件安装的检测方法, 其特征在于, 当所述 检测策略为多条时, 所述根据所述待检测软件对应的检测策略, 检测所 述待检测软件的版本号是否存在, 具体包括:  The software installation detection method according to claim 3, wherein when the detection policy is multiple, the detecting the version of the software to be detected according to the detection policy corresponding to the software to be detected Whether the number exists, specifically includes:
在所述待检测软件对应的多条检测策略中, 获取一条未被执行过的 检测策略作为当前检测策略, 并根据所述当前检测策略检测所述待检测 软件的版本号是否存在;  And acquiring, in the multiple detection policies corresponding to the software to be detected, an undetected detection policy as a current detection policy, and detecting whether a version number of the software to be detected exists according to the current detection policy;
如果无法获取未被执行过的检测策略, 则判定检测结果为未检测到 所述待检测软件的版本号。  If the detection policy that has not been executed cannot be obtained, it is determined that the detection result is that the version number of the software to be detected is not detected.
8、如权利要求 3所述的软件安装的检测方法, 其特征在于, 所述检 测方法进一步包括:  The method of detecting software installation according to claim 3, wherein the detecting method further comprises:
当判定所述待检测软件已安装时, 输出所述待检测软件的版本号。 When it is determined that the software to be detected is installed, the version number of the software to be detected is output.
9、 一种软件安装的检测装置, 其特征在于, 所述检测装置包括: 获取模块, 用于从所述检测装置所在的客户端保存的检测策略文件 中获取待检测软件及其对应的检测策略, 所述待检测软件对应的检测策 略至少为一条; A software-installed detection device, wherein the detection device comprises: an acquisition module, configured to acquire a software to be detected and a corresponding detection strategy from a detection policy file saved by a client where the detection device is located The detection strategy corresponding to the software to be detected is at least one;
检测模块, 用于根据所述获取模块获取的所述待检测软件对应的检 测策略判断所述待检测软件是否已安装。  And a detecting module, configured to determine, according to the detection policy corresponding to the software to be detected acquired by the acquiring module, whether the software to be detected is installed.
10、 如权利要求 9所述的软件安装的检测装置, 其特征在于, 所述 检测装置还包括:  The software-installed detecting device according to claim 9, wherein the detecting device further comprises:
检测策略文件获取模块, 用于接收服务器下发的为搜集到的软件分 配的 ID和配置的检测策略, 并将其保存在检测策略文件中。  The detection policy file obtaining module is configured to receive an ID assigned by the server for collecting the collected software and a configured detection policy, and save the detection policy in the detection policy file.
11、 如权利要求 9所述的软件安装的检测装置, 其特征在于, 所述 检测模块具体包括:  The software-installed detecting device according to claim 9, wherein the detecting module specifically includes:
版本号检测单元, 用于根据所述获取模块获取的所述待检测软件对 应的检测策略检测所述待检测软件的版本号是否存在;  a version number detecting unit, configured to detect whether a version number of the software to be detected exists according to a detection policy corresponding to the software to be detected acquired by the acquiring module;
判定单元, 用于如果所述版本号检测单元检测到所述待检测软件的 版本号, 判定所述待检测软件已安装; 如果所述版本号检测单元未检测 到所述待检测软件的版本号, 判定所述待检测软件未安装。  a determining unit, configured to determine that the software to be detected is installed if the version number detecting unit detects the version number of the software to be detected; if the version number detecting unit does not detect the version number of the software to be detected And determining that the software to be detected is not installed.
12、 如权利要求 11所述的软件安装的检测装置, 其特征在于, 当所 述检测策略为多条时, 所述版本号检测单元包括:  The device for detecting a software installation according to claim 11, wherein when the detection policy is a plurality of pieces, the version number detecting unit comprises:
获取子单元, 用于在所述待检测软件对应的多条检测策略中, 获取 一条未被执行过的检测策略作为当前检测策略; 述待检测软件的版本号是否存在;  Obtaining a sub-unit, configured to obtain an undetected detection policy as a current detection policy among the multiple detection policies corresponding to the software to be detected; and whether the version number of the detection software exists;
判定子单元, 用于如果所述获取子单元无法获取未被执行过的检测 策略, 判定检测结果为未检测到所述待检测软件的版本号。 a determining subunit, configured to determine that the detection result is that the version number of the software to be detected is not detected if the acquiring subunit cannot acquire a detection policy that has not been executed.
13、 如权利要求 11所述的软件安装的检测装置, 其特征在于, 所述 检测装置还包括: The software-installed detecting device according to claim 11, wherein the detecting device further comprises:
出所述版本号检测单元检测到的待检测软件的版本号。 The version number of the software to be detected detected by the version number detecting unit.
PCT/CN2011/070025 2010-01-12 2011-01-04 Method and apparatus for detecting software installation WO2011085647A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2010100005651A CN101789888B (en) 2010-01-12 2010-01-12 Detection method and device for software installation
CN201010000565.1 2010-01-12

Publications (1)

Publication Number Publication Date
WO2011085647A1 true WO2011085647A1 (en) 2011-07-21

Family

ID=42532953

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/070025 WO2011085647A1 (en) 2010-01-12 2011-01-04 Method and apparatus for detecting software installation

Country Status (2)

Country Link
CN (1) CN101789888B (en)
WO (1) WO2011085647A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294137A (en) * 2016-08-01 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of linux User space spin lock deadlock detection method and system
US11157583B2 (en) 2018-09-14 2021-10-26 International Business Machines Corporation Software detection based on user accounts

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789888B (en) * 2010-01-12 2012-04-11 腾讯科技(深圳)有限公司 Detection method and device for software installation
CN101986283A (en) * 2010-11-16 2011-03-16 北京安天电子设备有限公司 Method and system for detecting existed Windows system bugs
CN102737028A (en) * 2011-04-01 2012-10-17 深圳市赛格导航科技股份有限公司 Synchronization method and synchronization system of database
CN102955911B (en) * 2011-08-18 2015-12-16 腾讯科技(深圳)有限公司 Wooden horse scan method and system
CN102722392B (en) * 2012-06-07 2015-11-25 腾讯科技(深圳)有限公司 Software running method and system
CN102736978B (en) * 2012-06-26 2015-09-30 北京奇虎科技有限公司 A kind of method and device detecting the installment state of application program
CN103514089B (en) * 2012-06-26 2016-03-09 腾讯科技(深圳)有限公司 The software of software manager installs detection method and system
CN103577217A (en) * 2012-08-10 2014-02-12 腾讯科技(深圳)有限公司 Method and device for displaying software
CN103177104A (en) * 2013-03-26 2013-06-26 北京小米科技有限责任公司 Searching method and device of application program
CN103294565B (en) * 2013-06-24 2016-08-31 贝壳网际(北京)安全技术有限公司 Method, device and equipment for detecting installed application
CN103440144B (en) * 2013-08-07 2016-09-28 北京奇虎科技有限公司 A kind of method to set up to the default software that equipment uses and device
CN103473163B (en) * 2013-09-11 2016-10-26 腾讯科技(深圳)有限公司 application program detection method and device
CN103631603A (en) * 2013-12-16 2014-03-12 北京奇虎科技有限公司 Software cleaning method and system
CN103810105B (en) * 2014-03-06 2016-08-31 中国工商银行股份有限公司 application version detection method and device
CN104239215B (en) * 2014-09-30 2018-02-02 北京奇虎科技有限公司 The investigation method and apparatus of garbageware
CN107767594A (en) * 2017-11-09 2018-03-06 福州汇思博信息技术有限公司 The detection method and system of a kind of pre installation software package
CN108920155A (en) * 2018-05-04 2018-11-30 天津猎鹰网络技术有限公司 Software installation treating method and apparatus
CN109324872B (en) * 2018-09-21 2020-12-25 北京隆普智能科技有限公司 Method and system for verifying virtual machine change request
CN110096443A (en) * 2019-04-28 2019-08-06 北京奇安信科技有限公司 It is a kind of to detect the method and device for having installed software
CN110647739A (en) * 2019-07-26 2020-01-03 平安科技(深圳)有限公司 Software installation detection method, device, terminal and storage medium
CN115865809B (en) * 2023-02-02 2023-06-02 爱集微咨询(厦门)有限公司 Data transmission method, device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030181242A1 (en) * 2002-03-20 2003-09-25 Se-Wai Lee Method and apparatus for sotfware delivery and management
CN101158917A (en) * 2007-11-09 2008-04-09 中兴通讯股份有限公司 Software version upgrade mounting test system and method thereof
US7574481B2 (en) * 2000-12-20 2009-08-11 Microsoft Corporation Method and system for enabling offline detection of software updates
US20090241105A1 (en) * 2008-03-20 2009-09-24 International Business Machines Corporation Detecting Applications in a Virtualization Environment
CN101789888A (en) * 2010-01-12 2010-07-28 腾讯科技(深圳)有限公司 Detection method and device for software installation

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI317503B (en) * 2002-12-31 2009-11-21 Hon Hai Prec Ind Co Ltd System and method for remote installation of application programs in mobile derices
CN1797337B (en) * 2004-12-29 2010-05-05 北京软通科技有限责任公司 Method for installing software of computer automatically
CN101221511A (en) * 2008-01-25 2008-07-16 中兴通讯股份有限公司 Automatic installation and upgrading method of terminal unit application software
CN101593121B (en) * 2009-06-23 2014-03-05 中兴通讯股份有限公司 Method, device and system for software on-line upgrade

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7574481B2 (en) * 2000-12-20 2009-08-11 Microsoft Corporation Method and system for enabling offline detection of software updates
US20030181242A1 (en) * 2002-03-20 2003-09-25 Se-Wai Lee Method and apparatus for sotfware delivery and management
CN101158917A (en) * 2007-11-09 2008-04-09 中兴通讯股份有限公司 Software version upgrade mounting test system and method thereof
US20090241105A1 (en) * 2008-03-20 2009-09-24 International Business Machines Corporation Detecting Applications in a Virtualization Environment
CN101789888A (en) * 2010-01-12 2010-07-28 腾讯科技(深圳)有限公司 Detection method and device for software installation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294137A (en) * 2016-08-01 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of linux User space spin lock deadlock detection method and system
US11157583B2 (en) 2018-09-14 2021-10-26 International Business Machines Corporation Software detection based on user accounts

Also Published As

Publication number Publication date
CN101789888B (en) 2012-04-11
CN101789888A (en) 2010-07-28

Similar Documents

Publication Publication Date Title
WO2011085647A1 (en) Method and apparatus for detecting software installation
US7814126B2 (en) Using task sequences to manage devices
CN102043655B (en) Method and system for carrying out advanced uninstall on software
US7290258B2 (en) Managing multiple devices on which operating systems can be automatically deployed
CN106708557B (en) Update processing method and device for terminal application
WO2011085631A1 (en) Method, system and server for collecting version of software
US9875353B2 (en) Log information generation apparatus and recording medium, and log information extraction apparatus and recording medium
US20170185431A1 (en) Method and apparatus for dynamically implementing application function
US20110214111A1 (en) Systems and methods for detecting computing processes requiring reinitialization after a software package update
US20050155031A1 (en) Changed file identification, software conflict resolution and unwanted file removal
US9727352B2 (en) Utilizing history of changes associated with software packages to manage computing systems
JP2005339565A (en) Management of spyware and unwanted software through auto-start extensibility point
US20060123413A1 (en) System and method for installing a software application
WO2017071207A1 (en) Application installation method, corresponding apparatus, and application installation system
WO2012107255A1 (en) Detecting a trojan horse
WO2012142854A1 (en) Application service platform system and implementation method thereof
US9548891B2 (en) Configuration of network devices
WO2012163123A1 (en) Application management method and application platform
WO2011060735A1 (en) Method,device and system for invoking widget
US10404568B2 (en) Agent manager for distributed transaction monitoring system
WO2017186066A1 (en) Software management method and apparatus
US8904359B2 (en) On-demand monitoring of memory usage
CN114116322B (en) Data recovery method, device, equipment and storage medium
WO2023098118A1 (en) Cross-system application installation method and apparatus, electronic device, and storage medium
US20100318967A1 (en) Supplementary deployment actions

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 5880/CHENP/2012

Country of ref document: IN

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 18/09/2012)

122 Ep: pct application non-entry in european phase

Ref document number: 11732637

Country of ref document: EP

Kind code of ref document: A1