无法在Windows 10专业版中安装自定义inf。 Windows使用OEM驱动程序覆盖它 [英] Trouble installing custom inf in Windows 10 Professional. Windows overrides it with OEM driver

查看:532
本文介绍了无法在Windows 10专业版中安装自定义inf。 Windows使用OEM驱动程序覆盖它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为自定义设备制作了一个签名的USB Serial inf文件,并创建了一个安装程序,该驱动程序已成功将驱动程序安装到Windows 7(32/64),Windows 8.1(64)而非Windows10。这适用于默认安装使用设备管理器和PNPUTIL直接在文件上单击鼠标右键(安装)。设备驱动程序已成功安装,但改用了OEM usbser驱动程序。单击更新驱动程序并在设备管理器中选择我的驱动程序后,Windows会提示我已为您的设备安装了最佳驱动程序软件。如果我使用设备管理器并选择从磁盘安装,则可以使用Windows 10强制执行自己的驱动程序来成功解决此问题。

I have made a signed USB Serial inf file for a custom device and created an installer that successfully installs the driver to Windows 7 (32/64), Windows 8.1 (64) but not Windows 10. This applies to the default installation (right-click, install) directly on the file, using Device Manager and using PNPUTIL. The device driver successfully installs but the OEM usbser driver is used instead. After clicking "Update Driver" and selecting my driver in Device Manager, Windows prompts me with "The best driver software is already installed for your device". If I use Device Manager and choose "Have Disk" I can successfully get around the issue with Windows 10 enforcing their own driver. This doesn't get me any closer to having a successful inf file and installer though.

我的默认安装过程为:


  1. 从USB端口拔出设备

  2. 加载新安装的Windows 10 Professional的快照

  3. 右键单击,在.inf文件上安装

  4. 将其插入设备中

  5. 查看设备管理器,查看是否已制作了标准USB串行设备驱动程序由Microsoft代替驱动程序

  1. Unplug the device from the USB port
  2. Load a snap shot of freshly-installed Windows 10 Professional
  3. Right click, install on the .inf file
  4. Plug in the device
  5. Look at Device Manager and see that the standard USB Serial Device driver made by Microsoft is used instead of my driver

如果我随后将其卸载并重复步骤3-5,则有时我的自定义驱动程序会粘住。

If I then uninstall it and repeat steps 3-5 it sometimes allows my custom driver to stick.

有人告诉我,我的驱动程序安装在Windows 10 Enterprise上,这进一步困扰了人们。

I've been told that my driver installs on Windows 10 Enterprise, which confuses matters further.

问题:我在做什么错了?

我的信息文件:

;************************************************************
; Windows USB CDC ACM Setup File
; Copyright (c) 2000 Microsoft Corporation

; Version v1.1, updated 17 April 2013


[Strings]
DriverPackageDisplayName="Rinstrum USB Serial Drivers"
ManufacturerName="Rinstrum"
ServiceName="USB RS-232 Emulation Driver"
linux.gserial="Rinstrum USB Gadget Serial"
MFGNAME="Rinstrum"

[DefaultInstall]
CopyINF=c500.inf

[Version]
DriverVer=03/02/2017,1.0.0.0
Signature=$Windows NT$
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MFGNAME%
CatalogFile=c500.cat
DriverPackageDisplayName=%DriverPackageDisplayName%
PnpLockdown=1

[Manufacturer]
%MFGNAME%=Models,NTx86,NTamd64,NTarm

[DestinationDirs]
DefaultDestDir=12
FakeModemCopyFileSection=12

[Models.NTx86]
%linux.gserial%=DriverInstall, USB\VID_1FC9&PID_816A, USB\VID_1FC9&PID_816A&MI_00

[Models.NTamd64]
%linux.gserial%=DriverInstall, USB\VID_1FC9&PID_816A, USB\VID_1FC9&PID_816A&MI_00

[Models.NTarm]
%linux.gserial%=DriverInstall, USB\VID_1FC9&PID_816A, USB\VID_1FC9&PID_816A&MI_00

[DriverInstall]
Include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=DriverAddReg

[DriverAddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[DriverInstall.Services]
Include=mdmcpq.inf
AddService=usbser,0x2,DriverService

[DriverService]
DisplayName=%ServiceName%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys
LoadOrderGroup=Base

更新:来自setupapi.dev.log

Update: additional info from setupapi.dev.log

>>>  [Device Install (DiInstallDriver) - C:\Users\R&D\Desktop\c500.inf]
>>>  Section start 2017/02/03 17:17:58.321      
cmd: "C:\Windows\System32\InfDefaultInstall.exe" "C:\Users\R&D\Desktop\c500.inf"     
ndv: Flags: 0x00000000     
ndv: INF path: C:\Users\R&D\Desktop\c500.inf     
inf: {SetupCopyOEMInf: C:\Users\R&D\Desktop\c500.inf} 17:17:58.337     
inf:      Copy style: 0x00000000 !   
inf:      Driver package is already in driver store     
inf:      Driver Store Path: C:\Windows\System32\DriverStore\FileRepository\c500.inf_amd64_4fee793fb11027ac\c500.inf    inf:      Published Inf Path: C:\Windows\INF\oem4.inf     
inf: {SetupCopyOEMInf exit (0x00000000)} 17:17:58.368
<<<  Section end 2017/02/03 17:17:58.399
<<<  [Exit status: SUCCESS]

更新:
setupapi.dev.log出现以下错误尝试安装设备时

Update: setupapi.dev.log gives the following error when trying to install the device

 sig:                     Success: File is signed in Authenticode(tm) catalog.
 sig:                     Error 0xe0000242: The publisher of an Authenticode(tm) signed catalog has not yet been established as trusted.

更新:
VBox来宾添加安装程序设法在WIN10中安装我的inf文件。来源:

Update: The VBox guest additions installer manages to install my inf file in WIN10. Here is the source:

https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp#L433

推荐答案

在授予用户重写Windows 10中OEM驱动程序权限的权限之前,必须先激活Windows。解决了这个问题。

Windows needs to be activated before the user is granted the permission to override the OEM drivers in Windows 10. Activating windows on my test machine solved this issue.

这篇关于无法在Windows 10专业版中安装自定义inf。 Windows使用OEM驱动程序覆盖它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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