我是靠谱客的博主 彩色小鸽子,最近开发中收集的这篇文章主要介绍通过右键安装inf文件来安装驱动程序这种方式可取吗?,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

    很多人拿到驱动包准备安装驱动时,往往先想到通过鼠标右键-安装这种方式来安装驱动。且不说能不能安装成功,要支持这种安装方式,对inf文件有一定的要求:inf文件中需要包含[DefaultInstall]这样的节,这个节是右键安装时的Inf入口点(MSDN的原话:"An INF file's DefaultInstall section is accessed if a user selects the "Install" menu item after right-clicking on the INF file name.")。很遗憾的是,很多驱动安装包提供的Inf文件中并没有提供这样的节,因此右键安装并不能达到预期的效果("Providing a DefaultInstall section is optional. If an INF file does not include a DefaultInstall section, selecting "Install" after right-clicking on the file name causes an error message to be displayed."摘自MSDN)。

    于是,聪明的你会想:既然inf文件中没有这样的节,我自己往文件中插入这样的节不就能达到目的了吗?这种变通的思维当然是值得肯定的,但是,最终可能还是安装失败。不要质疑是不是自己哪写的不对,再继续修改inf文件前,请看下MSDN上这段话:

"Remarks
DefaultInstall sections must not be used for device installations. Use DefaultInstall sections only for the installation of class filter drivers, class co-installers, 
file system filters, and kernel driver services that are not associated with a device node (devnode).
Note The INF file of a driver package must not contain an INF DefaultInstall section if the driver package is to be digitally signed. For more information about 
signing driver packages, see Driver Signing."

    这段话翻译过来是说:DefaultInstall这种方式不适合设备安装(我们安装驱动不就是为了设备安装吗?),仅适用于安装类过滤驱动/类协安装器/文件系统过滤驱动/以及内核驱动服务(即legendDriver,比如WinIO.sys)这些不涉及到设备节点(devnode)的情况。说的再通俗一点:inf文件中包含[Manufacturer]这样的节(这个节包含了驱动匹配的设备ID)就不应该再有[DefaultInstall]这样的字眼。

--------------------------------------------------

后记:

    上面的内容不是很全面,只能说win7下右键安装inf文件的确不能成功,但到win10以后右键安装发生了变化。事情起因是一个同事的安装程序在win10下可以工作,但同样的程序在win7下失效,设备在设备管理器中还带着YB。以下分别是win7和win10的setupapi.dev.log

win7:

>>>  [Device Install (DiInstallDevice) - USBVID_138A&PID_00108DC97459065E]
>>>  Section start 2016/11/16 13:36:20.634
      cmd: C:Windowssystem32MsiExec.exe -Embedding CA2C5E8A03B6DFB686F86215EF748EA5 E GlobalMSI0000
     dvi: {Plug and Play Service: Device Install for USBVID_138A&PID_00108DC97459065E}
     ump:      Creating Install Process: DrvInst.exe 13:36:20.634
!    ndv:      Installing NULL driver!
     dvi:      Set selected driver complete.
     dvi:      {DIF_ALLOW_INSTALL} 13:36:20.634
     dvi:           No class installer for 'Synaptics FP Sensors (WBF) (PID=0010)'
     dvi:           Using exported function 'CoDeviceInstall' in module 'C:Windowssystem32WudfCoinstaller.dll'.
     dvi:           CoInstaller 1 == WudfCoinstaller.dll
     dvi:           CoInstaller 1: Enter 13:36:20.649
     dvi:           CoInstaller 1: Exit
     dvi:           Default installer: Enter 13:36:20.649
     dvi:           Default installer: Exit
     dvi:      {DIF_ALLOW_INSTALL - exit(0xe000020e)} 13:36:20.649
     dvi:      {DIF_INSTALLDEVICE} 13:36:20.649
     dvi:           No class installer for 'Synaptics FP Sensors (WBF) (PID=0010)'
     dvi:           CoInstaller 1: Enter 13:36:20.649
     dvi:           CoInstaller 1: Exit
     dvi:           Default installer: Enter 13:36:20.649
!    dvi:                Installing NULL driver!
     dvi:                Writing common driver property settings.
