WO2017173925A1 - Software management method and device, terminal, and storage medium - Google Patents

Software management method and device, terminal, and storage medium Download PDF

Info

Publication number
WO2017173925A1
WO2017173925A1 PCT/CN2017/077869 CN2017077869W WO2017173925A1 WO 2017173925 A1 WO2017173925 A1 WO 2017173925A1 CN 2017077869 W CN2017077869 W CN 2017077869W WO 2017173925 A1 WO2017173925 A1 WO 2017173925A1
Authority
WO
WIPO (PCT)
Prior art keywords
window
software
type
new
window type
Prior art date
Application number
PCT/CN2017/077869
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 WO2017173925A1 publication Critical patent/WO2017173925A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation

Definitions

  • the present invention relates to the field of software, and in particular, to a software management method and apparatus, a terminal, and a storage medium.
  • the embodiment of the invention provides a software management method and device, a terminal and a storage medium, which solve the problem that the versatility and the other windows are not affected in the process of automatically installing or uninstalling the software in the prior art.
  • an embodiment of the present invention provides a software management method, including:
  • the new window is processed according to the matching result, and the management operation of the software is completed.
  • the window type includes an application window type and an abnormal window type
  • the preset window processing rule includes:
  • the window type belongs to the application window type, acquiring control information of the window, and performing operation control on the content of the control;
  • the window type belongs to the exception window type
  • the window is closed.
  • the method before acquiring the software information, the method further includes: setting an abnormal window set, where the abnormal window set includes all window identifiers belonging to the abnormal window type window;
  • Identifying the window type of the new window includes: obtaining a window identifier of the new window, and determining whether the new window belongs to the abnormal window set, and if yes, the window type of the new window is an abnormal window type.
  • the method further includes: acquiring a process identifier of the software;
  • Identifying a window type of the new window includes obtaining a process identifier of the new window, determining whether a process identifier of the new window is consistent with a process identifier of the software, and if so, a window type of the new window is Application window type.
  • performing a management operation on the software includes performing an installation or uninstallation of the software.
  • the method when the management of the software is performed to perform the uninstallation of the software, after the uninstalling of the software is completed, the method further includes: querying whether the software is still in the registry. Relevant information, if yes, repeating the step of uninstalling the software or deleting related information of the software in the registry.
  • An embodiment of the present invention further provides a software management apparatus, including: an operation module configured to acquire software information, and start to perform a management operation on the software;
  • Window processing module configured to monitor a system window during a management operation; when a new window is generated on the monitored system interface, identify a window type of the new window, and match the window type with a preset window processing rule
  • the preset window processing rule defines a processing manner corresponding to each window type
  • the execution module is configured to process the new window according to the matching result, and complete management operations on the software.
  • the window type includes an application window type and an abnormal window type
  • the preset window processing rule includes:
  • the window type belongs to the application window type, acquiring control information of the window, and performing operation control on the content of the control;
  • the window type belongs to the exception window type
  • the window is closed.
  • the method further includes: setting a module: configured to acquire software information Pre-setting an exception window set, the exception window set including all window identifiers belonging to the exception window type window;
  • the window processing module further includes a first identification sub-module configured to acquire a window identifier of the new window, and determine whether the new window belongs to the abnormal window set, and if yes, the window type of the new window is abnormal Window type.
  • the method further includes: acquiring, configured to acquire a process identifier of the software before identifying a window type of the new window after performing a management operation on the software;
  • the window processing module further includes a second identification submodule configured to acquire a process identifier of the new window, determine whether a process identifier of the new window is consistent with a process identifier of the software, and if so, The window type of the new window is the application window type.
  • performing a management operation on the software includes performing an installation or uninstallation of the software.
  • the method further includes: a reprocessing module configured to query the registry after performing the uninstallation of the software after performing the uninstallation of the software by the management operation of the software Whether there is the software related information, and if so, repeating the step of uninstalling the software or deleting related information of the software in the registry.
  • a reprocessing module configured to query the registry after performing the uninstallation of the software after performing the uninstallation of the software by the management operation of the software Whether there is the software related information, and if so, repeating the step of uninstalling the software or deleting related information of the software in the registry.
  • An embodiment of the present invention further provides a terminal, including the foregoing software management apparatus.
  • the embodiment of the invention provides a computer storage medium, wherein the computer storage medium stores computer executable instructions configured to execute the software management method provided above.
  • the embodiment of the invention further provides a terminal, comprising: a processor and a storage medium configured to store executable instructions, wherein the processor is configured to execute the stored executable instructions, the executable instructions comprising:
  • the processing rule defines the processing method corresponding to each window type
  • the new window is processed according to the matching result, and the management operation of the software is completed.
  • the embodiment of the invention provides a software management method and device, a terminal, a storage medium, acquires software information, and starts to perform management operations on the software; monitors a system window during a management operation, and when a new window is detected And identifying a window type of the new window, and matching the window type of the new window with a preset window processing rule, wherein the preset window processing rule defines a processing manner corresponding to each window type, and after matching the result According to the matching result, the new window is processed to complete the management operation of the software.
  • the system window is monitored, and different processing methods are adopted according to the monitored window, because most software installation and uninstallation can be performed according to the above process, so it is universal;
  • the software management method in the present invention adopts different processing manners for different types of windows, and can effectively avoid the situation that the system pop-up window causes the installation process to be blocked. Therefore, the problem that the versatility and the influence of other windows cannot be considered in the automatic installation or uninstallation process of the software existing in the prior art can be effectively solved; the versatility of the software management is increased, and the other windows are not affected, thereby improving the user. The effect of the experience.
  • FIG. 1 is a flowchart of a software management method according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of a software uninstalling method according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic structural diagram of a software management apparatus according to Embodiment 2 of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • This embodiment provides a software management method. Referring to FIG. 1, the method includes:
  • S101 Acquire software information, and start to perform management operations on the software
  • S102 monitor a system window during a management operation
  • S105 Process the new window according to the matching result, and complete a management operation on the software.
  • the management operation may be to install or uninstall the software, or to install the software first, and then based on the installed The software is uninstalled.
  • the acquired software information includes the software installation package information.
  • the installation package of the possible software is downloaded from the network and is in the form of a compressed package.
  • the installation package must be first decompressed, and the decompressed information is not required to be executed. . If so, obtain the installation software that needs to be executed, and the software information is the installation software.
  • software uninstallation you need to get the information of the software that needs to be uninstalled first.
  • the software installation or software uninstallation is mainly included.
  • the specific triggering method can be a simple click to start the installation or software uninstallation.
  • step S102 After the management operation of the software is started, step S102 is performed, the system window is monitored during the management operation, and the system window changes during the execution of the software management operation (that is, installation or uninstallation), possibly Some windows will be added, and the system window will be monitored for software automation to perform the next installation.
  • step S103 is executed.
  • the new window When a new window is generated on the system interface, the new window is identified, mainly to identify the window type of the new window.
  • the software is usually installed or uninstalled to install or uninstall the window interface to facilitate interaction with the user.
  • the software is used to interact with the user, and those window types of the correctly installed window are defined as application windows. Types of. Of course, there are often other windows popping up during the installation or uninstallation process. These windows may be system reminders, for example, the system pops up, prompting that the registry key has been changed. For such windows, define it as an exception window type.
  • an abnormal window set is further set before the step S101 is performed, and the abnormal window set includes all window identifiers belonging to the abnormal window type window.
  • the exception window set includes: "Program Compatibility Assistant”, “Windows Security Alert”, “Desktop Gadget - Security Warning”, and so on.
  • the abnormal window set is set in advance, to complete the recognition of the window type of the new window, only the window identifier of the new window needs to be acquired, and it is determined that the acquired new window identifier is an identifier that does not belong to the abnormal window set.
  • a new window is generated on the monitoring system interface, the window identifier of the new window is obtained as “Windows security alarm”, and then the abnormal window set is viewed, and the abnormal window set is found to contain “Windows security alarm”, so that it can be known that The new window belongs to the exception window.
  • This process can use the Windows API functions EnumWindows, GetWindowText to enumerate all the top-level window identifiers on the screen.
  • a process IDentifier (PID) of the software is also acquired, and the PID is a kernel used by most operating systems to uniquely identify the process. Value.
  • the window can be identified.
  • the new window when the new window does not belong to the abnormal window type, the new window can be roughly determined as the application window type, but this is in the user. There is no operation of any other software or no other window with a non-exceptional window type. For example, when a user automatically installs a certain software, other software can be opened to perform other operations, so the determination in this way is inaccurate. Moreover, it is convenient and accurate to use PID to judge. Therefore, it is a preferable way to recognize the window of the abnormal window type with the abnormal window set and the window of the application window type by using the PID.
  • step S104 is performed to match the window type of the new window with the preset processing rule.
  • the preset processing rule a corresponding processing method for each window type is defined. For example, specifically, when the window type belongs to the application window type, the control information of the window is acquired, and the content of the control is controlled; when the window type belongs to the abnormal window type, the window is closed.
  • the window type is abnormal window type, it is proved that the window is not the window required to perform software management operations, and may hinder the normal operation of the software management operation, so the more direct way is to turn it off, the shutdown mode may be Close the corresponding process.
  • the window type is the application window type
  • the window belongs to the object of the management operation, so it is necessary to acquire the information of each control of the window and perform operation control on the content of the control.
  • the types of windows that are of interest in the present invention are mainly the exception window type and the application window type, no description is made for other window types.
  • the specific content of the preset processing rule is not limited to the above setting manner.
  • the processing mode for different types of windows has been defined in the preset processing rule, and only corresponding processing is performed according to the matching result, and the process proceeds to step S105.
  • the new window type is The exception window type closes the new window; if it is the application window type, the control information of the window is obtained, and the content of the control is controlled. Since the management operations in this embodiment mainly include installation and uninstallation, the control information obtained in the window here mainly includes acquiring mouse button operable buttons and an edit box for inputting text.
  • This process mainly uses the Windows API function EnumChildWindows to enumerate the control types and control texts on the installation interface, such as Edit, CButton, Static, etc. After finding the button type controls, you can analyze the text content of these controls, such as controls.
  • Keywords such as "ChooseInstallLocation” and “SelectDestinationLocation” in the text indicate that this window belongs to the modified software installation path interface and sends a message through the Application Programming Interface (API).
  • SendMessage sends the path to the specified control to complete the modification path; if the control text contains keywords such as "I have read and accept permission”, “Next”, “End”, “Complete”, etc., it means that it belongs to the normal installation selection interface. Then send a mouse click message through API SendMessage to simulate a manual click operation. Of course, if it is an exception window type window, close it.
  • this procedure can use the Windows API functions EnumWindows and GetWindowText to enumerate all the top-level window identifiers on the screen.
  • the window identifier matches the window identifier in the exception window set in the configuration file, Use the API function FindWindow to get the window handle, and finally use GetWindowThreadProcessId, TerminateProcess to end the window process.
  • all disk sizes and specific registries are also scanned before the installation of the software is performed. Item and record it in a temporary file. And after executing the installation of the software, it will scan all the disk sizes and specific registry entries for the second time, so that you can know the specific installation location of all the files of the software, related registry keys, the size of the software, and so on. information. In this way, on the one hand, it can be determined whether the software installation is successful, on the other hand, it can be easily uninstalled.
  • the specific information such as the size of the space occupied by the software can know the specific programs and parameters that need to be uninstalled, so that it can be completely uninstalled.
  • the software uninstallation process can be judged after the software uninstallation process is completed, and the software uninstallation is successful. If the uninstallation is successful, the uninstallation process can be re-executed.
  • the unsuccessful uninstallation may also include that the related information is not uninstalled cleanly, for example, the registry information is not deleted, and only the registry information needs to be deleted at this time.
  • a specific implementation manner of installing software in this embodiment includes:
  • the analysis of the software package is the basis of the entire business process. If it is in the form of a compressed package, it needs to be decompressed first. Extract to a temporary subdirectory.
  • S202 Scan an application software directory
  • S203 The first disk scan and the registry record the existing disk size and the installation software already in the registry.
  • an exception window type window may appear, which can be processed through the configuration file configuration window identifier, such as the window identifiers "Program Compatibility Assistant", “Windows Security Alert”, “Desktop Gadget - Security Warning”, and IE browser pop-ups, etc.
  • This process mainly uses the Windows API functions EnumWindows and GetWindowText to enumerate the top-level window titles on all screens. If the window identifier matches the identifier text to be processed in the configuration file, use the API function FindWindow to get the window handle, and finally use GetWindowThreadProcessId, TerminateProcess end window process.
  • S206 Scan the window handle of all visible windows, and obtain the PID by the handle;
  • S207 Select a visible window in which the PID is consistent with the PID of the software, and obtain control information of the window;
  • the control information includes a mouse-operable button control and an edit box for inputting text.
  • the default installation path can be replaced during the installation process, mainly by analyzing the text information or button information in the window.
  • This process mainly uses the Windows API function EnumChildWindows to enumerate the control types and control texts on the installation interface, such as Edit, CButton, Static, etc. After finding the button type controls, you can analyze the text content of these controls, such as controls.
  • the text contains keywords such as "Choose Install Location”, “Select Installation Location”, and “Select Destination Location”, indicating that this window belongs to the modified software installation path interface, and sends the path to the specified control through the API SendMessage to complete the modification path;
  • the control text contains keywords such as "I have read and accept permission”, “Next”, “End”, “Complete”, etc., indicating that it belongs to the normal installation selection interface, and then sends a mouse click message through API SendMessage to simulate manual click. operating.
  • S209 Determine, according to the installation list, whether the software installation is successful, and if yes, proceed to S211; otherwise, execute S210.
  • a specific implementation manner of uninstalling software in this embodiment includes:
  • the monitoring process and the window processing of the exception window type are similar to those in S204.
  • S304 Acquire a PID related to the installation software, and determine whether there is a child process. If yes, if it is proved that the software uninstallation is being executed, execute S305; otherwise, execute S309.
  • S305 Scan the window handle of all visible windows, and get the PID by the handle.
  • S306 Select a visible window in which the PID is consistent with the PID of the software, and obtain control information of the window.
  • S307 Determine whether the software uninstallation is successful, and if yes, go to S309; otherwise, execute S308.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the software management apparatus 4 includes: an operation module 41, a window processing module 42, and an execution module 43.
  • the operation module 41 is configured to acquire software information, and start executing the opposite.
  • the management operation of the software is configured to acquire software information, and start executing the opposite.
  • the management operation of the software is configured to monitor the system window during the management operation; when a new window is generated on the monitored system interface, the window type of the new window is recognized, and the window type and the preset window processing rule are Performing matching, wherein the preset window processing rule defines a processing manner corresponding to each window type; the executing module 43 is configured to process the new window according to the matching result, and complete a management operation on the software.
  • the window type includes an application window type and an exception window type;
  • the preset window processing rule includes: when the window type belongs to the application window type, the execution module 43 is configured to acquire the control information of the window, and perform operation control on the content of the control; when the window type belongs to When the exception window type is closed, the window is closed.
  • the software management apparatus 4 further includes a setting module 44 configured to pre-set an exception window set including all window identifiers belonging to the abnormal window type window before acquiring the software information.
  • the window processing module 42 further includes a first identification sub-module 421 configured to acquire a window identifier of the new window, and determine whether the new window belongs to the abnormal window set, and if so, the window type of the new window is an abnormal window type.
  • the software management apparatus 4 further includes an acquisition module 45 configured to acquire a process identifier of the software before identifying a window type of the new window after performing a management operation on the software; the window processing module 42 further includes a second identification sub-module 422, Configured to obtain the process identifier of the new window, determine whether the process identifier of the new window is consistent with the process identifier of the software, and if so, the window type of the new window is the application window type.
  • Performing management operations on the software includes performing an installation or uninstallation of the software.
  • a reprocessing module 46 configured to perform a management operation on the software to perform the When the uninstallation of the software is completed, after the uninstallation of the software is completed, whether the software related information is still in the registry is queried, and if so, the step of uninstalling the software is repeated or the related information of the software in the registry is deleted.
  • the software management apparatus in this embodiment may be configured to execute the software management method in the first embodiment.
  • a terminal is also provided in this embodiment, and the terminal may include, but is not limited to, a notebook computer, a desktop computer, a mobile terminal, and the like.
  • the terminal includes the software management device in this embodiment, and can be configured to manage the software and execute the software management method in the first embodiment.
  • Each module included in the software management apparatus and each submodule included in each module in the embodiment of the present invention may be implemented by a processor in a terminal (for example, a computer), and may also be implemented by a logic circuit;
  • the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA).
  • the software management method described above is implemented in the form of a software function module and sold or used as a stand-alone product, it may also be stored in a computer readable storage medium.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the software management method provided above.
  • an embodiment of the present invention further provides a terminal, including: a processor and a storage medium configured to store executable instructions, where the processor is configured to execute the stored executable instructions, where the executable instructions include:
  • the processing rule defines the processing method corresponding to each window type
  • the new window is processed according to the matching result, and the management operation of the software is completed.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • they may be implemented by program code executable by the computing device such that they may be stored in a storage medium (ROM/RAM, diskette, optical disk) by a computing device, and in some cases
  • the steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of the modules or steps may be implemented as a single integrated circuit module. Therefore, the invention is not limited to any particular combination of hardware and software.
  • the system window is monitored, and different processing methods are adopted according to the monitored window, because most software installation and uninstallation can be performed according to the above process, so it is universal;
  • the software management method in the present invention adopts different processing manners for different types of windows, and can effectively avoid the situation that the system pop-up window causes the installation process to be blocked. Therefore, the problem that the versatility and the influence of other windows cannot be considered in the automatic installation or uninstallation process of the software existing in the prior art can be effectively solved; the versatility of the software management is increased, and the other windows are not affected, thereby improving the user. The effect of the experience.

