USB驱动程序预安装 [英] USB Driver pre-installation

查看:199
本文介绍了USB驱动程序预安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,



我正在编写一个与USB设备通信的软件。

USB驱动程序存储在软件中安装在安装路径的子目录中。该路径将添加到注册表中

 HKEY \ LocalMachine \Software \ Microoft \ Windows \ CurrentVersion \DevicePath 

例如。

%SystemRoot%\ inff; C:\Programs \ MySoftware \ UsbDriver 





什么有效:

1)插入设备

2)打开设备管理器

3)选择设备

4)选择更新驱动程序

5)让操作系统自动查找驱动程序路径



什么不起作用:

1)插入设备

2)不要打扰任何东西,驱动程序完全自动安装



驱动程序已签名并且因此安装在Windows 8.1中,但用户必须手动转到设备管理器。



什么阻止自动安装立即启动?





好​​消息,大家!

如果在更改注册表后重新启动目标计算机,则安装在Windows 8.1上有效已经制作好了。

然后,用户可以插入设备并顺利安装驱动程序。


硬币的另一面是Windows 7(x64专业版)。

即使重新启动注册表更改后,只需弹出错误工具提示一秒钟或二。没有安装驱动程序。

我知道提供驱动程序路径是有效的,因为我可以从设备管理器启动驱动程序安装,选择自动搜索驱动程序,它只使用一个消息框询问我是否信任生产者。



W7与W8的不同之处在于它没有安装在W8中运行良好的驱动程序吗?



(我尝试使用未签名的驱动程序包,使用SHA1和SHA256签名)

[/ Edit]

解决方案

尝试调用这样的东西:

RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.inf



查看此链接了解更多信息:

https://msdn.microsoft.com/en-us/library/windows/hardware/ff557251%28v=vs.85%29.aspx [ ^ ]



好运气!

Hi experts,

I'm writing a software that communicates with a USB device.
The USB driver is stored during software installation in a subdirectory of the installation path. That path is added to the registry in

HKEY\LocalMachine\Software\Microsoft\Windows\CurrentVersion\DevicePath

e.g.

%SystemRoot%\inf;C:\Programs\MySoftware\UsbDriver



What works:
1) Plugging in the device
2) opening Device Manager
3) selecting the device
4) selecting to update the driver
5) let OS find driver path automatically

What doesn't work:
1) Plug in the device
2) Don't be bothered with anything, driver installs fully automatically

The driver is signed and therefore installs in Windows 8.1, but user will have to manually go to Device Manager.

What's preventing the automatic installation to start right away?

[Edit]
Good news, everyone!
Installation works on Windows 8.1 if the target machine is rebooted after the changes to the registry have been made.
Then, user can plug in its device and the driver is installed smoothly.

On the other side of the coin, there's Windows 7 (x64 Professional).
It, even after rebooting with the registry changes, just pops an error tooltip for a second or two. Driver is not installed.
I know that providing the driver path works since I can start driver installation from Device Manager, select to search for the driver automatically and it works with just one message box asking if I trust the producer.

How's W7 different from W8 that it doesn't install drivers that do work perfectly well in W8?

(I tried with driver packages unsigned, signed with SHA1 and with SHA256)
[/Edit]

解决方案

Try calling something like this:
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.inf

Check this link for more info:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff557251%28v=vs.85%29.aspx[^]

Good luck!


这篇关于USB驱动程序预安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