!    dvi:                Failed to set Device Description property: (null)
!    dvi:                Error 1784: The supplied user buffer is not valid for the requested operation.
     dvi:                {Restarting Devices} 13:36:22.771
     dvi:                     Restart: USBVID_138A&PID_00108DC97459065E
     dvi:                     Restart complete.
     dvi:                {Restarting Devices exit} 13:36:22.771
     dvi:           Default installer: Exit
     dvi:      {DIF_INSTALLDEVICE - exit(0x00000000)} 13:36:22.771
     dvi:      {DIF_DESTROYPRIVATEDATA} 13:36:22.786
     dvi:           CoInstaller 1: Enter 13:36:22.786
     dvi:           CoInstaller 1: Exit
     dvi:           Default installer: Enter 13:36:22.786
     dvi:           Default installer: Exit
     dvi:      {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 13:36:22.786
     ump:      Server install process exited with code 0x00000000 13:36:22.786
     ump: {Plug and Play Service: Device Install exit(00000000)}
<<<  Section end 2016/11/16 13:36:22.786
<<<  [Exit status: SUCCESS]
win10:
>>>  [Device Install (DiInstallDriver) - C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf]
>>>  Section start 2016/11/17 07:21:23.937
      cmd: "C:WINDOWSSystem32InfDefaultInstall.exe" "C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf"
     ndv: Flags: 0x00000000
     ndv: INF path: C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf
~~0~~inf: {SetupCopyOEMInf: C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf} 07:21:23.952
     inf:      Copy style: 0x00000000
     sto:      {Setup Import Driver Package: C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf} 07:21:23.952
     inf:           Provider: Synaptics FP Sensors
     inf:           Class GUID: {53D29EF7-377C-4D14-864B-EB3A85769359}
     inf:           Driver Version: 06/03/2016,4.5.329.0
     inf:           Catalog File: wbf_vfs_0010.cat
     sto:           {Copy Driver Package: C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf} 07:21:23.968
     sto:                Driver Package = C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf
     sto:                Flags          = 0x00000007
     sto:                Destination    = C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}
     sto:                Copying driver package files to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverX64vcsWBFEngineAdapter.dll' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64vcsWBFEngineAdapter.dll'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverX64wbf_vfs_0010.dll' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64wbf_vfs_0010.dll'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverX64valWBFPolicyService.exe' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64valWBFPolicyService.exe'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverX64vcsWBFStorageAdapter.dll' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64vcsWBFStorageAdapter.dll'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverX64ValEFIResDll.dll' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64ValEFIResDll.dll'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverX64vcsAPIFORWBF.dll' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64vcsAPIFORWBF.dll'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverwbf_vfs_0010.cat' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}wbf_vfs_0010.cat'.
     flq:                Copying 'C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf' to 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}wbf_vfs_0010.inf'.
     sto:           {Copy Driver Package: exit(0x00000000)} 07:21:24.015
     pol:           {Driver package policy check} 07:21:24.031
     pol:           {Driver package policy check - exit(0x00000000)} 07:21:24.031
     sto:           {Stage Driver Package: C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}wbf_vfs_0010.inf} 07:21:24.031
     inf:                {Query Configurability: C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}wbf_vfs_0010.inf} 07:21:24.031
