阅读:7272回复:4
【求助】在xp下使用DDK附带带的devcon.exe和install.c安装inf驱动后,usb设备不能使用,使用向导安装却正常
在xp下使用DDK附带带的devcon.exe和install.c安装inf驱动后,usb设备不能使用,在“设备管理器”中显示感叹号。
插入USB,系统会提示发现新硬件,这时,如果通过向导安装驱动,就能正常使用usb设备,“设备管理器”中会再添一 个端口。 为什么?观察注册表发现,两种安装方式在注册中写的位置也不同。 是不是inf文件有问题?请各位帮我看看 inf文件内容如下: ;------------------------------------------------------------------ ; SERWPL.INF - INF file for USB-to-Serial Device ; Copyright (C) 1999, Prolific Technology Inc. ; ; 09/13/2000 [Manufacturer] %MfgName%=Pro [Pro] %DeviceDesc%=ComPort, USB\\VID_067B&PID_2303 [SourceDisksNames] 1=\"USB-Serial Cable Diskette\",,, [SourceDisksFiles] ;SER9PL.SYS=1 ;SERSPL.VXD=1 ;SERSPL.INF=1 ;SERWPL.INF=1 [SourceDisksFiles.x86] ;ser2pl.sys=1 [DestinationDirs] USB2SER.Files.Ext = 11 USB2SER.Files.Inf = 10,INF ComPort.NT.Copy = 12 ;DIRID_DRIVERS SerialEnumerator.NT.Copy=12 ;DIRID_DRIVERS NonPort.NT.Copy = 12 ;DIRID_DRIVERS [ComPort_install] ;Windows98_ME [Version] Signature=\"$Chicago$\" Class=USB provider=%Mfg% LayoutFile=layout.inf ; DriverVer=12/27/2003,2.0.0.11 [PreCopySection] HKR,,NoSetupUI,,1 [ComPort] CopyFiles=USB2SER.Files.Ext, USB2SER.Files.Inf AddReg=USB2SER.AddReg [USB2SER.AddReg] HKR,,DevLoader,,*ntkern HKR,,NTMPDriver,,SER9PL.SYS [USB2SER.Files.Ext] SER9PL.SYS SERSPL.VXD [USB2SER.Files.Inf] SERWPL.INF SERSPL.INF ;======================================================================== ; ;======================================================================== [ComPort_Install.NTx86] ;Windows2000 [Version] Signature=\"$Chicago$\" Class=Ports ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} Provider=%Mfg% LayoutFile=layout.inf DriverVer=12/01/2003,2.0.0.24 AddReg=PortsClass.AddReg [PortsClass.AddReg] HKR,,,,%PortsClassName% [ComPort.NT] CopyFiles=ComPort.NT.Copy AddReg=ComPort.AddReg, ComPort.NT.AddReg ; LogConfig=c14,c1a,c23,c2a,c34,c3a,c43,c4a,caa LogConfig=c3a,c4a,caa SyssetupPnPFlags = 1 [ClassInstall32.NT] AddReg=PortsClass.NT.AddReg [PortsClass.NT.AddReg] HKR,,,,%PortsClassName% HKR,,Icon,,\"-23\" HKR,,Installer32,,\"MsPorts.Dll,PortsClassInstaller\" [ComPort.NT.HW] AddReg=ComPort.NT.HW.AddReg [ComPort.NT.Copy] ser2pl.sys [ComPort.NT.AddReg] HKR,,EnumPropPages32,,\"MsPorts.dll,SerialPortPropPageProvider\" ; Uncomment the following line if you want to override the advanced dialog for ; your device. See msports.h for protoype of OverrideAdvancedFunction ; HKR,,EnumAdvancedDialog,,\"yourdll.dll,OverrideAdvancedFunction\" [ComPort.NT.HW.AddReg] HKR,,\"UpperFilters\",0x00010000,\"serenum\" ; MultiPort COM Sections; ; ------------------------------------------------------- [MultiComPort.NT] CopyFiles=ComPort.NT.Copy AddReg=ComPort.AddReg, ComPort.NT.AddReg LogConfig=cm1,cm2,cm3,cm4,dg1,dga,cma SyssetupPnPFlags = 1 [MultiComPort.NT.HW] ; Add multiport and normal port into the hardware devnode AddReg=MultiComPort.NT.HW.AddReg,ComPort.NT.HW.AddReg [MultiComPort.NT.HW.AddReg] ; Add multiport specific info to the hardware devnode HKR,,MultiportDevice,0x00010001,1 ; The serial enumerator by itself, so that other INFs can install serenum w/out ser2pl.sys ; ------------------------------------------------------- [SerialEnumerator.NT] CopyFiles=SerialEnumerator.NT.Copy [SerialEnumerator.NT.Copy] serenum.sys ;-------------- Service installation ; Port Driver (function driver for this device) [ComPort.NT.Services] AddService = Ser2pl, 0x00000002, Serial_Service_Inst, Serial_EventLog_Inst AddService = Serenum,,Serenum_Service_Inst [MultiComPort.NT.Services] AddService = Ser2pl, 0x00000002, Serial_Service_Inst, Serial_EventLog_Inst AddService = Serenum,,Serenum_Service_Inst [SerialEnumerator.NT.Services] AddService = Serenum,,Serenum_Service_Inst ; -------------- Serial Port Driver install sections [Serial_Service_Inst] DisplayName = %Serial.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_SYSTEM_START (this driver may do detection) ErrorControl = 1 ; SERVICE_ERROR_IGNORE ServiceBinary = %12%\\ser2pl.sys ; LoadOrderGroup = Extended base ; -------------- Serenum Driver install section [Serenum_Service_Inst] DisplayName = %Serenum.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\\serenum.sys LoadOrderGroup = PNP Filter [Serial_EventLog_Inst] AddReg = Serial_EventLog_AddReg [Serial_EventLog_AddReg] HKR,,EventMessageFile,0x00020000,\"%%SystemRoot%%\\System32\\IoLogMsg.dll;%%SystemRoot%%\\System32\\drivers\\ser2pl.sys\" HKR,,TypesSupported,0x00010001,7 [*pnp0500.det] AddReg=Ports.AddReg,DevMap.AddReg ; The following sections are COM port resource configs. ; Section name format means: ; Char 1 = c (COM port) ; Char 2 = I/O config: 1 (3f8), 2 (2f8), 3 (3e8), 4 (2e8), a (any) ; Char 3 = IRQ config: #, a (any) [c14] ; COM1,IRQ4 ConfigPriority=HARDRECONFIG IOConfig=3f8-3ff(3ff::) IRQConfig=S:4 [c1a] ; COM1, any IRQ ConfigPriority=HARDRECONFIG IOConfig=3f8-3ff(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 [c23] ; COM2, IRQ3 ConfigPriority=HARDRECONFIG IOConfig=2f8-2ff(3ff::) IRQConfig=S:3 [c2a] ; COM2, any IRQ ConfigPriority=HARDRECONFIG IOConfig=2f8-2ff(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 [c34] ; COM3, IRQ4 ConfigPriority=HARDRECONFIG IOConfig=3e8-3ef(3ff::) IRQConfig=S:4 [c3a] ; COM3, any IRQ ConfigPriority=HARDRECONFIG IOConfig=3e8-3ef(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 [c43] ; COM4, IRQ3 ConfigPriority=HARDRECONFIG IOConfig=2e8-2ef(3ff::) IRQConfig=S:3,5 [c4a] ; COM4, any IRQ ConfigPriority=HARDRECONFIG IOConfig=2e8-2ef(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 [caa] ; Any base, any IRQ ConfigPriority=HARDRECONFIG IOConfig=8@100-ffff%fff8(3ff::) IRQConfig=S:3,4,5,7,9,10,11,12,14,15 ; The following are multiport configs for DigiBoard (dgxx) ; and Comtrol (cmxx) multiport boards ; Section name format means: ; Char 1,2 = manufacturer abbreviation ; Char 3 = config number, a = no idea, use base setting [cm1] ConfigPriority=HARDRECONFIG IOConfig=7@240-27E%3F8(3FF::) IOConfig=247-247(3FF::) IRQConfig=S:2,3,4,5,7,10,11 [cm2] ConfigPriority=HARDRECONFIG IOConfig=7@280-2BE%3F8(3FF::) IOConfig=287-287(3FF::) IRQConfig=S:2,3,4,5,7,10,11 [cm3] ConfigPriority=HARDRECONFIG IOConfig=7@500-5BE%FF8(3FF::) IOConfig=507-507(FFF::) IRQConfig=S:2,3,4,5,7,10,11 [cm4] ConfigPriority=HARDRECONFIG IOConfig=7@580-5BE%FF8(3FF::) IOConfig=587-587(3FF::) IRQConfig=S:2,3,4,5,7,10,11 [cma] ConfigPriority=HARDRECONFIG IOConfig=7@100-3FF%3F8(3FF::) ; I suspect we still need alignment here? IOConfig=1@100-3FF(3FF::) ; How about here? IRQConfig=S:2,3,4,5,7,10,11 [dg1] ConfigPriority=HARDRECONFIG IOConfig=7@100-17E%3F8(3FF::) IOConfig=140-140(3FF::) IRQConfig=S:3,4,5,6,7,9,10,11,12,14,15 [dga] ConfigPriority=HARDRECONFIG IOConfig=7@100-3FF%3F8(3FF::) ; I suspect we still need alignment here? IOConfig=1@100-3FF(3FF::) ; How about here? IRQConfig=S:3,4,5,6,7,9,10,11,12,14,15 ; End COM port LogConfig sections [ComPort.PosDup] *PNP0500,*PNP0501,*PNP0502 [ComPort.NT.PosDup] *PNP0500,*PNP0501,*PNP0502,*PNP0510,*PNP0511,*SMCF010 [DevMap.AddReg] HKLM,hardware\\devicemap\\serialcomm,COM1,,COM1 HKLM,hardware\\devicemap\\serialcomm,COM2,,COM2 ; \"NoDrv\" section: We do not yet support these port devices. ;---------------------------------------------------------- [NoDrv] ; \"Non-port\" sections: PCMCIA cards that look like COM ; ports, but aren\'t (excluding modems). ;---------------------------------------------------------- [NonPort] CopyFiles=NonPort.Copy AddReg=NonPort.AddReg [NonPort.Copy] serial.vxd [NonPort.AddReg] HKR,,PortSubClass,1,01 HKR,,DevLoader,,*vcomm HKR,,PortDriver,,serial.vxd HKR,,Contention,,*vcd HKR,,DCB,3,1C,00,00,00, 80,25,00,00, 11,33,00,00, 00,00, 0a,00, 0a,00, 08, 00, 00, 11, 13, 00, 00, 00 [NonPort.NT] ; ; BUGBUG--Unclear whether these devices are presently supported under NT. For now, leave a blank ; install section so we won\'t run the Win9x stuff. The fact that no function driver will be installed ; for this devnode will cause the installation to fail, which is what we want to have happen for now. ; ; User readable strings ;---------------------------------------------------------- [Strings] Mfg= \"Prolific\" MfgName = \"Prolific Technology Inc.\" PortsClassName = \"Ports (COM & LPT)\" DeviceDesc=\"Prolific USB-to-Serial Bridge\" Serial.SVCDESC = \"Prolific2 Serial port driver\" Serenum.SVCDESC = \"Serenum Filter Driver\" [编辑 - 3/20/05 by xl1533] |
|
沙发#
发布于:2005-03-22 09:51
setupapi.log内容如下:
------------------------------------------------------------------------------------- 使用向导安装: [2005/03/22 09:25:40 2764.124] #-198 处理的命令行: \"F:\\无线猫\\WIRELESSMODEM\\VC\\SetupINF2\\Debug\\SetupINF2.exe\" C:\\WINDOWS\\INF\\SERWPL.INF USB\\VID_067B&PID_2303 #I060 设置所选的驱动器。 #-019 正在查找硬件 ID(s): usb\\vid_067b&pid_2303&rev_0300,usb\\vid_067b&pid_2303 #-018 正在查找兼容 ID(s): usb\\class_ff&subclass_00&prot_00,usb\\class_ff&subclass_00,usb\\class_ff #I022 在 \"c:\\windows\\inf\\serwpl.inf\" 中发现了 \"USB\\VID_067B&PID_2303\";设备: \"Prolific USB-to-Serial Bridge\";驱动程序: \"Prolific USB-to-Serial Bridge\";提供程序: \"Prolific\";制造商: \"Prolific Technology Inc.\";段: \"ComPort\" #I087 驱动程序节点不受信任的,名次从 0x00000001 更改到 0x00008001。 #I023 实际安装部分: [ComPort.NT]。等级: 0x00008001。驱动程序有效日期: 12/01/2003。 #-166 设备安装函数: DIF_SELECTBESTCOMPATDRV。 #I063 从 [ComPort] 中的 \"c:\\windows\\inf\\serwpl.inf\" 选择驱动器安装服务。 #I320 设备的类别 GUID 依旧为: {4D36E978-E325-11CE-BFC1-08002BE10318}。 #I060 设置所选的驱动器。 #I058 选择最兼容的驱动器。 #-124 正在做“仅复制”安装 \"USB\\VID_067B&PID_2303\\00000001\"。 #W334 扫描文件队列时未能确认编录。 错误 1168: 找不到元素。 #E368 驱动程序 \"Prolific USB-to-Serial Bridge\" 的一个未经过签署或签署不正确的文件 \"c:\\windows\\inf\\serwpl.inf\" 被阻塞(策略=警告,用户说不行)。 错误 1168: 找不到元素。 #W187 安装失败,试图还原源文件。 ------------------------------------------------------------------------------------- 使用install.c安装 [2005/03/22 09:41:18 432.127] #-198 处理的命令行: \"F:\\无线猫\\WIRELESSMODEM\\VC\\SetupINF2\\Debug\\SetupINF2.exe\" C:\\WINDOWS\\INF\\SERWPL.INF USB\\VID_067B&PID_2303 #I060 设置所选的驱动器。 #-019 正在查找硬件 ID(s): usb\\vid_067b&pid_2303 #I022 在 \"c:\\windows\\inf\\serwpl.inf\" 中发现了 \"USB\\VID_067B&PID_2303\";设备: \"Prolific USB-to-Serial Bridge\";驱动程序: \"Prolific USB-to-Serial Bridge\";提供程序: \"Prolific\";制造商: \"Prolific Technology Inc.\";段: \"ComPort\" #I087 驱动程序节点不受信任的,名次从 0x00000000 更改到 0x00008000。 #I023 实际安装部分: [ComPort.NT]。等级: 0x00008000。驱动程序有效日期: 12/01/2003。 #-166 设备安装函数: DIF_SELECTBESTCOMPATDRV。 #I063 从 [ComPort] 中的 \"c:\\windows\\inf\\serwpl.inf\" 选择驱动器安装服务。 #I320 设备的类别 GUID 依旧为: {4D36E978-E325-11CE-BFC1-08002BE10318}。 #I060 设置所选的驱动器。 #I058 选择最兼容的驱动器。 #-124 正在做“仅复制”安装 \"ROOT\\USB\\0000\"。 #W334 扫描文件队列时未能确认编录。 错误 1168: 找不到元素。 #E366 驱动程序 \"Prolific USB-to-Serial Bridge\" 的一个未经过签署或签署不正确的文件 \"c:\\windows\\inf\\serwpl.inf\" 将得到安装(策略=警告,用户说可以)。 错误 1168: 找不到元素。 #-024 正在将文件 \"F:\\无线猫\\WirelessModem\\vc\\inf\\ser2pl.sys\" 复制到 \"C:\\WINDOWS\\system32\\DRIVERS\\ser2pl.sys\"。 #E362 驱动程序 \"Prolific USB-to-Serial Bridge\" 的一个未经过签署或签署不正确的文件 \"F:\\无线猫\\WirelessModem\\vc\\inf\\ser2pl.sys\" 将得到安装(策略=警告)。 错误 0x800b0100: 主题中没有签名。 #-166 设备安装函数: DIF_REGISTER_COINSTALLERS。 #I056 注册了共同安装程序。 #-166 设备安装函数: DIF_INSTALLINTERFACES。 #-011 正在从 \"c:\\windows\\inf\\serwpl.inf\" 安装段 [ComPort.NT.Interfaces]。 #I054 安装接口。 #-166 设备安装函数: DIF_INSTALLDEVICE。 #I123 进行 \"ROOT\\USB\\0000\" 的完整安装。 #I163 设备未开始: 设备有问题: 0x22: CM_PROB_NO_SOFTCONFIG. #I121 \"ROOT\\USB\\0000\" 的设备安装成功完成。 ------------------------------------------------------------------------------------- 使用向导安装: 实际安装部分: [ComPort.NT]。 “仅复制”安装 \"USB\\VID_067B&PID_2303\\00000001\"。 使用install.c安装: 实际安装部分:[ComPort.NT.Interfaces]。 “仅复制”安装 \"ROOT\\USB\\0000\"。 为什么路径都变了,而且我的inf文件中没有[ComPort.NT.Interfaces]这一项。 |
|
板凳#
发布于:2007-06-14 14:00
Re:【求助】在xp下使用DDK附带带的devcon.exe和install.c安装inf驱动后...
知道的不太详细,胡乱地说一说.devcon.exe install安装的是一个"环回根设备",不要问我这个词啥意思,我也不懂. 把install 换成 update,先插上USB设备,可以正确安装. |
|
地板#
发布于:2007-06-15 08:51
在xp下使用DDK附带带的devcon.exe和install.c安装inf驱动后,usb设备不能使用,使用向导安装却正常
你搞错了安装的意义devcon.exe的install部分,是安装那种没有实体硬件的driver,具体的说,就是devcon的安装过程会帮你产生一个根据你的hardware id而产生的pdo。而你的情况却是,pdo是要等到你的usb设备插入以后才会产生。这样做,不仅不能安装driver,而且在你插入usb设备后,会有2个同样hardware id的pdo但在不同的enumerator上。 正确的做法应该是,如果要在usb设备插入前安装,用SetupCopyOEMInf;如果在插入后,用UpdateDriverForPlugAndPlayDevices,或者devcon update |
|
|
驱动小牛
|
地下室#
发布于:2008-06-30 10:59
Re:【求助】在xp下使用DDK附带带的devcon.exe和install.c安装inf
原来一直不知道硬件插入前如何安装,原来是SetupCopyOEMInf,学习了 |