阅读:2956回复:5
驱动程序自动安装,解决就给分,多少您自己说
拷贝文件到指定目录比较容易,但是需要往注册表里写那些东东阿?下面是驱动inf文件部分内容:
[Version] Signature = "$Windows NT$" Class = NetService ClassGUID = {4D36E974-E325-11CE-BFC1-08002BE10318} Provider = %NuMega% DriverVer = 1.0 [Manufacturer] %NuMega% = Models [ControlFlags] [Models] %SecurityVirtualCardFilter_Desc% = SecurityVirtualCardFilter.ndi, Nm_SecurityVirtualCardFilter [SecurityVirtualCardFilter.ndi] AddReg = SecurityVirtualCardFilter.ndi.AddReg, SecurityVirtualCardFilter.AddReg Characteristics = 0x410 ; NCF_FILTER | NCF_NO_SERVICE SecurityVirtualCardFilter.CopyFiles.Sys, SecurityVirtualCardFilter.CopyFiles.Inf CopyFiles = SecurityVirtualCardFilter.CopyFiles.Sys, SecurityVirtualCardFilter.CopyFiles.Inf [SourceDisksNames] 1=%DiskDescription%,"",, [SourceDisksFiles] securityvirtualcard.sys=1 netFilterMp.inf=1 [DestinationDirs] DefaultDestDir = 12 SecurityVirtualCardFilter.CopyFiles.Init = 11 ; %windir%System32 SecurityVirtualCardFilter.CopyFiles.Sys = 12 ; %windir%System32drivers SecurityVirtualCardFilter.CopyFiles.Inf = 17 ; %windir%inf [SecurityVirtualCardFilter.CopyFiles.Init] [SecurityVirtualCardFilter.CopyFiles.Sys] securityvirtualcard.sys,,,2 [SecurityVirtualCardFilter.CopyFiles.Inf] netFilterMp.inf,,,2 [SecurityVirtualCardFilter.ndi.AddReg] HKR, Ndi, Service, , SecurityVirtualCard HKR, Ndi, FilterClass, , failover HKR, Ndi, FilterDeviceInfFile, , netFilterMp.inf HKR, Ndi, FilterDeviceInfId, , Nm_SecurityVirtualCardFiltermp HKR, NdiInterfaces, UpperRange, , noupper HKR, NdiInterfaces, LowerRange, , nolower HKR, NdiInterfaces, FilterMediaTypes, , "ethernet, tokenring, fddi" HKR, Ndi, HelpText, , %SecurityVirtualCardFilter_HELP% [SecurityVirtualCardFilter.AddReg] HKR, Parameters, Mediums, 0, 31 HKR, Parameters, DebugLevel, 0, 31 [SecurityVirtualCardFilter.Ndi.Remove.Services] DelService = SecurityVirtualCardFilter [Strings] NuMega = "Microsoft" DiskDescription = "SecurityVirtualCard Filter Install Disk" SecurityVirtualCardFilter_Desc = "Security Virtual Card" SecurityVirtualCardFilter_HELP = "Processes network packets in TBD way for TBD purpose" |
|
最新喜欢:![]() |
沙发#
发布于:2004-06-11 11:07
另外还有个netFilterMp.inf文件,其主要内容如下:
[Version] signature = "$Windows NT$" Class = Net ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} Provider = %NuMega% DriverVer = 1.0 [ControlFlags] ExcludeFromSelect = Nm_SecurityVirtualCardFiltermp [DestinationDirs] DefaultDestDir=12 ; No files to copy [Manufacturer] %NuMega% = Models [Models] %SecurityVirtualCardFilterMP_Desc% = SecurityVirtualCardFilterMP.ndi, Nm_SecurityVirtualCardFiltermp [SecurityVirtualCardFilterMP.ndi] Characteristics = 0x01 ;NCF_VIRTUAL. Consider: NCF_NOT_USER_REMOVABLE | NCF_HIDDEN CopyFiles = [SecurityVirtualCardFilterMP.ndi.Services] AddService = SecurityVirtualCard,0x2, SecurityVirtualCardFilterMP.AddService [SecurityVirtualCardFilterMP.AddService] DisplayName = %SecurityVirtualCardFilterMP_Desc% ServiceType = 1 ;SERVICE_KERNEL_DRIVER StartType = 3 ;SERVICE_DEMAND_START ErrorControl = 1 ;SERVICE_ERROR_NORMAL ServiceBinary = %12%securityvirtualcard.sys LoadOrderGroup = PNP_TDI AddReg = SecurityVirtualCardFilterMP.AddService.AddReg [SecurityVirtualCardFilterMP.AddService.AddReg] HKR, NDIparamsMaxPoolSize, ParamDesc, 0, %MaxPoolSize% HKR, NDIparamsMaxPoolSize, type, 0, "dword" HKR, NDIparamsMaxPoolSize, default, 0, 1024 HKR, NDIparamsMaxPoolSize, optional, 0, "1" HKR, NDIparamsMaxPoolSize, max, 0, 65535 HKR, NDIparamsDebugLevel, ParamDesc, 0, %DebugLevel% HKR, NDIparamsDebugLevel, type, 0, "enum" HKR, NDIparamsDebugLevel, default, 0, "0" HKR, NDIparamsDebugLevel, optional, 0, "1" HKR, NDIparamsDebugLevelenum, "0", 0, "TraceAlways" HKR, NDIparamsDebugLevelenum, "1", 0, "TraceInfo" HKR, NDIparamsDebugLevelenum, "2", 0, "TraceWarning" HKR, NDIparamsDebugLevelenum, "3", 0, "TraceError" HKR, NDIparamsDebugLevelenum, "4", 0, "TraceFatal" HKR, NDIparamsDebugLevelenum, "5", 0, "TraceNever" [SourceDisksNames] ;None [SourceDisksFiles] ;None [Strings] NuMega = "Microsoft" SecurityVirtualCardFilterMP_Desc = "Security Virtual Card" MaxPoolSize = "Maximum number of packet descriptors for repackaging" |
|
板凳#
发布于:2004-06-11 11:32
用instalshield 打包,脚本如下::
#include "ifx.h" ////////////////////// string defines //////////////////////////// //////////////////// installation declarations /////////////////// // ----- DLL function prototypes ----- // your DLL function prototypes // ---- script function prototypes ----- // your script function prototypes // your global variables ////////////////////////////////////////////////////////////////////////////// // // FUNCTION: OnBegin // // EVENT: Begin event is always sent as the first event during installation. // ////////////////////////////////////////////////////////////////////////////// function OnBegin() begin if (!(SYSINFO.WINNT.bWin2000)) then MessageBox("The installation only for Windows 2000.",INFORMATION); abort; endif; //delete device infomation RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); RegDBDeleteKey("Enum\USB\VID_066F&PID_8000"); end; ////////////////////////////////////////////////////////////////////////////// // // FUNCTION: OnFirstUIBefore // // EVENT: FirstUIBefore event is sent when installation is run for the first // time on given machine. In the handler installation usually displays // UI allowing end user to specify installation parameters. After this // function returns, ComponentTransferData is called to perform file // transfer. // /////////////////////////////////////////////////////////////////////////////// function OnFirstUIBefore() number nResult,nSetupType; string szTitle, szMsg; LIST listStartCopy; begin // TO DO: if you want to enable background, window title, and caption bar title // SetTitle( @TITLE_MAIN, 24, WHITE ); // SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Enable( FULLWINDOWMODE ); // Enable( BACKGROUND ); // SetColor(BACKGROUND,RGB (0, 128, 128)); TARGETDIR = PROGRAMFILES ^@COMPANY_NAME ^@PRODUCT_NAME; Dlg_Start: // beginning of dialogs label Dlg_SdWelcome: szTitle = ""; szMsg = ""; nResult = SdWelcome( szTitle, szMsg ); if (nResult = BACK) goto Dlg_Start; // setup default status SetStatusWindow(0, ""); Enable(STATUSEX); StatusUpdate(ON, 100); return 0; end; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION: OnFirstUIAfter // // EVENT: FirstUIAfter event is sent after file transfer, when installation // is run for the first time on given machine. In this event handler // installation usually displays UI that will inform end user that // installation has been completed successfully. // /////////////////////////////////////////////////////////////////////////////// function OnFirstUIAfter() STRING szTitle, szMsg1, szMsg2; NUMBER nReserved; begin Disable(STATUSEX); ShowObjWizardPages(NEXT); szMsg1 = SdLoadString(IFX_SDFINISH_MSG1); nReserved = 0; SdFinishReboot(szTitle, szMsg1, SYS_BOOTMACHINE,szMsg2,nReserved); end; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION: OnMoving // // EVENT: Moving event is sent when file transfer is started as a result of // ComponentTransferData call, before any file transfer operations // are performed. // /////////////////////////////////////////////////////////////////////////////// function OnMoving() string szAppPath; begin // Set LOGO Compliance Application Path // TO DO : if your application .exe is in a subfolder of TARGETDIR then add subfolder szAppPath = TARGETDIR; RegDBSetItem(REGDB_APPPATH, szAppPath); RegDBSetItem(REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY); end; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION: OnEnd // // EVENT: MaintUIAfter event is sent after file transfer, when end user runs // installation that has already been installed on the machine. Usually // this happens through Add/Remove Programs applet. // In the handler installation usually displays UI that will inform // end user that maintenance/uninstallation has been completed successfully. // /////////////////////////////////////////////////////////////////////////////// function OnEnd() string szCmdLine ; begin szCmdLine = "setupapi.dll,InstallHinfSection DefaultInstall 128 " + WINDIR + "\inf\\NetFilter.INF"; if(LaunchAppAndWait(WINSYSDIR ^ "RUNDLL32.EXE", szCmdLine, WAIT)<0) then MessageBox ("Unable to launch" ,SEVERE); //MessageBox (szCmdLine ,SEVERE); return -1; endif; end; /////////////////////////////////////////////////////////////////////////////// // // FUNCTION: OnMaintUIAfter // // EVENT: MaintUIAfter event is sent after file transfer, when end user runs // installation that has already been installed on the machine. Usually // this happens through Add/Remove Programs applet. // In the handler installation usually displays UI that will inform // end user that maintenance/uninstallation has been completed successfully. // /////////////////////////////////////////////////////////////////////////////// function OnMaintUIAfter() STRING szTitle, szMsg1, szMsg2, szOption1, szOption2; NUMBER bOpt1, bOpt2; begin Disable(STATUSEX); ShowObjWizardPages(NEXT); //Delete device information RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); RegDBDeleteKey("Enum\USB\VID_066F&PID_8000"); bOpt1 = FALSE; bOpt2 = FALSE; szMsg1 = SdLoadString(IFX_SDFINISH_MAINT_MSG1); szTitle = SdLoadString(IFX_SDFINISH_MAINT_TITLE); SdFinishEx(szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2); end; 各位大虾,帮帮忙啊,解决了就狂甩分~~ |
|
地板#
发布于:2004-06-11 14:00
现在安装后,注册不了信息,注册表里找不到对应的内容
|
|
地下室#
发布于:2004-08-12 15:47
关注!!不过好像没法解决!
|
|
|
5楼#
发布于:2004-08-16 01:11
直接将INF和SYS文件用instalshield装到目标文件夹试试。
|
|