!    inf:                     Found legacy AddReg operation using non-relative key (HKLMSOFTWAREValidity). Code = 1305
!    inf:                     Driver package 'wbf_vfs_0010.inf' is NOT configurable.
     inf:                {Query Configurability: exit(0x00000000)} 07:21:24.031
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64vcsWBFEngineAdapter.dll' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}X64vcsWBFEngineAdapter.dll'.
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64wbf_vfs_0010.dll' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}X64wbf_vfs_0010.dll'.
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64valWBFPolicyService.exe' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}X64valWBFPolicyService.exe'.
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64vcsWBFStorageAdapter.dll' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}X64vcsWBFStorageAdapter.dll'.
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64ValEFIResDll.dll' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}X64ValEFIResDll.dll'.
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}X64vcsAPIFORWBF.dll' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}X64vcsAPIFORWBF.dll'.
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}wbf_vfs_0010.cat' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}wbf_vfs_0010.cat'.
     flq:                Copying 'C:UsersaAppDataLocalTemp{d258c716-670e-f345-92c1-d29368915dc2}wbf_vfs_0010.inf' to 'C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}wbf_vfs_0010.inf'.
     sto:                {DRIVERSTORE IMPORT VALIDATE} 07:21:24.109
     sig:                     {_VERIFY_FILE_SIGNATURE} 07:21:24.124
     sig:                          Key      = wbf_vfs_0010.inf
     sig:                          FilePath = C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}wbf_vfs_0010.inf
     sig:                          Catalog  = C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}wbf_vfs_0010.cat
     sig:                          Success: File is signed in catalog.
     sig:                     {_VERIFY_FILE_SIGNATURE exit(0x00000000)} 07:21:24.124
     sto:                {DRIVERSTORE IMPORT VALIDATE: exit(0x00000000)} 07:21:24.187
     sig:                Signer Score = 0x0D000005
     sig:                Signer Name  = Microsoft Windows Hardware Compatibility Publisher
     sto:                {DRIVERSTORE IMPORT BEGIN} 07:21:24.187
     sto:                {DRIVERSTORE IMPORT BEGIN: exit(0x00000000)} 07:21:24.187
     cpy:                {Copy Directory: C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}} 07:21:24.187
     cpy:                     Target Path = C:WINDOWSSystem32DriverStoreFileRepositorywbf_vfs_0010.inf_amd64_a3cce991cb6184f8
     cpy:                     {Copy Directory: C:WINDOWSSystem32DriverStoreTemp{b3be54f1-7543-1a48-9ef9-03d288da77a4}X64} 07:21:24.187
     cpy:                          Target Path = C:WINDOWSSystem32DriverStoreFileRepositorywbf_vfs_0010.inf_amd64_a3cce991cb6184f8X64
     cpy:                     {Copy Directory: exit(0x00000000)} 07:21:24.187
     cpy:                {Copy Directory: exit(0x00000000)} 07:21:24.187
     idb:                {Register Driver Package: C:WINDOWSSystem32DriverStoreFileRepositorywbf_vfs_0010.inf_amd64_a3cce991cb6184f8wbf_vfs_0010.inf} 07:21:24.187
     idb:                     Created driver package object 'wbf_vfs_0010.inf_amd64_a3cce991cb6184f8' in DRIVERS database node.
     idb:                     Created driver INF file object 'wbf_vfs_0010.inf' in DRIVERS database node.
     idb:                     Registered driver package 'wbf_vfs_0010.inf_amd64_a3cce991cb6184f8' with 'wbf_vfs_0010.inf'.
     idb:                {Register Driver Package: exit(0x00000000)} 07:21:24.187
     idb:                {Publish Driver Package: C:WINDOWSSystem32DriverStoreFileRepositorywbf_vfs_0010.inf_amd64_a3cce991cb6184f8wbf_vfs_0010.inf} 07:21:24.187
     idb:                     Activating driver package 'wbf_vfs_0010.inf_amd64_a3cce991cb6184f8'.
     cpy:                     Published 'wbf_vfs_0010.inf_amd64_a3cce991cb6184f8wbf_vfs_0010.inf' to 'wbf_vfs_0010.inf'.
     idb:                     Indexed 2 device IDs for 'wbf_vfs_0010.inf_amd64_a3cce991cb6184f8'.
     sto:                     Flushed driver database node 'DRIVERS'. Time = 47 ms
     sto:                     Flushed driver database node 'SYSTEM'. Time = 31 ms
     idb:                {Publish Driver Package: exit(0x00000000)} 07:21:24.281
     sto:                {DRIVERSTORE IMPORT END} 07:21:24.281
     dvi:                     Flushed all driver package files to disk. Time = 141 ms
     sig:                     Installed catalog 'wbf_vfs_0010.cat' as 'wbf_vfs_0010.cat'.
     sto:                {DRIVERSTORE IMPORT END: exit(0x00000000)} 07:21:24.447
     sto:           {Stage Driver Package: exit(0x00000000)} 07:21:24.463
     sto:      {Setup Import Driver Package - exit (0x00000000)} 07:21:24.494
~~1~~inf:      Driver Store Path: C:WINDOWSSystem32DriverStoreFileRepositorywbf_vfs_0010.inf_amd64_a3cce991cb6184f8wbf_vfs_0010.inf
     inf:      Published Inf Path: C:WINDOWSINFwbf_vfs_0010.inf
