CN103440144B - A kind of method to set up to the default software that equipment uses and device - Google Patents
A kind of method to set up to the default software that equipment uses and device Download PDFInfo
- Publication number
- CN103440144B CN103440144B CN201310342016.6A CN201310342016A CN103440144B CN 103440144 B CN103440144 B CN 103440144B CN 201310342016 A CN201310342016 A CN 201310342016A CN 103440144 B CN103440144 B CN 103440144B
- Authority
- CN
- China
- Prior art keywords
- software
- default
- configuration file
- information
- resource
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Landscapes
- Stored Programmes (AREA)
Abstract
本发明公开了一种对设备使用的默认软件的设置方法和装置。本发明实施例提供的一种对设备使用的默认软件的设置方法包括:检测设备中所有已安装的预定类型的软件;将检测出的软件展示在用户界面上,并接收通过该用户界面返回的选择命令;根据选择命令获知选择的每种类型软件的默认软件;建立默认软件所属类型的软件所支持的资源与默认软件的对应关系,以利用该对应关系设置默认软件运行该资源。
The invention discloses a method and a device for setting default software used by equipment. A method for setting default software used by a device provided in an embodiment of the present invention includes: detecting all installed predetermined types of software in the device; displaying the detected software on a user interface, and receiving the returned information through the user interface Select a command; obtain the default software of each type of software selected according to the selection command; establish a correspondence between resources supported by the type of software to which the default software belongs and the default software, so as to use the correspondence to set the default software to run the resource.
Description
技术领域technical field
本发明涉及计算机软件技术领域,特别涉及一种对设备使用的默认软件的设置方法和装置。The invention relates to the technical field of computer software, in particular to a method and device for setting default software used by equipment.
背景技术Background technique
随着计算机软件产品的日益丰富,对设备中同一类型的资源通常会有多种软件支持该资源的运行。例如,对于视频资源,可以采用暴风影音、快播等多种软件执行视频资源的下载和播放等。With the increasing abundance of computer software products, for the same type of resource in the device, there are usually multiple kinds of software to support the operation of the resource. For example, for video resources, various software such as Baofengyingyin and Kuaibo can be used to download and play video resources.
为了满足用户需求,现有方案提出了一种默认软件的机制,即用户可以在设备的多个软件中选择一种软件作为默认软件,则在每次运行相应资源时,系统会自动调用默认软件来运行该资源。In order to meet the needs of users, the existing scheme proposes a default software mechanism, that is, the user can choose a software as the default software among multiple software on the device, and the system will automatically call the default software every time the corresponding resource is run to run the resource.
然而,现有的默认软件机制至少存在如下不足:However, the existing default software mechanism has at least the following deficiencies:
在设置默认软件时,用户需要对设备中每种类型的软件分别逐一进行查找和设置,操作不便;另外,目前用户的默认软件容易被第三方软件篡改,例如,用户设置暴风影音为默认软件,其它的视频软件在启动时会自动将自己设为默认软件。When setting the default software, the user needs to search and set each type of software in the device one by one, which is inconvenient to operate; in addition, the current default software of the user is easily tampered with by third-party software. For example, the user sets Baofengyingyin as the default software. Other video software automatically sets itself as the default software when it starts up.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种对设备使用的默认软件的设置方法和装置。In view of the above problems, the present invention is proposed in order to provide a method and device for setting default software used by devices to overcome the above problems or at least partially solve the above problems.
依据本发明的一个方面,本发明实施例提供了一种对设备使用的默认软件的设置方法,包括:According to one aspect of the present invention, the embodiment of the present invention provides a method for setting the default software used by the device, including:
检测设备中所有已安装的预定类型的软件;将检测出的软件展示在用户界面上,并接收通过该用户界面返回的选择命令;根据选择命令获知选择的每种类型软件的默认软件;建立默认软件所属类型的软件所支持的资源与默认软件的对应关系,以利用该对应关系设置该默认软件运行该资源。Detect all predetermined types of software installed in the device; display the detected software on the user interface, and receive a selection command returned through the user interface; learn the default software of each type of software selected according to the selection command; establish a default The corresponding relationship between the resources supported by the software of the type to which the software belongs and the default software, so as to use the corresponding relationship to set the default software to run the resource.
其中,上述将默认软件所属类型的软件所支持的资源关联至默认软件包括:Among them, associating the resources supported by the software of the type to which the default software belongs to the default software includes:
对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中记录的默认软件的配置项设置注册表中的对应项,以建立默认软件所属类型的软件所支持的资源与默认软件的对应关系;对不具有配置文件的软件,调用设备中指定的应用接口API,利用该指定API建立默认软件所属类型的软件所支持的资源与默认软件的对应关系。For software with configuration files, a configuration file library is established for the software, and the corresponding items in the registry are set according to the configuration items of the default software recorded in the configuration file library, so as to establish the resources and default software supported by the type of software to which the default software belongs. For software without configuration files, call the specified application interface API in the device, and use the specified API to establish the corresponding relationship between the resources supported by the type of software to which the default software belongs and the default software.
其中,上述为具有配置文件的软件建立配置文件库包括:收集具有配置文件的软件的信息;根据收集到的信息生成软件的配置项,将该配置项记录在配置文件库中,其中,该配置项至少包括:Wherein, the above-mentioned establishment of a configuration file library for software with configuration files includes: collecting information about software with configuration files; generating software configuration items according to the collected information, and recording the configuration items in the configuration file library, wherein the configuration Items include at least:
指示软件支持的文件类型和/或URL类型的配置项;Configuration items indicating the file types and/or URL types supported by the software;
指示软件的安装路径的配置项;A configuration item indicating the installation path of the software;
指示软件访问资源时使用的代码语句的配置项。A configuration item that indicates code statements used by software to access resources.
其中,上述检测设备中所有已安装的预定类型的软件包括:Among them, all predetermined types of software installed in the above-mentioned detection equipment include:
对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中的信息对设备进行检测,得到设备中具有配置文件的已安装的软件;对不具有配置文件的软件,调用设备中指定的API,利用该指定API枚举设备中已安装的软件,得到设备中不具有配置文件的已安装的软件。For software with configuration files, build a configuration file library for the software, detect the device according to the information in the configuration file library, and obtain the installed software with configuration files in the device; for software without configuration files, call the A specified API, using the specified API to enumerate the installed software in the device, and obtain the installed software in the device without configuration files.
其中,上述方法还包括:对具有配置文件的软件,为该软件生成软件标识ID,当该软件被选中为默认软件时,将选中的默认软件的软件ID记录在注册表中;则当再次启动对设备使用的默认软件的设置时,检测注册表中记录的软件ID与当前实际的默认软件的软件ID是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息;对不具有配置文件的软件,当再次启动对设备使用的默认软件的设置时,调用设备中指定的API,通过该指定API检测上一次使用的默认软件与当前实际的默认软件是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息。Wherein, the above-mentioned method also includes: for the software with the configuration file, generate a software identification ID for the software, when the software is selected as the default software, record the software ID of the selected default software in the registry; When setting the default software used by the device, check whether the software ID recorded in the registry is the same as the software ID of the current actual default software. If they are the same, confirm that the default software has not been modified. If not, confirm that the default software has been modified. Display information on the user interface indicating that the default software has been modified; for software that does not have a configuration file, when the default software setting for the device is started again, the specified API in the device is called, and the last used one is detected through the specified API Whether the default software is the same as the current actual default software, if the same, confirm that the default software has not been modified, if not, confirm that the default software has been modified, and display information on the user interface prompting that the default software has been modified.
其中,该方法还包括:若确认默认软件被修改,当接收到通过用户界面返回的默认软件恢复命令时,对具有配置文件的软件,利用注册表中记录的默认软件的软件ID和配置文件库中的信息修改当前实际的默认软件为注册表中记录的软件ID对应的软件;对不具有配置文件的软件,调用设备中指定API,将默认软件恢复为用户历史使用记录中的默认软件。Wherein, the method also includes: if it is confirmed that the default software is modified, when the default software recovery command returned through the user interface is received, for software with configuration files, using the software ID and configuration file library of the default software recorded in the registry The information in modify the current actual default software to the software corresponding to the software ID recorded in the registry; for software that does not have a configuration file, call the specified API in the device to restore the default software to the default software in the user's historical usage records.
其中,上述检测注册表中记录的软件ID与当前实际的默认软件的软件ID是否相同包括:Wherein, whether the software ID recorded in the above detection registry is the same as the software ID of the current actual default software includes:
对当前实际与每种类型软件所支持的资源建立对应关系的软件进行检测,得到当前实际的默认软件的安装路径;将当前实际的默认软件的安装路径,与配置文件库中各软件的安装路径进行匹配,检测匹配出的软件的软件ID与注册表中记录的软件ID是否相同。Detect the current actual software corresponding to the resources supported by each type of software to obtain the current actual default software installation path; compare the current actual default software installation path with the installation path of each software in the configuration file library Matching is performed to detect whether the software ID of the matched software is the same as the software ID recorded in the registry.
其中,上述对当前实际与每种类型软件所支持的资源关联的软件进行检测包括:在每种类型软件所支持的资源中选取一种指定资源;对当前实际与每种类型软件的指定资源建立对应关系的软件进行检测。Among them, the above-mentioned detection of the software currently actually associated with the resources supported by each type of software includes: selecting a specified resource from the resources supported by each type of software; Corresponding software to detect.
其中,上述方法还包括:检测同一类型软件中除默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件;当存在开启了设置项的软件时,生成是否关闭软件的设置项的提示信息,并将该提示信息展示在用户界面上;当接收到通过用户界面返回的关闭指令时,关闭软件的设置项。Wherein, the above-mentioned method also includes: detecting whether there is software with setting items for establishing the corresponding relationship between resources and software opened in the software of the same type except the default software; Set the prompt information of the item, and display the prompt information on the user interface; when receiving the closing instruction returned through the user interface, close the setting item of the software.
其中,上述检测同一类型软件中除默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件包括:对具有配置文件的软件,根据为该软件建立的配置文件库中的信息,查找软件的配置文件中设置项对应的信息项,根据查找到的信息项判断软件的设置项是否开启;对不具有配置文件的软件,调用设备中指定的API查找软件中设置项对应的信息项,根据查找到的信息项判断软件的设置项是否开启。Among them, the above-mentioned detection of whether there is software in the same type of software other than the default software that has opened the setting item for establishing the corresponding relationship between resources and software includes: for software with configuration files, according to the configuration file library established for the software. information, search for the information item corresponding to the setting item in the configuration file of the software, and judge whether the setting item of the software is enabled according to the found information item; for software without a configuration file, call the API specified in the device to find the corresponding setting item in the software Information items, according to the found information items, it is judged whether the setting items of the software are enabled.
依据本发明的另一方面,本发明实施例提供了一种对设备使用的默认软件的设置装置,包括:According to another aspect of the present invention, an embodiment of the present invention provides a device for setting default software used by a device, including:
检测单元,适于检测设备中所有已安装的预定类型的软件;a detection unit adapted to detect all installed software of a predetermined type in the device;
接收单元,适于将检测单元检测出的软件展示在用户界面上,并接收通过该用户界面返回的选择命令;The receiving unit is adapted to display the software detected by the detection unit on the user interface, and receive a selection command returned through the user interface;
获知单元,适于根据接收单元接收到的选择命令获知选择的每种类型软件的默认软件;A learning unit adapted to learn the default software of each type of software selected according to the selection command received by the receiving unit;
设置单元,适于建立获知单元所获知的默认软件所属类型的软件所支持的资源与默认软件的对应关系,以利用该对应关系设置该默认软件运行该资源。The setting unit is adapted to establish a corresponding relationship between resources supported by the default software known by the learning unit and the default software, so as to use the corresponding relationship to set the default software to run the resource.
其中,设置单元,适于对具有配置文件的软件,根据为该软件建立的配置文件库中记录的默认软件的配置项设置注册表中的对应项,以建立默认软件所属类型的软件所支持的资源与默认软件的对应关系;对不具有配置文件的软件,调用设备中指定的应用接口API,利用该指定API建立默认软件所属类型的软件所支持的资源与默认软件的对应关系。Wherein, the setting unit is suitable for setting the corresponding items in the registry according to the configuration items of the default software recorded in the configuration file library established for the software for the software with configuration files, so as to establish the default software supported by the type of software to which the default software belongs. The corresponding relationship between resources and default software; for software without configuration files, call the specified application interface API in the device, and use the specified API to establish the corresponding relationship between the resources supported by the type of software to which the default software belongs and the default software.
其中,上述装置还包括建立单元,适于收集具有配置文件的软件的信息;根据收集到的信息生成软件的配置项,将该配置项记录在配置文件库中,其中,该配置项至少包括:Wherein, the above-mentioned device also includes an establishment unit, adapted to collect information of software with a configuration file; generate a configuration item of the software according to the collected information, and record the configuration item in the configuration file library, wherein the configuration item at least includes:
指示软件支持的文件类型和/或统一资源定位符URL类型的配置项;Configuration items indicating the file types and/or URL types supported by the software;
指示软件的安装路径的配置项;A configuration item indicating the installation path of the software;
指示软件访问资源时使用的代码语句的配置项。A configuration item that indicates code statements used by software to access resources.
其中,检测单元,适于对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中的信息对设备进行检测,得到设备中具有配置文件的已安装的软件;对不具有配置文件的软件,调用设备中指定的API,利用该指定API枚举设备中已安装的软件,得到设备中不具有配置文件的已安装的软件。Among them, the detection unit is suitable for establishing a configuration file library for software with a configuration file, and detecting the device according to the information in the configuration file library to obtain the installed software with a configuration file in the device; The software of the file calls the specified API in the device, uses the specified API to enumerate the installed software in the device, and obtains the installed software in the device that does not have a configuration file.
其中,上述装置还包括修改判断单元,适于对具有配置文件的软件,为该软件生成软件标识ID,当该软件被选中为默认软件时,将选中的默认软件的软件ID记录在注册表中;则当再次启动对设备使用的默认软件的设置时,检测注册表中记录的软件ID与当前实际的默认软件的软件ID是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息;对不具有配置文件的软件,当再次启动对设备使用的默认软件的设置时,调用设备中指定的API,通过该指定API检测上一次使用的默认软件与当前实际的默认软件是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息。Wherein, the above-mentioned device also includes a modification judging unit, which is adapted to generate a software identification ID for the software with a configuration file, and when the software is selected as the default software, record the software ID of the selected default software in the registry ; Then when starting the default software setting for the device again, check whether the software ID recorded in the registry is the same as the software ID of the current actual default software, if the same, confirm that the default software has not been modified, if not, confirm If the default software is modified, a message indicating that the default software has been modified will be displayed on the user interface; for software without a configuration file, when the default software setting for the device is started again, the specified API in the device will be called, and the specified API will be used to Detect whether the default software used last time is the same as the current actual default software. If they are the same, confirm that the default software has not been modified;
其中,上述装置还包括恢复单元,适于若确认默认软件被修改,当接收到通过用户界面返回的默认软件恢复命令时,对具有配置文件的软件,利用注册表中记录的默认软件的软件ID和配置文件库中的信息修改当前实际的默认软件为注册表中记录的软件ID对应的软件;对不具有配置文件的软件,调用设备中指定API,将默认软件恢复为用户历史使用记录中的默认软件。Wherein, the above-mentioned device also includes a recovery unit, adapted to confirm that the default software has been modified, when receiving the default software recovery command returned through the user interface, use the software ID of the default software recorded in the registry for the software with configuration files Modify the current actual default software with the information in the configuration file library to the software corresponding to the software ID recorded in the registry; for software that does not have a configuration file, call the specified API in the device to restore the default software to the one in the user's historical usage records Default software.
其中,恢复单元,适于对当前实际与每种类型软件所支持的资源建立对应关系的软件进行检测,得到该当前实际的默认软件的安装路径;将当前实际的默认软件的安装路径,与配置文件库中各软件的安装路径进行匹配,检测匹配出的软件的软件ID与注册表中记录的软件ID是否相同。Wherein, the restoration unit is adapted to detect the software that is currently actually corresponding to the resources supported by each type of software, and obtain the current actual default software installation path; the current actual default software installation path and the configuration The installation path of each software in the file library is matched, and the software ID of the matched software is detected to be the same as the software ID recorded in the registry.
其中,恢复单元,适于在每种类型软件所支持的资源中选取一种指定资源;对当前实际与每种类型软件的指定资源建立对应关系的软件进行检测。Wherein, the recovery unit is adapted to select a designated resource among the resources supported by each type of software; and detect the current software that actually establishes a corresponding relationship with the designated resource of each type of software.
其中,上述装置还包括锁定单元,适于检测同一类型软件中除默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件;当存在开启了设置项的软件时,生成是否关闭软件的设置项的提示信息,并将该提示信息展示在用户界面上;当接收到通过用户界面返回的关闭指令时,关闭软件的设置项。Wherein, the above-mentioned device also includes a locking unit, which is suitable for detecting whether there is software with setting items for establishing the corresponding relationship between resources and software opened in the same type of software except the default software; when there is software with setting items opened, generate Whether to close the prompt information of the setting item of the software, and display the prompt information on the user interface; when receiving the closing instruction returned through the user interface, close the setting item of the software.
其中,锁定单元,适于对具有配置文件的软件,根据为该软件建立的配置文件库中的信息,查找软件的配置文件中设置项对应的信息项,根据查找到的信息项判断软件的设置项是否开启;对不具有配置文件的软件,调用设备中指定的API查找软件中设置项对应的信息项,根据查找到的信息项判断软件的设置项是否开启。Wherein, the locking unit is suitable for software with a configuration file, according to the information in the configuration file library established for the software, searching for the information item corresponding to the setting item in the configuration file of the software, and judging the setting of the software according to the found information item Whether the item is enabled; for software that does not have a configuration file, call the API specified in the device to find the information item corresponding to the setting item in the software, and judge whether the software setting item is enabled based on the found information item.
本发明实施例通过对设备中软件检测的技术手段,能够获取到设备中所有已安装的各类型的软件,然后利用用户界面向用户展示检测出的软件并接收用户返回的默认软件的选择命令,从而解决了用户需要对设备中各种软件逐一查找来设置默认软件造成的操作繁琐的问题,极大便利了设备中默认软件的设置,方便了用户对默认软件的管理。The embodiment of the present invention can obtain all installed software of various types in the device through the technical means of software detection in the device, and then use the user interface to display the detected software to the user and receive the selection command of the default software returned by the user, This solves the problem of cumbersome operations caused by the user needing to search for various software in the device one by one to set the default software, greatly facilitates the setting of the default software in the device, and facilitates the management of the default software by the user.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:
图1示出了根据本发明一个实施例的一种对设备使用的默认软件的设置方法流程图;Fig. 1 shows a flow chart of a method for setting default software used by a device according to an embodiment of the present invention;
图2示出了根据本发明一个实施例的一种检测默认软件是否被修改的方法流程图;以及Fig. 2 shows a flow chart of a method for detecting whether default software has been modified according to an embodiment of the present invention; and
图3示出了根据本发明一个实施例的一种对设备使用的默认软件的设置装置的结构示意图。Fig. 3 shows a schematic structural diagram of an apparatus for setting default software used by a device according to an embodiment of the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
本发明一个实施例提供的一种对设备使用的默认软件的设置方法,便利了对默认软件的设置操作,参见图1,该方法包括:An embodiment of the present invention provides a method for setting the default software used by the device, which facilitates the setting operation of the default software. Referring to FIG. 1, the method includes:
S100:检测设备中所有已安装的预定类型的软件。S100: Detect all installed software of a predetermined type in the device.
目前检测的软件类型主要包括视频播放器、音乐播放器、看图类软件、输入法软件、邮件收发软件、浏览器、下载类软件和压缩类软件等类型。Currently detected software types mainly include video players, music players, image viewing software, input method software, email sending and receiving software, browsers, download software, and compression software.
通常每个软件都有其支持播放或显示的资源类型,如文件类型或URL(Uniform Resource Locator,统一资源定位符)类型。常见的文件类型包括视频文件类型、音频文件类型、图片文件类型、邮件类文件类型和浏览器支持显示的文件类型等等。其中,视频文件类型包括.avi(音频视频交错格式),.wmv,.mp4等格式,音频文件类型包括.mp3,.mva等格式,图片文件类型包括.jpg(联合图像专家小组),.png(图像文件存储格式),.bmp(位图)等格式,邮件类文件类型包括.eml格式;浏览器支持显示的文件类型包括.htm(超文本标记语言),.html,.mht等格式。Generally, each software has a resource type that it supports to play or display, such as a file type or a URL (Uniform Resource Locator, uniform resource locator) type. Common file types include video file types, audio file types, image file types, email file types, and file types supported by browsers. Among them, video file types include .avi (audio-video interleaved format), .wmv, .mp4 and other formats, audio file types include .mp3, .mva and other formats, and image file types include .jpg (Joint Photographic Experts Group), .png (image file storage format), .bmp (bitmap) and other formats, mail file types include .eml format; browser supports display file types include .htm (Hypertext Markup Language), .html, .mht and other formats.
某些类型的软件,比如浏览器和邮件,还支持URL类型,浏览器支持ftp(文件传输协议),http(超文本传输协议);邮件支持mailto等。Certain types of software, such as browsers and emails, also support URL types. Browsers support ftp (file transfer protocol), http (hypertext transfer protocol); emails support mailto, etc.
在执行检测操作时,本实施例至少提供如下两种检测方式:When performing detection operations, this embodiment provides at least the following two detection methods:
方式一、method one,
对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中的信息对设备进行检测,得到设备中具有配置文件的已安装的软件。For software with configuration files, a configuration file library is established for the software, and equipment is detected according to information in the configuration file library to obtain installed software with configuration files in the device.
需要说明的是,本实施例会预先为设备中具有配置文件的软件建立一个配置文件库,如dat文件库,在配置文件库中对各类软件的信息进行配置,包括软件安装路径、软件支持的文件后缀类型和/或URL类型,各类型资源运行时使用的软件路径和参数等等。It should be noted that this embodiment will pre-establish a configuration file library for software with configuration files in the device, such as a dat file library, and configure information of various software in the configuration file library, including software installation paths, software support File suffix type and/or URL type, software paths and parameters used when various types of resources are running, etc.
本实施例在为具有配置文件的软件建立配置文件库时,收集具有配置文件的软件的信息,根据收集到的信息生成软件的配置项,将该配置项记录在配置文件库中,其中,该配置项至少包括:In this embodiment, when a configuration file library is established for software with configuration files, the information of the software with configuration files is collected, configuration items of the software are generated according to the collected information, and the configuration items are recorded in the configuration file library, wherein the Configuration items include at least:
指示软件支持的文件类型和/或URL类型的配置项;Configuration items indicating the file types and/or URL types supported by the software;
指示软件的安装路径的配置项;A configuration item indicating the installation path of the software;
指示软件访问资源时使用的代码语句的配置项。A configuration item that indicates code statements used by software to access resources.
下面以360安全浏览器为例说明配置文件库中为软件配置的信息。例如,配置文件库中为360安全浏览器配置的信息可以表示如下:The following takes 360 Safe Browser as an example to illustrate the information configured for the software in the configuration file library. For example, the information configured for 360 Security Browser in the configuration file library can be expressed as follows:
其中,fileassociation(文件关联)节点表示软件支持的文件类型,urlassociation(URL关联)节点表示软件支持的URL类型,上述示例中表示360安全浏览器支持的文件类型包括:.htm,.html,.shtml,.xht,.xhtml,.crx,支持的URL类型包括360seurl,ftp,htmlfile,http,https。Among them, the fileassociation (file association) node indicates the file type supported by the software, and the urlassociation (URL association) node indicates the URL type supported by the software. In the above example, the file types supported by 360 Secure Browser include: .htm, .html, .shtml ,.xht,.xhtml,.crx, supported URL types include 360seurl,ftp,htmlfile,http,https.
fileassociation节点和urlassociation节点中的progid参数表示该软件支持的某种类型对应的progid节点的名称。The progid parameter in the fileassociation node and the urlassociation node indicates the name of the progid node corresponding to a certain type supported by the software.
比如,节点<fileassociation ext=".htm"progid="360seURL"rate="1"/>对应的progid节点的名称为360seURL。For example, the name of the progid node corresponding to the node <fileassociation ext=".htm" progid="360seURL"rate="1"/> is 360seURL.
在progid节点中,包括name(名称)项、defaulticon(图标路径)项和shellopencmd(访问资源所使用的代码语句)项。defaulticon项和shellopencmd项中的assocvar参数对应于assocvar节点。In the progid node, it includes name (name) item, defaulticon (icon path) item and shellopencmd (code statement used to access resources) item. The assocvar parameter in the defaulticon item and the shellopencmd item corresponds to the assocvar node.
在assocvar节点中,包括regkey参数,该参数表示注册表中指定的软件(360安全浏览器)的安装路径(HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths\360se6.exe\)。根据该参数中的安装路径,就可以知道defaulticon项和shellopencmd项中%assocvar0%\360se.exe的路径,从而能够利用该项中的代码语句访问资源(如htm文件)。In the assocvar node, include the regkey parameter, which indicates the installation path (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths\360se6.exe\) of the software (360 Security Browser) specified in the registry. According to the installation path in this parameter, you can know the path of %assocvar0%\360se.exe in the defaulticon item and shellopencmd item, so that you can use the code statement in this item to access resources (such as htm files).
另外,如果设备中软件的配置信息发生了变化,比如有新发布的软件或软件进行了升级,则本实施例会及时对配置文件库进行更新,如在配置文件库中增加对新发布软件的相关配置信息,或者增加某些新版的软件相对旧版软件的发生变化的配置信息等等。In addition, if the configuration information of the software in the device changes, for example, there is newly released software or the software is upgraded, this embodiment will update the configuration file library in time, such as adding information related to the newly released software in the configuration file library. Configuration information, or add configuration information that some new versions of software have changed relative to older versions of software, etc.
本实施例对需要检测的每个软件都预先在配置文件库中添加该软件的信息,根据配置文件库中的信息对软件进行检测,若配置文件库中没有该软件的信息,就无法将该软件检测出来。In this embodiment, the information of the software is added in the configuration file library in advance for each software that needs to be detected, and the software is detected according to the information in the configuration file library. If there is no information about the software in the configuration file library, the software cannot be The software detects it.
方式二、Method two,
对不具有配置文件的软件,调用设备中指定的API(应用接口),利用该指定API枚举设备中已安装的软件,得到设备中不具有配置文件的已安装的软件。For software without a configuration file, call the specified API (application interface) in the device, use the specified API to enumerate the installed software in the device, and obtain the installed software in the device without a configuration file.
不具有配置文件的软件,如输入法软件,由于配置文件库中没有这些软件的配置信息,所以无法利用配置文件库对这些软件进行检测,则本实施例调用指定API来对这些软件进行检测,一个指定的API可以对一种或多种类型的软件进行检测。Software without configuration files, such as input method software, cannot use the configuration file library to detect these software because there is no configuration information of these software in the configuration file library, then the present embodiment calls the specified API to detect these software, A given API can detect one or more types of software.
S102:将检测出的软件展示在用户界面上,并接收通过该用户界面返回的选择命令。S102: Display the detected software on a user interface, and receive a selection command returned through the user interface.
本实施例针对默认软件的设置与管理提供一个专有的用户界面,该用户界面提供一个对默认软件进行设备和管理的专有接口。This embodiment provides a dedicated user interface for setting and managing the default software, and the user interface provides a dedicated interface for configuring and managing the default software.
在用户界面上可以展示检测出的软件的图标、软件名称和每种类型软件当前的默认软件等信息。示例性的,当用户点击用户界面上软件的图标时,生成一条或多条选择命令并传递至设备,每条选择命令指示被点击图标对应的软件为用户选择的默认软件。Information such as icons of detected software, software names, and current default software for each type of software can be displayed on the user interface. Exemplarily, when the user clicks a software icon on the user interface, one or more selection commands are generated and transmitted to the device, and each selection command indicates that the software corresponding to the clicked icon is the default software selected by the user.
S104:根据选择命令获知选择的每种类型软件的默认软件。S104: Obtain the default software of each type of software selected according to the selection command.
对用户主动进行默认软件设置的每种类型的软件,根据接收到的选择命令获知每种类型软件的默认软件。For each type of software for which the user actively sets the default software, the default software of each type of software is learned according to the received selection command.
对用户没有进行默认软件主动设置的各类型的软件,保持系统对该类型软件的默认软件。For various types of software for which the user has not actively set the default software, keep the system's default software for this type of software.
S106:建立默认软件所属类型的软件所支持的资源与默认软件的对应关系,以利用该对应关系设置该默认软件运行该资源。其中,与资源建立对应关系的软件即为运行该资源的默认软件。S106: Establish a correspondence between resources supported by the software of the type to which the default software belongs and the default software, so as to use the correspondence to set the default software to run the resource. Wherein, the software corresponding to the resource is the default software for running the resource.
上述资源包括各种文件类型的资源和/或URL类型的资源,该资源被软件所支持指示软件能够对该资源进行诸如打开、编辑、播放和显示等各种运行操作。The above-mentioned resources include resources of various file types and/or resources of URL type, and the resources supported by the software indicate that the software can perform various operation operations on the resources, such as opening, editing, playing and displaying.
对用户主动选择的软件,将该软件设置为该类型软件在设备中的默认软件,至少包括如下两种方式:For the software actively selected by the user, setting the software as the default software of this type of software in the device includes at least the following two methods:
第一种方式针对具有配置文件的软件。本实施例为具有配置文件的软件建立配置文件库,根据配置文件库中记录的默认软件的配置项设置注册表中的对应项,以建立默认软件所属类型的软件所支持的资源与默认软件的对应关系,即将默认软件所属类型的软件所支持的资源关联至默认软件,从而通过这种对应关系在需要时(如需要打开资源时)设备会自动调用该默认软件来运行资源。The first way is for software with configuration files. This embodiment establishes a configuration file library for software with configuration files, and sets the corresponding items in the registry according to the configuration items of the default software recorded in the configuration file library, so as to establish the resources supported by the type of software to which the default software belongs and the resources of the default software. The corresponding relationship refers to associating the resources supported by the software of the type to which the default software belongs to the default software, so that the device will automatically call the default software to run the resource when needed (for example, when the resource needs to be opened) through this corresponding relationship.
第二种方式针对不具有配置文件的软件。本实施例调用设备中指定的API,利用该指定API建立默认软件所属类型的软件所支持的资源与默认软件的对应关系。The second way is for software that does not have a configuration file. In this embodiment, a specified API in the device is invoked, and the specified API is used to establish a corresponding relationship between resources supported by the type of software to which the default software belongs and the default software.
仍以上述360安全浏览器为例说明上述第一种方式下根据配置文件库中记录的默认软件的配置项设置注册表中的对应项的具体方法。Still taking the above-mentioned 360 security browser as an example to illustrate the specific method of setting the corresponding items in the registry according to the configuration items of the default software recorded in the configuration file library under the first method above.
设置默认软件时,对软件的安装路径,在注册表中设置progid对应的值为上述fileassociation和urlassociation的progid中的值,例如,When setting the default software, for the installation path of the software, set the value corresponding to the progid in the registry to the value in the progid of the above fileassociation and urlassociation, for example,
根据assocvar中的regkey获取软件安装路径%assocvar0%的值,则在注册表中将HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths\360se6.exe\对应的值设置为C:\Users\auto\AppData\Roaming\360se6\Application\360se.exe。Obtain the value of the software installation path %assocvar0% according to the regkey in assocvar, then set the value corresponding to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths\360se6.exe\ to C:\Users\auto\AppData in the registry \Roaming\360se6\Application\360se.exe.
对软件支持的文件类型,根据配置文件中的Fileassociation节点(如.htm格式的资源),进行如下设置:For the file types supported by the software, according to the Fileassociation node in the configuration file (such as resources in .htm format), make the following settings:
1、设置HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\Progid的值为360seURL1. Set the value of HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\Progid to 360seURL
2、设置HKCU\Software\Classes\.htm\Progid的值为360seURL2. Set the value of HKCU\Software\Classes\.htm\Progid to 360seURL
3、在Win7系统上设置HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\UserChoice\Progid的值为360seURL。3. Set the value of HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\UserChoice\Progid to 360seURL on the Win7 system.
对软件支持的URL类型,根据配置文件中urlassociation节点(如http格式的资源),进行如下设置:For the URL types supported by the software, according to the urlassociation node in the configuration file (such as resources in http format), set as follows:
在win7系统上设HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice\Progid的值为360seURLOn the win7 system, set the value of HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice\Progid to 360seURL
另外,对软件访问资源时使用的代码语句,设置注册表中DefaultIcon项和command项的值为配置文件中defaulticon项和shellopencmd项的指定的值。In addition, for the code statement used when the software accesses resources, set the values of the DefaultIcon item and the command item in the registry to the specified values of the defaulticon item and the shellopencmd item in the configuration file.
配置文件中defaulticon项的值为"%assocvar0%\360se.exe,5",shellopencmd项的值为""%assocvar0%\360se.exe"--"%1""则可以对注册表中的对应项进行如下设置:The value of the defaulticon item in the configuration file is "%assocvar0%\360se.exe,5", and the value of the shellopencmd item is ""%assocvar0%\360se.exe"--"%1"", then the corresponding value in the registry can be Items are set as follows:
1、设置HKLM\Software\Classes\360seURL\DefaultIcon\[默认]的值为c:\users\auto\appdata\roaming\360se6\Application\360se.exe,51. Set the value of HKLM\Software\Classes\360seURL\DefaultIcon\[default] to c:\users\auto\appdata\roaming\360se6\Application\360se.exe,5
2、设置HKCU\Software\Classes\360seURL\DefaultIcon\[默认]的值为c:\users\auto\appdata\roaming\360se6\Application\360se.exe,52. Set the value of HKCU\Software\Classes\360seURL\DefaultIcon\[default] to c:\users\auto\appdata\roaming\360se6\Application\360se.exe,5
3、设置HKLM\Software\Classes\shell\open\command\的值为"C:\Users\auto\AppData\Roaming\360se6\Application\360se.exe"--"%1"3. Set the value of HKLM\Software\Classes\shell\open\command\ to "C:\Users\auto\AppData\Roaming\360se6\Application\360se.exe"--"%1"
4.设置HKCU\Software\Classes\shell\open\command\的值为"C:\Users\auto\AppData\Roaming\360se6\Application\360se.exe"--"%1"4. Set the value of HKCU\Software\Classes\shell\open\command\ to "C:\Users\auto\AppData\Roaming\360se6\Application\360se.exe"--"%1"
由上所述,本发明实施例通过对设备中软件检测的技术手段,能够获取到设备中所有已安装的各类型的软件,然后利用用户界面向用户展示检测出的软件并接收用户返回的默认软件的选择命令,从而解决了用户需要对设备中各种软件逐一查找来设置默认软件造成的操作繁琐的问题,极大便利了设备中默认软件的设置,方便了用户对默认软件的管理。From the above, the embodiment of the present invention can obtain all installed software of various types in the device through the technical means of software detection in the device, and then use the user interface to display the detected software to the user and receive the default returned by the user. The software selection command solves the problem of cumbersome operations caused by the user needing to search for various software in the device one by one to set the default software, which greatly facilitates the setting of the default software in the device and the management of the default software by the user.
本发明又一个实施例提供的一种对设备使用的默认软件的设置方法,能够实现对默认软件的灵活管理。参见图2,示出了本发明实施例提供的一种检测默认软件是否被修改的方法流程图,包括如下步骤:Another embodiment of the present invention provides a method for setting default software used by a device, which can realize flexible management of the default software. Referring to FIG. 2 , it shows a flowchart of a method for detecting whether default software has been modified provided by an embodiment of the present invention, including the following steps:
S200:在前期执行过默认软件的主动设置后,再次启动对设备使用的默认软件的设置。S200: After performing the active setting of the default software in the early stage, start the setting of the default software used by the device again.
例如,当通过上述步骤S100至S106将用户选择的某个软件设置为默认软件后,再次启动上述步骤S100并展示出用户界面时,表明再次启动了对设备使用的默认软件的设置。For example, when a certain software selected by the user is set as the default software through the above steps S100 to S106, and the above step S100 is started again and the user interface is displayed, it indicates that the setting of the default software used by the device is started again.
S204:判断软件是否为具有配置文件的软件,若是,执行步骤S206,若否,执行步骤S208。S204: Determine whether the software is software with a configuration file, if yes, execute step S206, if not, execute step S208.
S206:检测注册表中记录的软件ID(标识)与当前实际的默认软件的软件ID是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息。S206: Detect whether the software ID (identification) recorded in the registry is the same as the software ID of the current actual default software, if the same, confirm that the default software has not been modified, if not, confirm that the default software has been modified, and display it on the user interface Prompt that the default software has been modified.
需要说明的是,本实施例在步骤S200之前,对具有配置文件的软件,会为该软件生成一个软件ID,当该软件被选中为默认软件时,将选中的默认软件的软件ID记录在注册表中。It should be noted that, in this embodiment, before step S200, a software ID will be generated for the software with a configuration file, and when the software is selected as the default software, the software ID of the selected default software will be recorded in the registry table.
获取当前实际的默认软件的软件ID的一种方式为:对当前实际与每种类型软件所支持的资源建立对应关系的软件进行检测,得到当前实际的默认软件的安装路径,其中,当前实际的默认软件即为当前实际与相应资源建立对应关系的软件;将当前实际的默认软件的安装路径,与配置文件库中各软件的安装路径进行匹配,则配置文件库中匹配成功的软件即为当前实际的默认软件的软件ID,将该匹配出的软件的软件ID与注册表中记录的软件ID进行比对。One way to obtain the software ID of the current actual default software is to detect the current actual software corresponding to the resources supported by each type of software, and obtain the current actual default software installation path, wherein the current actual The default software is the software that actually establishes a corresponding relationship with the corresponding resources; if the installation path of the current actual default software is matched with the installation path of each software in the configuration file library, the software that is successfully matched in the configuration file library is the current For the actual software ID of the default software, compare the software ID of the matched software with the software ID recorded in the registry.
由于每种类型软件能够支持的多种格式的资源,优选的,本实施例中在每种类型软件所支持的资源中选取一种指定资源,对当前实际与每种类型软件的指定资源建立对应关系的软件进行检测。Due to the multiple formats of resources that each type of software can support, preferably, in this embodiment, a specified resource is selected from the resources supported by each type of software, and the current actual situation corresponds to the specified resource of each type of software. Relational software for detection.
比如,对视频类软件,只检测与.avi格式的视频资源建立对应关系的软件,音频类软件只检测与.mp3格式的音频资源建立对应关系的软件,图片类软件只检测与.jpg格式的图片资源建立对应关系的软件,邮件类软件只检测mailto格式的邮件资源建立对应关系的软件,浏览器只检测与http的浏览器资源建立对应关系的软件等等。For example, for video software, only the software that establishes a relationship with video resources in .avi format is detected, audio software only detects software that establishes a relationship with audio resources in .mp3 format, and picture software only detects software that establishes a relationship with .jpg format Software that establishes a corresponding relationship with picture resources, mail software that only detects mail resources in mailto format and establishes a corresponding relationship, browsers that only detects software that establishes a corresponding relationship with http browser resources, and so on.
S208:调用设备中指定的API,通过该指定API检测上一次使用的默认软件与当前实际的默认软件是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息。S208: Call the API specified in the device, and check whether the default software used last time is the same as the current actual default software through the specified API. If they are the same, confirm that the default software has not been modified. If not, confirm that the default software has been modified. A message indicating that the default software has been modified is displayed on the user interface.
在确认默认软件被修改后,本实施例还能够根据用户的需求对默认软件进行恢复,具体包括:After confirming that the default software has been modified, this embodiment can also restore the default software according to the needs of the user, specifically including:
若确认默认软件被修改,当接收到通过用户界面返回的默认软件恢复命令时,例如,当接收到用户通过点击用户界面上的恢复按钮发送的默认软件恢复命令时,对具有配置文件的软件,利用注册表中记录的默认软件的软件ID和配置文件库中的信息修改当前实际的默认软件为注册表中记录的软件ID对应的软件;对不具有配置文件的软件,调用设备中指定API,将默认软件恢复为用户历史使用记录中的默认软件,如当用户历史使用记录中记录的默认软件为用户上一次使用的默认软件,则将默认软件恢复为用户上一次使用的默认软件。If it is confirmed that the default software has been modified, when receiving the default software recovery command returned through the user interface, for example, when receiving the default software recovery command sent by the user by clicking the recovery button on the user interface, for software with configuration files, Use the software ID of the default software recorded in the registry and the information in the configuration file library to modify the current actual default software to the software corresponding to the software ID recorded in the registry; for software that does not have a configuration file, call the specified API in the device, Restore the default software to the default software in the user's historical usage records. For example, if the default software recorded in the user's historical usage records is the default software used by the user last time, restore the default software to the default software used by the user last time.
由上所述,本发明实施例的方案能够实现对默认软件是否被修改的判断以及默认软件的自动修复,操作简单、灵活,方便了用户对默认软件的管理。From the above, the solution of the embodiment of the present invention can realize the judgment of whether the default software has been modified and the automatic repair of the default software, and the operation is simple and flexible, which is convenient for the user to manage the default software.
本发明又一个实施例提供的一种对设备使用的默认软件的设置方法,能够实现对默认软件的锁定,当默认软件被锁定后,大大降低了默认软件被修改的几率。Another embodiment of the present invention provides a method for setting default software used by a device, which can lock the default software. When the default software is locked, the probability of the default software being modified is greatly reduced.
一些软件具有用于建立资源与软件对应关系的设置项,即在这些软件中具有一个是否默认建立资源与软件对应关系的选项,如迅雷看看中具有“总是保持文件关联”的选项,当这一选项开启时,这些软件在启动时会默认将自身与所支持的文件建立对应关系,即将该软件设置为相应资源的默认软件,造成了对默认软件的修改,针对这种缺陷,本实施例提供了如下方法:Some software has setting items for establishing the corresponding relationship between resources and software, that is, there is an option in these software whether to establish the corresponding relationship between resources and software by default, such as Thunder Kankan has the option of "always keep file association", when When this option is turned on, these software will establish a corresponding relationship between itself and the supported files by default when starting, that is, the software will be set as the default software of the corresponding resource, resulting in the modification of the default software. For this defect, this implementation The example provides the following methods:
检测同一类型软件中除默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件;当存在开启了设置项的软件时,生成是否关闭软件的设置项的提示信息,并将该提示信息展示在用户界面上;当接收到通过用户界面返回的关闭指令时,关闭软件的上述设置项,实现对默认软件的锁定。软件锁定即锁定该软件为默认使用的软件。Detect whether there is a software with setting items that are used to establish the corresponding relationship between resources and software in the same type of software except the default software; when there is software with setting items that are turned on, generate a prompt message whether to close the setting items of the software, and The prompt information is displayed on the user interface; when the closing instruction returned through the user interface is received, the above-mentioned setting items of the software are closed, and the default software is locked. Software lock means to lock the software as the default software.
上述检测同一类型软件中除默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件的一种方式为:对具有配置文件的软件,根据为该软件建立的配置文件库中的信息,查找软件的配置文件中上述设置项对应的信息项,根据查找到的信息项判断软件的该设置项是否开启;对不具有配置文件的软件,调用设备中指定的API查找软件中上述设置项对应的信息项,根据查找到的信息项判断软件的该设执行是否开启。One way to detect whether there is any software in the same type of software other than the default software that has enabled the setting items for establishing the corresponding relationship between resources and software is: for software with configuration files, according to the configuration file library established for the software information in the software configuration file, search for the information item corresponding to the above setting item in the software configuration file, and judge whether the setting item of the software is enabled according to the found information item; for software that does not have a configuration file, call the API specified in the device to find the software For the information items corresponding to the above setting items, judge whether the execution of the software is enabled or not according to the found information items.
例如,当前设备中安装了暴风影音、QQ影音、快播这三个视频播放器软件,当用户主动设置暴风影音为默认软件的时,本实施例提供的方法会检测一下QQ影音和快播是否开启了用于建立资源与软件对应关系的设置项,如通过配置文件库中记录的QQ影音和快播的配置信息来判断QQ影音和快播的用于建立资源与软件对应关系的设置项是否开启,如果这两个软件中的任一个开启了该设置项,在用户界面(如弹窗)提示用户,让用户选择是否关闭这两个软件的用于建立资源与软件对应关系的设置项,当接收到用户发送的对QQ影音和快播的关闭指令时,关闭这两个软件的上述设置项,从而实现对暴风影音的锁定,则QQ影音和快播无法再把自身设置为默认播放软件。For example, three video player software, Baofengyingyin, QQyingyin, and Kuaibo, are installed in the current device. When the user actively sets Baofengyingyin as the default software, the method provided in this embodiment will detect whether The setting items for establishing the corresponding relationship between resources and software are enabled. For example, according to the configuration information of QQ video and fast broadcast recorded in the configuration file library, it can be judged whether the setting items for establishing the corresponding relationship between resources and software for QQ video and fast broadcast are Enabled, if either of the two softwares has enabled this setting item, the user interface (such as a pop-up window) will prompt the user to choose whether to close the setting item of the two softwares for establishing the corresponding relationship between resources and software. When receiving the closing command of QQ Video and Kuaibo from the user, close the above setting items of these two softwares, so as to realize the lock of Baofeng Video, then QQ Video and Kuaibo can no longer set themselves as the default playback software .
本发明实施例提供的方案,通过软件锁定机制,降低了默认软件被修改的几率,实现了对默认软件的保护。The solution provided by the embodiment of the present invention reduces the probability of the default software being modified through the software locking mechanism, and realizes the protection of the default software.
本发明又一个实施例提供了一种对设备使用的默认软件的设置装置300,参见图3,该装置300包括:Yet another embodiment of the present invention provides an apparatus 300 for setting default software used by a device. Referring to FIG. 3 , the apparatus 300 includes:
检测单元310,适于检测设备中所有已安装的预定类型的软件。目前检测的软件类型包括但不局限于视频播放器、音乐播放器、看图类软件、输入法软件、邮件收发软件、浏览器、下载类软件和压缩类软件等类型。The detection unit 310 is adapted to detect all installed software of a predetermined type in the device. Currently detected software types include, but are not limited to, video players, music players, picture viewing software, input method software, email sending and receiving software, browsers, download software, and compression software.
接收单元312,适于将检测单元310检测出的软件展示在用户界面上,并接收通过该用户界面返回的选择命令。The receiving unit 312 is adapted to display the software detected by the detecting unit 310 on a user interface, and receive a selection command returned through the user interface.
获知单元314,适于根据接收单元312接收到的选择命令获知选择的每种类型软件的默认软件。The obtaining unit 314 is adapted to obtain the default software of each type of software selected according to the selection command received by the receiving unit 312 .
设置单元316,适于建立获知单元314所获知的默认软件所属类型的软件所支持的资源与默认软件的对应关系,以利用该对应关系设置该默认软件运行该资源。The setting unit 316 is adapted to establish a correspondence between resources supported by the software of the type of the default software learned by the obtaining unit 314 and the default software, so as to use the correspondence to set the default software to run the resource.
其中,设置单元316,适于对具有配置文件的软件,根据为该软件建立的配置文件库中记录的默认软件的配置项设置注册表中的对应项,以建立默认软件所属类型的软件所支持的资源与默认软件的对应关系;对不具有配置文件的软件,调用设备中指定的API(应用接口),利用该指定API建立默认软件所属类型的软件所支持的资源与默认软件的对应关系。Wherein, the setting unit 316 is suitable for setting the corresponding items in the registry according to the configuration items of the default software recorded in the configuration file library established for the software, so as to establish the software supported by the type of default software. The corresponding relationship between the resources of the default software and the default software; for software without configuration files, call the specified API (application interface) in the device, and use the specified API to establish the corresponding relationship between the resources supported by the type of software to which the default software belongs and the default software.
其中,上述装置300还包括建立单元318,适于收集具有配置文件的软件的信息;根据收集到的信息生成软件的配置项,将该配置项记录在配置文件库中,其中,该配置项至少包括:Wherein, the above-mentioned device 300 also includes an establishment unit 318, adapted to collect information of software with configuration files; generate software configuration items according to the collected information, and record the configuration items in the configuration file library, wherein the configuration items are at least include:
指示软件支持的文件类型和/或统一资源定位符URL类型的配置项;Configuration items indicating the file types and/or URL types supported by the software;
指示软件的安装路径的配置项;A configuration item indicating the installation path of the software;
指示软件访问资源时使用的代码语句的配置项。A configuration item that indicates code statements used by software to access resources.
其中,检测单元310,适于对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中的信息对设备进行检测,得到设备中具有配置文件的已安装的软件;对不具有配置文件的软件,调用设备中指定的API,利用该指定API枚举设备中已安装的软件,得到设备中不具有配置文件的已安装的软件。Wherein, the detection unit 310 is adapted to establish a configuration file library for the software with configuration files, detect the device according to the information in the configuration file library, and obtain the installed software with configuration files in the device; The software of the configuration file calls the specified API in the device, uses the specified API to enumerate the installed software in the device, and obtains the installed software in the device without the configuration file.
其中,上述装置300还包括修改判断单元320,能够检测默认软件是否被修改。修改判断单元320适于对具有配置文件的软件,为该软件生成软件标识ID,当该软件被选中为默认软件时,将选中的默认软件的软件ID记录在注册表中;则当再次启动对设备使用的默认软件的设置时,检测注册表中记录的软件ID与当前实际的默认软件的软件ID是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息;对不具有配置文件的软件,当再次启动对设备使用的默认软件的设置时,调用设备中指定的API,通过该指定API检测上一次使用的默认软件与当前实际的默认软件是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息。Wherein, the above-mentioned apparatus 300 further includes a modification judging unit 320, capable of detecting whether the default software has been modified. Modification judging unit 320 is suitable for the software with configuration file, generates software identification ID for this software, when this software is selected as default software, the software ID of the selected default software is recorded in the registry; When setting the default software used by the device, check whether the software ID recorded in the registry is the same as the actual software ID of the current default software. If they are the same, confirm that the default software has not been modified. If not, confirm that the default software has been modified. The user interface displays information prompting that the default software has been modified; for software that does not have a configuration file, when the default software setting for the device is started again, the specified API in the device is called, and the last used default software is detected through the specified API. Whether the software is the same as the current actual default software, if the same, confirm that the default software has not been modified, if not, confirm that the default software has been modified, and display information on the user interface prompting that the default software has been modified.
其中,上述装置300还包括恢复单元322,适于若确认默认软件被修改,当接收到通过用户界面返回的默认软件恢复命令时,对具有配置文件的软件,利用注册表中记录的默认软件的软件ID和配置文件库中的信息修改当前实际的默认软件为注册表中记录的软件ID对应的软件;对不具有配置文件的软件,调用设备中指定API,将默认软件恢复为用户历史使用记录中的默认软件。具体的,恢复单元322,适于对当前实际与每种类型软件所支持的资源建立对应关系的软件进行检测,得到该当前实际的默认软件的安装路径;将当前实际的默认软件的安装路径,与配置文件库中各软件的安装路径进行匹配,检测匹配出的软件的软件ID与注册表中记录的软件ID是否相同。其中,恢复单元322,适于在每种类型软件所支持的资源中选取一种指定资源;对当前实际与每种类型软件的指定资源建立对应关系的软件进行检测。Wherein, the above-mentioned device 300 also includes a restoring unit 322, which is adapted to use the default software recorded in the registry for the software with configuration files when it is confirmed that the default software has been modified. Modify the current actual default software to the software corresponding to the software ID recorded in the registry by modifying the information in the software ID and configuration file library; for software that does not have a configuration file, call the specified API in the device to restore the default software to the user's historical usage records The default software in . Specifically, the recovery unit 322 is adapted to detect the current actual software corresponding to the resources supported by each type of software, and obtain the current actual default software installation path; the current actual default software installation path, Match the installation path of each software in the configuration file library, and check whether the software ID of the matched software is the same as the software ID recorded in the registry. Wherein, the recovery unit 322 is adapted to select a designated resource among the resources supported by each type of software; and detect the current software that actually establishes a corresponding relationship with the designated resource of each type of software.
一些软件具有用于建立资源与软件对应关系的设置项,即在这些软件中具有一个是否默认建立资源与软件对应关系的选项,如迅雷看看中具有“总是保持文件关联”的选项,当这一选项开启时,这些软件在启动时会默认将自身与所支持的文件建立对应关系,即将该软件设置为相应资源的默认软件,造成了对默认软件的修改,针对这种缺陷,上述装置300还包括锁定单元324,适于检测同一类型软件中除默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件;当存在开启了设置项的软件时,生成是否关闭软件的设置项的提示信息,并将该提示信息展示在用户界面上;当接收到通过用户界面返回的关闭指令时,关闭软件的上述设置项,从而实现对默认软件的锁定。软件锁定即锁定该软件为默认使用的软件。Some software has setting items for establishing the corresponding relationship between resources and software, that is, there is an option in these software whether to establish the corresponding relationship between resources and software by default, such as Thunder Kankan has the option of "always keep file association", when When this option is turned on, these software will establish a corresponding relationship between itself and the supported files by default when starting, that is, the software will be set as the default software of the corresponding resource, resulting in the modification of the default software. For this defect, the above-mentioned device 300 also includes a locking unit 324, which is adapted to detect whether there is software with a setting item that is used to establish a corresponding relationship between resources and software in the same type of software except the default software; when there is software with a setting item that is opened, whether to generate The prompt information of the setting items of the software, and display the prompt information on the user interface; when the closing instruction returned through the user interface is received, the above-mentioned setting items of the software are closed, thereby realizing the locking of the default software. Software lock means to lock the software as the default software.
其中,锁定单元324,适于对具有配置文件的软件,根据为该软件建立的配置文件库中的信息,查找软件的配置文件中上述设置项对应的信息项,根据查找到的信息项判断软件的该设置项是否开启;对不具有配置文件的软件,调用设备中指定的API查找软件中上述设置项对应的信息项,根据查找到的信息项判断软件的该设置项是否开启。Among them, the locking unit 324 is adapted to search for the information items corresponding to the above-mentioned setting items in the configuration file of the software according to the information in the configuration file library established for the software with the configuration file, and judge the software according to the information item found. Whether the setting item is enabled; for software without a configuration file, call the API specified in the device to find the information item corresponding to the above setting item in the software, and judge whether the setting item of the software is enabled according to the found information item.
本发明装置实施例中各单元的具体工作方式可以参见本发明的方法实施例,在此不再赘述。For the specific working methods of each unit in the device embodiment of the present invention, reference may be made to the method embodiment of the present invention, which will not be repeated here.
本发明实施例通过对设备中软件检测的技术手段,能够获取到设备中所有已安装的各类型的软件,然后利用用户界面向用户展示检测出的软件并接收用户返回的默认软件的选择命令,从而解决了用户需要对设备中各种软件逐一查找来设置默认软件造成的操作繁琐的问题,极大便利了设备中默认软件的设置,方便了用户对默认软件的管理。The embodiment of the present invention can obtain all installed software of various types in the device through the technical means of software detection in the device, and then use the user interface to display the detected software to the user and receive the selection command of the default software returned by the user, This solves the problem of cumbersome operations caused by the user needing to search for various software in the device one by one to set the default software, greatly facilitates the setting of the default software in the device, and facilitates the management of the default software by the user.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings), as well as any method or method so disclosed, may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的对设备使用的默认软件的设置装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the components in the device for setting the default software used by the device according to the embodiment of the present invention. Full functionality. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
本发明实施例揭示了:A1、一种对设备使用的默认软件的设置方法,包括:设备中所有已安装的预定类型的软件;将检测出的软件展示在用户界面上,并接收通过该用户界面返回的选择命令;根据所述选择命令获知选择的每种类型软件的默认软件;建立所述默认软件所属类型的软件所支持的资源与所述默认软件的对应关系,以利用该对应关系设置该默认软件运行该资源。A2、根据权利要求A1所述的方法,其中,所述建立所述默认软件所属类型的软件所支持的资源与所述默认软件的对应关系包括:对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中记录的所述默认软件的配置项设置注册表中的对应项,以建立所述默认软件所属类型的软件所支持的资源与所述默认软件的对应关系;对不具有配置文件的软件,调用设备中指定的应用接口API,利用该指定API建立所述默认软件所属类型的软件所支持的资源与所述默认软件的对应关系。A3、根据权利要求A2所述的方法,其中,所述为具有配置文件的软件建立配置文件库包括:收集具有配置文件的软件的信息;根据收集到的信息生成软件的配置项,将该配置项记录在配置文件库中,其中,所述配置项至少包括:指示软件支持的文件类型和/或统一资源定位符URL类型的配置项;指示软件的安装路径的配置项;指示软件访问资源时使用的代码语句的配置项。A4、根据权利要求A1所述的方法,其中,所述检测设备中所有已安装的预定类型的软件包括:对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中的信息对所述设备进行检测,得到所述设备中具有配置文件的已安装的软件;对不具有配置文件的软件,调用设备中指定的API,利用该指定API枚举所述设备中已安装的软件,得到所述设备中不具有配置文件的已安装的软件。A5、根据权利要求A4所述的方法,其中,所述方法还包括:对具有配置文件的软件,为该软件生成软件ID,当该软件被选中为默认软件时,将选中的默认软件的软件ID记录在注册表中;则当再次启动对设备使用的默认软件的设置时,检测注册表中记录的软件ID与当前实际的默认软件的软件ID是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息;对不具有配置文件的软件,当再次启动对设备使用的默认软件的设置时,调用设备中指定的API,通过该指定API检测上一次使用的默认软件与当前实际的默认软件是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息。A6、根据权利要求A5所述的方法,其中,该方法还包括:若确认默认软件被修改,当接收到通过用户界面返回的默认软件恢复命令时,对具有配置文件的软件,利用注册表中记录的默认软件的软件ID和配置文件库中的信息修改当前实际的默认软件为注册表中记录的软件ID对应的软件;对不具有配置文件的软件,调用设备中指定API,将默认软件恢复为用户历史使用记录中的默认软件。A7、根据权利A5所述的方法,其中,所述检测注册表中记录的软件ID与当前实际的默认软件的软件ID是否相同包括:对当前实际与每种类型软件所支持的资源建立对应关系的软件进行检测,得到当前实际的默认软件的安装路径;将所述当前实际的默认软件的安装路径,与配置文件库中各软件的安装路径进行匹配,检测匹配出的软件的软件ID与注册表中记录的软件ID是否相同。A8、根据权利要求A7所述的方法,其中,所述对当前实际与每种类型软件所支持的资源建立对应关系的软件进行检测包括:在每种类型软件所支持的资源中选取一种指定资源;对当前实际与每种类型软件的指定资源建立对应关系的软件进行检测。A9、根据权利要求A1所述的方法,其中,所述方法还包括:检测同一类型软件中除所述默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件;当存在开启了所述设置项的软件时,生成是否关闭所述软件的设置项的提示信息,并将该提示信息展示在用户界面上;当接收到通过所述用户界面返回的关闭指令时,关闭所述软件的设置项。A10、根据权利要求A9所述的方法,其中,所述检测同一类型软件中除所述默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件包括:对具有配置文件的软件,根据为该软件建立的配置文件库中的信息,查找软件的配置文件中所述设置项对应的信息项,根据查找到的信息项判断软件的所述设置项是否开启;对不具有配置文件的软件,调用设备中指定的API查找软件中所述设置项对应的信息项,根据查找到的信息项判断软件的所述设置项是否开启。A11、一种对设备使用的默认软件的设置装置,包括:检测单元,适于检测设备中所有已安装的预定类型的软件;接收单元,适于将所述检测单元检测出的软件展示在用户界面上,并接收通过该用户界面返回的选择命令;获知单元,适于根据所述接收单元接收到的选择命令获知选择的每种类型软件的默认软件;设置单元,适于建立所述获知单元所获知的默认软件所属类型的软件所支持的资源与所述默认软件的对应关系,以利用该对应关系设置该默认软件运行该资源。A12、根据权利要求A11所述的装置,其中,所述设置单元,适于对具有配置文件的软件,根据为该软件建立的配置文件库中记录的所述默认软件的配置项设置注册表中的对应项,以建立所述默认软件所属类型的软件所支持的资源与所述默认软件的对应关系;对不具有配置文件的软件,调用设备中指定的应用接口API,利用该指定API建立所述默认软件所属类型的软件所支持的资源与所述默认软件的对应关系。A13、根据权利要求A12所述的装置,其中,所述装置还包括建立单元,适于收集具有配置文件的软件的信息;根据收集到的信息生成软件的配置项,将该配置项记录在配置文件库中,其中,所述配置项至少包括:指示软件支持的文件类型和/或统一资源定位符URL类型的配置项;指示软件的安装路径的配置项;指示软件访问资源时使用的代码语句的配置项。A14、根据权利要求A11所述的装置,其中,所述检测单元,适于对具有配置文件的软件,为该软件建立配置文件库,根据配置文件库中的信息对所述设备进行检测,得到所述设备中具有配置文件的已安装的软件;对不具有配置文件的软件,调用设备中指定的API,利用该指定API枚举所述设备中已安装的软件,得到所述设备中不具有配置文件的已安装的软件。A15、根据权利要求A14所述的装置,其中,所述装置还包括修改判断单元,适于对具有配置文件的软件,为该软件生成软件ID,当该软件被选中为默认软件时,将选中的默认软件的软件ID记录在注册表中;则当再次启动对设备使用的默认软件的设置时,检测注册表中记录的软件ID与当前实际的默认软件的软件ID是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息;对不具有配置文件的软件,当再次启动对设备使用的默认软件的设置时,调用设备中指定的API,通过该指定API检测上一次使用的默认软件与当前实际的默认软件是否相同,若相同,确认默认软件未被修改,若不相同,确认默认软件被修改,在用户界面上展示提示默认软件被修改的信息。A16、根据权利要求A15所述的装置,其中,所述装置还包括恢复单元,适于若确认默认软件被修改,当接收到通过用户界面返回的默认软件恢复命令时,对具有配置文件的软件,利用注册表中记录的默认软件的软件ID和配置文件库中的信息修改当前实际的默认软件为注册表中记录的软件ID对应的软件;对不具有配置文件的软件,调用设备中指定API,将默认软件恢复为用户历史使用记录中的默认软件。A17、根据权利要求A15所述的装置,其中,所述恢复单元,适于对当前实际与每种类型软件所支持的资源建立对应关系的软件进行检测,得到该当前实际的默认软件的安装路径;将所述当前实际的默认软件的安装路径,与配置文件库中各软件的安装路径进行匹配,检测匹配出的软件的软件ID与注册表中记录的软件ID是否相同。A18、根据权利要求A17所述的装置,其中,所述恢复单元,适于在每种类型软件所支持的资源中选取一种指定资源;对当前实际与每种类型软件的指定资源建立对应关系的软件进行检测。A19、根据权利要求A11所述的装置,其中,所述装置还包括锁定单元,适于检测同一类型软件中除所述默认软件之外是否存在开启了用于建立资源与软件对应关系的设置项的软件;当存在开启了所述设置项的软件时,生成是否关闭所述软件的设置项的提示信息,并将该提示信息展示在用户界面上;当接收到通过所述用户界面返回的关闭指令时,关闭所述软件的设置项。A20、根据权利要求A19所述的装置,其中,所述锁定单元,适于对具有配置文件的软件,根据为该软件建立的配置文件库中的信息,查找软件的配置文件中所述设置项对应的信息项,根据查找到的信息项判断软件的所述设置项是否开启;对不具有配置文件的软件,调用设备中指定的API查找软件中所述设置项对应的信息项,根据查找到的信息项判断软件的所述设置项是否开启。The embodiment of the present invention discloses: A1. A method for setting default software used by a device, including: all installed predetermined types of software in the device; displaying the detected software on the user interface, and receiving the The selection command returned by the interface; according to the selection command, the default software of each type of software selected is known; the corresponding relationship between the resources supported by the type of software to which the default software belongs and the default software is established, so as to use the corresponding relationship to set The default software runs the resource. A2. The method according to claim A1, wherein said establishing the correspondence between the resources supported by the software of the type to which the default software belongs and the default software comprises: establishing a configuration for the software with a configuration file The file library, according to the configuration items of the default software recorded in the configuration file library, set the corresponding items in the registry, so as to establish the correspondence between the resources supported by the software of the type to which the default software belongs and the default software; The software with the configuration file calls the specified application interface API in the device, and uses the specified API to establish the correspondence between the resources supported by the software of the type to which the default software belongs and the default software. A3. The method according to claim A2, wherein said establishing a configuration file library for software with configuration files includes: collecting information about software with configuration files; generating software configuration items according to the collected information, and configuring the The item is recorded in the configuration file library, wherein the configuration item at least includes: a configuration item indicating the file type supported by the software and/or a URL type of the uniform resource locator; a configuration item indicating the installation path of the software; Configuration items for code statements used. A4. The method according to claim A1, wherein said detection of all installed predetermined types of software in the device comprises: for software with a configuration file, establishing a configuration file library for the software, and according to the information in the configuration file library Detecting the device to obtain installed software with a configuration file in the device; calling the specified API in the device for software without a configuration file, and using the specified API to enumerate the installed software in the device , to get the installed software on the device that does not have a configuration file. A5. The method according to claim A4, wherein the method further comprises: for the software with a configuration file, generating a software ID for the software, and when the software is selected as the default software, the selected default software The ID is recorded in the registry; when the default software used by the device is set again, check whether the software ID recorded in the registry is the same as the software ID of the current actual default software, and if they are the same, confirm that the default software has not been modified , if not the same, confirm that the default software has been modified, and display a message on the user interface indicating that the default software has been modified; for software that does not have a configuration file, when the default software setting for the device is started again, the specified in the device will be invoked. API, through the specified API to detect whether the default software used last time is the same as the current actual default software, if the same, confirm that the default software has not been modified, if not, confirm that the default software has been modified, and display the default software on the user interface Modified information. A6. The method according to claim A5, wherein the method further comprises: if it is confirmed that the default software has been modified, when the default software recovery command returned through the user interface is received, for the software with configuration files, use the The software ID of the recorded default software and the information in the configuration file library modify the current actual default software to the software corresponding to the software ID recorded in the registry; for software that does not have a configuration file, call the specified API in the device to restore the default software Use the default software in the user history. A7. The method according to claim A5, wherein said detecting whether the software ID recorded in the registry is the same as the software ID of the current actual default software includes: establishing a corresponding relationship between the current actual and the resources supported by each type of software The software is detected, and the installation path of the current actual default software is obtained; the installation path of the current actual default software is matched with the installation path of each software in the configuration file library, and the software ID of the matched software is detected and registered. Whether the software IDs recorded in the table are the same. A8. The method according to claim A7, wherein said detecting the current software that actually establishes a corresponding relationship with the resources supported by each type of software includes: selecting a designated resource from the resources supported by each type of software Resources: detect the current software that actually establishes a corresponding relationship with the specified resource of each type of software. A9. The method according to claim A1, wherein the method further comprises: detecting whether there is software in the same type of software other than the default software that has enabled the setting item for establishing the corresponding relationship between resources and software; When there is software with the setting item turned on, generate prompt information whether to close the setting item of the software, and display the prompt information on the user interface; when receiving a closing instruction returned through the user interface, close the The setting items of the software. A10. The method according to claim A9, wherein said detecting whether there is software with a setting item for establishing a corresponding relationship between resources and software other than the default software in the same type of software includes: software, according to the information in the configuration file library established for the software, search for the information item corresponding to the setting item in the configuration file of the software, and judge whether the setting item of the software is enabled according to the found information item; The software of the configuration file calls the API specified in the device to search for information items corresponding to the setting items in the software, and judges whether the setting items of the software are enabled according to the found information items. A11. A device for setting default software used by a device, comprising: a detection unit adapted to detect all installed predetermined types of software in the device; a receiving unit adapted to display the software detected by the detection unit to the user interface, and receive the selection command returned through the user interface; the learning unit is adapted to learn the default software of each type of software selected according to the selection command received by the receiving unit; the setting unit is adapted to establish the learning unit Knowing the corresponding relationship between the resources supported by the software of the type to which the default software belongs and the default software, so as to use the corresponding relationship to set the default software to run the resource. A12. The device according to claim A11, wherein the setting unit is adapted to set the configuration items in the registry according to the configuration items of the default software recorded in the configuration file library established for the software with configuration files. Corresponding items to establish the corresponding relationship between the resources supported by the type of software to which the default software belongs and the default software; for software that does not have a configuration file, call the specified application interface API in the device, and use the specified API to establish the corresponding relationship between the default software and the default software; The corresponding relationship between the resources supported by the software of the type to which the default software belongs and the default software. A13. The device according to claim A12, wherein the device further comprises an establishment unit adapted to collect information of software with a configuration file; generate a configuration item of the software according to the collected information, and record the configuration item in the configuration In the file library, wherein the configuration items at least include: a configuration item indicating the file type supported by the software and/or a URL type of a uniform resource locator; a configuration item indicating the installation path of the software; a code statement used when indicating the software to access resources configuration items. A14. The device according to claim A11, wherein the detection unit is adapted to establish a configuration file library for the software with a configuration file, detect the device according to the information in the configuration file library, and obtain The installed software with a configuration file in the device; for software without a configuration file, call the specified API in the device, use the specified API to enumerate the installed software in the device, and obtain the software that does not have a configuration file in the device. Profiles of installed software. A15. The device according to claim A14, wherein the device further comprises a modification judging unit adapted to generate a software ID for the software with a configuration file, and when the software is selected as the default software, the selected The software ID of the default software is recorded in the registry; when the default software setting for the device is started again, check whether the software ID recorded in the registry is the same as the actual software ID of the current default software, and if they are the same, confirm The default software has not been modified. If it is not the same, confirm that the default software has been modified, and display a message on the user interface indicating that the default software has been modified; for software that does not have a configuration file, when starting the default software settings for the device again, Call the specified API in the device, and use the specified API to detect whether the default software used last time is the same as the current actual default software. If they are the same, confirm that the default software has not been modified. If not, confirm that the default software has been modified. On the user interface A message indicating that the default software has been modified is displayed on the screen. A16. The device according to claim A15, wherein the device further comprises a restore unit, adapted to restore the default software with the configuration file when the default software restore command returned through the user interface is received if it is confirmed that the default software has been modified. , use the software ID of the default software recorded in the registry and the information in the configuration file library to modify the current actual default software to the software corresponding to the software ID recorded in the registry; for software that does not have a configuration file, call the specified API in the device , restore the default software to the default software in the user history. A17. The device according to claim A15, wherein the recovery unit is adapted to detect the current actual software corresponding to the resources supported by each type of software, and obtain the actual current installation path of the default software ; Match the installation path of the current actual default software with the installation path of each software in the configuration file library, and detect whether the software ID of the matched software is the same as the software ID recorded in the registry. A18. The device according to claim A17, wherein the recovery unit is adapted to select a specified resource from the resources supported by each type of software; establish a corresponding relationship between the current actual and the specified resource of each type of software software for detection. A19. The device according to claim A11, wherein the device further comprises a locking unit adapted to detect whether there is a setting item for establishing a corresponding relationship between resources and software that is enabled in the same type of software except the default software software; when there is software with the setting item enabled, generate a prompt message indicating whether to close the setting item of the software, and display the prompt message on the user interface; when receiving the closing message returned through the user interface When commanding, close the setting items of the software. A20. The device according to claim A19, wherein the locking unit is adapted to search for the setting items in the configuration file of the software according to the information in the configuration file library established for the software with the configuration file For the corresponding information item, judge whether the said setting item of the software is opened according to the found information item; for software that does not have a configuration file, call the API specified in the device to search for the information item corresponding to the said setting item in the software, according to the found The information item judges whether the setting item of the software is enabled.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310342016.6A CN103440144B (en) | 2013-08-07 | 2013-08-07 | A kind of method to set up to the default software that equipment uses and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310342016.6A CN103440144B (en) | 2013-08-07 | 2013-08-07 | A kind of method to set up to the default software that equipment uses and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103440144A CN103440144A (en) | 2013-12-11 |
CN103440144B true CN103440144B (en) | 2016-09-28 |
Family
ID=49693835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310342016.6A Active CN103440144B (en) | 2013-08-07 | 2013-08-07 | A kind of method to set up to the default software that equipment uses and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103440144B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033341B (en) * | 2015-03-16 | 2019-05-24 | 宏碁股份有限公司 | Electronic device and user interface operation method |
CN105574190B (en) * | 2015-12-24 | 2019-03-26 | 珠海豹趣科技有限公司 | A kind of Web access method and device |
CN105653641B (en) * | 2015-12-25 | 2019-04-12 | 珠海豹趣科技有限公司 | A kind of browser locking means and device |
CN106557688A (en) * | 2016-11-17 | 2017-04-05 | 广东欧珀移动通信有限公司 | Method and device for managing default applications |
CN106933626B (en) * | 2017-03-01 | 2020-09-25 | 腾讯科技(深圳)有限公司 | Application association method and device |
CN110019027B (en) | 2017-07-28 | 2022-10-04 | 华为终端有限公司 | Folder naming method and terminal |
CN109976824A (en) * | 2017-12-28 | 2019-07-05 | 珠海市君天电子科技有限公司 | A kind of application setting method and device |
CN109992321A (en) * | 2017-12-28 | 2019-07-09 | 珠海市君天电子科技有限公司 | A kind of application setting method and device |
CN110084486B (en) * | 2019-04-02 | 2024-05-28 | 深圳前海微众银行股份有限公司 | Resource management method and device |
CN110175052A (en) * | 2019-04-16 | 2019-08-27 | 努比亚技术有限公司 | A kind of method, apparatus and computer readable storage medium of file opening |
CN112584208B (en) * | 2020-09-19 | 2023-05-23 | 河北能瑞科技有限公司 | Video browsing editing method and system based on artificial intelligence |
CN114328409A (en) * | 2021-12-20 | 2022-04-12 | 珠海豹好玩科技有限公司 | A method, device and electronic device for setting a file type opening method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101789888A (en) * | 2010-01-12 | 2010-07-28 | 腾讯科技(深圳)有限公司 | Detection method and device for software installation |
CN102521032A (en) * | 2011-12-13 | 2012-06-27 | 北京风灵创景科技有限公司 | Setting method for optimal application programs and mobile terminal |
CN102937913A (en) * | 2012-10-12 | 2013-02-20 | 广东欧珀移动通信有限公司 | Method and device for managing default application program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8250518B2 (en) * | 2006-03-30 | 2012-08-21 | Microsoft Corporation | Per user file associations |
US7996778B2 (en) * | 2006-05-18 | 2011-08-09 | Dell Products L.P. | Central internet browser control for multiple browsers enabled system |
-
2013
- 2013-08-07 CN CN201310342016.6A patent/CN103440144B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101789888A (en) * | 2010-01-12 | 2010-07-28 | 腾讯科技(深圳)有限公司 | Detection method and device for software installation |
CN102521032A (en) * | 2011-12-13 | 2012-06-27 | 北京风灵创景科技有限公司 | Setting method for optimal application programs and mobile terminal |
CN102937913A (en) * | 2012-10-12 | 2013-02-20 | 广东欧珀移动通信有限公司 | Method and device for managing default application program |
Also Published As
Publication number | Publication date |
---|---|
CN103440144A (en) | 2013-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103440144B (en) | A kind of method to set up to the default software that equipment uses and device | |
US9438491B1 (en) | Service monitor for monitoring a network connection to track the performance of an application running on different mobile devices | |
CN103927198B (en) | A kind of software method for cleaning and device | |
US8990697B2 (en) | Associating file types with web-based applications for automatically launching the associated application | |
TW201120683A (en) | User interface systems and methods between a portable device and computer | |
CN103853658B (en) | The automated testing method and Android device of recording and playback are carried out in Android device | |
CN102314551B (en) | For transmitting the system and method for long-range context | |
CN103617057A (en) | Application program installation method and device | |
US9639434B2 (en) | Auto-didacted hierarchical failure recovery for remote access controllers | |
CN108829430A (en) | Java Web project update method and relevant apparatus based on Eclipse and Tomcat | |
CN104484223A (en) | Android system application closing method and android system application closing device | |
CN103605538B (en) | A kind of method and apparatus for installing software | |
CN106027597A (en) | Offline file transmission method, system, terminal device and server | |
WO2017206476A1 (en) | Method, device and apparatus for detecting cpu occupation | |
US9641913B2 (en) | Smart terminal information display method and smart terminal | |
TW200925972A (en) | Modifying hover help for a user interface | |
CN106201602B (en) | Label providing method, label obtaining method, server and electronic equipment | |
US10901984B2 (en) | Enhanced batch updates on records and related records system and method | |
CN110750460A (en) | Browser compatibility detection method, device, device and readable storage medium | |
US20160359932A1 (en) | Display device and method of controlling the same | |
CN106802846A (en) | A kind of remote test method, apparatus and system | |
CN106101378B (en) | An application anti-addiction method and device to a mobile terminal | |
CN104616682B (en) | Blu-ray player method of testing and smart machine, Blu-ray player | |
WO2014067368A1 (en) | Method, apparatus and device for obtaining resource preview image | |
WO2018227735A1 (en) | Pos terminal automatic testing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220714 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |