WO2013131332A1 - 终端设备的驱动安装方法及装置 - Google Patents

终端设备的驱动安装方法及装置 Download PDF

Info

Publication number
WO2013131332A1
WO2013131332A1 PCT/CN2012/076764 CN2012076764W WO2013131332A1 WO 2013131332 A1 WO2013131332 A1 WO 2013131332A1 CN 2012076764 W CN2012076764 W CN 2012076764W WO 2013131332 A1 WO2013131332 A1 WO 2013131332A1
Authority
WO
WIPO (PCT)
Prior art keywords
registry
key value
driver
driving mode
mode key
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.)
Ceased
Application number
PCT/CN2012/076764
Other languages
English (en)
French (fr)
Inventor
张可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to EP12870541.5A priority Critical patent/EP2811398A4/en
Priority to US14/382,047 priority patent/US9063812B2/en
Publication of WO2013131332A1 publication Critical patent/WO2013131332A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00—Arrangements for software engineering
    • G06F8/60—Software deployment
    • G06F8/61—Installation
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00—Arrangements for program control, e.g. control units
    • G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44—Arrangements for executing specific programs
    • G06F9/4401—Bootstrapping
    • G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers

Definitions

  • the present invention relates to the field of computers, and in particular, to a driving and mounting method and apparatus for a terminal device.
  • the relevant driver search is performed from the network side, and this process often takes a long time. If the relevant driver is not found on the network side, The search and loading of the driver will be performed locally. This will cause the user to wait for a long time to load the driver of the device and use the terminal device after inserting the terminal device, which reduces the user experience.
  • the embodiment of the invention provides a method and a device for driving and installing a terminal device, so as to solve the problem that the terminal device loading time is too long caused by searching for the driver of the terminal device that needs to be loaded from the network side in the prior art.
  • the embodiment of the invention provides a driving installation method for a terminal device, which includes:
  • the steps of setting the driver installer to search for the driver directly from the local machine include:
  • the step of obtaining, by using a registry key value obtaining function, the first registration table search matching driving mode key value and the second registry search matching driving mode key value in the driving query subkey includes:
  • the step of determining whether the first registry search matching driving mode key value and the second registry search matching driving mode key value are equal to 1 comprises:
  • the step of setting the first registry search matching driving mode key value and the second registry search matching driving mode key value to 1 by using a registry key value setting function includes:
  • the embodiment of the invention further provides a driving installation device for the terminal device, including: Calling a module, which is set to call the driver installer;
  • a setting module which is set to set the driver installer to search for the driver directly from the local machine; a search module set to search for the driver from the local machine through the driver installer; and a setup module set to install the searched driver program.
  • the setting module is set to:
  • the setting module is configured to obtain, by using a registry key value obtaining function, a first registry search matching driving mode key value and a second registry search matching driving mode key value in the driving query subkey by using a registry key value obtaining function :
  • the first registry search matching driving mode key value and the second registry search matching driving mode key value are respectively stored in the second variable and the third variable.
  • the setting module is configured to determine whether the first registry search matching driving mode key value and the second registry search matching driving mode key value are equal to 1 in a manner of: determining the first Whether the variable and the key value in the second variable are equal to one.
  • the setting module is configured to use the registry key value setting function to match the first registry search matching driving mode key value and the second registry search matching driving manner by using a registry key value setting function
  • the key value is set to 1 :
  • FIG. 1 is a flowchart of a method for driving installation of a terminal device according to an embodiment of the present invention
  • FIG. 3 is a flowchart of adding a system search function of a shutdown system in a driver installation program according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a driving installation device of a terminal device according to an embodiment of the present invention.
  • the embodiment of the present invention provides a driving installation method and device for the terminal device.
  • the embodiments of the present invention are described in detail. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
  • FIG. 1 is a flowchart of a driving installation method of a terminal device according to an embodiment of the present invention.
  • the driver installation method includes the following processing: Step 101, calling the driver installer, and setting the driver installer to search for the driver directly from the machine;
  • step 101 setting the driver installer to directly search for the driver from the local machine specifically includes the following processing:
  • Step 1 Use the registry open function (RegOpenKeyEx) to open the corresponding driver query subkey in the registry.
  • the corresponding driver query subkey is: [HKEY_LOCAL_MACHINE ⁇ SOFTWARE ⁇ Policies ⁇ Microsoft ⁇ windows ⁇ DriverSe arching] subkey;
  • Step 2 obtaining a key value of the first registry search matching driving mode ( DontSearchWindowsUpdate ) in the subkey and a key value of the second registry search matching driving mode ( DontPromptForWindowsUpdate ) by using a registry key value obtaining function (RegQuery ValueEx );
  • step 2 the following specifically includes the following processing:
  • the first registry search matching driver mode key value and the second registry search matching driver mode key value are respectively stored in a second variable (for example, a DontSearch variable) and a third variable (for example, a DontPrompt variable).
  • a second variable for example, a DontSearch variable
  • a third variable for example, a DontPrompt variable
  • Step 3 Determine whether the first registry search matching driving mode key value and the second registry search matching driving mode key value are equal to 1. If the determination is yes, use the registry closing function (RegCloseKey) to close the registry, if it is determined If not, use the registry key value setting function ( RegSetValueEx ) to set the first registry search matching driver mode key value and the second registry search matching driver mode key value to 1, and then use the registry shutdown function to close the registry. .
  • step 3 determining whether the first registry search matching driving mode key value and the second registry search matching driving mode key value are equal to 1 specifically includes the following processing: determining the second variable (eg, the DontSearch variable) and the third variable Whether the key values in (for example, the DontPrompt variable) are equal to 1.
  • using the registry key value setting function to set the first registry search matching driver mode key value and the second registry search matching driver mode key value to 1 specifically includes the following processing: using the registry key value setting function Calling the first variable (for example, the key variable) sets the key value in the second variable (for example, the DontSearch variable) and the third variable (for example, the DontPrompt variable) to 1.
  • Step 102 Search for the driver from the local machine by the driver installer, and install the searched driver.
  • the driver installer code when calling the device driver installer, in the driver installer code, use the registry open function to open the driver query subkey in the registry, and obtain the first registration through the registry key value acquisition function.
  • the table search matches the driving mode, and the second registry search matches the value of the driving mode. If the two key values are not equal to 1, the first registry search is used to match the driving mode and the second registry search is performed using the registry key setting function. Matching drive mode two key values are set to
  • the technical solution of the embodiment of the present invention overcomes the problem that the existing terminal device takes a long time to perform network drive search in the system loading and driving process, and directly performs the local drive search. Because each manufacturer provides its own loading terminal device driver, after the installation completion program is completed, the driver must be stored in the local machine without the system performing network search. Thus, for the user, when the device is inserted, the driver can be quickly found. And using the device, thereby improving the user's use of the physical examination, while meeting the operator's demand for time.
  • Step 201 Before the terminal device is used, the system needs to call the corresponding driver.
  • the driver needs to call the special installation program when the driver is installed.
  • the system calls the corresponding driver installation program.
  • Step 202 modify the driver installation program, and add a system network search function in the driver installation program
  • Step 203 the driver installation program is installed
  • Step 204 when the driver installer performs a driver installation, only searches for the local driver, and Complete the installation of the driver.
  • the system can directly drive the search from the local when loading the driver, which greatly improves the speed of loading the driver.
  • FIG. 3 is a flowchart of adding a system search function of a shutdown system in a driver installation program according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included:
  • Step 301 When the driver installer is invoked, the driver open subkey is opened by using a registry open function, and the open handle HKEY is stored in the key variable for later operations.
  • Step 302 calling a registry key value obtaining function, and using a handle stored in the key variable to obtain a key value of the first registry search matching driving mode and the second registry search matching driving mode, and respectively stored in the second variable and Save it in the third variable.
  • Step 303 Determine the second variable and the third variable to determine whether the values of the two variables are all 1. If the values of the two variables are all 1, the driver is installed. If not, step 304 is performed.
  • Step 304 Call the registry key value acquisition function, and use the key variable to set the second variable and the third variable to a value of 1, thereby increasing the speed at which the system loads the driver.
  • the registry when the driver is installed, the registry is operated, and the system search mode is changed to search the driver from the local machine, which solves the need in the prior art to search from the network side for loading.
  • the problem that the terminal device is loaded for too long caused by the driving of the terminal device can improve the driving speed of the system installation terminal device, thereby improving the user experience.
  • FIG. 4 is a schematic structural diagram of a driving installation device for a terminal device according to an embodiment of the present invention.
  • the driving installation device includes: a calling module 40, a setting module 42, a searching module 44, and a mounting module 46.
  • the respective modules of the embodiments of the present invention are described in detail below.
  • Calling module 40 used to call the driver installer
  • the setting module 42 is configured to set the driver installation program to directly search for the driver from the local machine; the setting module 42 specifically includes: a sub-key opening module, a key value obtaining module, and a registry processing module; the sub-key opening module uses a registry opening function (RegOpenKeyEx) open the corresponding driver in the registry Dynamic query subkey, the driver query subkey is:
  • key value acquisition module obtains the first registry search matching drive mode key value and the second registry search matching driver in the subkey through the registry key value acquisition function
  • the mode key module determines whether the first registry search matching driver mode key value and the second registry search matching driver mode key value are equal to 1, if the determination is yes, the registry closing function is used to close the registry. If the judgment is no, the first registry search matching driving mode key value and the second registry search matching driving mode key value are all set to 1 by using the registry key value setting function, and then the registry is closed using the registry closing function.
  • the key value obtaining module may store the handle HKEY of the subkey in the first variable, for example, a key variable; the registry key value obtaining function may be obtained through a registry key value, and the function is obtained from the registry key value.
  • the first registry search may be matched with the driving mode key value and the second
  • the registry search match driver mode key values are stored in a second variable (for example, a DontSearch variable) and a third variable (for example, a DontPrompt variable).
  • the registry processing module can determine the first variable (eg, the DontSearch variable) and the third variable (eg, , the key value in the DontPrompt variable) is equal to 1. And, when the first registry search matching driving mode key value and the second registry search matching driving mode key value are both set to 1 by using the registry key value setting function, the setting module 42 can use the registry key value setting function call.
  • the first variable (for example, the key variable) sets the key value in the second variable (for example, the DontSearch variable) and the third variable (for example, the DontPrompt variable) to 1.
  • the search module 44 is used to search for the driver from the local machine through the driver installer; the installation module 46 is used to install the searched driver.
  • the setting module 42 uses the registry open function to open the driver query subkey in the registry, through the registry.
  • the key value acquisition function obtains the key value.
  • the first registry search matches the driving mode, and the second registry search matches the value of the driving mode. If the two key values are not equal to 1, the registry key value acquisition function is used to apply the first registry. Search for matching drive method, second registry search Match the driver mode, the two key values are set to 1, and finally use the registry shutdown function to close.
  • the search module 44 can directly search from the local machine, thereby achieving the effect of quick installation.
  • the technical solution of the embodiment of the present invention overcomes the problem that the existing terminal device takes a long time to perform network drive search in the system loading and driving process, and directly performs the local drive search. Because each manufacturer provides its own loading terminal device driver, after the installation completion program is completed, the driver must be stored in the local machine without the system performing network search. Thus, for the user, when the device is inserted, the driver can be quickly found. And using the device, thereby improving the user's use of the physical examination, while meeting the operator's demand for time.
  • the terminal device uses the above-mentioned driver installation device to perform the driver installation method, and includes the following processing: Step 501: Before the terminal device is used, the system needs to call the corresponding driver, and the driver needs to call a special installation program when installing the driver, when using the device for the first time When the device is in use, the calling module 40 calls the corresponding driver installation program;
  • Step 502 the setting module 42 modifies the driver installation program, and adds a network search function of the shutdown system in the driver installation program;
  • Step 503 the driver installation program is installed
  • Step 504 when the driver installer performs the driver installation, the search module 44 only searches for the local driver, and the installation module 46 completes the driver installation.
  • the system can directly drive the search from the local when loading the driver, which greatly improves the speed of loading the driver.
  • the system installation search function is added in the driver installation program by using the above-mentioned driver installation device, including the following processing:
  • Step 601 When the calling module 40 drives the installer, the setting module 42 uses the registry open function to open the driver query subkey, and stores the opened handle HKEY in the key variable for later operations.
  • Step 602 the setting module 42 calls the function registry key value obtaining function, and uses the handle stored in the key variable to obtain the key values of the first registry search matching driving mode and the second registry search matching driving mode, and respectively stored in The second variable and the third variable are saved.
  • Step 603 The setting module 42 determines the second variable and the third variable to determine whether two The value of the variable is 1 . If the values of both variables are 1, the driver is installed. If not, step 604 is executed.
  • Step 604 the setting module 42 calls the registry key value obtaining function, and uses the key variable to set the variable second variable and the third variable to have a value of 1, thereby increasing the speed at which the system loads the driver.
  • the registry when the driver is installed, the registry is operated, and the system search mode is changed to search the driver from the local machine, which solves the need in the prior art to search from the network side for loading.
  • the problem that the terminal device is loaded for too long caused by the driving of the terminal device can improve the driving speed of the system installation terminal device, thereby improving the user experience.
  • each module/unit in the foregoing embodiment may be implemented in the form of hardware, or may use software functions.
  • the form of the module is implemented. The invention is not limited to any specific form of combination of hardware and software.
  • the registry is operated, and the way of searching the system is changed to search the driver from the local machine, which solves the problem that the prior art needs to search for the terminal device to be loaded from the network side.
  • the problem that the terminal device is loaded for too long can improve the driving speed of the system installation terminal device, thereby improving the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

