xiaou
驱动牛犊
驱动牛犊
  • 注册日期2008-05-15
  • 最后登录2008-07-23
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望3点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
阅读:2364回复:1

[求助]devcon不能安装协议驱动?

楼主#
更多 发布于:2008-05-16 19:08
大家看看一下是我的inf文件,先声明我手动安装成功了的然后用户程序也测试了没问题的。

;-------------------------------------------------------------------------
; PACKET.INF -- Sample Protocol Driver
;
; Copyright (c) 1993-1999, Microsoft Corporation
;-------------------------------------------------------------------------
[version]
Signature   = "$Windows NT$"
Class       = NetTrans
ClassGUID   = {4d36e975-e325-11ce-bfc1-08002be10318}
Provider    = %Msft%
DriverVer   = 06/16/2004,5.00.2064

[Manufacturer]
%Msft%=MSFT

[MSFT]
%PACKET_Desc%=Install, MS_PACKET

;-------------------------------------------------------------------------
; Installation Section
;-------------------------------------------------------------------------
[Install]
AddReg=Inst_Ndi
Characteristics=0 ; Has no characterstic
CopyFiles=CpyFiles_Sys

;-------------------------------------------------------------------------
; Ndi installation support
;-------------------------------------------------------------------------
[Inst_Ndi]
HKR,Ndi,Service,,"Packet"  ;
HKR,Ndi,HelpText,,%PACKET_HelpText%
HKR, Ndi\Interfaces, UpperRange,, noupper
HKR,"Ndi\Interfaces","LowerRange",,"ndis5,ndis4"

;-------------------------------------------------------------------------
; Service installation support
;-------------------------------------------------------------------------
[Install.Services]
AddService=Packet,,PACKET_Service_Inst

[Packet_Service_Inst]
DisplayName     = %PACKET_Desc%
ServiceType     = 1 ;SERVICE_KERNEL_DRIVER
StartType       = 3 ;SERVICE_DEMAND_START  
ErrorControl    = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary   = %12%\ProtoDrv.sys        
LoadOrderGroup  = "PNP_TDI"
AddReg          = AddReg_PACKET_Service_Inst
Description     = %PACKET_Desc%

[AddReg_PACKET_Service_Inst]
HKLM,"System\CurrentControlSet\Services\Packet","TextModeFlags",%REG_DWORD%,0x0001
HKR,"Parameters","Test",,"Hello"

;-------------------------------------------------------------------------
; Support for removal of static registry settings
;-------------------------------------------------------------------------
[Install.Remove]
DelReg=Del_Static_Reg

[Install.Remove.Services]
DelService=Packet

[Del_Static_Reg]
HKLM,"System\CurrentControlSet\Services\Packet","TextModeFlags"

;-------------------------------------------------------------------------
; Declare Destination Directories for file copy/deletion
;-------------------------------------------------------------------------
[DestinationDirs]
CpyFiles_Sys    = 12    ; DIRID_DRIVERS


;-------------------------------------------------------------------------
; Files to Copy/Delete - Referenced by Install and Remove sections above
;-------------------------------------------------------------------------
[CpyFiles_Sys]
ProtoDrv.sys,,,2                            

[Strings]
Msft = "Microsoft"
PACKET_Desc = "DDK PACKET Protocol"
PACKET_HelpText = "A non-routable protocol designed for use in small LANs."
REG_DWORD = 0x10001


因为devcon安装的话,需要硬件id,但我找不到hwid。
这样试了不行:devcon.exe install E:\\uu\\sys\\packet.inf MS_PACKET

网上有说可以用pnpids来根据inf生成驱动的硬件ID。但我找不到pnpids,谁有的给一个。这是win2000里面的。



我又尝试了
    TCHAR szPath[256]=TEXT(
"rundll32.exe setupapi.dll,InstallHinfSection Install 132 E:\\uu\\sys\\packet.inf"
    );
    STARTUPINFO si={sizeof si};
    PROCESS_INFORMATION piProcess1;
    if(CreateProcess(NULL,szPath,NULL,NULL,FALSE,0,NULL,NULL,&si,&piProcess1)){
        CloseHandle(piProcess1.hThread);CloseHandle(piProcess1.hProcess);
    }
还是不行。

急的不得了/~@!
学习!学习!
hylas
驱动牛犊
驱动牛犊
  • 注册日期2006-06-05
  • 最后登录2008-07-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2008-07-29 08:57
怎么 没人 帮忙解决
游客

返回顶部