gpt4 book ai didi

driver - 使用我的安装程序打包驱动程序文件

转载 作者:行者123 更新时间:2023-12-04 07:05:10 25 4
gpt4 key购买 nike

我已将设备驱动程序文件 .inf、.sys 和 .cat 打包到我的安装程序中,它们被安装到 windows\system32 文件夹和 windows\system32\drivers 文件夹中,但是,当我插入我的设备并让 windows 搜索驱动程序时,找不到驱动程序。
驱动程序文件有效。知道如何自动为 Windows 安装设备驱动程序吗?
这是 inf 文件:

;/*++
;
;Abstract:
; Installation inf for the Android USB Bulk device
;
;--*/

[Version]
Signature="$WINDOWS NT$"
Class=USB
ClassGuid={F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}
Provider=%GOOG%
DriverVer=date,1.0.0009.00000
CatalogFile=androidusb.cat

; ================= Class section =====================

[ClassInstall32]
Addreg=AndroidUsbClassReg

[AndroidUsbClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-5

[DestinationDirs]
DefaultDestDir = 12

; ================= Device section =====================

[Manufacturer]
%MfgName%=Google,NTx86

; For Win2K
[Google]
; For loopback testing
%USB\VID_18D1&PID_DDDD.DeviceDescTest%=androidusb.Dev, USB\VID_18D1&PID_DDDD
; Android Sooner
%USB\VID_18D1&PID_D00D.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_D00D
%USB\VID_18D1&PID_DEED&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_DEED&MI_01
%USB\VID_18D1&PID_DEED&MI_02.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_DEED&MI_02
; HTC Dream
%USB\VID_0BB4&PID_0C01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C01
%USB\VID_0BB4&PID_0C02&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C02&MI_01

; For XP and later
[Google.NTx86]
; For loopback testing
%USB\VID_18D1&PID_DDDD.DeviceDescTest%=androidusb.Dev, USB\VID_18D1&PID_DDDD
; Android Sooner
%USB\VID_18D1&PID_D00D.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_D00D
%USB\VID_18D1&PID_DEED&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_DEED&MI_01
%USB\VID_18D1&PID_DEED&MI_02.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_DEED&MI_02
; HTC Dream
%USB\VID_0BB4&PID_0C01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C01
%USB\VID_0BB4&PID_0C02&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C02&MI_01

[androidusb.Dev.NT]
CopyFiles=androidusb.Files.Ext

[androidusb.Dev.NT.Services]
Addservice = androidusb, 0x00000002, androidusb.AddService

[androidusb.AddService]
DisplayName = %androidusb.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\androidusb.sys
AddReg = androidusb.AddReg
LoadOrderGroup = Base

[androidusb.AddReg]
HKR,"Parameters","MaximumTransferSize",0x10001,4096
HKR,"Parameters","DebugLevel",0x10001,2
HKR, Parameters\Wdf, VerboseOn, 0x00010001, 1
HKR, Parameters\Wdf, VerifierOn, 0x00010001, 1
HKR, Parameters\Wdf, DbgBreakOnError, 0x00010001, 1

[androidusb.Files.Ext]
androidusb.sys

[SourceDisksNames]
1=%Disk_Description%,,,

[SourceDisksFiles]
androidusb.sys = 1

;-------------- WDF Coinstaller installation
[DestinationDirs]
CoInstaller_CopyFiles = 11

[androidusb.Dev.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
wdfcoinstaller01005.dll

[SourceDisksFiles]
wdfcoinstaller01005.dll=1 ; make sure the number matches with SourceDisksNames

[CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "wdfcoinstaller01005.dll,WdfCoInstaller"

[androidusb.Dev.NT.Wdf]
KmdfService = androidusb, androidusb_wdfsect

[androidusb_wdfsect]
KmdfLibraryVersion = 1.5

;---------------------------------------------------------------;

[Strings]
GOOG = "Google, Inc"
MfgName = "Google, Inc"
Disk_Description= "ADB Interface Installation Disk"
androidusb.SvcDesc = "ADB Interface Driver"
ClassName = "ADB Interface"
USB\VID_18D1&PID_DDDD.DeviceDescTest="Android Sooner ADB Testing Interface"
USB\VID_18D1&PID_D00D.DeviceDescRelease="Android Sooner Single ADB Interface"
USB\VID_18D1&PID_DEED&MI_01.DeviceDescRelease="Android Sooner Composite ADB Interface"
USB\VID_18D1&PID_DEED&MI_02.DeviceDescRelease="Android Sooner Kernel Debug Interface"
USB\VID_0BB4&PID_0C01.DeviceDescRelease="HTC Dream"
USB\VID_0BB4&PID_0C02&MI_01.DeviceDescRelease="HTC Dream Composite ADB Interface"

最佳答案

您必须使用 SetupAPI 函数安装驱动程序

要先安装驱动程序,您必须使用 SetupCopyOEMInf( ... ) .

以这种方式安装时,您的驱动程序可能不会总是被选中,因为内置驱动程序可能更匹配。

更好的匹配始终是 WHQL 签名的驱动程序,然后是签名的驱动程序,然后是未签名的驱动程序。

关于driver - 使用我的安装程序打包驱动程序文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1215590/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com