Abstract

A software management method and device, terminal, and storage medium. The method comprises: acquiring information of software, and starting to execute management operation on the software (S101); performing, during the management operation, system window monitoring (S102); upon detecting generation of a new window, identifying the window type of the new window (S103); matching the window type of the new window against a predetermined window handling rule (S104), wherein the predetermined window handling rule defines a handling mode for each window type; and after the matching result is obtained, handling, according to the matching result, the new window to complete the management operation on the software (S105).

Description

一种软件管理方法及装置、终端、存储介质Software management method and device, terminal and storage medium 技术领域Technical field
本发明涉及软件领域,尤其涉及一种软件管理方法及装置、终端、存储介质。The present invention relates to the field of software, and in particular, to a software management method and apparatus, a terminal, and a storage medium.
背景技术Background technique
随着互联网技术(Internet Technology,IT)领域及终端行业的不断发展,软件应用越来越多,软件越来越多,用户的选择也就越来越多,于是要增强自身的竞争力往往就需要将自身产品做得更好,于是为了提高用户体验,提供了越来越多的软件自动安装或卸载的方法。With the continuous development of the Internet technology (IT) field and the terminal industry, more and more software applications, more and more software, more and more choices of users, so it is necessary to enhance their competitiveness. Need to do their own products better, so in order to improve the user experience, more and more methods of automatic software installation or uninstallation are provided.
现有技术中,有一种全自动安装软件技术是利用文件壳识别技术,提取安装程序的静默参数,通过静默安装模式,可以有效避免安装过程中出现的未知窗口,其是把一个应用软件的全部安装过程简化为一个命令,不需要多次点击鼠标选择“下一步”等其他安装操作,也不需要敲击键盘输入安装路径。但并不是所有软件都可以使用静默安装模式完成安装,事实上,只有很少一部分软件支持静默安装模式。所以该自动化安装方法并不具有普适性。另外,现有技术中,还有一种自动安装技术,利用脚本模拟鼠标、键盘等操作完成软件安装,由于需要录制键盘、鼠标的过程,第一次安装应用程序时,必须由人工操作。同时由于软件安装过程中弹出窗口并不是一成不变的,因此脚本录制需要包含软件安装过程中所有弹出窗口,难度比较大,普适性也比较低。为了解决普适性的问题,现有技术中也有另外一种较为通用的软件安装方法,通过对安装软件进行分析智能地模拟人工点击界面的方法实现应用程序的安装,然而实际应用中,在软件程序的安装过程中可能出现不属于安装进程的界面,例如系统弹窗,此时就造成软 件无法继续进行安装。In the prior art, there is a fully automatic installation software technology that utilizes the file shell identification technology to extract the silent parameters of the installation program. Through the silent installation mode, the unknown window appearing during the installation process can be effectively avoided, which is to apply all the application software. The installation process is simplified to a single command. You don't need to click the mouse to select other installation operations such as “Next”, and you don't need to type the keyboard to enter the installation path. However, not all software can be installed using the silent installation mode. In fact, only a small percentage of the software supports the silent installation mode. Therefore, this automated installation method is not universal. In addition, in the prior art, there is also an automatic installation technology, which uses a script to simulate a mouse, a keyboard, and the like to complete the software installation. Since the process of recording a keyboard and a mouse is required, the first time the application is installed, it must be manually operated. At the same time, because the pop-up window is not static during the software installation process, the script recording needs to include all pop-up windows during the software installation process, which is relatively difficult and generally low. In order to solve the problem of universality, there is another general software installation method in the prior art, which realizes the installation of the application by intelligently simulating the method of manually clicking the interface by analyzing the installation software. However, in actual application, the software is installed. During the installation of the program, an interface that does not belong to the installation process may appear. For example, the system pops up, which causes softness. The piece cannot be installed.
综上所述,现有技术中虽然存在软件的自动安装方法,但是这些软件安装方法由于自身原因的限制要么普适性比较低,不具有通用性;要么安装过程中容易受到其他弹窗的影响无法继续完成安装。In summary, although there are automatic software installation methods in the prior art, these software installation methods are generally less universal and have no universality due to limitations of their own reasons; or they are susceptible to other pop-up windows during the installation process. Unable to continue the installation.
发明内容Summary of the invention
本发明实施例提供一种软件管理方法及装置、终端、存储介质,解决现有技术中的软件自动化安装或卸载过程中,不能兼顾通用性和不受其他窗口影响的问题。The embodiment of the invention provides a software management method and device, a terminal and a storage medium, which solve the problem that the versatility and the other windows are not affected in the process of automatically installing or uninstalling the software in the prior art.
为解决上述技术问题,本发明实施例提供一种软件管理方法,包括:To solve the above technical problem, an embodiment of the present invention provides a software management method, including:
获取软件信息,并开始执行对所述软件的管理操作;Obtaining software information and starting to perform management operations on the software;
在管理操作过程中对系统窗口进行监控;当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型,将所述窗口类型与预设窗口处理规则进行匹配,其中,所述预设窗口处理规则定义各窗口类型对应的处理方式;Monitoring the system window during the management operation; when a new window is generated on the monitoring system interface, identifying the window type of the new window, and matching the window type with the preset window processing rule, wherein the pre- Setting a window processing rule to define a processing method corresponding to each window type;
根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。The new window is processed according to the matching result, and the management operation of the software is completed.
在本发明一种实施例中,所述窗口类型包括应用窗口类型和异常窗口类型;预设窗口处理规则包括:In an embodiment of the present invention, the window type includes an application window type and an abnormal window type; the preset window processing rule includes:
当窗口类型属于应用窗口类型时,获取所述窗口的控件信息,并对所述控件内容进行操作控制;When the window type belongs to the application window type, acquiring control information of the window, and performing operation control on the content of the control;
当窗口类型属于异常窗口类型时,关闭所述窗口。When the window type belongs to the exception window type, the window is closed.
在本发明一种实施例中,在获取软件信息之前还包括预先设置异常窗口集,所述异常窗口集包括所有属于异常窗口类型窗口的窗口标识;In an embodiment of the present invention, before acquiring the software information, the method further includes: setting an abnormal window set, where the abnormal window set includes all window identifiers belonging to the abnormal window type window;
识别所述新窗口的窗口类型包括:获取所述新窗口的窗口标识,并判断所述新窗口是否属于所述异常窗口集,若是,则所述新窗口的窗口类型为异常窗口类型。 Identifying the window type of the new window includes: obtaining a window identifier of the new window, and determining whether the new window belongs to the abnormal window set, and if yes, the window type of the new window is an abnormal window type.
在本发明一种实施例中,在执行对所述软件的管理操作之后,识别所述新窗口的窗口类型之前还包括:获取所述软件的进程标识符;In an embodiment of the present invention, after performing the management operation on the software, before identifying the window type of the new window, the method further includes: acquiring a process identifier of the software;
识别所述新窗口的窗口类型包括获取所述新窗口的进程标识符,判断所述新窗口的进程标识符与所述软件的进程标识符是否一致,若是,则所述新窗口的窗口类型为应用窗口类型。Identifying a window type of the new window includes obtaining a process identifier of the new window, determining whether a process identifier of the new window is consistent with a process identifier of the software, and if so, a window type of the new window is Application window type.
在本发明一种实施例中,执行对所述软件的管理操作包括执行对所述软件的安装或卸载。In an embodiment of the invention, performing a management operation on the software includes performing an installation or uninstallation of the software.
在本发明一种实施例中,当执行对所述软件的管理操为执行对所述软件的卸载时,在完成对所述软件的卸载之后还包括:查询注册表中是否还有所述软件相关信息,若是,则重复对所述软件进行卸载的步骤或者删除所述注册表内所述软件的相关信息。In an embodiment of the present invention, when the management of the software is performed to perform the uninstallation of the software, after the uninstalling of the software is completed, the method further includes: querying whether the software is still in the registry. Relevant information, if yes, repeating the step of uninstalling the software or deleting related information of the software in the registry.
本发明实施例还提供一种软件管理装置,包括:操作模块:配置为获取软件信息,并开始执行对所述软件的管理操作;An embodiment of the present invention further provides a software management apparatus, including: an operation module configured to acquire software information, and start to perform a management operation on the software;
窗口处理模块:配置为在管理操作过程中对系统窗口进行监控;当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型,将所述窗口类型与预设窗口处理规则进行匹配,其中,所述预设窗口处理规则定义各窗口类型对应的处理方式;Window processing module: configured to monitor a system window during a management operation; when a new window is generated on the monitored system interface, identify a window type of the new window, and match the window type with a preset window processing rule The preset window processing rule defines a processing manner corresponding to each window type;
执行模块:配置为根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。The execution module is configured to process the new window according to the matching result, and complete management operations on the software.
在本发明一种实施例中,所述窗口类型包括应用窗口类型和异常窗口类型;预设窗口处理规则包括:In an embodiment of the present invention, the window type includes an application window type and an abnormal window type; the preset window processing rule includes:
当窗口类型属于应用窗口类型时,获取所述窗口的控件信息,并对所述控件内容进行操作控制;When the window type belongs to the application window type, acquiring control information of the window, and performing operation control on the content of the control;
当窗口类型属于异常窗口类型时,关闭所述窗口。When the window type belongs to the exception window type, the window is closed.
在本发明一种实施例中,还包括设置模块:配置为在获取软件信息之 前预先设置异常窗口集,所述异常窗口集包括所有属于异常窗口类型窗口的窗口标识;In an embodiment of the present invention, the method further includes: setting a module: configured to acquire software information Pre-setting an exception window set, the exception window set including all window identifiers belonging to the exception window type window;
所述窗口处理模块还包括第一识别子模块,配置为获取所述新窗口的窗口标识,并判断所述新窗口是否属于所述异常窗口集,若是,则所述新窗口的窗口类型为异常窗口类型。The window processing module further includes a first identification sub-module configured to acquire a window identifier of the new window, and determine whether the new window belongs to the abnormal window set, and if yes, the window type of the new window is abnormal Window type.
在本发明一种实施例中,还包括获取模块:配置为在在执行对所述软件的管理操作之后,识别所述新窗口的窗口类型之前,获取所述软件的进程标识符;In an embodiment of the present invention, the method further includes: acquiring, configured to acquire a process identifier of the software before identifying a window type of the new window after performing a management operation on the software;
所述窗口处理模块还包括第二识别子模块,配置为获取所述新窗口的进程标识符,判断所述新窗口的进程标识符与所述软件的进程标识符是否一致,若是,则所述新窗口的窗口类型为应用窗口类型。The window processing module further includes a second identification submodule configured to acquire a process identifier of the new window, determine whether a process identifier of the new window is consistent with a process identifier of the software, and if so, The window type of the new window is the application window type.
在本发明一种实施例中,执行对所述软件的管理操作包括执行对所述软件的安装或卸载。In an embodiment of the invention, performing a management operation on the software includes performing an installation or uninstallation of the software.
在本发明一种实施例中,还包括重处理模块,配置为当执行对所述软件的管理操为执行对所述软件的卸载时,在完成对所述软件的卸载之后,查询注册表中是否还有所述软件相关信息,若是,则重复对所述软件进行卸载的步骤或者删除所述注册表内所述软件的相关信息。In an embodiment of the present invention, the method further includes: a reprocessing module configured to query the registry after performing the uninstallation of the software after performing the uninstallation of the software by the management operation of the software Whether there is the software related information, and if so, repeating the step of uninstalling the software or deleting related information of the software in the registry.
本发明实施例还提供一种终端,包括上述软件管理装置。An embodiment of the present invention further provides a terminal, including the foregoing software management apparatus.
本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令配置为执行上述提供的软件管理方法。The embodiment of the invention provides a computer storage medium, wherein the computer storage medium stores computer executable instructions configured to execute the software management method provided above.
本发明实施例还提供一种终端,包括:处理器和配置为存储可执行指令的存储介质,其中,处理器配置为执行存储的可执行指令,所述可执行指令包括:The embodiment of the invention further provides a terminal, comprising: a processor and a storage medium configured to store executable instructions, wherein the processor is configured to execute the stored executable instructions, the executable instructions comprising:
获取软件信息,并开始执行对所述软件的管理操作; Obtaining software information and starting to perform management operations on the software;
在管理操作过程中对系统窗口进行监控;当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型,将所述窗口类型与预设窗口处理规则进行匹配,所述预设窗口处理规则定义各窗口类型对应的处理方式;Monitoring a system window during a management operation; when a new window is generated on the monitored system interface, identifying a window type of the new window, and matching the window type with a preset window processing rule, the preset window The processing rule defines the processing method corresponding to each window type;
根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。The new window is processed according to the matching result, and the management operation of the software is completed.
本发明实施例的有益效果是:The beneficial effects of the embodiments of the present invention are:
本发明实施例提供一种软件管理方法及装置、终端、存储介质,获取软件信息,并开始执行对软件的管理操作;在管理操作过程中对系统窗口进行监控,当监控到有新窗口产生时,对该新窗口的窗口类型进行识别,将该新窗口的窗口类型与预设窗口处理规则进行匹配,其中,所述预设窗口处理规则定义各种窗口类型对应的处理方式,匹配出结果后,根据匹配结果对新窗口进行处理,完成对软件的管理操作。在对软件管理操作的过程中,对系统窗口进行监控,根据监控到的窗口采用不同的处理方式,因为大多数的软件安装卸载都可以根据上述流程进行执行,所以其具有普适性;另外,本发明中的软件管理方法针对不同类型的窗口采用不同的处理方式,可以有效避免系统弹窗导致阻断安装进程的状况。所以,可以有效解决现有技术中存在的软件自动化安装或卸载过程中,不能兼顾通用性和不受其他窗口影响的问题;达到增加软件管理的通用性,同时不受其他窗口影响,从而提升用户体验的效果。The embodiment of the invention provides a software management method and device, a terminal, a storage medium, acquires software information, and starts to perform management operations on the software; monitors a system window during a management operation, and when a new window is detected And identifying a window type of the new window, and matching the window type of the new window with a preset window processing rule, wherein the preset window processing rule defines a processing manner corresponding to each window type, and after matching the result According to the matching result, the new window is processed to complete the management operation of the software. In the process of software management operations, the system window is monitored, and different processing methods are adopted according to the monitored window, because most software installation and uninstallation can be performed according to the above process, so it is universal; The software management method in the present invention adopts different processing manners for different types of windows, and can effectively avoid the situation that the system pop-up window causes the installation process to be blocked. Therefore, the problem that the versatility and the influence of other windows cannot be considered in the automatic installation or uninstallation process of the software existing in the prior art can be effectively solved; the versatility of the software management is increased, and the other windows are not affected, thereby improving the user. The effect of the experience.
附图说明DRAWINGS
图1为本发明实施例一中软件管理方法的流程图;1 is a flowchart of a software management method according to Embodiment 1 of the present invention;
图2为本发明实施例一中软件安装方法的流程图;2 is a flowchart of a software installation method in Embodiment 1 of the present invention;
图3为本发明实施例一中软件卸载方法的流程图;3 is a flowchart of a software uninstalling method according to Embodiment 1 of the present invention;
图4为本发明实施例二中软件管理装置的结构示意图。 4 is a schematic structural diagram of a software management apparatus according to Embodiment 2 of the present invention.
具体实施方式detailed description
下面通过具体实施方式结合附图对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings.
实施例一:Embodiment 1:
本实施例提供一种软件管理方法,请参考图1,该方法包括:This embodiment provides a software management method. Referring to FIG. 1, the method includes:
S101:获取软件信息,并开始执行对所述软件的管理操作;S101: Acquire software information, and start to perform management operations on the software;
S102:在管理操作过程中对系统窗口进行监控;S102: monitor a system window during a management operation;
S103:当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型;S103: when a new window is generated on the monitored system interface, identify a window type of the new window;
S104:将所述窗口类型与预设窗口处理规则进行匹配;S104: Match the window type with a preset window processing rule.
S105:根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。S105: Process the new window according to the matching result, and complete a management operation on the software.
要对软件进行管理控制,首先要获取该软件的相关信息,执行步骤S101,在本实施例中管理操作可以是对软件进行安装或者卸载,也可以是对该软件先进行安装,然后基于已安装的软件完成卸载。若该管理操作是软件安装的话,那么获取的软件信息就包括软件安装包信息。例如,可能软件的安装包是从网络上下载的,是压缩包的形式,此时要完成软件的安装必须首先完成安装包的解压,还要判断解压后的信息是不是想要执行的安装软件。如果是就获取该需要执行的安装软件,此时软件信息就为所述安装软件。对于软件卸载也类似,需要先获取需要进行卸载的软件的信息。例如,当想要对某软件A进行卸载的时候,可以扫描注册表信息,根据软件A的名称与注册表中“显示名称(DisplayName)”项的内容进行匹配从而获取需要完成卸载软件的信息。在获取到软件的相关信息后,需要执行相应的操作,本实施例中主要包括软件安装或软件卸载。其具体触发方式,可以是简单的点击开始安装或者软件卸载等。上述示例仅为了说明举的具体示例,并不作为对本实施例的方案的限定。 To perform management control on the software, first obtain information about the software, and perform step S101. In this embodiment, the management operation may be to install or uninstall the software, or to install the software first, and then based on the installed The software is uninstalled. If the management operation is software installation, the acquired software information includes the software installation package information. For example, the installation package of the possible software is downloaded from the network and is in the form of a compressed package. In order to complete the installation of the software, the installation package must be first decompressed, and the decompressed information is not required to be executed. . If so, obtain the installation software that needs to be executed, and the software information is the installation software. For software uninstallation, you need to get the information of the software that needs to be uninstalled first. For example, when you want to uninstall a software A, you can scan the registry information and match the content of the "DisplayName" item in the registry according to the name of the software A to obtain the information that needs to be uninstalled. After the related information of the software is obtained, the corresponding operations need to be performed. In this embodiment, the software installation or software uninstallation is mainly included. The specific triggering method can be a simple click to start the installation or software uninstallation. The above examples are merely illustrative of specific examples and are not intended to limit the scope of the embodiments.
开始执行对所述软件的管理操作后,执行步骤S102,在管理操作过程中对系统窗口进行监控,在执行对软件管理操作(也即是安装或卸载)的过程中系统窗口会发生变化,可能会新增一些窗口,为了软件自动化的执行接下来的安装所以要对系统窗口进行监控。然后执行步骤S103,当监控到系统界面上有新窗口产生的时候,对该新窗口进行识别,主要是识别新窗口的窗口类型。容易理解,在安装过程中通常安装或卸载软件是会有安装或卸载窗口界面,以便于与用户交互,将这些软件用以与用户进行交互,方便正确安装的窗口的那些窗口类型定义为应用窗口类型。当然,在安装或卸载的过程中往往还会有其他窗口弹出来,这些窗口可能是系统提醒,例如,系统弹窗,提示注册表项被更改。对于这类窗口,将其定义为异常窗口类型。After the management operation of the software is started, step S102 is performed, the system window is monitored during the management operation, and the system window changes during the execution of the software management operation (that is, installation or uninstallation), possibly Some windows will be added, and the system window will be monitored for software automation to perform the next installation. Then, step S103 is executed. When a new window is generated on the system interface, the new window is identified, mainly to identify the window type of the new window. It is easy to understand that during the installation process, the software is usually installed or uninstalled to install or uninstall the window interface to facilitate interaction with the user. The software is used to interact with the user, and those window types of the correctly installed window are defined as application windows. Types of. Of course, there are often other windows popping up during the installation or uninstallation process. These windows may be system reminders, for example, the system pops up, prompting that the registry key has been changed. For such windows, define it as an exception window type.
在本实施例的一种具体实施方式中,在执行步骤S101之前还会预先设置异常窗口集,异常窗口集包括所有属于异常窗口类型窗口的窗口标识。例如,异常窗口集中包括:“程序兼容性助手”、“Windows安全警报”、“桌面小工具-安全警告”等等。在预先设置了异常窗口集的情况下,要完成对新窗口的窗口类型的识别就只需要获取新窗口的窗口标识,并判断获取到的新窗口的标识属不属于异常窗口集中的标识。例如,监控到系统界面上有新窗口产生,获取到该新窗口的窗口标识为“Windows安全警报”,然后查看异常窗口集,发现异常窗口集中包含“Windows安全警报”,于是就可以知道,该新窗口属于异常窗口。采用这种方式可以简单的识别出异常窗口类型的窗口。本过程可以利用Windows API函数EnumWindows、GetWindowText枚举所有屏幕上的顶层窗口标识。In a specific implementation manner of this embodiment, an abnormal window set is further set before the step S101 is performed, and the abnormal window set includes all window identifiers belonging to the abnormal window type window. For example, the exception window set includes: "Program Compatibility Assistant", "Windows Security Alert", "Desktop Gadget - Security Warning", and so on. In the case that the abnormal window set is set in advance, to complete the recognition of the window type of the new window, only the window identifier of the new window needs to be acquired, and it is determined that the acquired new window identifier is an identifier that does not belong to the abnormal window set. For example, a new window is generated on the monitoring system interface, the window identifier of the new window is obtained as “Windows security alarm”, and then the abnormal window set is viewed, and the abnormal window set is found to contain “Windows security alarm”, so that it can be known that The new window belongs to the exception window. In this way, the window of the abnormal window type can be easily identified. This process can use the Windows API functions EnumWindows, GetWindowText to enumerate all the top-level window identifiers on the screen.
在本实施例的另一种具体实施方式中,在执行完步骤S101之后,还会获取软件的进程标识符(Process IDentifier,PID),PID是大多数操作系统的内核用于唯一标识进程的一个数值。在这种情况下,对窗口进行识别可 以通过获取该新窗口的PID,看新窗口的进PID与软件的PID是否一致,如果一致的话,很明显该新窗口就是软件本身运行的窗口。采用这种方式可以很容易的就识别出应用窗口类型的窗口。In another specific implementation manner of this embodiment, after performing step S101, a process IDentifier (PID) of the software is also acquired, and the PID is a kernel used by most operating systems to uniquely identify the process. Value. In this case, the window can be identified. By obtaining the PID of the new window, it is obvious whether the PID of the new window is consistent with the PID of the software. If it is consistent, it is obvious that the new window is the window in which the software itself runs. In this way, the window of the application window type can be easily identified.
在上述实施例中,分别采用两种不同方式来对不同类型的窗口进行识别,其实当新窗不属于异常窗口类型时,可以大致将该新窗口判定为应用窗口类型,但是,这是在用户没有操作任何其他软件或者没有其他非异常窗口类型的窗口出现的情况下。例如,往往用户在进行自动安装某个软件的时候,也可以打开其他软件,进行其他操作,所以使用这种方式进行判定不准确。而且采用PID进行判断既方便又准确。所以,同时采用异常窗口集识别异常窗口类型的窗口和利用PID识别应用窗口类型的窗口属于比较优选的方式。In the above embodiment, two different ways are used to identify different types of windows. In fact, when the new window does not belong to the abnormal window type, the new window can be roughly determined as the application window type, but this is in the user. There is no operation of any other software or no other window with a non-exceptional window type. For example, when a user automatically installs a certain software, other software can be opened to perform other operations, so the determination in this way is inaccurate. Moreover, it is convenient and accurate to use PID to judge. Therefore, it is a preferable way to recognize the window of the abnormal window type with the abnormal window set and the window of the application window type by using the PID.
识别出新窗口的窗口类型之后,执行步骤S104,将新窗口的窗口类型与预设处理规则进行匹配。在预设处理规则中,定义了针对各窗口类型进行对应的处理方式。例如,具体的,可以设置当窗口类型属于应用窗口类型时,获取所述窗口的控件信息,并对所述控件内容进行操作控制;当窗口类型属于异常窗口类型时,关闭所述窗口。当窗口类型为异常窗口类型的时候证明该窗口并不是执行软件管理操作所需要的窗口,并且可能会妨碍对软件的管理操作的正常进行,所以比较直接的方式是将其关闭,关闭方式可以是关闭相应的进程。当窗口类型为应用窗口类型的时候,证明该窗口是属于管理操作的对象,所以,需要获取该窗口的各控件信息,并对控件内容进行操作控制。由于在本发明中关心的窗口类型主要是异常窗口类型和应用窗口类型,所以并没有对其他窗口类型进行任何说明。另外,预设处理规则的具体内容也不限于上述设置方式。After the window type of the new window is recognized, step S104 is performed to match the window type of the new window with the preset processing rule. In the preset processing rule, a corresponding processing method for each window type is defined. For example, specifically, when the window type belongs to the application window type, the control information of the window is acquired, and the content of the control is controlled; when the window type belongs to the abnormal window type, the window is closed. When the window type is abnormal window type, it is proved that the window is not the window required to perform software management operations, and may hinder the normal operation of the software management operation, so the more direct way is to turn it off, the shutdown mode may be Close the corresponding process. When the window type is the application window type, it is proved that the window belongs to the object of the management operation, so it is necessary to acquire the information of each control of the window and perform operation control on the content of the control. Since the types of windows that are of interest in the present invention are mainly the exception window type and the application window type, no description is made for other window types. In addition, the specific content of the preset processing rule is not limited to the above setting manner.
在预设处理规则中已经定义好了针对不同类型的窗口的处理方式,只需要根据匹配结果进行相应处理即可,进入步骤S105。如果新窗口类型是 异常窗口类型就关闭该新窗口;如果是应用窗口类型,就获取所述窗口的控件信息,并对所述控件内容进行操作控制。由于本实施例中的管理操作主要包括安装和卸载,所以此处在获取到窗口的控件信息主要包括获取那些鼠标可操作的按钮控件以及可输入文字的编辑框。此过程主要是利用Windows API函数EnumChildWindows枚举安装界面上的控件类型以及控件文本,比如Edit、CButton、Static等等,在找出按钮类型的控件后,就可以分析这些控件的文本内容,例如控件文本中包含“选择安装位置(ChooseInstallLocation)”、“选择目的位置(SelectDestinationLocation)”等关键词,则表示此窗口属于修改软件安装路径界面,通过应用程序编程接口(Application Programming Interface,API)发送消息(SendMessage)发送路径到指定的控件,完成修改路径;如果控件文本中包含“我已阅读并接受许可”、“下一步”、“结束”、“完成”等关键字,表示属于正常安装选择界面,则通过API SendMessage发送鼠标单击消息,模拟人工单击操作。当然如果是异常窗口类型的窗口,将其关闭,例如,本过程可以利用Windows API函数EnumWindows、GetWindowText枚举所有屏幕上的顶层窗口标识当窗口标识与配置文件中异常窗口集中的窗口标识一致时,利用API函数FindWindow获取窗口句柄,最终利用GetWindowThreadProcessId、TerminateProcess结束窗口进程。The processing mode for different types of windows has been defined in the preset processing rule, and only corresponding processing is performed according to the matching result, and the process proceeds to step S105. If the new window type is The exception window type closes the new window; if it is the application window type, the control information of the window is obtained, and the content of the control is controlled. Since the management operations in this embodiment mainly include installation and uninstallation, the control information obtained in the window here mainly includes acquiring mouse button operable buttons and an edit box for inputting text. This process mainly uses the Windows API function EnumChildWindows to enumerate the control types and control texts on the installation interface, such as Edit, CButton, Static, etc. After finding the button type controls, you can analyze the text content of these controls, such as controls. Keywords such as "ChooseInstallLocation" and "SelectDestinationLocation" in the text indicate that this window belongs to the modified software installation path interface and sends a message through the Application Programming Interface (API). SendMessage) sends the path to the specified control to complete the modification path; if the control text contains keywords such as "I have read and accept permission", "Next", "End", "Complete", etc., it means that it belongs to the normal installation selection interface. Then send a mouse click message through API SendMessage to simulate a manual click operation. Of course, if it is an exception window type window, close it. For example, this procedure can use the Windows API functions EnumWindows and GetWindowText to enumerate all the top-level window identifiers on the screen. When the window identifier matches the window identifier in the exception window set in the configuration file, Use the API function FindWindow to get the window handle, and finally use GetWindowThreadProcessId, TerminateProcess to end the window process.
在本实施例中,为了方便对软件卸载时更方便的获取软件的相关信息,在本发明的一种具体实施例中,在执行对软件的安装之前还会扫描所有磁盘大小及特定的注册表项,并记录到临时文件中。并且在执行完对软件的安装之后还会第二次扫描所有磁盘大小及特定的注册表项,这样就可以知道该软件所有文件的具体安装位置,相关注册表项,软件所占空间大小等具体信息。如此,一方面可以确定软件安装是否成功,另一方面可以方便卸载。在卸载的时候根据该软件所有文件的具体安装位置,相关注册表项, 软件所占空间大小等具体信息可以知道需要卸载软件的具体程序和参数,方便完全卸载。另外也可以在软件卸载流程走完以后进行判断,看软件卸载是否成功,没有卸载成功,可以重新执行卸载的步骤。当然该卸载不成功也可以包括相关信息没有卸载干净,例如注册表信息没有删除,此时只需要删除注册表信息即可。In this embodiment, in order to facilitate more convenient acquisition of software related information when uninstalling the software, in a specific embodiment of the present invention, all disk sizes and specific registries are also scanned before the installation of the software is performed. Item and record it in a temporary file. And after executing the installation of the software, it will scan all the disk sizes and specific registry entries for the second time, so that you can know the specific installation location of all the files of the software, related registry keys, the size of the software, and so on. information. In this way, on the one hand, it can be determined whether the software installation is successful, on the other hand, it can be easily uninstalled. According to the specific installation location of all files of the software at the time of uninstallation, relevant registry entries, The specific information such as the size of the space occupied by the software can know the specific programs and parameters that need to be uninstalled, so that it can be completely uninstalled. In addition, the software uninstallation process can be judged after the software uninstallation process is completed, and the software uninstallation is successful. If the uninstallation is successful, the uninstallation process can be re-executed. Of course, the unsuccessful uninstallation may also include that the related information is not uninstalled cleanly, for example, the registry information is not deleted, and only the registry information needs to be deleted at this time.
请参考图2,为本实施例中对软件进行安装的一种具体实施方式,包括:Referring to FIG. 2, a specific implementation manner of installing software in this embodiment includes:
S201:应用软件包分析;S201: application software package analysis;
软件包的分析是整个业务流程的基础,如果是压缩包形式,则需要先解压。解压到临时子目录上。The analysis of the software package is the basis of the entire business process. If it is in the form of a compressed package, it needs to be decompressed first. Extract to a temporary subdirectory.
S202:扫描应用软件目录;S202: Scan an application software directory;
查找是否有Windows安装包程序,如果有Windows安装包程序,也就是当前的系统中已经存在该待安装的软件;则会提示警告性信息,维护人员可以中断后续的处理流程。Find out if there is a Windows installation package. If there is a Windows installation package, that is, the software to be installed already exists in the current system; warning information will be displayed, and maintenance personnel can interrupt the subsequent processing.
S203:第一次磁盘扫描以及注册表,记录现有磁盘大小以及注册表中已有的安装软件。S203: The first disk scan and the registry record the existing disk size and the installation software already in the registry.
通过HKEY_LOCAL_MACHINE项以及HKEY_USERS扫描所有子项的“SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”注册表项中“DisplayName”的值。并记录到临时文件中。Scans the value of "DisplayName" in the "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" registry key for all subkeys via the HKEY_LOCAL_MACHINE entry and HKEY_USERS. And recorded in a temporary file.
S204:启动系统窗口监控线程;S204: Start a system window monitoring thread;
在软件安装过程中,可能出现异常窗口类型的窗口,可通过配置文件配置窗口标识进行处理,例如窗口标识为“程序兼容性助手”、“Windows安全警报”、“桌面小工具-安全警告”以及IE浏览器弹窗等。本过程主要利用Windows API函数EnumWindows、GetWindowText枚举所有屏幕上的顶层窗口标题,如果窗口标识与配置文件中需要处理的标识文本一致时,利用API函数FindWindow获取窗口句柄,最终利用 GetWindowThreadProcessId、TerminateProcess结束窗口进程。During the software installation process, an exception window type window may appear, which can be processed through the configuration file configuration window identifier, such as the window identifiers "Program Compatibility Assistant", "Windows Security Alert", "Desktop Gadget - Security Warning", and IE browser pop-ups, etc. This process mainly uses the Windows API functions EnumWindows and GetWindowText to enumerate the top-level window titles on all screens. If the window identifier matches the identifier text to be processed in the configuration file, use the API function FindWindow to get the window handle, and finally use GetWindowThreadProcessId, TerminateProcess end window process.
S205:获取安装软件相关的PID,并判断是否有子进程,若有,则证明软件安装正在执行,则执行S206;否则执行S211;S205: Obtain a PID related to the installation software, and determine whether there is a child process, if yes, prove that the software installation is being executed, then execute S206; otherwise, execute S211;
S206:扫描所有可见窗口的窗口句柄,通过句柄得到其PID;S206: Scan the window handle of all visible windows, and obtain the PID by the handle;
S207:选择PID与软件的PID一致的可见窗口,并获取该窗口的控件信息;S207: Select a visible window in which the PID is consistent with the PID of the software, and obtain control information of the window;
控件信息中包含鼠标可操作的按钮控件以及可输入文字的编辑框。安装过程中可以替换默认安装路径,主要是通过分析窗口中的文本信息或者按钮信息。此过程主要是利用Windows API函数EnumChildWindows枚举安装界面上的控件类型以及控件文本,比如Edit、CButton、Static等等,在找出按钮类型的控件后,就可以分析这些控件的文本内容,例如控件文本中包含“Choose Install Location”、“选择安装位置”、“Select Destination Location”等关键词,则表示此窗口属于修改软件安装路径界面,通过API SendMessage发送路径到指定的控件,完成修改路径;如果控件文本中包含“我已阅读并接受许可”、“下一步”、“结束“、“完成”等关键字,表示属于正常安装选择界面,则通过API SendMessage发送鼠标单击消息,模拟人工单击操作。The control information includes a mouse-operable button control and an edit box for inputting text. The default installation path can be replaced during the installation process, mainly by analyzing the text information or button information in the window. This process mainly uses the Windows API function EnumChildWindows to enumerate the control types and control texts on the installation interface, such as Edit, CButton, Static, etc. After finding the button type controls, you can analyze the text content of these controls, such as controls. The text contains keywords such as "Choose Install Location", "Select Installation Location", and "Select Destination Location", indicating that this window belongs to the modified software installation path interface, and sends the path to the specified control through the API SendMessage to complete the modification path; The control text contains keywords such as "I have read and accept permission", "Next", "End", "Complete", etc., indicating that it belongs to the normal installation selection interface, and then sends a mouse click message through API SendMessage to simulate manual click. operating.
S208:进行第二次磁盘以及注册表扫描。S208: Perform a second disk and registry scan.
计算出磁盘变化大小,对比第一次扫描和第二次扫描两次扫描后注册表中变化,得出软件安装列表。Calculate the size of the disk change, compare the changes in the registry after the first scan and the second scan, and get the software installation list.
S209:根据安装列表判断软件安装是否成功,若是,进入S211;否则,执行S210。S209: Determine, according to the installation list, whether the software installation is successful, and if yes, proceed to S211; otherwise, execute S210.
S210:选择是否重新进行安装,若是,则重新执行201;否则,进入S211。S210: Select whether to re-install, if yes, execute 201 again; otherwise, go to S211.
S211:结束安装流程。 S211: End the installation process.
请参考图3,为本实施例中对软件进行卸载的一种具体实施方式,包括:Referring to FIG. 3, a specific implementation manner of uninstalling software in this embodiment includes:
S301:依据软件安装过程中扫描注册表所得软件安装列表。S301: According to the software installation list obtained by scanning the registry during the software installation process.
根据软件名称匹配注册表项中“DisplayName”,从而得到“UninstallString”的值,即软件卸载。Match the "DisplayName" in the registry key according to the software name, and get the value of "UninstallString", that is, software uninstallation.
S302:运行“UninstallString”对应的软件卸载命令,启动卸载程序。S302: Run the software uninstall command corresponding to “UninstallString” to start the uninstaller.
S303:启动系统窗口监控线程。S303: Start a system window monitoring thread.
其监控过程,以及异常窗口类型的窗口处理方式与S204中类似。The monitoring process and the window processing of the exception window type are similar to those in S204.
S304:获取安装软件相关的PID,并判断是否有子进程,若有,则证明软件卸载正在执行,则执行S305;否则执行S309。S304: Acquire a PID related to the installation software, and determine whether there is a child process. If yes, if it is proved that the software uninstallation is being executed, execute S305; otherwise, execute S309.
S305:扫描所有可见窗口的窗口句柄,通过句柄得到其PID。S305: Scan the window handle of all visible windows, and get the PID by the handle.
S306:选择PID与软件的PID一致的可见窗口,并获取该窗口的控件信息。S306: Select a visible window in which the PID is consistent with the PID of the software, and obtain control information of the window.
获取该窗口的控件信息,便可模拟人工卸载应用软件,此过程利用EnumWindows、FindWindow、GetWindowThreadProcessId等windows API函数,分析当前可见窗口中属于安装进程ID的卸载窗口,如果存在可见窗口,利用EnumChildWindows、GetWindowRect、GetWindowText函数枚举窗口所有控件的文本、位置等信息,如安装界面上的控件的文本为“卸载“、”删除“、”remove“、”uninstall“等等。则利用SendMessage发送鼠标单击消息,完成界面操作。Get the control information of the window, you can simulate the manual uninstall application software. This process uses the Windows API functions such as EnumWindows, FindWindow, GetWindowThreadProcessId, etc. to analyze the uninstall window of the currently visible window belonging to the installation process ID. If there is a visible window, use EnumChildWindows, GetWindowRect The GetWindowText function enumerates the text, position, and other information of all controls in the window. For example, the text of the control on the installation interface is "uninstall", "delete", "remove", "uninstall", and so on. Then use SendMessage to send a mouse click message to complete the interface operation.
S307:判断软件卸载是否成功,若是,进入S309;否则,执行S308。S307: Determine whether the software uninstallation is successful, and if yes, go to S309; otherwise, execute S308.
S308:选择是否重新进行卸载,若是,则重新执行301;否则,进入S309.S308: Select whether to perform the uninstallation again, if yes, re-execute 301; otherwise, enter S309.
S309:结束卸载流程。S309: End the uninstallation process.
上述示例仅作为对本发明方案的说明,并不对本发明的方案做任何限制。采用本发明中的管理方法,可以完成对软件的自动化安装和卸载,同时可以很好的避免异常窗口造成的安装或卸载中断的问题,提高了用户体 验。The above examples are only illustrative of the solution of the present invention, and do not impose any limitation on the solution of the present invention. By adopting the management method of the invention, the automatic installation and uninstallation of the software can be completed, and the problem of installation or uninstallation interruption caused by the abnormal window can be well avoided, and the user body is improved. Test.
实施例二:Embodiment 2:
本实施例中还提供一种软件管理装置,请参考图4,软件管理装置4包括:操作模块41、窗口处理模块42、执行模块43;操作模块41配置为获取软件信息,并开始执行对所述软件的管理操作;窗口处理模块42配置为在管理操作过程中对系统窗口进行监控;当监控到系统界面上有新窗口产生,识别新窗口的窗口类型,将窗口类型与预设窗口处理规则进行匹配,其中,所述预设窗口处理规则定义各窗口类型对应的处理方式;执行模块43配置为根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。In this embodiment, a software management apparatus is further provided. Referring to FIG. 4, the software management apparatus 4 includes: an operation module 41, a window processing module 42, and an execution module 43. The operation module 41 is configured to acquire software information, and start executing the opposite. The management operation of the software; the window processing module 42 is configured to monitor the system window during the management operation; when a new window is generated on the monitored system interface, the window type of the new window is recognized, and the window type and the preset window processing rule are Performing matching, wherein the preset window processing rule defines a processing manner corresponding to each window type; the executing module 43 is configured to process the new window according to the matching result, and complete a management operation on the software.
窗口类型包括应用窗口类型和异常窗口类型;预设窗口处理规则包括:当窗口类型属于应用窗口类型时,执行模块43配置为获取窗口的控件信息,并对控件内容进行操作控制;当窗口类型属于异常窗口类型时,关闭窗口。软件管理装置4还包括设置模块44配置为在获取软件信息之前预先设置异常窗口集,异常窗口集包括所有属于异常窗口类型窗口的窗口标识。窗口处理模块42还包括第一识别子模块421配置为获取新窗口的窗口标识,并判断新窗口是否属于异常窗口集,若是,则新窗口的窗口类型为异常窗口类型。The window type includes an application window type and an exception window type; the preset window processing rule includes: when the window type belongs to the application window type, the execution module 43 is configured to acquire the control information of the window, and perform operation control on the content of the control; when the window type belongs to When the exception window type is closed, the window is closed. The software management apparatus 4 further includes a setting module 44 configured to pre-set an exception window set including all window identifiers belonging to the abnormal window type window before acquiring the software information. The window processing module 42 further includes a first identification sub-module 421 configured to acquire a window identifier of the new window, and determine whether the new window belongs to the abnormal window set, and if so, the window type of the new window is an abnormal window type.
软件管理装置4还包括获取模块45:配置为在在执行对软件的管理操作之后,识别新窗口的窗口类型之前,获取软件的进程标识符;窗口处理模块42还包括第二识别子模块422,配置为获取新窗口的进程标识符,判断新窗口的进程标识符与软件的进程标识符是否一致,若是,则所述新窗口的窗口类型为应用窗口类型。执行对所述软件的管理操作包括执行对所述软件的安装或卸载。The software management apparatus 4 further includes an acquisition module 45 configured to acquire a process identifier of the software before identifying a window type of the new window after performing a management operation on the software; the window processing module 42 further includes a second identification sub-module 422, Configured to obtain the process identifier of the new window, determine whether the process identifier of the new window is consistent with the process identifier of the software, and if so, the window type of the new window is the application window type. Performing management operations on the software includes performing an installation or uninstallation of the software.
还包括重处理模块46,配置为当执行对软件的管理操为执行对所述软 件的卸载时,在完成对软件的卸载之后,查询注册表中是否还有所述软件相关信息,若是,则重复对所述软件进行卸载的步骤或者删除注册表内所述软件的相关信息。该实施例中的软件管理装置可配置为执行实施例一中的软件管理方法。Also included is a reprocessing module 46 configured to perform a management operation on the software to perform the When the uninstallation of the software is completed, after the uninstallation of the software is completed, whether the software related information is still in the registry is queried, and if so, the step of uninstalling the software is repeated or the related information of the software in the registry is deleted. The software management apparatus in this embodiment may be configured to execute the software management method in the first embodiment.
本实施例中还提供一种终端,该终端可以包括但不限于笔记本电脑,台式机,移动终端等等。该终端包括本实施例中的软件管理装置,可配置为对软件进行管理,执行上述实施例一中的软件管理方法。A terminal is also provided in this embodiment, and the terminal may include, but is not limited to, a notebook computer, a desktop computer, a mobile terminal, and the like. The terminal includes the software management device in this embodiment, and can be configured to manage the software and execute the software management method in the first embodiment.
本发明实施例中软件管理装置所包括的各模块以及各模块所包括的各子模块,都可以通过终端(例如计算机)中的处理器来实现,当然也可通过逻辑电路实现;在实施例的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。Each module included in the software management apparatus and each submodule included in each module in the embodiment of the present invention may be implemented by a processor in a terminal (for example, a computer), and may also be implemented by a logic circuit; In the process, the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA).
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的软件管理方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present invention, if the software management method described above is implemented in the form of a software function module and sold or used as a stand-alone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
对应地,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令配置为执行上述提供的软件管理方法。 Correspondingly, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the software management method provided above.
对应地,本发明实施例还提供一种终端,包括:处理器和配置为存储可执行指令的存储介质,其中,处理器配置为执行存储的可执行指令,所述可执行指令包括:Correspondingly, an embodiment of the present invention further provides a terminal, including: a processor and a storage medium configured to store executable instructions, where the processor is configured to execute the stored executable instructions, where the executable instructions include:
获取软件信息,并开始执行对所述软件的管理操作;Obtaining software information and starting to perform management operations on the software;
在管理操作过程中对系统窗口进行监控;当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型,将所述窗口类型与预设窗口处理规则进行匹配,所述预设窗口处理规则定义各窗口类型对应的处理方式;Monitoring a system window during a management operation; when a new window is generated on the monitored system interface, identifying a window type of the new window, and matching the window type with a preset window processing rule, the preset window The processing rule defines the processing method corresponding to each window type;
根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。The new window is processed according to the matching result, and the management operation of the software is completed.
上述示例仅作为对本发明方案的说明,并不对本发明的方案做任何限制。采用本实施例中的软件管理装置,可以很好的避免异常窗口造成的安装或卸载中断的问题,卸载或安装过程由软件管理装置自动执行,提高了用户体验。The above examples are only illustrative of the solution of the present invention, and do not impose any limitation on the solution of the present invention. With the software management device in this embodiment, the problem of installation or uninstallation interruption caused by the abnormal window can be well avoided, and the uninstallation or installation process is automatically executed by the software management device, thereby improving the user experience.
显然,本领域的技术人员应该明白,上述本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in a storage medium (ROM/RAM, diskette, optical disk) by a computing device, and in some cases The steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of the modules or steps may be implemented as a single integrated circuit module. Therefore, the invention is not limited to any particular combination of hardware and software.
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。 The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.
工业实用性Industrial applicability
在对软件管理操作的过程中,对系统窗口进行监控,根据监控到的窗口采用不同的处理方式,因为大多数的软件安装卸载都可以根据上述流程进行执行,所以其具有普适性;另外,本发明中的软件管理方法针对不同类型的窗口采用不同的处理方式,可以有效避免系统弹窗导致阻断安装进程的状况。所以,可以有效解决现有技术中存在的软件自动化安装或卸载过程中,不能兼顾通用性和不受其他窗口影响的问题;达到增加软件管理的通用性,同时不受其他窗口影响,从而提升用户体验的效果。 In the process of software management operations, the system window is monitored, and different processing methods are adopted according to the monitored window, because most software installation and uninstallation can be performed according to the above process, so it is universal; The software management method in the present invention adopts different processing manners for different types of windows, and can effectively avoid the situation that the system pop-up window causes the installation process to be blocked. Therefore, the problem that the versatility and the influence of other windows cannot be considered in the automatic installation or uninstallation process of the software existing in the prior art can be effectively solved; the versatility of the software management is increased, and the other windows are not affected, thereby improving the user. The effect of the experience.

