VC 自动安装驱动程序 现做一个项目,需要和自己公司的设备通过USB设备相连,有自己的驱动程序,包括 .SYS .INF等 要求在程序安装过程中或程序启动运行时进行驱动程序的安装 我的程序是用MFC写的,安装包的制作是用VS2008自带的新建的项目安装程序 急急急! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 或者谁能帮我解释一下这个INF完成了什么功能,好用VC实现,O(∩_∩)O~ [Version]Signature = "$Chicago$"provider = %Mitech%DriverVer = INF_DATE,INF_VERSIONCatalogFile = TGE udisk.catClass = LibUsbDevicesClassGUID = {EB781AAF-9C70-4523-A5DF-642A87ECA567}[ClassInstall]AddReg=ClassInstall.AddReg[ClassInstall32]AddReg=ClassInstall.AddReg[ClassInstall.AddReg]HKR,,,,"LibUSB-Win32 Devices"HKR,,Icon,,"-20"[Manufacturer]%manufacturer%=Devices;--------------------------------------------------------------------------; Files;--------------------------------------------------------------------------[SourceDisksNames]1 = "Libusb-Win32 Driver Installation Disk",,[SourceDisksFiles]libusb0.sys = 1,,libusb0.dll = 1,,[DestinationDirs]LIBUSB.Files.Sys = 10,System32\DriversLIBUSB.Files.Dll = 10,System32[LIBUSB.Files.Sys]libusb0.sys[LIBUSB.Files.Dll]libusb0.dll;--------------------------------------------------------------------------; Device driver;--------------------------------------------------------------------------[LIBUSB_DEV]CopyFiles = LIBUSB.Files.Sys, LIBUSB.Files.DllAddReg = LIBUSB_DEV.AddReg[LIBUSB_DEV.NT]CopyFiles = LIBUSB.Files.Sys, LIBUSB.Files.Dll[LIBUSB_DEV.HW]DelReg = LIBUSB_DEV.DelReg.HWAddReg = LIBUSB_DEV.AddReg.HW[LIBUSB_DEV.NT.HW]DelReg = LIBUSB_DEV.DelReg.HWAddReg = LIBUSB_DEV.AddReg.HW[LIBUSB_DEV.NT.Services]AddService = libusb0, 0x00000002, LIBUSB.AddService[LIBUSB_DEV.AddReg]HKR,,DevLoader,,*ntkernHKR,,NTMPDriver,,libusb0.sys; Older versions of this .inf file installed filter drivers. They are not; needed any more and must be removed[LIBUSB_DEV.DelReg.HW]HKR,,LowerFiltersHKR,,UpperFilters; Device properties[LIBUSB_DEV.AddReg.HW]HKR,,SurpriseRemovalOK, 0x00010001, 1;--------------------------------------------------------------------------; Services;--------------------------------------------------------------------------[LIBUSB.AddService]DisplayName = "LibUsb-Win32 - Kernel Driver INF_DATE, INF_VERSION"ServiceType = 1StartType = 3ErrorControl = 0ServiceBinary = %12%\libusb0.sys;--------------------------------------------------------------------------; Devices;--------------------------------------------------------------------------[Devices]"Mitech Usb Device"=LIBUSB_DEV, USB\VID_0471&PID_0666;--------------------------------------------------------------------------; Strings;--------------------------------------------------------------------------[Strings]manufacturer = "MFD USB TEST" 安装包里直接调这个INF不可以吗? 我的想法就是当程序运行是自己写程序完成INF文件里面的东西 要是在安装的时候就完成,呵呵,我不会………… 顶一下!! INF稍微有点麻烦, 简单的驱动可以直接复制文件, 创建内核服务复制文件到系统驱动目录, 创建内核服务可以直接用API: CreateService inf格式说明http://blog.csdn.net/zzz3265/archive/2010/04/15/5488341.aspx To zzz3265 谢谢 不过到现在一直没有找到好的办法解决啊! 我想要自己手动完成INF所要完成的功能吧 还有别的办法吗 google一下 驱动动态加载 邮箱:[email protected]谢谢 麻烦一下,偶也想要一份,谢谢[email protected] to YUNSHI0123 已经发了 请查收 to hunt2088 已收到,谢谢 to hunt2088:收到,谢谢 楼主,我也在做这个,有空时发给我一份,非常感谢,这几天一直在整理这个思路。[email protected] 楼主还有资料吗,发一份[email protected]谢谢!! 楼主,有空时发给我一份,非常感谢![email protected] 楼主,有时间给我也发一份,[email protected]谢谢。 楼主 有时间也给我一份:[email protected]谢谢 我邮箱[email protected] 谢谢了 求一个vc 去html标签的 正则表达式 CComboBox具有挑战的问题:下拉时高亮选中的并不是正确的项 断线自动恢复? 为什么使用向导生成的程序直接运行都出错呢? 在atl写程序中 能否使用mfc? 我的机器安装了xp后,administrator登录文件属性中居然没有控制文件的页面,高手帮帮我 ole db求教 怎么样把CString 转换成 USHORT ????? VC++(DLL) into ASM 如何解决重绘时的闪烁问题?请各位指教 '控制面板'中的'打印机和传真',是如何获得打印机列表的 GetWindowLong失败
或者谁能帮我解释一下这个INF完成了什么功能,好用VC实现,O(∩_∩)O~
[Version]
Signature = "$Chicago$"
provider = %Mitech%
DriverVer = INF_DATE,INF_VERSION
CatalogFile = TGE udisk.catClass = LibUsbDevices
ClassGUID = {EB781AAF-9C70-4523-A5DF-642A87ECA567}[ClassInstall]
AddReg=ClassInstall.AddReg[ClassInstall32]
AddReg=ClassInstall.AddReg[ClassInstall.AddReg]
HKR,,,,"LibUSB-Win32 Devices"
HKR,,Icon,,"-20"[Manufacturer]
%manufacturer%=Devices;--------------------------------------------------------------------------
; Files
;--------------------------------------------------------------------------[SourceDisksNames]
1 = "Libusb-Win32 Driver Installation Disk",,[SourceDisksFiles]
libusb0.sys = 1,,
libusb0.dll = 1,,[DestinationDirs]
LIBUSB.Files.Sys = 10,System32\Drivers
LIBUSB.Files.Dll = 10,System32[LIBUSB.Files.Sys]
libusb0.sys[LIBUSB.Files.Dll]
libusb0.dll;--------------------------------------------------------------------------
; Device driver
;--------------------------------------------------------------------------[LIBUSB_DEV]
CopyFiles = LIBUSB.Files.Sys, LIBUSB.Files.Dll
AddReg = LIBUSB_DEV.AddReg[LIBUSB_DEV.NT]
CopyFiles = LIBUSB.Files.Sys, LIBUSB.Files.Dll[LIBUSB_DEV.HW]
DelReg = LIBUSB_DEV.DelReg.HW
AddReg = LIBUSB_DEV.AddReg.HW[LIBUSB_DEV.NT.HW]
DelReg = LIBUSB_DEV.DelReg.HW
AddReg = LIBUSB_DEV.AddReg.HW[LIBUSB_DEV.NT.Services]
AddService = libusb0, 0x00000002, LIBUSB.AddService[LIBUSB_DEV.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,libusb0.sys; Older versions of this .inf file installed filter drivers. They are not
; needed any more and must be removed
[LIBUSB_DEV.DelReg.HW]
HKR,,LowerFilters
HKR,,UpperFilters; Device properties
[LIBUSB_DEV.AddReg.HW]
HKR,,SurpriseRemovalOK, 0x00010001, 1;--------------------------------------------------------------------------
; Services
;--------------------------------------------------------------------------[LIBUSB.AddService]
DisplayName = "LibUsb-Win32 - Kernel Driver INF_DATE, INF_VERSION"
ServiceType = 1
StartType = 3
ErrorControl = 0
ServiceBinary = %12%\libusb0.sys;--------------------------------------------------------------------------
; Devices
;--------------------------------------------------------------------------[Devices]
"Mitech Usb Device"=LIBUSB_DEV, USB\VID_0471&PID_0666
;--------------------------------------------------------------------------
; Strings
;--------------------------------------------------------------------------[Strings]manufacturer = "MFD USB TEST"
我的想法就是当程序运行是自己写程序完成INF文件里面的东西 要是在安装的时候就完成,呵呵,我不会………… 顶一下!!
复制文件到系统驱动目录,
创建内核服务可以直接用API: CreateService
http://blog.csdn.net/zzz3265/archive/2010/04/15/5488341.aspx
To zzz3265
谢谢
不过到现在一直没有找到好的办法解决啊! 我想要自己手动完成INF所要完成的功能吧
还有别的办法吗
邮箱:[email protected]
谢谢
[email protected]
to hunt2088
已收到,谢谢
收到,谢谢
[email protected]
[email protected]
[email protected]
谢谢。
[email protected]
谢谢