一种终端设备的驱动安装方法及装置。该方法包括:调用驱动安装程序,并将驱动安装程序设置为直接从本机搜索驱动程序;通过驱动安装程序从本机进行驱动程序的搜索,并安装搜索到的驱动程序。该方法和装置能够提高系统安装终端设备驱动速度,从而提高了用户体验。

Description

终端设备的驱动安装方法及装置
技术领域
本发明涉及计算机领域, 特别是涉及一种终端设备的驱动安装方法及装 置。
背景技术
目前, 基本上所有的设备的提供厂商, 都会在终端设备中提供该设备的 驱动, 用来在个人计算机(Personal Computer, 简称为 PC ) 电脑上设置该设 备的端口。 在系统进行设备驱动加载的过程中, 尤其是在 Vista和 Win7系统 中, 都是先从网络侧进行相关驱动的搜索, 而这个过程往往需要很长的时间, 如果在网络侧没有找到相关驱动, 才会在本地进行驱动的搜索并进行加载, 这样就导致用户在插入终端设备以后, 需要等待很长时间才可以正常加载设 备的驱动并使用该终端设备, 降低了用户的使用体验。
也就是说, 系统在加载设备驱动时, 根据系统默认的设定, 一般是需要 先从网络搜索驱动, 然后在本地进行驱动的搜索, 这种方法导致在系统加载 终端设备的过程中, 花费很长时间, 而绝大多数的终端设备, 都会提供自己 的驱动, 用于系统加载终端设备, 完全没有必要进行网络搜索, 从而浪费很 多时间用于驱动的搜索。 发明内容
本发明实施例提供一种终端设备的驱动安装方法及装置, 以解决现有技 术中需要首选从网络侧搜索需要加载的终端设备的驱动而导致的终端设备加 载时间过长的问题。
本发明实施例提供一种终端设备的驱动安装方法, 包括:
调用驱动安装程序,并将驱动安装程序设置为直接从本机搜索驱动程序; 通过驱动安装程序从本机进行驱动程序的搜索, 并安装搜索到的驱动程 序。 可选的, 将所述驱动安装程序设置为直接从本机搜索驱动程序的步骤包 括:
使用注册表打开函数打开注册表中的驱动查询子键;
通过注册表键值获取函数获取所述驱动查询子键中第一注册表搜索匹配 驱动方式键值和第二注册表搜索匹配驱动方式键值;
判断所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配 驱动方式键值是否都等于 1 , 如果判断为是, 则使用注册表关闭函数关闭注 册表, 如果判断为否, 则使用注册表键值设置函数将所述第一注册表搜索匹 配驱动方式键值和所述第二注册表搜索匹配驱动方式键值都设置为 1 , 再使 用所述注册表关闭函数关闭注册表。
可选的, 所述通过注册表键值获取函数获取所述驱动查询子键中第一注 册表搜索匹配驱动方式键值和第二注册表搜索匹配驱动方式键值的步骤包 括:
将所述驱动查询子键的句柄存储在第一变量中;
通过所述注册表键值获取函数从所述第一变量中获取所述句柄, 根据所 述句柄从所述驱动查询子键中获取所述第一注册表搜索匹配驱动方式键值和 所述第二注册表搜索匹配驱动方式键值; 将所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配驱 动方式键值分别存储于第二变量和第三变量中。
可选的, 判断所述第一注册表搜索匹配驱动方式键值和所述第二注册表 搜索匹配驱动方式键值是否都等于 1的步骤包括:
判断所述第一变量和所述第二变量中的键值是否都等于 1。
可选的, 使用注册表键值设置函数将所述第一注册表搜索匹配驱动方式 键值和所述第二注册表搜索匹配驱动方式键值都设置为 1的步骤包括:
使用所述注册表键值设置函数调用所述第一变量将所述第二变量和所述 第三变量中的键值设置为 1。
本发明实施例还提供了一种终端设备的驱动安装装置, 包括: 调用模块, 其设置为调用驱动安装程序;
设置模块, 其设置为将驱动安装程序设置为直接从本机搜索驱动程序; 搜索模块, 其设置为通过驱动安装程序从本机进行驱动程序的搜索; 安装模块, 其设置为安装搜索到的驱动程序。
可选的, 所述设置模块是设置为:
使用注册表打开函数打开注册表中的驱动查询子键;
通过注册表键值获取函数获取所述驱动查询子键中第一注册表搜索匹配 驱动方式键值和第二注册表搜索匹配驱动方式键值;
判断所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配 驱动方式键值是否都等于 1 , 如果判断为是, 则使用注册表关闭函数关闭注 册表, 如果判断为否, 则使用注册表键值设置函数将所述第一注册表搜索匹 配驱动方式键值和所述第二注册表搜索匹配驱动方式键值都设置为 1 , 再使 用所述注册表关闭函数关闭注册表。
可选的, 所述设置模块是设置为以如下方式通过注册表键值获取函数获 取所述驱动查询子键中第一注册表搜索匹配驱动方式键值和第二注册表搜索 匹配驱动方式键值:
将所述驱动查询子键的句柄存储在第一变量中;
通过所述注册表键值获取函数从所述第一变量中获取所述句柄, 根据所 述句柄从所述驱动查询子键中获取所述第一注册表搜索匹配驱动方式键值和 所述第二注册表搜索匹配驱动方式键值;
将所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配驱 动方式键值分别存储于第二变量和第三变量中。
可选的, 所述设置模块是设置为以如下方式判断所述第一注册表搜索匹 配驱动方式键值和所述第二注册表搜索匹配驱动方式键值是否都等于 1 : 判断所述第一变量和所述第二变量中的键值是否都等于 1。
可选的, 所述设置模块是设置为以如下方式使用注册表键值设置函数将 所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配驱动方式 键值都设置为 1 :
使用所述注册表键值设置函数调用所述第一变量将所述第二变量和所述 第三变量中的键值设置为 1。
本发明实施例有益效果如下:
通过在进行安装驱动时, 操作注册表, 改变系统搜索的方式为从本机进 行驱动程序的搜索, 解决了现有技术中需要首选从网络侧搜索需要加载的终 端设备的驱动而导致的终端设备加载时间过长的问题, 能够提高系统安装终 端设备驱动速度, 从而提高了用户体验。 附图概述
图 1是本发明实施例的终端设备的驱动安装方法的流程图;
图 3是本发明实施例的在驱动安装程序中添加关闭系统网络搜索功能的 流程图;
图 4是本发明实施例的终端设备的驱动安装装置的结构示意图。
本发明的较佳实施方式
为了解决现有技术中需要首选从网络侧搜索需要加载的终端设备的驱动 而导致的终端设备加载时间过长的问题, 本发明实施例提供了一种终端设备 的驱动安装方法及装置, 以下结合附图, 对本发明实施例进行详细说明。 需 要说明的是, 在不冲突的情况下, 本申请中的实施例及实施例中的特征可以 相互任意组合。
方法实施例
根据本发明的实施例, 提供了一种终端设备的驱动安装方法, 图 1是本 发明实施例的终端设备的驱动安装方法的流程图, 如图 1所示, 根据本发明 实施例的终端设备的驱动安装方法包括如下处理: 步骤 101 , 调用驱动安装程序, 并将驱动安装程序设置为直接从本机搜 索驱动程序;
具体地, 在步骤 101 中, 将驱动安装程序设置为直接从本机搜索驱动程 序具体包括如下处理:
步骤 1、 使用注册表打开函数( RegOpenKeyEx )打开注册表中相应的驱 动 查 询 子 键 , 该 相 应 的 驱 动 查 询 子 键 为 : [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\windows\DriverSe arching]子键;
步骤 2、 通过注册表键值获取函数( RegQuery ValueEx )获取子键中第一 注册表搜索匹配驱动方式( DontSearchWindowsUpdate )的键值和第二注册表 搜索匹配驱动方式( DontPromptForWindowsUpdate ) 的键值;
在步骤 2中, 具体包括如下处理:
1、 将子键的句柄 HKEY存储在第一变量中, 例如, key变量;
2、通过注册表键值获取函数从第一变量中获取句柄, 根据句柄从子键中 获取第一注册表搜索匹配驱动方式键值和第二注册表搜索匹配驱动方式键 值;
3、将第一注册表搜索匹配驱动方式键值和第二注册表搜索匹配驱动方式 键值分别存储于第二变量 (例如, DontSearch 变量) 和第三变量 (例如, DontPrompt变量) 中。
步骤 3、 判断第一注册表搜索匹配驱动方式键值和第二注册表搜索匹配 驱动方式键值是否都等于 1 , 如果判断为是, 则使用注册表关闭函数 ( RegCloseKey ) 关闭注册表, 如果判断为否, 则使用注册表键值设置函数 ( RegSetValueEx )将第一注册表搜索匹配驱动方式键值和第二注册表搜索匹 配驱动方式键值都设置为 1 , 再使用注册表关闭函数关闭注册表。
在步骤 3中, 判断第一注册表搜索匹配驱动方式键值和第二注册表搜索 匹配驱动方式键值是否都等于 1具体包括如下处理: 判断第二变量(例如, DontSearch变量)和第三变量(例如, DontPrompt变量) 中的键值是否都等 于 1。 在步骤 3中, 使用注册表键值设置函数将第一注册表搜索匹配驱动方式 键值和第二注册表搜索匹配驱动方式键值都设置为 1具体包括如下处理: 使 用注册表键值设置函数调用第一变量(例如, key变量)将第二变量(例如, DontSearch变量)和第三变量(例如, DontPrompt变量) 中的键值设置为 1。
步骤 102 , 通过驱动安装程序从本机进行驱动程序的搜索, 并安装搜索 到的驱动程序。
也就是说, 在实际应用中, 当调用设备驱动安装程序时, 在驱动安装程 序代码里面, 使用注册表打开函数打开注册表中的驱动查询子键, 通过注册 表键值获取函数获取第一注册表搜索匹配驱动方式、 第二注册表搜索匹配驱 动方式的值, 如果这两个键值不等于 1 , 则使用注册表键值设置函数把第一 注册表搜索匹配驱动方式、 第二注册表搜索匹配驱动方式两个键值设置成为
1 , 最后使用注册表关闭函数关闭即可。 这样系统调用搜索驱动程序时, 可以 直接从本机进行搜索, 从而实现快速安装的效果。 从上述处理可以看出, 本发明实施例的技术方案克服了现有终端设备在 系统加载驱动过程中需要花费较长时间进行网络驱动搜索的问题, 而是直接 进行本机驱动的搜索。 因为各个厂商都是自己提供加载终端设备驱动, 在安 装完成程序完成以后, 驱动必定在本机存放, 而无需系统进行网络搜索, 这 样对于用户来说, 当插入设备以后, 可以很快的找到驱动, 并且使用设备, 从而提高了用户的使用体检, 同时满足了运营商对于时间上的需求。
图 2所示, 包括如下处理:
步骤 201 , 在终端设备使用以前, 系统需要调用相应的驱动程序, 安装 驱动程序需要系统调用专门的安装程序, 当第一次使用某种设备的时候, 系 统调用相应的驱动安装程序;
步骤 202 , 修改驱动安装程序, 在驱动安装程序里面添加关闭系统网络 搜索功能;
步骤 203 , 驱动安装程序安装完成;
步骤 204 , 驱动安装程序在进行驱动安装时, 仅搜索本地驱动程序, 并 完成该驱动程序的安装。
通过修改系统搜索网络驱动的功能, 实现系统在加载驱动的时候, 直接 从本地进行驱动搜索, 大大提高了加载驱动的速度。
图 3是本发明实施例的在驱动安装程序中添加关闭系统网络搜索功能的 流程图, 如图 3所示, 包括如下处理:
步骤 301 , 在调用驱动安装程序时, 使用注册表打开函数打开驱动查询 子键, 并且把打开的句柄 HKEY存放在 key变量中, 用于后面的操作。
步骤 302,调用注册表键值获取函数,并且使用保存在 key变量中的句柄 获取第一注册表搜索匹配驱动方式和第二注册表搜索匹配驱动方式 的键值, 并且分别存放于第二变量和第三变量中保存起来。
步骤 303 , 对第二变量和第三变量进行判断, 确定是否两个变量的值都 是 1 , 如果两个变量的值都是 1 , 则进行驱动程序的安装, 如果不是, 则执行 步骤 304。
步骤 304,调用注册表键值获取函数,并且使用 key变量去设置第二变量 和第三变量的值为 1 , 从而达到提高系统加载驱动程序的速度。
综上所述, 本发明实施例通过在进行安装驱动时, 操作注册表, 改变系 统搜索的方式为从本机进行驱动程序的搜索, 解决了现有技术中需要首选从 网络侧搜索需要加载的终端设备的驱动而导致的终端设备加载时间过长的问 题, 能够提高系统安装终端设备驱动速度, 从而提高了用户体验。
装置实施例
本发明的实施例提供了一种终端设备的驱动安装装置, 图 4是本发明实 施例的终端设备的驱动安装装置的结构示意图, 如图 4所示, 才艮据本发明实 施例的终端设备的驱动安装装置包括: 调用模块 40、 设置模块 42、 搜索模块 44、 以及安装模块 46, 以下对本发明实施例的各个模块进行详细的说明。
调用模块 40, 用于调用驱动安装程序;
设置模块 42, 用于将驱动安装程序设置为直接从本机搜索驱动程序; 设置模块 42具体包括:子键打开模块、键值获取模块和注册表处理模块; 子键打开模块使用注册表打开函数 ( RegOpenKeyEx )打开注册表中相应的驱 动 查 询 子 键 , 该 驱 动 查 询 子 键 为 :
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\windows\DriverSe arching]子键; 键值获取模块通过注册表键值获取函数获取子键中第一注册表 搜索匹配驱动方式键值和第二注册表搜索匹配驱动方式键值; 注册表处理模 块判断第一注册表搜索匹配驱动方式键值和第二注册表搜索匹配驱动方式键 值是否都等于 1 , 如果判断为是, 则使用注册表关闭函数关闭注册表, 如果 判断为否, 则使用注册表键值设置函数将第一注册表搜索匹配驱动方式键值 和第二注册表搜索匹配驱动方式键值都设置为 1 , 再使用注册表关闭函数关 闭注册表。
优选地, 键值获取模块可以将子键的句柄 HKEY存储在第一变量中, 例 如, key变量; 可以通过注册表键值获取注册表键值获取函数, 并通过注册表 键值获取函数从第一变量中获取句柄, 根据句柄从子键中获取第一注册表搜 索匹配驱动方式键值和第二注册表搜索匹配驱动方式键值; 可以将第一注册 表搜索匹配驱动方式键值和第二注册表搜索匹配驱动方式键值分别存储于第 二变量(例如, DontSearch变量)和第三变量(例如, DontPrompt变量) 中。
在判断第一注册表搜索匹配驱动方式键值和第二注册表搜索匹配驱动方 式键值是否都等于 1是,注册表处理模块可以判断第一变量(例如, DontSearch 变量)和第三变量(例如, DontPrompt变量) 中的键值是否都等于 1。 并且, 在使用注册表键值设置函数将第一注册表搜索匹配驱动方式键值和第二注册 表搜索匹配驱动方式键值都设置为 1时,设置模块 42可以使用注册表键值设 置函数调用第一变量(例如, key变量 )将第二变量(例如, DontSearch变量 ) 和第三变量(例如, DontPrompt变量) 中的键值设置为 1。
搜索模块 44, 用于通过驱动安装程序从本机进行驱动程序的搜索; 安装模块 46, 用于安装搜索到的驱动程序。
也就是说, 在实际应用中, 当调用模块 40调用设备驱动安装程序时, 在 驱动安装程序代码里面,设置模块 42使用注册表打开函数打开注册表中的驱 动查询子键子键, 通过注册表键值获取函数获取键值第一注册表搜索匹配驱 动方式、 第二注册表搜索匹配驱动方式的值, 如果这两个键值不等于 1 , 则 使用注册表键值获取函数把第一注册表搜索匹配驱动方式、 第二注册表搜索 匹配驱动方式两个键值设置成为 1 , 最后使用注册表关闭函数关闭即可。 这 样搜索模块 44可以直接从本机进行搜索, 从而实现快速安装的效果。
从上述处理可以看出, 本发明实施例的技术方案克服了现有终端设备在 系统加载驱动过程中需要花费较长时间进行网络驱动搜索的问题, 而是直接 进行本机驱动的搜索。 因为各个厂商都是自己提供加载终端设备驱动, 在安 装完成程序完成以后, 驱动必定在本机存放, 而无需系统进行网络搜索, 这 样对于用户来说, 当插入设备以后, 可以很快的找到驱动, 并且使用设备, 从而提高了用户的使用体检, 同时满足了运营商对于时间上的需求。
终端设备利用上述驱动安装装置进行驱动安装方法, 包括如下处理: 步骤 501 , 在终端设备使用以前, 系统需要调用相应的驱动程序, 安装 驱动程序需要调用专门的安装程序, 当第一次使用某种设备的时候, 调用模 块 40调用相应的驱动安装程序;
步骤 502, 设置模块 42修改驱动安装程序, 在驱动安装程序里面添加关 闭系统网络搜索功能;
步骤 503 , 驱动安装程序安装完成;
步骤 504, 驱动安装程序在进行驱动安装时, 搜索模块 44仅搜索本地驱 动程序, 安装模块 46完成该驱动程序的安装。
通过修改系统搜索网络驱动的功能, 实现系统在加载驱动的时候, 直接 从本地进行驱动搜索, 大大提高了加载驱动的速度。
利用上述驱动安装装置在驱动安装程序中添加关闭系统网络搜索功能, 包括如下处理:
步骤 601 , 在调用模块 40驱动安装程序时, 设置模块 42使用注册表打 开函数打开驱动查询子键, 并且把打开的句柄 HKEY存放在 key变量中, 用 于后面的操作。
步骤 602, 设置模块 42调用函数注册表键值获取函数, 并且使用保存在 key 变量中的句柄获取第一注册表搜索匹配驱动方式和第二注册表搜索匹配 驱动方式的键值, 并且分别存放于第二变量和第三变量中保存起来。
步骤 603 , 设置模块 42对第二变量和第三变量进行判断, 确定是否两个 变量的值都是 1 , 如果两个变量的值都是 1 , 则进行驱动程序的安装, 如果不 是, 则执行步骤 604。
步骤 604, 设置模块 42调用注册表键值获取函数, 并且使用 key变量去 设置变量第二变量和第三变量的值为 1 , 从而达到提高系统加载驱动程序的 速度。
综上所述, 本发明实施例通过在进行安装驱动时, 操作注册表, 改变系 统搜索的方式为从本机进行驱动程序的搜索, 解决了现有技术中需要首选从 网络侧搜索需要加载的终端设备的驱动而导致的终端设备加载时间过长的问 题, 能够提高系统安装终端设备驱动速度, 从而提高了用户体验。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现, 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。
需要说明的是, 本发明还可有其他多种实施例, 在不背离本发明精神及 和变形, 但这些相应的改变和变形都应属于本发明所附的权利要求的保护范 围。
工业实用性
上述实施例在进行安装驱动时, 操作注册表, 改变系统搜索的方式为从 本机进行驱动程序的搜索, 解决了现有技术中需要首选从网络侧搜索需要加 载的终端设备的驱动而导致的终端设备加载时间过长的问题, 能够提高系统 安装终端设备驱动速度, 从而提高了用户体验。

