rain0412
驱动牛犊
驱动牛犊
  • 注册日期2006-01-23
  • 最后登录2012-08-18
  • 粉丝0
  • 关注0
  • 积分17分
  • 威望201点
  • 贡献值0点
  • 好评度42点
  • 原创分0分
  • 专家分0分
阅读:3193回复:2

怎么编写过滤驱动的安装程序

楼主#
更多 发布于:2009-04-10 16:37
最近写了个过滤驱动程序,用inf文件安装完成可以用,现在想写个安装程序,用InstallHinfSection的文件拷贝完成后不安装,那位朋友能否帮忙
rain0412
驱动牛犊
驱动牛犊
  • 注册日期2006-01-23
  • 最后登录2012-08-18
  • 粉丝0
  • 关注0
  • 积分17分
  • 威望201点
  • 贡献值0点
  • 好评度42点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2009-04-10 16:38
我的inf文件如下
; kbfiltr.inf
;
; Installation inf for the Device that needs filtering adapter.
;
; (c) Copyright 1999 Microsoft
;

[Version]
Signature="$Windows NT$"
Provider=%DDK_Ex%
ClassGUID={4D36E96B-E325-11CE-BFC1-08002BE10318}
Class=Keyboard
CatalogFile=kbfiltr.cat
DriverVer=07/20/1999

[DestinationDirs]
DefaultDestDir   = 12

;
; Driver information
;

[Manufacturer]
%DDK_Ex%   = DDK_Ex.Mfg

[DDK_Ex.Mfg]
%DDK_Ex% = kbfiltr, *PNP0BAAD


;
; General installation section
;

[kbfiltr]
; perform port related actions from keyboard.inf
Include=keyboard.inf
Needs=STANDARD_Inst

; Copy the driver over
CopyFiles=kbfiltr.CopyFiles


;
; File sections
;

[kbfiltr.CopyFiles]
kbfiltr.sys


;
; Service Installation
;

[kbfiltr.Services]
AddService = kbfiltr,  , kbfiltr_Service_Inst
; Install the port driver and mouclass from keyboard.inf
Include=keyboard.inf
Needs=STANDARD_Inst.Services

[kbfiltr_Service_Inst]
DisplayName    = %kbfiltr.SvcDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 0                  ; SERVICE_ERROR_IGNORE
LoadOrderGroup = Keyboard Port
ServiceBinary  = %12%\kbfiltr.sys

[kbfiltr.HW]
; Add the device upper filter
AddReg = kbfiltr.HW.AddReg

; run the directives need by the port driver
Include=keyboard.inf
Needs=STANDARD_Inst.HW

[kbfiltr.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"kbfiltr"


;
; Source file information
;

; use [SourceDisksNames.x86] for x86 only installs
; use [SourceDisksNames.alpha] for alpha only installs

[SourceDisksNames]
1 = %DiskId1%,,,

[SourceDisksFiles]
kbfiltr.sys = 1,,


[Strings]

;
; Non-Localizable Strings
;

REG_SZ         = 0x00000000
REG_MULTI_SZ   = 0x00010000
REG_EXPAND_SZ  = 0x00020000
REG_BINARY     = 0x00000001
REG_DWORD      = 0x00010001
SERVICEROOT    = "System\CurrentControlSet\Services"

;
; Localizable Strings
;

DiskId1 = "DDK Example Installation Disk #1 (Keyboard)"
DDK_Ex = "DDK Example Device that needs filtering"
kbfiltr.SvcDesc="Keyboard Filter Example"
zhangcheng12
驱动牛犊
驱动牛犊
  • 注册日期2007-12-11
  • 最后登录2010-04-26
  • 粉丝0
  • 关注0
  • 积分4分
  • 威望48点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2010-01-29 15:51
我写的mousefilter也有这个问题,InstallHinfSection和devcon都不行,大哥解决了吗?
游客

返回顶部