;---------------------------------------------------------------------------- ; ; KTCCB4N4.INF NDIS4.0 configuration file for Windows NT 4.0 ; Kingston EtheRx CardBus 10/100 Fast Ethernet adapter (KNE-CB4TX) ; 11/16/98 V2.00 ; ;---------------------------------------------------------------------------- [Identification] OptionType = NetAdapter [PlatformsSupported] ISA EISA MCA PCI [Options] KTC [OptionsTextENG] KTC = "Kingston EtheRx CardBus 10/100 Fast Ethernet adapter (KNE-CB4TX)" [AllFileConstants] GenericInfVersion = " V2.00" UtilityInf = "UTILITY.INF" ParamInf = "NCPARAM.INF" subroutineinf = "SUBROUTN.INF" SoftwareType = "driver" Exit_Code = 0 NetEventDLL = "%SystemRoot%\System32\netevent.dll" IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll" Manufacturer = "Kingston" DISABLEPCMCIASYS = "0" ; "1" [FileConstants-KTC] GenericAdapterName = "Kingston EtheRx CardBus 10/100 Fast Ethernet adapter" GenericTitleName = "KNE-CB4TX CardBus PC Card" GenericDriverName = "Kingston EtheRx CardBus 10/100 Fast Ethernet adapter" GenericSysName = "KTCCB4N4.SYS" GenericName = "KTCCB4N4" ProductMajorVersion = "2" ProductMinorVersion = "00" ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion) ProductSoftwareName = "KTCCB4N4" ProductSoftwareDesc = "Kingston EtheRx CardBus 10/100 Fast Ethernet adapter" ProductSoftwarePath = "\SystemRoot\System32\drivers\"$(GenericSysName) NetRuleSoftwareType = "ktccb4n4Sys ndisDriver ktccb4n4Driver" NetRuleSoftwareUse = $(SoftwareType) NetRuleSoftwareBindForm = """ktccb4n4Sys"" yes no container" NetRuleSoftwareClass = {"ktccb4n4Driver basic"} NetRuleSoftwareBindable = {"ktccb4n4Driver ktccb4n4Adapter non exclusive 100"} ProductHardwareName = "KTCCB4N4" ProductHardwareDesc = "Kingston EtheRx CardBus 10/100 Fast Ethernet adapter" NetRuleHardwareType = "KTCCB4N4 ktccb4n4Adapter" NetRuleHardwareBindForm = " yes yes container" NetRuleHardwareClass = {"ktccb4n4Adapter basic"} ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion" ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters" VERS1Manufacturer = "Kingston" VERS1Product = "EtheRx CardBus 10/100 Fast Ethernet adapter" VERS1Type = "KNECB4TX-10/100" PCMCIA = 0 [GeneralConstants] From = "" To = "" ExitCodeOk = 0 ExitCodeCancel = 1 ExitCodeFatal = 2 KeyNull = "" MaximumAllowed = 33554432 RegistryError = NO_ERROR KeyProduct = "" KeyParameters = "" TRUE = 1 FALSE = 0 NoTitle = 0 ExitState = "Active" OldVersionExist = $(FALSE) DriverPath = $(!STF_NTPATH)\drivers [date] ; Now is a list which contains { Sec From 1-1-1970, Year, Month, Day, Hour, ; Minute, Second } Now = {} ? $(!LIBHANDLE) GetSystemDate ;--------------------------------------------------------------------------- ; 1. Identify ; ; DESCRIPTION: To verify that this INF deals with the same type of options ; as we are choosing currently. ; ; INPUT: None ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL ; $($R1): Option Type (COMPUTER ...) ; $($R2): Diskette description ;--------------------------------------------------------------------------- [Identify] read-syms Identification set Status = STATUS_SUCCESSFUL set Identifier = $(OptionType) set Media = #("Source Media Descriptions", 1, 1) Return $(Status) $(Identifier) $(Media) ;------------------------------------------------------------------------ ; 2. ReturnOptions: ; ; DESCRIPTION: To return the option list supported by this INF and the ; localised text list representing the options. ; ; ; INPUT: $($0): Language used. ( ENG | FRN | ... ) ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ; STATUS_NOLANGUAGE ; STATUS_FAILED ; STATUS_NOTSUPPORTED ; $($R1): Option List ; $($R2): Option Text List ;------------------------------------------------------------------------ [ReturnOptions] set Status = STATUS_FAILED set OptionList = {} set OptionTextList = {} set LanguageList = ^(LanguagesSupported, 1) Ifcontains(i) $($0) in $(LanguageList) ifstr(i) $($1) == "" goto returnoptions endif set PlatformList = ^(PlatformsSupported, 1) Ifcontains(i) $($1) in $(PlatformList) goto returnoptions else set Status = STATUS_NOTSUPPORTED goto finish_ReturnOptions endif else set Status = STATUS_NOLANGUAGE goto finish_ReturnOptions endif returnoptions = + set OptionList = ^(Options, 1) set OptionTextList = ^(OptionsText$($0), 1) set Status = STATUS_SUCCESSFUL finish_ReturnOptions = + Return $(Status) $(OptionList) $(OptionTextList) ;------------------------------------------------------------------------ ; InstallOption: ; ; This section is shelled to by main installation processing ; or by NCPASHEL.INF during reconfig, removal, update, etc. ; ; FUNCTION: To copy files representing Options ; To configure the installed option ; To update the registry for the installed option ; ; INPUT: $($0): Language to use ; $($1): OptionID to install ; $($2): SourceDirectory ; $($3): AddCopy (YES | NO) ; $($4): DoCopy (YES | NO) ; $($5): DoConfig (YES | NO) ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ; STATUS_NOLANGUAGE | ; STATUS_USERCANCEL | ; STATUS_FAILED ;------------------------------------------------------------------------ [InstallOption] set Status = STATUS_FAILED set Option = $($1) set SrcDir = $($2) set AddCopy = $($3) set DoCopy = $($4) set DoConfig = $($5) Set !DebugOutputControl = 1 Debug-Output "OEMSETNT.INF: InstallOption" set LanguageList = ^(LanguagesSupported, 1) Ifcontains(i) $($0) NOT-IN $(LanguageList) Return STATUS_NOLANGUAGE endif set-subst LF = "\n" read-syms GeneralConstants read-syms AllFileConstants read-syms FileConstants"-"$(Option) read-syms DialogConstants$(!STF_LANGUAGE)"-"$(Option) ifstr(i) $(!NTN_Origination) == "NCPA" set Continue = $(OK) endif read-syms AllFileConstants$(!STF_LANGUAGE) read-syms FileConstants$(!STF_LANGUAGE)"-"$(Option) detect date set-title $(FunctionTitle) set To = Begin set From = Begin set CommonStatus = STATUS_SUCCESSFUL EndWait Begin = + Set ActivateDetection = FALSE Ifstr(i) $(!NTN_InstallMode) == deinstall set StartLabel = removeadapter else-Ifstr(i) $(!NTN_InstallMode) == Update set StartLabel = UpgradeSoftware else-Ifstr(i) $(!NTN_InstallMode) == bind set StartLabel = bindingadapter else-Ifstr(i) $(!NTN_InstallMode) == configure set StartLabel = configureadapter Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) set From = end set To = end goto nonfatalinfo endif else set StartLabel = installadapter set OEM_ABANDON_OPTIONS = {} set OEM_ABANDON_SOFTWARE = FALSE set OEM_ABANDON_ON = TRUE endif ; Set the Default values set IRQValue = *($(IRQList), 6) ; IRQ Level = 10 set IOBaseAddrValue = *($(IOBaseAddrList), 11) ; IOBase Address = 0x6000 set MemoryAddrValue = *($(MemoryAddrList), 17) ; Memory Address = 0xD0000 set TransmitBuffersValue = *($(TransmitBuffersList), 2) ; TransmitBuffers = 16 set ReceiveBuffersValue = *($(ReceiveBuffersList), 2) ; ReceiveBuffers = 16 Set From = $(fatal) Set To = $(fatal) Goto $(StartLabel) ;----------------------------------------------- ; Installation Section ;----------------------------------------------- installadapter = + ; Check whether the same version of the software exists OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MaximumAllowed) KeyProduct Ifstr $(KeyProduct) != $(KeyNull) ; Same version already existed in the local machine ; Popup the dialog and ask the user whether he wants to continue CloseRegKey $(KeyProduct) ifstr(i) !(NTN_RegBase) == $(ProductKeyName) Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+ $(ProductVersion) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error: cannot get an error string." goto ShellCodeError endif goto end else ; Add a new adapter card? Shell $(UtilityInf), CardExistedDlg ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error: cannot get an error string." goto ShellCodeError endif ifstr(i) $($R1) != "OK" goto end endif set OldVersionExist = $(TRUE) endif endif ; DLL load addition Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO Ifint $($ShellCode) != $(!SHELL_CODE_OK) Goto ShellCodeError Else-Ifstr(i) $($R0) == STATUS_FAILED Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) Goto fatal Else-Ifstr(i) $($R0) == STATUS_USERCANCEL Goto successful Endif Set SrcDir = $($R1) install "Install-Dll" goto adaptersetup ;----------------------------------------------- ; Configuration Section ;----------------------------------------------- ; Get the current values of all the parameters configureadapter = + Ifstr $(KeyProduct) == $(KeyNull) OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MaximumAllowed) KeyProduct Ifstr $(KeyProduct) == $(KeyNull) set RegistryError = CANNOT_FIND_COMPONENT_SERVICE Debug-Output "Cannot find component product key" goto fatalregistry Endif Endif ; Get the other parameters; they're attached to the service parameters key Debug-Output "INF: Shelling to FindService" Shell $(UtilityInf) FindService, $(KeyProduct) Ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "INF: FindService shell failure" Goto ShellCodeError Endif Ifstr(i) $($R0) != NO_ERROR Debug-Output "INF: FindService Shell error: "$($R0) Goto fatalregistry endif Set KeyParameters = $($R2) CloseRegKey $($R1) Ifstr $(KeyParameters) == $(KeyNull) set RegistryError = CANNOT_FIND_COMPONENT_SERVICE Debug-Output "Cannot find component service" goto fatalregistry endif set OldVersionExist = $(TRUE) set ValueName = "" set ValueData = "" set ValueStr = "" set ValueList = {} ; Get the old values from the Registry [Get Values] EnumRegValue $(KeyParameters) ValueList ForListDo $(ValueList) set ValueItem = $($) set ValueName = *($(ValueItem),1) set ValueData = *($(ValueItem),4) ifstr(i) $(ValueName) == "IoBaseAddress" set IOBaseAddrIndex = $(ValueData) else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress" set MemoryAddrIndex = $(ValueData) else-ifstr(i) $(ValueName) == "InterruptNumber" set IRQValueIndex = $(ValueData) else-ifstr(i) $(ValueName) == "ReceiveBuffers" set ReceiveBuffersIndex = $(ValueData) else-ifstr(i) $(ValueName) == "TransmitBuffers" set TransmitBuffersIndex = $(ValueData) endif EndForListDo set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex))) ifstr(i) $(IRQValue) == "" set IRQValue = *($(IRQList), 2) endif set MemoryAddrValue = *($(MemoryAddrList), ~($(MemoryAddrValues),$(MemoryAddrIndex))) ifstr(i) $(MemoryAddrValue) == "" set MemoryAddrValue = *($(MemoryAddrValues), 21) endif set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex))) ifstr(i) $(IOBaseAddrValue) == "" set IOBaseAddrValue = *($(IOBaseAddrList), 1) endif set ReceiveBuffersValue = *($(ReceiveBuffersList), ~($(ReceiveBuffersValues),$(ReceiveBuffersIndex))) ifstr(i) $(ReceiveBuffersValue) == "" set ReceiveBuffersValue = *($(ReceiveBuffersValues), 0) endif set TransmitBuffersValue = *($(TransmitBuffersList), ~($(TransmitBuffersValues),$(TransmitBuffersIndex))) ifstr(i) $(TransmitBuffersValue) == "" set TransmitBuffersValue = *($(TransmitBuffersValues), 0) endif adaptersetup = + Set From = adapteroptions adapteroptions = + LoadLibrary "disk 1" $(DialogDllName) hLib read-syms FileDependentDlg$(!STF_LANGUAGE)"-"$(Option) set ENABLER = 0 ui start "InputDlg" $(hLib) set ExitButton = $(ButtonPressed) FreeLibrary $(hLib) ifstr(i) $(DLGEVENT) == "CONTINUE" set IOBaseAddrIndex = $(Combo1Out) set MemoryAddrIndex = $(Combo2Out) set IRQValueIndex = $(Combo3Out) set ReceiveBuffersIndex = $(Combo4Out) set TransmitBuffersIndex = $(Combo5Out) set ExitButton = $(ButtonPressed) ui pop 1 else-ifstr(i) $(DLGEVENT) == "EXIT" set CommonStatus = STATUS_USERCANCEL ui pop 1 goto end else set CommonStatus = STATUS_USERCANCEL ui pop 1 Debug-Output "Action: unknown. Bye." goto end endif ; If installing, go create the necessary keys; ; if configuring, they're already open. skipoptions =+ ifint $(OldVersionExist) == $(TRUE) ifstr(i) $(!NTN_InstallMode) == configure goto writeparameters endif endif StartWait ; Add Software Component ifint $(OldVersionExist) == $(FALSE) ifstr(i) $(!NTN_InstallMode) == "install" Ifstr(i) $(DoCopy) == "YES" Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES Ifint $($ShellCode) != $(!SHELL_CODE_OK) Goto ShellCodeError Else-Ifstr(i) $($R0) == STATUS_FAILED Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) Goto fatal Else-Ifstr(i) $($R0) == STATUS_USERCANCEL Goto successful Endif Set SrcDir = $($R1) Endif install "Install-Option" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto fatal endif endif Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName), + $(ProductSoftwareName), + $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), + $(ProductSoftwarePath), "kernel", "NDIS", {}, "",+ $(NetEventDLL) Set OEM_ABANDON_SOFTWARE = TRUE ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error" goto ShellCodeError endif ; $R1 contains the product version key handle ; $R2 contains the NetRules subkey handle ; $R3 contains the new Services key handle ; $R4 contains the Parameters key ; $R5 contains the Linkage Key set RegistryError = $($R0) set KeyProduct = $($R1) Set SoftNetRulesKey = $($R2) CloseRegKey $($R3) CloseRegKey $($R4) CloseRegKey $($R5) Ifstr(i) $(RegistryError) != NO_ERROR EndWait Debug-Output "Registry error: add software components" CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) goto fatalregistry endif set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+ {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+ {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+ {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDesc)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}} Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error." goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR EndWait Debug-Output "Registry error: add value list." CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) goto fatalregistry endif set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+ {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, + {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, + {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, + {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, + {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}} Shell $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error." goto ShellCodeError endif set RegistryError = $($R0) CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) Ifstr(i) $(RegistryError) != NO_ERROR EndWait Debug-Output "Resgitry error: add value list." goto fatalregistry endif endif ; Create the HARDWARE\Netcard region and its corresponding service Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName) ifint $($R4) != -1 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4)) endif ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "Cannot add hardware component" goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR EndWait Debug-Output "Registry error: add hardware component" CloseRegKey $($R1) CloseRegKey $($R2) CloseRegKey $($R3) goto fatalregistry endif ; $R1 Registry key variable for HARDWARE\Netcard\(n) ; $R2 Registry key variable for HARDWARE\Netcard\(n)\\NetRules ; $R3 Registry key handle for <service>\Parameters key ; $R4 Adapter number assigned to adapter ; $R5 Service name generated by combining svc name with adapter number set KeyParameters = $($R3) set KeyAdapterRules = $($R2) set AdapterNumber = $($R4) set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+ {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDesc)},+ {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}} Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error" goto ShellCodeError endif CloseRegKey $($R1) set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)"""" set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm) set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+ {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, + {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, + {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}} Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error." goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR EndWait Debug-Output "Resgitry error: add value list." CloseRegKey $(KeyParameters) CloseRegKey $(KeyAdapterRules) goto fatalregistry endif CloseRegKey $(KeyAdapterRules) goto writeparameters ; REQUIRED: $(KeyParameters) contains service Parameters key handle writeparameters = + Shell $(UtilityInf), GetBusTypeNum set BusTypeNum = $($R1) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error." goto ShellCodeError endif ; Add the rest of the parameters to the Services area Debug-Output "OEMSETNT.INF: - Create Driver Parameters" set MemoryAddrValue = *($(MemoryAddrValues),~($(MemoryAddrList), $(MemoryAddrIndex))) set IRQValue = *($(IRQValues), ~($(IRQList), $(IRQValueIndex))) set IOBaseAddrValue = *($(IOBaseAddrValues),~($(IOBaseAddrList), $(IOBaseAddrIndex))) set ReceiveBuffersValue = *($(ReceiveBuffersValues), ~($(ReceiveBuffersList), $(ReceiveBuffersIndex))) set TransmitBuffersValue = *($(TransmitBuffersValues), ~($(TransmitBuffersList), $(TransmitBuffersIndex))) set IOLengthValue = 128 set NewValueList = {{IoBaseAddress, $(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+ {IoLength, $(NoTitle),$(!REG_VT_DWORD), 128},+ {MemoryMappedBaseAddress, $(NoTitle),$(!REG_VT_DWORD),$(MemoryAddrValue)},+ {MemoryMappedSize, $(NoTitle),$(!REG_VT_DWORD),4096},+ {InterruptNumber, $(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+ {TransmitBuffers, $(NoTitle),$(!REG_VT_DWORD),$(TransmitBuffersValue)},+ {ReceiveBuffers, $(NoTitle),$(!REG_VT_DWORD),$(ReceiveBuffersValue)},+ {MediaType, $(NoTitle),$(!REG_VT_DWORD),1},+ {BusType, $(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+ {BusNumber, $(NoTitle),$(!REG_VT_DWORD),0},+ {AdapterType, $(NoTitle),$(!REG_VT_DWORD),0},+ {PCMCIA, $(NoTitle),$(!REG_VT_DWORD),0},+ {DriverType,$(NoTitle),$(!REG_VT_DWORD),1},+ {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+ {NwayProtocol,$(NoTitle),$(!REG_VT_DWORD),1},+ {PlatformType,$(NoTitle),$(!REG_VT_DWORD),1}} Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList) CloseRegKey $(KeyParameters) ifint $(DISABLEPCMCIASYS) == 1 set PCMCIAKeyName = $(!NTN_ServiceBase)"\Pcmcia" OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIAKeyName) $(MaximumAllowed) PCMCIAKey SetRegValue $(PCMCIAKey) {Start, 0, $(!REG_VT_DWORD),4} ; '4' disables the driver CloseRegKey $(PCMCIAKey) endif ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error." goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR Debug-Output "Registry error: Add value list" goto fatalregistry endif EndWait ; ---------------------------------------------------------------------------------------------------------- ; add driver info to the SYSTEM\CurrentControlSet\Services\resman\Database\Kingston for CardWizard ; ---------------------------------------------------------------------------------------------------------- Debug-Output "OEMSETNT.INF: Check the presence of CardWizard" OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\resman" $(MaximumAllowed) MyPcmciaHandle Ifstr $(MyPcmciaHandle) == $(KeyNull) goto successful endif Debug-Output "OEMSETNT.INF: Create Registry Keys for CardWizard" OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\resman\Database\Kingston\KNE-CB4TX" $(MaximumAllowed) MyPcmciaHandle Ifstr $(MyPcmciaHandle) == $(KeyNull) Debug-Output "OEMSETNT.INF: Create Registry Keys (KNE-CB4TX)" OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\resman\Database" $(MaximumAllowed) MyPcmciaKey CreateRegKey $(MyPcmciaKey) {"Kingston",0,GenericClass} "" $(MaximumAllowed) "" MyPcmcialHandle CloseRegKey $(MyPcmciaKey) OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\resman\Database\Kingston" $(MaximumAllowed) MyPcmciaKey CreateRegKey $(MyPcmciaKey) {"KNE-CB4TX",0,GenericClass} "" $(MaximumAllowed) "" MyPcmcialHandle CloseRegKey $(MyPcmciaKey) OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\resman\Database\Kingston\KNE-CB4TX" $(MaximumAllowed) MyPcmciaHandle endif set NewValueList = {{Driver,$(NoTitle),$(!REG_VT_SZ),$(GenericName)}} Shell $(UtilityInf), AddValueList, $(MyPcmciaHandle), $(NewValueList) Debug-Output "<DBG> AddValueList - Driver:REG_SZ:KNE-CB4TX" CloseRegKey $(MyPcmciaHandle) goto successful ;----------------------------------------------- ; Binding section ;----------------------------------------------- bindingadapter =+ set Error = "Binding: Sorry, not yet implemented." goto fatal ;----------------------------------------------- ; Removeadapter section ;----------------------------------------------- removeadapter = + Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) ; Remove Software Component Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error" goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR goto fatalregistry endif else Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), + $(ProductSoftwareName), $(!NTN_RegBase) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error" goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR goto fatalregistry endif endif ifint $(DISABLEPCMCIASYS) == 1 set PCMCIAKeyName = $(!NTN_ServiceBase)"\Pcmcia" OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIAKeyName) $(MaximumAllowed) PCMCIAKey SetRegValue $(PCMCIAKey) {Start, 0, $(!REG_VT_DWORD),0} ; '0' restores the driver to "BOOT" CloseRegKey $(PCMCIAKey) endif goto end ;----------------------------------------------- ; Upgrade Software section ;----------------------------------------------- UpgradeSoftware = + ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MaximumAllowed) KeyProduct Ifstr $(KeyProduct) != $(KeyNull) GetRegValue $(KeyProduct),"MajorVersion", VersionInfo set Version = *($(VersionInfo), 4) Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error" goto ShellCodeError endif set !UG_Filename = $($R0) ifstr(i) $(!UG_Filename) != "" install "Install-Update" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS goto fatal endif endif SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)} SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)} ifint $(Version) != $(ProductVersion) ; Do nothing for update endif CloseRegKey $(KeyProduct) else goto fatalregistry endif else OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) + $(MaximumAllowed) NetworkCardKey Ifstr(i) $(NetworkCardKey) != $(KeyNull) GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo set ServiceName = *($(ServiceNameInfo), 4) OpenRegKey $(NetworkCardKey) "" "NetRules" + $(MaximumAllowed) NetRuleKey Ifstr(i) $(NetRuleKey) != $(KeyNull) ; Make the change here else goto fatalregistry endif CloseRegKey $(NetRules) CloseRegKey $(NetworkCardKey) else goto fatalregistry endif OpenRegKey $(!REG_H_LOCAL) "" + $(!NTN_ServiceBase)"\"$(ServiceName) + $(MaximumAllowed) ServiceKey Ifstr(i) $(ServiceKey) != $(KeyNull) CloseRegKey $(ServiceKey) else goto fatalregistry endif endif goto end successful = + goto end abandon = + ForListDo $(OEM_ABANDON_OPTIONS) Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), + $(ProductSoftwareName), $($) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error" goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR goto fatalregistry endif EndForListDo Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName), FALSE ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error" goto ShellCodeError endif set RegistryError = $($R0) Ifstr(i) $(RegistryError) != NO_ERROR goto fatalregistry endif endif goto end warning = + Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr(i) $($R1) == "OK" goto $(to) else-ifstr(i) $($R1) == "CANCEL" goto $(From) else goto "end" endif nonfatalinfo = + Set Severity = STATUS Set CommonStatus = STATUS_USERCANCEL goto nonfatalmsg nonfatal = + Set Severity = NONFATAL goto nonfatalmsg nonfatalmsg = + ifstr(i) $(Error) == "" Set Severity = NONFATAL Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) endif Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr(i) $($R1) == "OK" goto $(From) else goto "end" endif fatalregistry = + Shell $(UtilityInf) RegistryErrorString $(RegistryError) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) goto fatal fataldetect = + Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "ShellCode error: cannot get an error string." goto ShellCodeError endif set Error = $($R0) Goto fatal fatal = + ifstr(i) $(Error) == "" Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL" ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) endif Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif goto setfailed ShellCodeError = + set DlgType = "MessageBox" set STF_MB_TITLE = $(ShellCodeErrorTitle) set STF_MB_TEXT = $(ShellCodeErrorText) set STF_MB_TYPE = 1 set STF_MB_ICON = 3 set STF_MB_DEF = 1 ui start "Error Message" goto setfailed setfailed = + set CommonStatus = STATUS_FAILED ifstr(i) $(OEM_ABANDON_ON) == TRUE set OEM_ABANDON_ON = FALSE goto abandon endif goto end end = + goto term term = + Return $(CommonStatus) [DebugConfiguration] Set InfName = "OEMSETNT.INF" return [Install-Option] set STF_VITAL = "" ifstr(i) $(AddCopy) == "YES" AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers endif ifstr(i) $(DoCopy) == "YES" set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList endif Exit [Install-Update] set STF_VITAL = "" set STF_OVERWRITE = "VERIFYSOURCEOLDER" AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH) set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList exit [Install-Dll] set STF_VITAL = "" AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH) set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList exit [Source Media Descriptions] 1 = "Kingston Setup Disk for NT" [ProductType] STF_PRODUCT = Winnt STF_PLATFORM = I386 [Files-Inf] 1, OEMSETNT.INF, SIZE=58000, RENAME=$(!UG_Filename) [Files-Dll] 1, KTCCB4N4.DLL, SIZE=21000 [Files-KTC] 1, KTCCB4N4.SYS, SIZE=53000 [LanguagesSupported] ENG [AllFileConstantsENG] ProCaption = "Windows NT Setup" ProCancel = "Cancel" ProCancelMsg = "Windows NT Networking is not correctly installed. "+ "Are you sure you want to cancel copying files?" ProCancelCap = "Network Setup Message" ProText1 = "Copying:" ProText2 = "To:" DialogDllName = "KTCCB4N4.DLL" [FileConstantsENG-KTC] FunctionTitle = $(GenericTitleName)" Setup"$(GenericInfVersion) ProductSoftwareTitle = $(GenericDriverName) ProductHardwareTitle = $(GenericAdapterName) IRQList = ^(IRQChoices, 1) IRQValues = ^(IRQChoices, 2) IOBaseAddrList = ^(IOBaseAddrChoices, 1) IOBaseAddrValues = ^(IOBaseAddrChoices, 2) MemoryAddrList = ^(MemoryAddrChoices,1) MemoryAddrValues = ^(MemoryAddrChoices,2) ReceiveBuffersList = ^(ReceiveBuffersChoices, 1) ReceiveBuffersValues = ^(ReceiveBuffersChoices, 2) TransmitBuffersList = ^(TransmitBuffersChoices, 1) TransmitBuffersValues = ^(TransmitBuffersChoices, 2) [DialogConstantsENG-KTC] Help = "&Help" Exit = "Cancel" OK = "OK" HelpContext = "" Continue = "Continue" Cancel = "Cancel" [FileDependentDlgENG-KTC] DlgType = "RadioCombination" DlgTemplate = "KTCCB4N4" Caption = $(FunctionTitle) HelpContext = $(!IDH_DB_OEMNADE2_INS) CBOptionsGreyed = {} NotifyFields = {NO, NO, NO, NO, NO} Combo1Label = "I/O Port:" Combo2Label = "Memory Address:" Combo3Label = "Interrupt:" Combo4Label = "Rx Buffers:" Combo5Label = "Tx Buffers:" Combo1List = $(IOBaseAddrList) Combo1Out = $(IOBaseAddrValue) Combo2List = $(MemoryAddrList) Combo2Out = $(MemoryAddrValue) Combo3List = $(IRQList) Combo3Out = $(IRQValue) Combo4List = $(ReceiveBuffersList) Combo4Out = $(ReceiveBuffersValue) Combo5List = $(TransmitBuffersList) Combo5Out = $(TransmitBuffersValue) ComboListItemsIn = {Combo1List,Combo2List,Combo3List, Combo4List, Combo5List} ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out, Combo4Out, Combo5Out} EditTextIn = {"",""} EditTextLim = {"",""} [MemoryAddrChoices] MA_1 = "0xC0000", 786432 MA_2 = "0xC1000", 790528 MA_3 = "0xC2000", 794624 MA_4 = "0xC3000", 798720 MA_5 = "0xC4000", 802816 MA_6 = "0xC5000", 806912 MA_7 = "0xC6000", 811008 MA_8 = "0xC7000", 815104 MA_9 = "0xC8000", 819200 MA_10 = "0xC9000", 823296 MA_11 = "0xCA000", 827392 MA_12 = "0xCB000", 831488 MA_13 = "0xCC000", 835584 MA_14 = "0xCD000", 839680 MA_15 = "0xCE000", 843776 MA_16 = "0xCF000", 847872 MA_17 = "0xD0000", 851968 MA_18 = "0xD1000", 856064 MA_19 = "0xD2000", 860160 MA_20 = "0xD3000", 864256 MA_21 = "0xD4000", 868352 MA_22 = "0xD5000", 872448 MA_23 = "0xD6000", 876544 MA_24 = "0xD7000", 880640 MA_25 = "0xD8000", 884736 MA_26 = "0xD9000", 888832 MA_27 = "0xDA000", 892928 MA_28 = "0xDB000", 897024 MA_29 = "0xDC000", 901120 MA_30 = "0xDD000", 905216 MA_31 = "0xDE000", 909312 MA_32 = "0xDF000", 913408 [IRQChoices] IRQ_1 = "3",3 IRQ_2 = "4",4 IRQ_3 = "5",5 IRQ_4 = "7",7 IRQ_5 = "9",9 IRQ_6 = "10",10 IRQ_7 = "11",11 IRQ_8 = "15",15 [ReceiveBuffersChoices] RXB_1 = "8", 8 RXB_2 = "16", 16 RXB_3 = "32", 32 RXB_4 = "48", 48 RXB_5 = "64", 64 [TransmitBuffersChoices] TXB_1 = "8", 8 TXB_2 = "16", 16 TXB_3 = "32", 32 TXB_4 = "48", 48 TXB_5 = "64", 64 [IOBaseAddrChoices] IOBase_1 = "0x1000",4096 IOBase_2 = "0x1800",6144 IOBase_3 = "0x2000",8192 IOBase_4 = "0x2800",10240 IOBase_5 = "0x3000",12288 IOBase_6 = "0x3800",14336 IOBase_7 = "0x4000",16384 IOBase_8 = "0x4800",18432 IOBase_9 = "0x5000",20480 IOBase_10 = "0x5800",22528 IOBase_11 = "0x6000",24576 IOBase_12 = "0x6800",26624 IOBase_13 = "0x7000",28672 IOBase_14 = "0x7800",30720 IOBase_15 = "0x8000",32768 IOBase_16 = "0x8800",34816 IOBase_17 = "0x9000",36864 IOBase_18 = "0x9800",38912 IOBase_19 = "0xA000",40960 IOBase_20 = "0xA800",43008 IOBase_21 = "0xB000",45056 IOBase_22 = "0xB800",47104 IOBase_23 = "0xC000",49152 IOBase_24 = "0xC800",51200 IOBase_25 = "0xD000",53248 IOBase_26 = "0xD800",55296 IOBase_27 = "0xE000",57344 IOBase_28 = "0xE800",59392 IOBase_29 = "0xF000",61440 IOBase_30 = "0xF800",63488Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.