Claims

权 利 要 求 书
1、 一种终端设备的驱动安装方法, 其包括:
调用驱动安装程序, 并将所述驱动安装程序设置为直接从本机搜索驱动 程序; 以及
通过所述驱动安装程序从本机进行驱动程序的搜索, 并安装搜索到的驱 动程序。
2、 如权利要求 1所述的方法, 其中, 将所述驱动安装程序设置为直接从 本机搜索驱动程序的步骤包括:
使用注册表打开函数打开注册表中的驱动查询子键;
通过注册表键值获取函数获取所述驱动查询子键中第一注册表搜索匹配 驱动方式键值和第二注册表搜索匹配驱动方式键值;
判断所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配 驱动方式键值是否都等于 1 , 如果判断为是, 则使用注册表关闭函数关闭注 册表, 如果判断为否, 则使用注册表键值设置函数将所述第一注册表搜索匹 配驱动方式键值和所述第二注册表搜索匹配驱动方式键值都设置为 1 , 再使 用所述注册表关闭函数关闭注册表。
3、 如权利要求 2所述的方法, 其中, 所述通过注册表键值获取函数获取 所述驱动查询子键中第一注册表搜索匹配驱动方式键值和第二注册表搜索匹 配驱动方式键值的步骤包括:
将所述驱动查询子键的句柄存储在第一变量中;
通过所述注册表键值获取函数从所述第一变量中获取所述句柄, 根据所 述句柄从所述驱动查询子键中获取所述第一注册表搜索匹配驱动方式键值和 所述第二注册表搜索匹配驱动方式键值;
将所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配驱 动方式键值分别存储于第二变量和第三变量中。
4、 如权利要求 3所述的方法, 其中, 判断所述第一注册表搜索匹配驱动 方式键值和所述第二注册表搜索匹配驱动方式键值是否都等于 1 的步骤包 括:
判断所述第一变量和所述第二变量中的键值是否都等于 1。
5、 如权利要求 4所述的方法, 其中, 使用注册表键值设置函数将所述第 一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配驱动方式键值都 设置为 1的步骤包括:
使用所述注册表键值设置函数调用所述第一变量将所述第二变量和所述 第三变量中的键值设置为 1。
6、 一种终端设备的驱动安装装置, 其包括:
调用模块, 其设置为: 调用驱动安装程序;
设置模块, 其设置为: 将所述驱动安装程序设置为直接从本机搜索驱动 程序;
搜索模块, 其设置为: 通过所述驱动安装程序从本机进行驱动程序的搜 索; 以及
安装模块, 其设置为: 安装搜索到的驱动程序。
7、 如权利要求 6所述的装置, 其中, 所述设置模块是设置为: 使用注册表打开函数打开注册表中的驱动查询子键;
通过注册表键值获取函数获取所述驱动查询子键中第一注册表搜索匹配 驱动方式键值和第二注册表搜索匹配驱动方式键值;
判断所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配 驱动方式键值是否都等于 1 , 如果判断为是, 则使用注册表关闭函数关闭注 册表, 如果判断为否, 则使用注册表键值设置函数将所述第一注册表搜索匹 配驱动方式键值和所述第二注册表搜索匹配驱动方式键值都设置为 1 , 再使 用所述注册表关闭函数关闭注册表。
8、 如权利要求 7所述的装置, 其中, 所述设置模块是设置为以如下方式 通过注册表键值获取函数获取所述驱动查询子键中第一注册表搜索匹配驱动 方式键值和第二注册表搜索匹配驱动方式键值:
将所述驱动查询子键的句柄存储在第一变量中;
通过所述注册表键值获取函数从所述第一变量中获取所述句柄, 根据所 述句柄从所述驱动查询子键中获取所述第一注册表搜索匹配驱动方式键值和 所述第二注册表搜索匹配驱动方式键值;
将所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配驱 动方式键值分别存储于第二变量和第三变量中。
9、 如权利要求 8所述的装置, 其中, 所述设置模块是设置为以如下方式 判断所述第一注册表搜索匹配驱动方式键值和所述第二注册表搜索匹配驱动 方式键值是否都等于 1 :
判断所述第一变量和所述第二变量中的键值是否都等于 1。
10、 如权利要求 9所述的装置, 其中, 所述设置模块是设置为以如下方 式使用注册表键值设置函数将所述第一注册表搜索匹配驱动方式键值和所述 第二注册表搜索匹配驱动方式键值都设置为 1 :
使用所述注册表键值设置函数调用所述第一变量将所述第二变量和所述 第三变量中的键值设置为 1。
PCT/CN2012/076764 2012-03-06 2012-06-12 终端设备的驱动安装方法及装置 Ceased WO2013131332A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12870541.5A EP2811398A4 (en) 2012-03-06 2012-06-12 METHOD AND APPARATUS FOR PILOT INSTALLATION FOR TERMINAL DEVICE
US14/382,047 US9063812B2 (en) 2012-03-06 2012-06-12 Driver installation method and apparatus for terminal device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210055691.6A CN102662685B (zh) 2012-03-06 2012-03-06 终端设备的驱动安装方法及装置
CN201210055691.6 2012-03-06

