阅读:1737回复:5
usb设备开发成功后的问题,安装???20分重谢
使用一个usb口安装驱动成功后,把设备插入另一个usb口中,系统提示发现新硬件,需要手动浏览查找.sys文件,如何让系统自己找到.sys文件实现第二个usb口的自动安装??
|
|
最新喜欢:![]() |
沙发#
发布于:2003-06-16 09:26
你是指的vid和pid么?有啊
|
|
板凳#
发布于:2003-06-15 12:09
你的设备没有序列号,是吗?
|
|
|
地板#
发布于:2003-06-12 13:51
楼主,不行啊。
我按照中文贴子中的第二条去做,好像不行啊 :( 当我重新插入第二个usb口的时候,系统仍然提示让我查找.sys文件 |
|
地下室#
发布于:2003-06-12 09:41
谢谢!给分先
|
|
5楼#
发布于:2003-06-11 18:06
我刚好也在看这个问题,copy给你看看!
请问你的安装程序是怎么做的,就是那种run install,ok的那种, 不需要用户交互的。还有你用的是68013吗? #--------------- FYI ---------------------# Copying INFs It is sometimes necessary to copy INF files during device installation, so that Setup can find them without repetitively displaying user prompts. For example, the base INF file for a multifunction device might copy the INF files for the device\'s individual functions, so that Setup can find these INF files without prompting the user each time it installs one of the device\'s functions. To copy INF files, you can use either of the following techniques: ? A co-installer or setup application can call SetupCopyOEMInf (described in Platform SDK documentation). This DDK includes source code for a co-installer, cocpyinf.dll, which uses this technique. The source code resides under the DDK\'s /src directory. ? (Windows XP and later.) An INF file can include the INF CopyINF directive. (Note that this DDK also includes a redistributable, compiled version of cocpyinf.dll. If you use this co-installer for your device, the CopyINF directive can then be used on Windows 2000. The redistributable version of copyinf.dll resides under the DDK\'s \\tools directory.) Both of these methods will: ? Install the appropriate catalog file, if it exists, along with the INF file. ? Give the INF file a unique name so that it does not overwrite any other INF files, and will not be overwritten by other INF files. ? Retain the path to the source medium from which device files are to be copied. ? Ensure compatibility with future versions of Windows. On Windows 2000 and later, installation software must never copy INF files directly into a system\'s %windir%/inf directory. Copying INF files by using techniques not described in this section will invalidate a driver\'s digital signature. Built on Friday, April 11, 2003 INF CopyINF Directive Windows XP and later [DDInstall] CopyINF=filename1.inf[,filename2.inf]... A CopyINF directive causes specified INF files to be copied to the target system. Comments This directive is typically used when installing multifunction devices. If the installation of a multifunction device requires multiple INF files (for multiple functions belonging to multiple setup classes), then using this directive insures that Setup will find the INF files when installing the functions. Use the following rules: ? If the functions supplied by a multifunction device are enumerated as children of a parent device (such as an IEEE 1284.4 device), the INF file for the parent device should have a CopyINF directive to copy the INF files for the device\'s individual functions. ? If all functions supplied by a multifunction device (such as a PCI card) are enumerated as peers of each other, the INF file for each function should have a CopyINF directive to copy the INF files for all peer functions. If you follow these rules, Setup can install drivers for each function without prompting the user for an installation disk for each function. Setup copies the specified INF files as part of the default processing for DIF_INSTALLDEVICE (see SetupDiInstallDevice), after the device has been successfully installed. The locations of INF files specified in the CopyINF directive are relative to the source location of the INF file containing the CopyINF directive. Setup copies the specified INF files into a system directory path that it will search during device installations. You must include all INF files on each disk of a multidisk installation. System support for the CopyINF directive is available in Windows XP and later OS versions. You can also use the directive with Windows 2000 if you install and register the cocpyinf co-installer, which is supplied with this DDK in the /tools directory. For additional information about copying INF files, see Copying INFs. Example [MyMfDevice.NTx86] CopyINF = Sound.INF Built on Friday, April 11, 2003 [wdmaudiodev] USB Audio Device install under Win2000 ? To: <wdmaudiodev@xxxxxxxxxxxxx> ? Subject: [wdmaudiodev] USB Audio Device install under Win2000 ? From: \"Jerry J. Trantow\" <Jerry.Trantow@xxxxxxxxxxxxxxxxxxxxxxxxxxx> ? Date: Fri, 25 Oct 2002 15:44:32 -0500 I\'m having a device driver install issue with a USB Audio filter driver. Recently, we have a number of Win2000 customers that install and get an error 31 (CM_PROB_FAILED_ADD) on the USB Audio Device entry. This doesn\'t occur if a usb audio device which uses the generic USB Audio class driver has previously been installed on the machine. I tried to follow the best practices and the install copies all the files (*.inf, *.sys) into a directory and then calls SetupCopyOEMInf(). The driver is NOT signed. I have also noticed that on the machines that work with the install, the driver details for the audio class only list my filter drivers and four other files: Portcls.sys Stream.sys Ksuser.dll Wdmaud.drv On the machines that don\'t work, the users see a much longer list of driver files including: Ksclock.asx Ksdata.asx Ksproxy.asx ... How can I get my driver install to work the first time without installing the generic drivers first? Has there been a recent change in Win2000 that prevents this from working with my unsigned driver? Any ideas??? ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@freelists.org Subscribe: mailto:wdmaudiodev-request@freelists.org?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@freelists.org?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@freelists.org URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/ 发表于: 2001/4/30 - 06:10 最近写driver有一点心得,虽然不是很重要,但可能某位兄弟正在寻找(就像我当初一样),因此贴出来,给大家参考。有的虽然对driver的开发没有直接的影响,对于产品的商业化比较有用。现在先贴2个,等以后有了新的发现再继续。有不正确的地方,请各位指正。///////////////////////////////////////////////////////////Q1。Win2K下,怎样避免拔出USB设备时产生的“不安全的设备删除“对话框?A1。在IRP_MN_QUERY_CAPABILITIES的处理函数中设置:PDEVICE_CAPABILITIES::SurpriseRemovalOK=TRUE;PDEVICE_CAPABILITIES::Removable=TRUE;PDEVICE_CAPABILITIES::EjectSupported=TRUE;PDEVICE_CAPABILITIES::WarmEjectSupported=TRUE;这样,在System Tray中的“插入硬件“的图标也没有了。具体例子,可以参考DriverWorks中的USBTherm。Q2。怎样安装硬件的驱动而不让Windows弹出“指定.sys\"的对话框?A2。在Win98下,将.inf拷到<WINDIR>Inf下,.sys拷到<WINDIR>System32Drivers下,并且删除<WINDIR>Inf下的DRVIDX.BIN和DRVDATA.BIN,再插入硬件。Win2K下,用SetupCopyOEMInf将.inf文件拷到<WINDIR>Inf下,并且.inf中不能有拷贝.inf的句子,否则,当插入第二个硬件时,系统仍然会提示找不到.sys。//////////////////////////////////////////////////////// v |
|