Claims (15)

  1. 一种软件管理方法,包括:A software management method comprising:
    获取软件信息,并开始执行对所述软件的管理操作;Obtaining software information and starting to perform management operations on the software;
    在管理操作过程中对系统窗口进行监控;Monitor system windows during management operations;
    当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型,将所述窗口类型与预设窗口处理规则进行匹配,其中,所述预设窗口处理规则定义各窗口类型对应的处理方式;When a new window is generated on the monitoring system interface, the window type of the new window is identified, and the window type is matched with a preset window processing rule, wherein the preset window processing rule defines a processing corresponding to each window type. the way;
    根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。The new window is processed according to the matching result, and the management operation of the software is completed.
  2. 如权利要求1所述的软件管理方法,其中,所述窗口类型包括应用窗口类型和异常窗口类型;所述预设窗口处理规则包括:The software management method according to claim 1, wherein the window type comprises an application window type and an exception window type; and the preset window processing rule comprises:
    当窗口类型属于应用窗口类型时,获取所述窗口的控件信息,并对所述控件内容进行操作控制;When the window type belongs to the application window type, acquiring control information of the window, and performing operation control on the content of the control;
    当窗口类型属于异常窗口类型时,关闭所述窗口。When the window type belongs to the exception window type, the window is closed.
  3. 如权利要求2所述的软件管理方法,其中,在获取软件信息之前还包括:预先设置异常窗口集,所述异常窗口集包括所有属于异常窗口类型窗口的窗口标识;The software management method according to claim 2, further comprising: presetting an abnormal window set, wherein the abnormal window set includes all window identifiers belonging to the abnormal window type window;
    识别所述新窗口的窗口类型包括:获取所述新窗口的窗口标识,并判断所述新窗口是否属于所述异常窗口集,若是,则所述新窗口的窗口类型为异常窗口类型。Identifying the window type of the new window includes: obtaining a window identifier of the new window, and determining whether the new window belongs to the abnormal window set, and if yes, the window type of the new window is an abnormal window type.
  4. 如权利要求2所述的软件管理方法,其中,在执行对所述软件的管理操作之后,识别所述新窗口的窗口类型之前还包括:The software management method according to claim 2, wherein after the management operation of the software is performed, before identifying the window type of the new window, the method further comprises:
    获取所述软件的进程标识符;Obtaining a process identifier of the software;
    识别所述新窗口的窗口类型包括:获取所述新窗口的进程标识符,判断所述新窗口的进程标识符与所述软件的进程标识符是否一致,若是,则所述新窗口的窗口类型为应用窗口类型。 Identifying a window type of the new window includes: obtaining a process identifier of the new window, determining whether a process identifier of the new window is consistent with a process identifier of the software, and if so, a window type of the new window For the application window type.
  5. 如权利要求1-4任意一项所述的软件管理方法,其中,执行对所述软件的管理操作包括执行对所述软件的安装或卸载。A software management method according to any one of claims 1 to 4, wherein performing a management operation on the software comprises performing an installation or uninstallation of the software.
  6. 如权利要求5所述的软件管理方法,其中,当执行对所述软件的管理操为执行对所述软件的卸载时,在完成对所述软件的卸载之后还包括:查询注册表中是否还有所述软件相关信息,若是,则重复对所述软件进行卸载的步骤或者删除所述注册表内所述软件的相关信息。The software management method according to claim 5, wherein when performing the management operation of the software to perform the uninstallation of the software, after completing the uninstalling of the software, the method further comprises: querying whether the registry is still There is the software related information, and if so, repeating the step of uninstalling the software or deleting related information of the software in the registry.
  7. 一种软件管理装置,包括:A software management device comprising:
    操作模块:配置为获取软件信息,并开始执行对所述软件的管理操作;An operation module: configured to acquire software information, and start to perform management operations on the software;
    窗口处理模块:配置为在管理操作过程中对系统窗口进行监控;当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型,将所述窗口类型与预设窗口处理规则进行匹配,所述预设窗口处理规则定义各窗口类型对应的处理方式;Window processing module: configured to monitor a system window during a management operation; when a new window is generated on the monitored system interface, identify a window type of the new window, and match the window type with a preset window processing rule The preset window processing rule defines a processing manner corresponding to each window type;
    执行模块:配置为根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。The execution module is configured to process the new window according to the matching result, and complete management operations on the software.
  8. 如权利要求7所述的软件管理装置,其中,所述窗口类型包括应用窗口类型和异常窗口类型;预设窗口处理规则包括:The software management apparatus according to claim 7, wherein the window type includes an application window type and an abnormal window type; and the preset window processing rule comprises:
    当窗口类型属于应用窗口类型时,获取所述窗口的控件信息,并对所述控件内容进行操作控制;When the window type belongs to the application window type, acquiring control information of the window, and performing operation control on the content of the control;
    当窗口类型属于异常窗口类型时,关闭所述窗口。When the window type belongs to the exception window type, the window is closed.
  9. 如权利要求8所述的软件管理装置,其中,还包括设置模块:配置为在获取软件信息之前预先设置异常窗口集,所述异常窗口集包括所有属于异常窗口类型窗口的窗口标识;The software management apparatus according to claim 8, further comprising: a setting module configured to preset an abnormal window set before acquiring the software information, the abnormal window set including all window identifiers belonging to the abnormal window type window;
    所述窗口处理模块还包括第一识别子模块,配置为获取所述新窗口的窗口标识,并判断所述新窗口是否属于所述异常窗口集,若是,则所 述新窗口的窗口类型为异常窗口类型。The window processing module further includes a first identification submodule configured to acquire a window identifier of the new window, and determine whether the new window belongs to the abnormal window set, and if so, the The window type of the new window is the exception window type.
  10. 如权利要求8所述的软件管理装置,其中,还包括获取模块:配置为在在执行对所述软件的管理操作之后,识别所述新窗口的窗口类型之前,获取所述软件的进程标识符;The software management apparatus according to claim 8, further comprising an acquisition module configured to acquire a process identifier of said software before identifying a window type of said new window after performing a management operation on said software ;
    所述窗口处理模块还包括第二识别子模块,配置为获取所述新窗口的进程标识符,判断所述新窗口的进程标识符与所述软件的进程标识符是否一致,若是,则所述新窗口的窗口类型为应用窗口类型。The window processing module further includes a second identification submodule configured to acquire a process identifier of the new window, determine whether a process identifier of the new window is consistent with a process identifier of the software, and if so, The window type of the new window is the application window type.
  11. 如权利要求7-10任意一项所述的软件管理装置,其中,执行对所述软件的管理操作包括执行对所述软件的安装或卸载。A software management apparatus according to any one of claims 7 to 10, wherein performing a management operation on the software comprises performing an installation or uninstallation of the software.
  12. 如权利要求11所述的软件管理装置,其中,还包括重处理模块,配置为当执行对所述软件的管理操为执行对所述软件的卸载时,在完成对所述软件的卸载之后,查询注册表中是否还有所述软件相关信息,若是,则重复对所述软件进行卸载的步骤或者删除所述注册表内所述软件的相关信息。The software management apparatus according to claim 11, further comprising a reprocessing module configured to, after performing an operation of the software to perform uninstallation of the software, after completing uninstallation of the software, Query whether there is any software related information in the registry, and if so, repeat the step of uninstalling the software or delete related information of the software in the registry.
  13. 一种终端,包括如权利要求7-12任意一项所述的软件管理装置。A terminal comprising the software management apparatus according to any one of claims 7-12.
  14. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令配置为执行权利要求1-6任意一项提供的软件管理方法。A computer storage medium having stored therein computer executable instructions configured to perform the software management method of any of claims 1-6.
  15. 一种终端,包括:处理器和配置为存储可执行指令的存储介质,其中,处理器配置为执行存储的可执行指令,所述可执行指令包括:A terminal comprising: a processor and a storage medium configured to store executable instructions, wherein the processor is configured to execute the stored executable instructions, the executable instructions comprising:
    获取软件信息,并开始执行对所述软件的管理操作;在管理操作过程中对系统窗口进行监控;当监控到系统界面上有新窗口产生,识别所述新窗口的窗口类型,将所述窗口类型与预设窗口处理规则进行匹配,所述预设窗口处理规则定义各窗口类型对应的处理方式;根据匹配结果对所述新窗口进行处理,完成对所述软件的管理操作。 Obtaining software information, and starting to perform management operations on the software; monitoring a system window during a management operation; and when a new window is generated on the monitored system interface, identifying a window type of the new window, the window is The type is matched with a preset window processing rule, and the preset window processing rule defines a processing manner corresponding to each window type; the new window is processed according to the matching result, and the management operation of the software is completed.