Publications (1)

Publication Number Publication Date
WO2013131332A1 true WO2013131332A1 (zh) 2013-09-12

Family

ID=46772186

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/076764 Ceased WO2013131332A1 (zh) 2012-03-06 2012-06-12 终端设备的驱动安装方法及装置

Country Status (4)

Country Link
US (1) US9063812B2 (zh)
EP (1) EP2811398A4 (zh)
CN (1) CN102662685B (zh)
WO (1) WO2013131332A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775833B (zh) * 2016-11-28 2021-03-16 青岛海信移动通信技术股份有限公司 设备驱动程序加载方法、终端及系统
CN110007973B (zh) * 2019-03-26 2021-07-16 联想(北京)有限公司 一种信息处理方法及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019896A1 (en) * 2002-07-23 2004-01-29 Wen-Chu Yu Method of automatic program installation for computer device
CN1527199A (zh) * 2003-03-07 2004-09-08 联想(北京)有限公司 驱动程序的安装方法
CN1920774A (zh) * 2005-08-25 2007-02-28 英业达股份有限公司 驱动程序自动安装方法以及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0164838B1 (ko) * 1996-04-19 1999-01-15 김광호 컴퓨터 주변기기의 드라이버 프로그램 설치방법
KR100584558B1 (ko) * 2003-08-16 2006-05-30 삼성전자주식회사 드라이버 자동 설치 방법 및 장치와 컴퓨터 프로그램을저장하는 컴퓨터로 읽을 수 있는 기록 매체
US7796588B2 (en) * 2004-07-27 2010-09-14 Canon Kabushiki Kaisha Information processing device, control method thereof, and program
US20090024757A1 (en) * 2004-07-30 2009-01-22 Proctor David W Automatic Protocol Determination For Portable Devices Supporting Multiple Protocols
US7536486B2 (en) * 2004-07-30 2009-05-19 Microsoft Corporation Automatic protocol determination for portable devices supporting multiple protocols
WO2006075397A1 (ja) * 2005-01-17 2006-07-20 Fujitsu Limited インストール方法、プログラム、周辺機器及びシステム
KR20080001959A (ko) * 2006-06-30 2008-01-04 삼성전자주식회사 드라이버와 네트워크 포트의 관리를 위한 사용자 단말장치및 그의 드라이버와 네트워크 포트의 관리 방법

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019896A1 (en) * 2002-07-23 2004-01-29 Wen-Chu Yu Method of automatic program installation for computer device
CN1527199A (zh) * 2003-03-07 2004-09-08 联想(北京)有限公司 驱动程序的安装方法
CN1920774A (zh) * 2005-08-25 2007-02-28 英业达股份有限公司 驱动程序自动安装方法以及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2811398A4 *