~~2~~inf: {SetupCopyOEMInf exit (0x00000000)} 07:21:24.510
~~3~~ndv: {Update Device Driver - USBVID_138A&PID_00105489D2BC33CE}
     ndv:      Search options: 0x00000081
     ndv:      Searching single INF 'C:UsersaDesktopNew folderDriverwbf_vfs_0010.inf'
     dvi:      {Build Driver List} 07:21:24.525
     dvi:           Searching for hardware ID(s):
     dvi:                usbvid_138a&pid_0010&rev_0078
     dvi:                usbvid_138a&pid_0010
     dvi:           Searching for compatible ID(s):
     dvi:                usbclass_ff&subclass_00&prot_00
     dvi:                usbclass_ff&subclass_00
     dvi:                usbclass_ff
     dvi:           Created Driver Node:
     dvi:                HardwareID   - USBVID_138A&PID_0010
     dvi:                InfName      - c:usersadesktopnew folderdriverwbf_vfs_0010.inf
     dvi:                DevDesc      - Synaptics FP Sensors (WBF) (PID=0010)
     dvi:                Section      - Biometric_Install.NT
     dvi:                Rank         - 0x00c00001
     dvi:                Signer Score - WHQL
     dvi:                DrvDate      - 06/03/2016
     dvi:                Version      - 4.5.329.0
     dvi:      {Build Driver List - exit(0x00000000)} 07:21:24.556
     ndv:      Searching currently installed INF
     dvi:      {Build Driver List} 07:21:24.572
     dvi:           Searching for hardware ID(s):
     dvi:                usbvid_138a&pid_0010&rev_0078
     dvi:                usbvid_138a&pid_0010
     dvi:           Searching for compatible ID(s):
     dvi:                usbclass_ff&subclass_00&prot_00
     dvi:                usbclass_ff&subclass_00
     dvi:                usbclass_ff
     dvi:      {Build Driver List - exit(0x00000000)} 07:21:24.588
     dvi:      {DIF_SELECTBESTCOMPATDRV} 07:21:24.588
     dvi:           Default installer: Enter 07:21:24.588
     dvi:                {Select Best Driver}
     dvi:                     Class GUID of device changed to: {53d29ef7-377c-4d14-864b-eb3a85769359}.
     dvi:                     Selected:
     dvi:                          Description - [Synaptics FP Sensors (WBF) (PID=0010)]
     dvi:                          InfFile     - [c:usersadesktopnew folderdriverwbf_vfs_0010.inf]
     dvi:                          Section     - [Biometric_Install]
     dvi:                {Select Best Driver - exit(0x00000000)}
     dvi:           Default installer: Exit
     dvi:      {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 07:21:24.603
     ndv:      Installing driver:
     ndv:           Inf Name       - wbf_vfs_0010.inf
     ndv:           Driver Date    - 06/03/2016
     ndv:           Driver Version - 4.5.329.0
~~4~~ndv:      Driver package 'C:WINDOWSSystem32DriverStoreFileRepositorywbf_vfs_0010.inf_amd64_a3cce991cb6184f8wbf_vfs_0010.inf' is already imported.
     sto:      {Setup Import Driver Package: c:usersadesktopnew folderdriverwbf_vfs_0010.inf} 07:21:24.619
     sto:           Driver package already imported as 'wbf_vfs_0010.inf'.
     sto:      {Setup Import Driver Package - exit (0x00000000)} 07:21:24.635
     dvi:      Searching for hardware ID(s):
     dvi:           usbvid_138a&pid_0010&rev_0078
     dvi:           usbvid_138a&pid_0010
     dvi:      Searching for compatible ID(s):
     dvi:           usbclass_ff&subclass_00&prot_00
     dvi:           usbclass_ff&subclass_00
     dvi:           usbclass_ff
     dvi:      Class GUID of device changed to: {53d29ef7-377c-4d14-864b-eb3a85769359}.
     dvi:      {Plug and Play Service: Device Install for USBVID_138A&PID_00105489D2BC33CE}
     dvi:           Driver INF Path: C:WINDOWSINFwbf_vfs_0010.inf
     dvi:           Driver Node Name: wbf_vfs_0010.inf:b8956f6d4f120cff:Biometric_Install:4.5.329.0:usbvid_138a&pid_0010
     dvi:           Driver Store Path: C:WINDOWSSystem32DriverStoreFileRepositorywbf_vfs_0010.inf_amd64_a3cce991cb6184f8wbf_vfs_0010.inf
     dvi:           Searching for hardware ID(s):
     dvi:                usbvid_138a&pid_0010&rev_0078
     dvi:                usbvid_138a&pid_0010
     dvi:           Searching for compatible ID(s):
     dvi:                usbclass_ff&subclass_00&prot_00
     dvi:                usbclass_ff&subclass_00
     dvi:                usbclass_ff
     dvi:           Class GUID of device changed to: {53d29ef7-377c-4d14-864b-eb3a85769359}.
     dvi:           {Core Device Install} 07:21:24.662
     dvi:                {Install Device - USBVID_138A&PID_00105489D2BC33CE} 07:21:24.662
     dvi:                     Parent device: USBROOT_HUB304&39111547&0&0
     dvi:                     {Configure Device - USBVID_138A&PID_00105489D2BC33CE} 07:21:24.662
     dvi:                          Parent device: USBROOT_HUB304&39111547&0&0
     dvi:                     {Configure Device - exit(0x00000032)} 07:21:24.662
     dvi:                     {DIF_ALLOW_INSTALL} 07:21:24.662
     dvi:                          Using exported function 'CoDeviceInstall' in module 'C:WINDOWSsystem32WUDFCoinstaller.dll'.
     dvi:                          CoInstaller 1 == WUDFCoinstaller.dll
     dvi:                          CoInstaller 1: Enter 07:21:24.677
     dvi:                          CoInstaller 1: Exit
     dvi:                          Default installer: Enter 07:21:24.677
     dvi:                          Default installer: Exit
     dvi:                     {DIF_ALLOW_INSTALL - exit(0xe000020e)} 07:21:24.677
     dvi:                     {DIF_INSTALLDEVICEFILES} 07:21:24.677
     dvi:                          CoInstaller 1: Enter 07:21:24.677
     dvi:                          CoInstaller 1: Exit
     dvi:                          Default installer: Enter 07:21:24.677
     dvi:                          Default installer: Exit
     dvi:                     {DIF_INSTALLDEVICEFILES - exit(0x00000000)} 07:21:24.677
     flq:                     File 'C:WINDOWSsystem32DRIVERSUMDFwbf_vfs_0010.dll' pruned from copy.
     flq:                     File 'C:WINDOWSsystem32vcsAPIFORWBF.dll' pruned from copy.
     flq:                     File 'C:WINDOWSsystem32valWBFPolicyService.exe' pruned from copy.
     flq:                     File 'C:WINDOWSsystem32ValEFIResDll.dll' pruned from copy.
     flq:                     File 'C:WINDOWSsystem32WinBioPlugInsvcsWBFEngineAdapter.dll' pruned from copy.
     flq:                     File 'C:WINDOWSsystem32WinBioPlugInsvcsWBFStorageAdapter.dll' pruned from copy.
     flq:                     File 'C:WINDOWSsystem32DRIVERSwinusb.sys' pruned from copy.
     dvi:                     {DIF_REGISTER_COINSTALLERS} 07:21:24.759
     dvi:                          Reset Device: Resetting device configuration. 07:21:24.759
     dvi:                          Reset Device: Resetting device configuration completed. 07:21:24.759
     dvi:                          CoInstaller 1: Enter 07:21:24.759
     dvi:                          CoInstaller 1: Exit
     dvi:                          Default installer: Enter 07:21:24.759
     dvi:                               {DIF_DESTROYPRIVATEDATA} 07:21:24.759
     dvi:                                    CoInstaller 1: Enter 07:21:24.759
     dvi:                                    CoInstaller 1: Exit
     dvi:                                    Default installer: Enter 07:21:24.759
     dvi:                                    Default installer: Exit
     dvi:                               {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 07:21:24.759
     dvi:                          Default installer: Exit
     dvi:                     {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 07:21:24.759
     dvi:                     {DIF_INSTALLINTERFACES} 07:21:24.759
     dvi:                          Using exported function 'CoDeviceInstall' in module 'C:WINDOWSsystem32WudfCoinstaller.dll'.
     dvi:                          CoInstaller 1 == WudfCoinstaller.dll
     dvi:                          CoInstaller 1: Enter 07:21:24.759
     dvi:                          CoInstaller 1: Exit
     dvi:                          Default installer: Enter 07:21:24.759
     dvi:                          Default installer: Exit
     dvi:                     {DIF_INSTALLINTERFACES - exit(0x00000000)} 07:21:24.759
     dvi:                     {DIF_INSTALLDEVICE} 07:21:24.775
     dvi:                          CoInstaller 1: Enter 07:21:24.775
     dvi:                          CoInstaller 1: Exit
     dvi:                          Default installer: Enter 07:21:24.988
     dvi:                               {Install DEVICE}
     dvi:                                    {Writing Device Properties}
     dvi:                                         Strong Name=wbf_vfs_0010.inf:b8956f6d4f120cff:Biometric_Install:4.5.329.0:usbvid_138a&pid_0010
     dvi:                                    {Writing Device Properties - Complete}
     inf:                                    AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall  (wbf_vfs_0010.inf line 71)
     dvi:                                    Add Service: Modified existing service 'WUDFRd'.
     inf:                                    AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall  (wbf_vfs_0010.inf line 72)
     dvi:                                    Add Service: Modified existing service 'WinUsb'.
     inf:                                    AddService=valWBFPolicyService,0x000009f8,WBFPolicy_ServiceInstall  (wbf_vfs_0010.inf line 73)
     dvi:                                    Add Service: Modified existing service 'valWBFPolicyService'.
     dvi:                                    Start Service: Successfully restarted service 'valWBFPolicyService'.
     dvi:                               {Install DEVICE exit (0x00000000)}
     dvi:                               Install Device: Configuring device class. 07:21:25.582
     dvi:                               Install Device: Configuring device class completed. 07:21:25.582
     dvi:                               Install Device: Starting device. 07:21:25.582
     dvi:                               Install Device: Starting device completed. 07:21:26.058
     dvi:                          Default installer: Exit
     dvi:                          CoInstaller 1: Enter (Post Processing) 07:21:26.058
     dvi:                          CoInstaller 1: Exit (Post Processing)
     dvi:                     {DIF_INSTALLDEVICE - exit(0x00000000)} 07:21:26.120
     dvi:                     {DIF_NEWDEVICEWIZARD_FINISHINSTALL} 07:21:26.120
     dvi:                          CoInstaller 1: Enter 07:21:26.120
     dvi:                          CoInstaller 1: Exit
     dvi:                          Default installer: Enter 07:21:26.120
     dvi:                          Default installer: Exit
     dvi:                     {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 07:21:26.120
     dvi:                {Install Device - exit(0x00000000)} 07:21:26.136
     dvi:           {Core Device Install - exit(0x00000000)} 07:21:26.136
     dvi:           {DIF_DESTROYPRIVATEDATA} 07:21:26.136
     dvi:                CoInstaller 1: Enter 07:21:26.136
     dvi:                CoInstaller 1: Exit
     dvi:                Default installer: Enter 07:21:26.151
     dvi:                Default installer: Exit
     dvi:           {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 07:21:26.151
     ump:      {Plug and Play Service: Device Install exit(00000000)}
     ndv: {Update Device Driver - exit(00000000)}
<<<  Section end 2016/11/17 07:21:26.167
<<<  [Exit status: SUCCESS]

    直观感受就是win10的安装日志内容远比win7丰富,并且有很多copyfile的动作。这不免会联想到难不成inf文件工作了?带着这种怀疑,我仔细查看了win10的setupapi.dev.log。在~~0~~处,右键安装时调用了SetupCopyOEMInf函数。这个函数怎么感觉有点眼熟?winddk 7600下devcon add_dp命令的实现就是调用了这个函数。调用这个函数的结果就是将驱动包安装在DriverStore下:

再看setupapi.dev.log ~~3~~处,在调用SetupCopyOEMInf函数完成后,系统紧接着做了一次[Update Device Driver]操作-----这相当于在设备管理器里做了一次更新设备驱动的操作。这使得设备管理器中YB的设备在DriverStore中匹配相应的设备驱动,正因为win10的这些变化导致了同事的安装程序在win7下工作失败。

最后

以上就是彩色小鸽子为你收集整理的通过右键安装inf文件来安装驱动程序这种方式可取吗?的全部内容,希望文章能够帮你解决通过右键安装inf文件来安装驱动程序这种方式可取吗?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(69)

评论列表共有 0 条评论

立即
投稿
返回
顶部