PCT/CN2017/077869 2016-04-06 2017-03-23 Software management method and device, terminal, and storage medium WO2017173925A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610209619.2 2016-04-06
CN201610209619.2A CN107273145A (en) 2016-04-06 2016-04-06 A kind of method of managing software and device, terminal

Publications (1)

Publication Number Publication Date
WO2017173925A1 true WO2017173925A1 (en) 2017-10-12

Family

ID=60000197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/077869 WO2017173925A1 (en) 2016-04-06 2017-03-23 Software management method and device, terminal, and storage medium

Country Status (2)

Country Link
CN (1) CN107273145A (en)
WO (1) WO2017173925A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110673910A (en) * 2019-09-11 2020-01-10 上海二三四五网络科技有限公司 Control method and control device for controlling popup window display in app system
CN115859278A (en) * 2023-03-01 2023-03-28 深圳市科力锐科技有限公司 Software operation behavior auditing method, system, equipment and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108734006A (en) * 2018-05-25 2018-11-02 山东华软金盾软件股份有限公司 A method of disabling Windows installation procedures
CN108920216B (en) * 2018-08-03 2021-11-09 武汉斗鱼网络科技有限公司 Method, device, terminal and storage medium for closing software compatible mode
CN111078236A (en) * 2019-12-18 2020-04-28 中国建设银行股份有限公司 Automatic software installation method and system, electronic equipment and storage medium
CN111966562A (en) * 2020-07-21 2020-11-20 北京视博云信息技术有限公司 Monitoring method and device of cloud platform and readable storage medium
CN112346946B (en) * 2020-11-13 2022-06-21 西安交通大学 User software operation behavior monitoring method and system based on control positioning

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147736A (en) * 2010-02-10 2011-08-10 华为技术有限公司 Method and device for installing software
CN102681861A (en) * 2011-03-14 2012-09-19 腾讯科技(深圳)有限公司 Method and device for installing software
US20150186126A1 (en) * 2013-12-27 2015-07-02 Kaspersky Lab Zao System and Method of Automating Installation of Applications
CN104765630A (en) * 2015-04-10 2015-07-08 百度在线网络技术(北京)有限公司 Software installation method and software installation device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147736A (en) * 2010-02-10 2011-08-10 华为技术有限公司 Method and device for installing software
CN102681861A (en) * 2011-03-14 2012-09-19 腾讯科技(深圳)有限公司 Method and device for installing software
US20150186126A1 (en) * 2013-12-27 2015-07-02 Kaspersky Lab Zao System and Method of Automating Installation of Applications
CN104765630A (en) * 2015-04-10 2015-07-08 百度在线网络技术(北京)有限公司 Software installation method and software installation device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110673910A (en) * 2019-09-11 2020-01-10 上海二三四五网络科技有限公司 Control method and control device for controlling popup window display in app system
CN110673910B (en) * 2019-09-11 2023-05-26 上海二三四五网络科技有限公司 Control method and control device for controlling popup window display in app system
CN115859278A (en) * 2023-03-01 2023-03-28 深圳市科力锐科技有限公司 Software operation behavior auditing method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN107273145A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
WO2017173925A1 (en) Software management method and device, terminal, and storage medium
CN102043655B (en) Method and system for carrying out advanced uninstall on software
US20150331882A1 (en) Redundant file deletion method, apparatus and storage medium
US9202021B2 (en) License verification method and apparatus, and computer readable storage medium storing program therefor
US9734047B2 (en) Method and apparatus for an improved automated test of software with a graphical user interface
US10713107B2 (en) Detecting a possible underlying problem among computing devices
WO2013174200A1 (en) Code analysis method and code analysis system, computer storage media
JP5556655B2 (en) Analysis support program, analysis support apparatus, and analysis support method
KR102105753B1 (en) Method and system for automatic configuration test case generation of mobile application
EP3346409A1 (en) Program, information processing apparatus and method
TWI656453B (en) Detection system and detection method
EP3115917A1 (en) Information processing apparatus, method, and program
US8947689B2 (en) Information processing apparatus having reliable display screen control within printer driver, storage medium, and control method thereof
US20170161188A1 (en) Information management system
US20180341770A1 (en) Anomaly detection method and anomaly detection apparatus
EP3588353B1 (en) Systems and methods of analyzing a software component
JP3348430B2 (en) Automatic environment setting method of preinstalled application and storage medium
US8762699B1 (en) System, apparatus, and method for initiating a reboot of a personal computer system by pressing a button on an attached storage device and causing the operating system on the attached storage device to be booted
US20150089490A1 (en) Information processing system, information processing apparatus, device, software installation method, and storage medium
TW201015296A (en) Method for auto-testing environment variable setting
US8918630B1 (en) System, apparatus, and method for initiating a reboot of a personal computer system by pressing a button on an attached storage device and causing the operating system on the attached storage device to be booted
CN113505365A (en) Authority management method, device, electronic equipment and storage medium
US20190129670A1 (en) Information processing apparatus
CN111813757B (en) Characteristic information storage method, device, equipment and readable storage medium
US20230409309A1 (en) Device of Updating Library Required by Testing Program for Testing and Method Thereof

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17778589

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17778589

Country of ref document: EP

Kind code of ref document: A1