Also Published As

Publication number Publication date
EP2811398A1 (en) 2014-12-10
CN102662685A (zh) 2012-09-12
US20150026674A1 (en) 2015-01-22
EP2811398A4 (en) 2014-12-24
US9063812B2 (en) 2015-06-23
CN102662685B (zh) 2015-08-12

Similar Documents

Publication Publication Date Title
US12056519B2 (en) Virtual machine migration method and apparatus
EP3713198A1 (en) Request processing method, system on chip, and public cloud management component
EP3961381A1 (en) Method and apparatus for node selection
CN102567063B (zh) 一种自动安装软件的方法及装置
WO2011079794A1 (zh) 获取软件的方法及通信设备
RU2008138700A (ru) Создание шаблонов отключенных ресурсов
WO2017080487A1 (zh) 云桌面的调用方法及装置
US20180224820A1 (en) Method and apparatus for controlling and managing an industry process using an industry internet operating system
CN103778081A (zh) 一种usb外设设备接入控制方法
WO2014183556A1 (zh) 应用程序的处理方法和装置
WO2018040746A1 (zh) 一种驱动程序的安装方法及装置、电子设备
US8291406B2 (en) Data imaging system and methods
CN104717103B (zh) 一种对网络设备进行测试的方法和装置
WO2018068658A1 (zh) 一种设备的组件加载方法、装置以及物联网系统
CN104516749A (zh) 一种信息处理方法及电子设备
CN104076696B (zh) 控制终端及应用程序处理方法、家电设备及其控制系统
CN105787300A (zh) 一种控制软件使用的方法及系统
CN105740012A (zh) 一种更新电脑的bios程序的方法
CN102662685B (zh) 终端设备的驱动安装方法及装置
US20120144390A1 (en) Customized computer image preparation and deployment including virtual machine mode
CN103279569B (zh) 更改系统主题的方法及装置
US7930693B2 (en) Method and system for accessing and launching a java based applet as a locally installed application
CN104516752A (zh) 一种信息处理方法及电子设备
WO2018119795A1 (zh) 机器人指令的处理方法、装置及电子设备
US10089322B2 (en) Portable electronic device, method for sharing file between multiple operating systems, recording medium and computer program product

Legal Events

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

Ref document number: 12870541

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14382047

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2012870541

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE