[Identification] OptionType = NetAdapter [PlatformsSupported] PCI [LanguagesSupported] ENG [PreferredLanguage] language = ENG [Options] colwmac [OptionsTextENG] colwmac = "Sitecom PCI ISDN adapter DC-105" [FileConstantsENG] CANNOT_FIND_ANY_CARD = "Sitecom PCI ISDN adapter DC-105 is not present in the system" 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:" ShellCodeErrorTitle = "Error: "$(FunctionTitle)$(Option)) ShellCodeErrorText = "Shell Code Error." [Source Media Descriptions] ; 1 = "Sitecom PCI ISDN adapter DC-105 Windows NT driver", TAGFILE = colwmac.sy_ 1 = "Sitecom PCI ISDN adapter DC-105 Windows NT driver" ;---------------------------------------------------------------------------- ; ;---------------------------------------------------------------------------- [FileConstants] ; Product Info driverName = "colwmac" messageDLLName = "isdnmsg" configDLLName = "isdncfg" helpfileName = "isdncfg" internalVersion = "(V4.00.11)" ProductSoftwareName = $(driverName) Manufacturer = "Sitecom" ;0x182D pciVendor = 6189 ;0x3069 pciCFID = 12393 ProductMajorVersion = "4.00" ProductMinorVersion = "11" ProductHardwareTitle = "Sitecom PCI ISDN adapter DC-105" NetEventDLL = "%SystemRoot%\System32\"$(messageDLLName).dll IoLogMsgDLL = "%SystemRoot%\System32\"$(messageDLLName).dll oemDriverPath = $(!STF_WINDOWSSYSPATH)"\drivers" oemUtilPath = $(!STF_WINDOWSSYSPATH) FunctionTitle = "Sitecom PCI ISDN adapter DC-105 Setup" ProductSoftwareDescription = "Sitecom PCI ISDN adapter DC-105 Driver "$(internalVersion) ProductHardwareDescription = "Sitecom PCI ISDN adapter DC-105 "$(internalVersion) ProductSoftwareTitle = "Sitecom PCI ISDN adapter DC-105 Driver "$(internalVersion) ProductHardwareTitle = "Sitecom PCI ISDN adapter DC-105 "$(internalVersion) ; ---- end of OEM depenend section ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion) ProductLogo = $(ProductSoftwareName)" Driver (c) "$(Manufacturer) ProductDiskLogo = $(ProductHardwareTitle)" Windows NT Setup Disk #1" ; ----- Software ------ SoftwareName = $(ProductSoftwareName) SoftwareServiceName = $(SoftwareName) SoftwareTitle = $(ProductSoftwareTitle) SoftwareType = "driver" SoftwareImagePath = "%SystemRoot%\System32\drivers\"$(SoftwareName)".sys" SoftwareServiceGroup = "NDIS" SoftwareServiceType = "kernel" SoftwareServiceTypeDisabled = "kerneldisable" SoftwareBase = $(!NTN_SoftwareBase)"\"$(Manufacturer) SoftwareKeyName = $(SoftwareBase)"\"$(ProductSoftwareName)"\CurrentVersion" NetRuleSoftwareType = $(ProductSoftwareName)"Sys "$(ProductSoftwareName)"Driver" NetRuleSoftwareUse = $(SoftwareType) NetRuleSoftwareBindForm = """"$(ProductSoftwareName)"Driver"" yes no container" NetRuleSoftwareClass = {$(ProductSoftwareName)"Driver basic"} NetRuleSoftwareBindable = { $(ProductSoftwareName)"Driver "$(ProductSoftwareName)"Adapter non exclusive 100"} ; ------------- product hardware ---------------------------------- ProductHardwareName = $(ProductSoftwareName) NetRuleHardwareType = $(ProductSoftwareName)" "$(ProductSoftwareName)"Adapter" NetRuleHardwareBindForm = " yes yes container" NetRuleHardwareClass = {$(ProductSoftwareName)"Adapter basic"} ; INF file names InfName = "OEMNADTI.INF" UtilityInf = "UTILITY.INF" ParamInf = "NCPARAM.INF" subroutineinf = "SUBROUTN.INF" ; Service CurrentControlSet = "SYSTEM\CurrentControlSet" ServiceBase = $(CurrentControlSet)"\Services" ServicePath = $(ServiceBase)"\"$(SoftwareServiceName) ServiceParameters = $(ServicePath)"\Parameters" ControlBase = $(CurrentControlSet)"\Control" ServiceGroupOrder = $(ControlBase)"\ServiceGroupOrder" TapiDevicesPath = "HARDWARE\DEVICEMAP\TAPI DEVICES" DeviceMap = "HARDWARE\DEVICEMAP" TapiDevices = "TAPI DEVICES" TapiDeviceKey = $(ProductHardwareName) TapiMediaType = "ISDN" ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters" ; FIXME - Set to zero before release DebugFlags = 0 DebugOutput = 3 DebugBuffer = 100 isdn1TR6 = "1TR6" isdnDSS1 = "DSS1" isdnNI12 = "NI-1/2, DMS 100" ; isdnDMS100 = "DMS 100" isdnJATE = "INS-Net (Jate)" isdnATT = "AT & T" isdnVN45 = "VN-4/5" idDSS1 = 128 id1TR6 = 32 idNI12 = 4 idJATE = 16 idATT = 2 idVN45 = 64 isdnProtocolType = $(idDSS1) fwType = $(isdnDSS1) b3Protocol = 4 b2Protocol = 2 msnInNumber = "4" msnOutNumber = "1" capiControllerNumber = 1 capiSerialNumber = "" lineType = 0 TapiAddressList = "" ndisAdapterNumber = 1 tapiInfoOption = 0 tapiABIF = 0 capiMaxApplication = 3 Capimaxchannel = 9 ioBaseAddress = 0 ioBaseAddress2 = 0 ioBaseAddress3 = 0 capiSPID1 = "" capiSPID2 = "" RAM_Addr_List = {} IRQ_List = {} firmwareList = { + $(isdnDSS1), + $(isdn1TR6), + $(isdnNI12), + ; $(isdnDMS100), + $(isdnJATE), + $(isdnATT), + $(isdnVN45), + , + } msnInList = {"all","1","2","1+2"} msnOutList = {"1","2"} phoneID1 = "" phoneID2 = "" callControlList = {"*"} tapiMsnOutKey = "tapi.msnOut" tapiMsnInKey = "tapi.msnIn" tapiLineTypeKey = "tapi.lineType" tapiB2ProtocolKey = "tapi.b2Protocol" tapiB3ProtocolKey = "tapi.b3Protocol" tapiMediaTypeKey = "tapi.mediaType" tapiAddressListKey = "tapi.addressList" tapiInfoOptionKey = "tapi.infoOption" tapiCallControlKey = "tapi.callControl" tapiABIFKey = "tapi.abif" capiMaxApplicationKey = "capi.maxApplication" capiMaxChannelKey = "capi.maxChannel" capiNumberKey = "capi.controllerNumber" capiSerialNumberKey = "capi.SerialNumber" capiIsdnProtocolKey = "line0.switchType" capiSPID1Key = "line0.channel0.SPID" capiSPID2Key = "line0.channel1.SPID" phoneID1Key = "line0.channel0.Phone" phoneID2Key = "line0.channel1.Phone" idG711Default = "protocol default" idG711YLAW = "µ-law" idG711ALAW = "a-law" abG711Key = "ab.g711" abG711 = 0 abG711Type = $(idG711Default) abG711List = { $(idG711Default), $(idG711YLAW), $(idG711ALAW) } hConfig = 0 dummyValue = "" [OptionsTextENG] colwmac = $(ProductHardwareTitle) ;---------------------------------------------------------------------------- ; ;---------------------------------------------------------------------------- [GeneralConstants] from = "" to = "" ExitCodeOk = 0 ExitCodeCancel = 1 ExitCodeFatal = 2 KeyNull = "" MAXIMUM_ALLOWED = 33554432 RegistryErrorIndex = NO_ERROR KeyProduct = "" KeyParameters = "" TRUE = 1 FALSE = 0 NoTitle = 0 ExitState = "Active" OldVersionExisted = $(FALSE) ;---------------------------------------------------------------------------- ; ;---------------------------------------------------------------------------- [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 | GER | FRN ... ) ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ; STATUS_NOLANGUAGE ; STATUS_FAILED ; STATUS_NOTSUPPORTED ; ; $($R1): Option List ; $($R2): Option Text List ;------------------------------------------------------------------------ [ReturnOptions] ; Check if the language requested is supported read-syms PreferredLanguage ifstr $(Language) == "" set Language = "ENG" set LanguageList = ^(LanguagesSupported, 1) ifcontains(i) $($0) IN $(LanguageList) set Language = $($0) endif endif set OptionList = ^(Options, 1) set OptionTextList = ^(OptionsText$(Language), 1) ; Don't check the platform, we are hardware independent set printparms = no ifstr $(printparms) == yes set parms = "ReturnOptions: Lang="$($0)" Platform="$($1)""$(!LF)+ $(OptionList)$(!LF)$(OptionTextList) Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$(parms) endif return STATUS_SUCCESSFUL $(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): Option, i.e name of card type 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 RasDir = $($2) Set AddCopy = $($3) Set DoCopy = $($4) Set DoConfig = $($5) set CallerOfThisScript = $($1) ; Check if the language requested is supported, if not use default read-syms PreferredLanguage ifstr $(Language) == "" set Language = "ENG" set LanguageList = ^(LanguagesSupported, 1) ifcontains(i) $($0) IN $(LanguageList) set Language = $($0) endif endif IfContains(i) $($0) NOT-IN $(LanguageList) Return STATUS_NOLANGUAGE endif ;------------------------------------------------------------ ;#??# FIXME - make sure this flag is disabled before shipping ;------------------------------------------------------------- Set OldDebugControl = $(!DebugOutputControl) Set !DebugOutputControl = 2 Set-Subst LF = "\n" Read-Syms GeneralConstants Read-Syms FileConstants Read-Syms DialogConstants$(!STF_LANGUAGE) ifstr(i) $(!NTN_Origination) == "NCPA" Set Continue = $(OK) endif Read-Syms FileConstants$(!STF_LANGUAGE) Detect Date Set-Title $(FunctionTitle)$(Option) 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 Set ActivateDetection = TRUE Set CommonStatus = STATUS_REBOOT ifstr(i) $(SoftwareKeyName) == $(!NTN_RegBase) Debug-Output $(InfName)": Cannot configure the ISDN driver software." Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string." GoTo ShellCodeError endif Set Error = $($R0) Set from = end Set to = end GoTo NonFatalInfo endif else Set StartLabel = InstallAdapter Set ActivateDetection = TRUE Set OEM_ABANDON_OPTIONS = {} Set OEM_ABANDON_SOFTWARE = FALSE Set OEM_ABANDON_ON = TRUE endif Debug-Output $(InfName)": ==================================================" Debug-Output $(InfName)": STF_CWDIR is: "$(!STF_CWDIR) Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE) Debug-Output $(InfName)": Option is: "$(Option) Debug-Output $(InfName)": !STF_NCDETECT is: "$(!STF_NCDETECT) Debug-Output $(InfName)": !STF_NCOPTION is: "$(!STF_NCOPTION) Debug-Output $(InfName)": !STF_NCDETCARD is: "$(!STF_NCDETCARD) Debug-Output $(InfName)": !STF_NCDETINFO is: "$(!STF_NCDETINFO) Debug-Output $(InfName)": ==================================================" ; ; Now we don't validate the hardware parameter ; Set DetectedCard = FALSE ifstr(i) $(ActivateDetection) != TRUE GoTo $(StartLabel) endif Debug-Output $(InfName)": Calling Param_SetDefaults" Shell $(ParamInf) Param_SetDefaults {} Shell $(ParamInf) HexListFromDecList $(RAM_Addr_List) Set RAM_Hex_List = $($R0) ifstr(i) $(!STF_NCDETECT) == YES ifstr(i) $(!STF_NCOPTION) == $(Option) Set DetectedCard = TRUE Debug-Output $(InfName)": Setting DetectedCard to TRUE" endif endif Shell "" DebugConfiguration "After parameter querying" Set from = FatalError Set to = FatalError GoTo $(StartLabel) ;----------------------------------------------------------------- ; Installation Section, install a new or a second adapter ;------------------------------------------------------------ InstallAdapter = + Set dialogDLLName = $(oemUtilPath)"\"$(configDLLName).dll ; ; COPY CFG dll first for later access to PCI ; 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-StartupFiles" ; ; Open the System\CurrentControlSet\Services\$(ProductSoftwareName)\Parameters ; key and get some current service parameter settings ; ; "KeyServiceParameters" is not closed cause we need it once more later OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareKeyName) $(MAXIMUM_ALLOWED) KeyProduct ifstr $(KeyProduct) != $(KeyNull) CloseRegKey $(KeyProduct) ifstr(i) !(NTN_RegBase) == $(SoftwareKeyName) Shell $(UtilityInf), VerExistedDlg, $(SoftwareTitle),+ $(ProductVersion) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string." GoTo ShellCodeError endif GoTo end else Shell $(UtilityInf), CardExistedDlg IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string." GoTo ShellCodeError endif ifstr(i) $($R1) != "OK" Set CommonStatus = STATUS_USERCANCEL GoTo end endif Set OldVersionExisted = $(TRUE) endif endif Set CurrParamSettings = {} ifstr(i) $(DetectedCard) != TRUE GoTo AdapterSetup endif StartWait Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD) EndWait ifstr(i) $($R0) != STATUS_SUCCESSFUL GoTo AdapterSetup endif Set DetectedParams = $($R1) Debug-Output $(InfName)": Calling Param_SetDefaults to merge detected params" Shell $(ParamInf) Param_SetDefaults $(DetectedParams) GoTo AdapterSetup ;----------------------------------------------- ; Configuration Section ;----------------------------------------------- ConfigureAdapter = + Set dialogDLLName = $(oemUtilPath)"\"$(configDLLName).dll ifstr $(KeyProduct) == $(KeyNull) OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct ifstr $(KeyProduct) == $(KeyNull) Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE Debug-Output $(InfName)": Cannot find component product key" GoTo FatalRegistry endif endif Debug-Output $(InfName)": Shelling to FindService" Shell $(UtilityInf) FindService, $(KeyProduct) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": FindService shell failure" GoTo ShellCodeError endif ifstr(i) $($R0) != NO_ERROR Debug-Output $(InfName)": FindService Shell error: "$($R0) GoTo FatalRegistry endif Set KeyParameters = $($R2) CloseRegKey $($R1) ifstr $(KeyParameters) == $(KeyNull) Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE Debug-Output $(InfName)": Cannot find component service" GoTo FatalRegistry endif Set OldVersionExisted = $(TRUE) Set ValueName = "" Set ValueData = "" Set ValueStr = "" Set ValueList = {} Debug-Output $(InfName)": Read current parameters" EnumRegValue $(KeyParameters) ValueList ForListDo $(ValueList) Set ValueItem = $($) Set ValueName = *($(ValueItem),1) Set ValueData = *($(ValueItem),4) Debug-Output $(InfName)": "$(ValueName)" = "$(ValueData) ifstr(i) $(ValueName) == "ioBaseAddress" Set ioBaseAddress = $(ValueData) else-ifstr(i) $(ValueName) == "InterruptNumber" Set InterruptNumber = $(ValueData) else-ifstr(i) $(ValueName) == $(tapiLineTypeKey) Set lineType = $(ValueData) else-ifstr(i) $(ValueName) == "BusNumber" set BusNumber = $(ValueData) else-ifstr(i) $(ValueName) == "BusType" set BusType = $(ValueData) else-ifstr(i) $(ValueName) == $(capiIsdnProtocolKey) set isdnProtocolType = $(ValueData) ifstr(i) $(ValueData) == $(idDSS1) set fwType = $(isdnDSS1) else-ifstr(i) $(ValueData) == $(id1TR6) set fwType = $(isdn1TR6) else-ifstr(i) $(ValueData) == $(idNI12) set fwType = $(isdnNI12) else-ifstr(i) $(ValueData) == $(idJATE) set fwType = $(isdnJATE) else-ifstr(i) $(ValueData) == $(idATT) set fwType = $(isdnATT) else-ifstr(i) $(ValueData) == $(idVN45) set fwType = $(isdnVN45) endif else-ifstr(i) $(ValueName) == $(tapiB2ProtocolKey) set b2Protocol = $(ValueData) else-ifstr(i) $(ValueName) == $(tapiB3ProtocolKey) set b3Protocol = $(ValueData) else-ifstr(i) $(ValueName) == $(tapiMsnInKey) set msnInNumber = $(ValueData) else-ifstr(i) $(ValueName) == $(tapiMsnOutKey) set msnOutNumber = $(ValueData) else-ifstr(i) $(ValueName) == $(tapiMediaTypeKey) set mediaType = $(ValueData) else-ifstr(i) $(ValueName) == $(tapiCallControlKey) set callControlList = $(ValueData) else-ifstr(i) $(ValueName) == $(capiMaxApplicationKey) set capiMaxApplication = $(ValueData) else-ifstr(i) $(ValueName) == $(capiMaxChannelKey) set capiMaxChannel = $(ValueData) else-ifstr(i) $(ValueName) == $(capiSPID1Key) set capiSPID1 = $(ValueData) else-ifstr(i) $(ValueName) == $(capiSPID2Key) set capiSPID2 = $(ValueData) else-ifstr(i) $(ValueName) == $(phoneID1Key) set phoneID1 = $(ValueData) else-ifstr(i) $(ValueName) == $(phoneID2Key) set phoneID2 = $(ValueData) else-ifstr(i) $(ValueName) == $(abG711Key) set abG711 = $(ValueData) ifstr(i) $(ValueData) == 0 set abG711Type = $(idG711Default) else-ifstr(i) $(ValueData) == 1 set abG711Type = $(idG711YLAW) else-ifstr(i) $(ValueData) == 2 set abG711Type = $(idG711ALAW) endif else-ifstr(i) $(ValueName) == $(capiControllerNumberKey) ;Debug-Output $(InfName)": found capiControllerNumber "$(ValueData); set capiControllerNumber = $(ValueData) else-ifstr(i) $(ValueName) == "ndisAdapterNumber" ;Debug-Output $(InfName)": found ndisAdapterNumber "$(ValueData); set ndisAdapterNumber = $(ValueData) else-ifstr(i) $(ValueName) == $(tapiABIFKey) set tapiABIF = $(ValueData) endif EndForListDo Shell $(ParamInf) Param_SaveValues Set CurrParamSettings = $($R0) goto adapterSetup ;---------------------------------------------------------------------------- ; ;---------------------------------------------------------------------------- AdapterSetup = + Shell "" DebugConfiguration "before displaying dialog" Set from = AdapterOptions ; We are a PCI adapter, get the hardware parameter from registry ; from ENUM\ISAPNP branch ; call our DLL to do this stuff Debug-Output "PNPISDN.INF: LOAD configurator DLL" LoadLibrary "" $(dialogDLLName) hConfig Debug-Output "PNPISDN.INF: configHandle is "$(hConfig) LibraryProcedure Result, $(hConfig), getPCIConfiguration, + $(!STF_HWND) $(Option) $(!NTN_InstallMode) $(pciID) FreeLibrary $(hConfig) ; now we have following result string ; "result irqNumber ioBaseAddress secondIOBaseAddress ... " Debug-Output "PNPISDN.INF: result is "$(Result) Set DialogResult = *($(Result),1) Set InterruptNumber = *($(Result),2) Set ioBaseAddress = *($(Result),3) Set ioBaseAddress2 = *($(Result),4) Set ioBaseAddress3 = *($(Result),5) Set IRQ_List = {$(InterruptNumber)} Set RAM_Hex_List = {$(ioBaseAddress)} ifstr(i) $(DialogResult) != "OK" Debug-Output " GET parameter failed" goto fatalregistry endif Set fwType = *($(firmwareList), ~($(firmwareList),$(fwType))) Set msnInNumber = *($(msnInList), ~($(msnInList),$(msnInNumber))) Set msnOutNumber = *($(msnOutList), ~($(msnOutList),$(msnOutNumber))) Set abG711Type = *($(abG711List), ~($(abG711List),$(abG711Type))) Shell $(ParamInf) Param_ParameterConfidence ifstr(i) $($R0) != STATUS_SUCCESSFUL Debug-Output $(InfName)": parameter confidence too low to bypass configuration" GoTo AdapterOptions endif ifstr(i) $(DetectedCard) == TRUE ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM GoTo AdapterVerify endif endif ;*********************************************************************** ; ;*********************************************************************** AdapterOptions = + ; ; Load DLL containing dialogs and verification routines ; Debug-Output $(InfName)": Load config DLL <"$(dialogDLLName)">" LoadLibrary "ISDN-card Driver Disk" $(dialogDLLName) hConfig Read-Syms FileDependentDlg$(!STF_LANGUAGE) Debug-Output $(InfName)": start dialog" UI Start "InputDlg" $(hConfig) FreeLibrary $(hConfig) ifstr(i) $(DLGEVENT) == "CONTINUE" Set fwType = $(Combo3Out) Set msnInNumber = $(Combo4Out) Set msnOutNumber = $(Combo5Out) Set abG711Type = $(Combo6Out) Set capiSPID1 = *($(EditTextOut),1) Set capiSPID2 = *($(EditTextOut),2) Set phoneID1 = *($(EditTextOut),3) Set phoneID2 = *($(EditTextOut),4) Debug-Output $(InfName)": Dialog result" Debug-Output $(InfName)": spID1 "$(capiSPID1) Debug-Output $(InfName)": spID2 "$(capiSPID2) Debug-Output $(InfName)": msn 1 "$(phoneID1) Debug-Output $(InfName)": msn 2 "$(phoneID2) Debug-Output $(InfName)": fw "$(fwType) Debug-Output $(InfName)": msn in "$(msnInNumber) Debug-Output $(InfName)": msn out "$(msnOutNumber) Debug-Output $(InfName)": g711 "$(abG711Type) ; DSS1 and dialup connection is always default Set firmware = $(fwDSS1) Set lineType = "0" Set abG711 = 0 ; ; set the isdn protocol type value depending on choosen firmware string ; ifstr $(fwType) == $(isdnDSS1) set isdnProtocolType = $(idDSS1) else-ifstr $(fwType) == $(isdn1TR6) set isdnProtocolType = $(id1TR6) else-ifstr $(fwType) == $(isdnNI12) set isdnProtocolType = $(idNI12) else-ifstr $(fwType) == $(isdnDMS100) set isdnProtocolType = $(idNI12) else-ifstr $(fwType) == $(isdnJATE) set isdnProtocolType = $(idJATE) else-ifstr $(fwType) == $(isdnATT) set isdnProtocolType = $(idATT) else-ifstr $(fwType) == $(isdnVN45) set isdnProtocolType = $(idVN45) endif ifstr $(abG711Type) == $(idG711Default) set abG711 = 0 else-ifstr $(abG711Type) == $(idG711YLAW) set abG711 = 1 else-ifstr $(abG711Type) == $(idG711ALAW) set abG711 = 2 endif ui pop 1 else-ifstr(i) $(DLGEVENT) == "BACK" Set CommonStatus = STATUS_USERCANCEL Debug-Output $(InfName)": Action: user CANCEL, bye" ui pop 1 GoTo end else Debug-Output $(InfName)": Action: unknown <"$(DLGEVENT)"> bye" ui pop 1 GoTo end endif ifstr(i) $(!STF_NCDETINFO) == {} SET BusType = "5" Shell $(UtilityInf), GetPCIInformation, $(pciVendor) $(pciCFID) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr(i) $($R0) == {} set Error = $(CANNOT_FIND_ANY_CARD) set CommonStatus = USER_CANCEL set from = end goto NonFatalInfo endif set AdapterList = $($R0) ForListDo $(AdapterList) set BusNumber = *($($),1) set DeviceNumber = *($($),2) set FunctionNumber = *($($),3) else Set BusType = *($(!STF_NCDETINFO),5) Set BusNumber = *($(!STF_NCDETINFO),6) endif ;*********************************************************************** ; ;*********************************************************************** AdapterVerify = + Shell "" DebugConfiguration "after running dialog" ifstr(i) $(DetectedCard) != TRUE Shell $(ParamInf) Param_SaveValues Set NewParamSettings = $($R0) ifstr(i) $(CurrParamSettings) == {} Set DiffParamSettings = $(NewParamSettings) else Shell $(ParamInf) Param_DiffValues $(CurrParamSettings) Set DiffParamSettings = $($R0) endif Debug-Output $(InfName)": Calling Param_VerifyResources" Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings) ifstr(i) $($R0) == STATUS_SUCCESSFUL Debug-Output $(InfName)": Param_VerifyResources succeeded" GoTo SkipOptions endif else Set CardVerifyIndex = $(!STF_NCDETCARD) Debug-Output $(InfName)": Calling Param_VerifyCard" Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD) ifstr(i) $($R0) == STATUS_SUCCESSFUL Debug-Output $(InfName)": Param_VerifyCard succeeded" GoTo SkipOptions endif endif Set from = AdapterOptions Set to = SkipOptions Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string." GoTo ShellCodeError endif Set Error = $($R0) GoTo WarningMsg ;---------------------------------------------------------------------- ; ;---------------------------------------------------------------------- SkipOptions =+ IfInt $(OldVersionExisted) == $(TRUE) ifstr(i) $(!NTN_InstallMode) == configure GoTo WriteParameters endif endif StartWait IfInt $(OldVersionExisted) == $(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 FatalError else-ifstr(i) $($R0) == STATUS_USERCANCEL GoTo SuccessfulOption 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 FatalError endif endif Debug-Output $(InfName)": add software Component" Debug-Output " manufacturer - "$(Manufacturer) Debug-Output " softwareName - "$(SoftwareName) Debug-Output " softwareServiceName - "$(SoftwareServiceName) Debug-Output " softwaretitle - "$(SoftwareTitle) Debug-Output " imgagePath - "$(SoftwareImagePath) Debug-Output " serviceGroup - "$(SoftwareServiceGroup) Shell $(UtilityInf), AddSoftwareComponent, + $(Manufacturer), + $(ProductSoftwareName), + $(SoftwareServiceName), + $(SoftwareTitle), + $(STF_CONTEXTINFNAME), + $(SoftwareImagePath), + "kernelautostart", + $(SoftwareServiceGroup), + {}, + "",+ $(NetEventDLL) SET OEM_ABANDON_SOFTWARE = TRUE IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": add software Component failed" GoTo ShellCodeError endif Debug-Output $(InfName)": add software Component exit" ; Return parameter: ; $R1 contains the product version key handle; ; $R2 contains the NetRules subkey handle; ; $R3 contains the new Services key handle; ; $R4 contains the new Services Parameters key handle ; $R5 contains the Linkage key handle Set RegistryErrorIndex = $($R0) Set KeyProduct = $($R1) Set SoftNetRulesKey = $($R2) set KeyService = $($R3) CloseRegKey $($R3) CloseRegKey $($R4) CloseRegKey $($R5) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait Debug-Output $(InfName)": Registry error "$(RegistryErrorIndex)" 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),$(SoftwareTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+ } Debug-Output $(InfName)": create key "$(KeyProduct) Debug-Output " softwareType - "$(SoftwareType) Debug-Output " majorVersion - "$(ProductMajorVersion) Debug-Output " minorVersion - "$(ProductMinorVersion) Debug-Output " title - "$(SoftwareTitle) Debug-Output " description - "$(ProductSoftwareDescription) Debug-Output " serviceName - "$(ProductSoftwareName) Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList) IfInt $($ShellCode) != $(!SHELL_CODE_OK) CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) CloseRegKey $(KeyService) Debug-Output $(InfName)": ShellCode error." GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait Debug-Output $(InfName)": Registry error: add value list." CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) CloseRegKey $(KeyService) 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)}+ } Debug-Output $(InfName)": create key "$(SoftwareNetRulesKey) Debug-Output " type - "$(NetRuleSoftwareType) Debug-Output " use - "$(NetRuleSoftwareUse) Debug-Output " bindform - "$(NetRuleSoftwareBindForm) Debug-Output " class - "$(NetRuleSoftwareClass) Debug-Output " bindable - "$(NetRuleSoftwareBindable) Debug-Output " InfOption - "$(Option) Shell $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error." CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) CloseRegKey $(KeyService) GoTo ShellCodeError endif ; update group dependency set NewValue = {"NdisWan"} GetRegValue $(KeyService) "DependOnGroup" Value ifint $(RegLastError) == $(!REG_ERROR_SUCCESS) set OldValue = *($(Value), 4) ForListDo $(OldValue) set Value = $($) ifstr(i) $(Value) != "NdisWan" set NewValue = >($(NewValue),$(Value)) endif EndForListDo endif SetRegValue $(KeyService) {DependOnGroup, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewValue)} Set RegistryErrorIndex = $($R0) CloseRegKey $(KeyProduct) CloseRegKey $(SoftNetRulesKey) CloseRegKey $(KeyService) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait Debug-Output $(InfName)": Registry error: "$(RegistryErrorIndex) GoTo FatalRegistry endif endif ; ; Create the SOFTWARE\...\NetworkCards region and its corresponding service ; Debug-Output $(InfName)": add hardware component: "$(ProductHardwareName) Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(SoftwareKeyName) 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 $(InfName)": Cannot add hardware component" GoTo ShellCodeError endif set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait Debug-Output $(InfName)": Registry error: add hardware component" CloseRegKey $($R1) CloseRegKey $($R2) CloseRegKey $($R3) GoTo FatalRegistry endif ; Return parameter: ; $R1 Registry key variable for SOFTWARE\...\NetworkCards\<n> ; $R2 Registry key variable for SOFTWARE\...\NetworkCards\<n>\NetRules ; $R3 Registry key handle for Services\$(Packet)<n>\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 ndisAdapterNumber = $($R4) ; ; \HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\NetworkCards ; ndisAdapterNumber ; Set NewValueList = {+ {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+ ;; {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+ {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+ {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+ } Debug-Output $(InfName)": add network card: "$($(R1))) Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error" CloseRegKey $(KeyAdapterRules) CloseRegKey $(KeyParameters) GoTo ShellCodeError endif CloseRegKey $($R1) set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR CloseRegKey $(KeyAdapterRules) CloseRegKey $(KeyParameters) goto fatalregistry endif Set TempProdName = """"$(ProductHardwareName)$(ndisAdapterNumber)"""" 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)}+ } Debug-Output $(InfName)": create key adapter rules "$(KeyAdapterRules) Debug-Output " type - "$(NetRuleHardwareType) Debug-Output " bindform - "$(TempBindForm) Debug-Output " class - "$(NetRuleHardwareClass) Debug-Output " infOptions - "$(Option) Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList) CloseRegKey $(KeyAdapterRules) IfInt $($ShellCode) != $(!SHELL_CODE_OK) CloseRegKey $(KeyParameters) Debug-Output $(InfName)": ShellCode error." GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR EndWait Debug-Output $(InfName)": Registry error: add value list." CloseRegKey $(KeyParameters) GoTo FatalRegistry endif GoTo WriteParameters ;--------------------------------------------------------------------- ; write the private global configuration parameters ;--------------------------------------------------------------------- WriteParameters = + Set TapiAddressList = {$(ndisAdapterNumber)" 1 0"} Set TapiAddressList = >($(TapiAddressList),$(ndisAdapterNumber)" 2 0") Debug-Output $(InfName)": write private profile parameter" Debug-Output $(InfName)" address list :"$(TapiAddressList) Debug-Output $(InfName)" interrupt number :"$(InterruptNumber) Debug-Output $(InfName)" line type :"$(lineType) Debug-Output $(InfName)" io base address :"$(ioBaseAddress) Debug-Output $(InfName)" firmware :"$(firmware) Debug-Output $(InfName)" msn :"$(msnInNumber) Debug-Output $(InfName)" capi controller :"$(capiControllerNumber) Debug-Output $(InfName)" ndisAdapter No. :"$(ndisAdapterNumber) Debug-Output $(InfName)" SPID1 :"$(capiSPID1) Debug-Output $(InfName)" SPID2 :"$(capiSPID2) Set NewValueList = {+ {$(tapiAddressListKey),$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+ {$(abG711Key),$(NoTitle),$(!REG_VT_DWORD),$(abG711)},+ {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+ {BusType,$(NoTitle),$(!REG_VT_DWORD),5},+ {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNumber)},+ {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNumber)},+ {ndisAdapterNumber,$(NoTitle),$(!REG_VT_DWORD),$(ndisAdapterNumber)},+ {$(capiControllerNumberKey),$(NoTitle),$(!REG_VT_DWORD),$(capiControllerNumber)},+ {$(capiIsdnProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(isdnProtocolType)},+ {$(capiMaxApplicationKey),$(NoTitle),$(!REG_VT_DWORD),$(capiMaxApplication)},+ {$(capiMaxChannelKey),$(NoTitle),$(!REG_VT_DWORD),$(capiMaxChannel)},+ {DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+ {$(tapiLineTypeKey),$(NoTitle),$(!REG_VT_DWORD),$(lineType)},+ {$(tapiMediaTypeKey),$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+ {$(tapiB2ProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(b2Protocol)},+ {$(tapiB3ProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(b3Protocol)},+ {$(tapiCallControlKey),$(NoTitle),$(!REG_VT_MULTI_SZ),$(callControlList)},+ {DebugFlags,$(NoTitle),$(!REG_VT_DWORD),$(DebugFlags)},+ {DebugOutput,$(NoTitle),$(!REG_VT_DWORD),$(DebugOutput)},+ {DebugBuffer,$(NoTitle),$(!REG_VT_DWORD),$(DebugBuffer)},+ {$(tapiMsnInKey),$(NoTitle),$(!REG_VT_SZ),$(msnInNumber)},+ {$(tapiMsnOutKey),$(NoTitle),$(!REG_VT_SZ),$(msnOutNumber)},+ {$(tapiInfoOptionKey),$(NoTitle),$(!REG_VT_DWORD),$(tapiInfoOption)},+ {$(tapiABIFKey),$(NoTitle),$(!REG_VT_DWORD),$(tapiABIF)},+ {$(capiIsdnProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(isdnProtocolType)},+ {$(capiSPID1Key),$(NoTitle),$(!REG_VT_SZ),$(capiSPID1)},+ {$(capiSPID2Key),$(NoTitle),$(!REG_VT_SZ),$(capiSPID2)},+ {$(phoneID1Key),$(NoTitle),$(!REG_VT_SZ),$(phoneID1)},+ {$(phoneID2Key),$(NoTitle),$(!REG_VT_SZ),$(phoneID2)},+ {$(capiSerialNumberKey),$(NoTitle),$(!REG_VT_SZ),$(capiSerialNumber)}+ } ; {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+ ; {ioBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(ioBaseAddress)},+ ; {ioBaseAddress2,$(NoTitle),$(!REG_VT_DWORD),$(ioBaseAddress2)},+ ; {ioBaseAddress3,$(NoTitle),$(!REG_VT_DWORD),$(ioBaseAddress3)},+ Debug-Output $(InfName)": write private profile parameter" Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList) CloseRegKey $(KeyParameters) Debug-Output $(InfName)": returns with shell code "$(ShellCode) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error."$(ShellCode) GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR Debug-Output $(InfName)": Registry error: Add value list" GoTo FatalRegistry endif ; ; Save NDIS driver name to manufacturer ; LoadLibrary "" $(dialogDLLName) hConfig LibraryProcedure Result, $(hConfig) setupNdisDriver, + $(!STF_HWND) $(Option) $(!NTN_InstallMode) + $(ProductSoftwareName) $(Manufacturer) FreeLibrary $(hConfig) ifstr(i) $(Result) != "OK" Debug-Output " install ndis driver name failed" goto fatalregistry endif goto createTAPIInfo ;---------------------------------------------------------------------------- ; ;---------------------------------------------------------------------------- createTAPIInfo = + ifstr(i) $(!NTN_InstallMode) == configure Debug-Output $(InfName)": configure option, dont create TAPI_DEVICE info" GoTo SuccessfulOption endif Debug-Output $(InfName)": create TAPI device info " ; ; Create the HARDWARE\DEVICEMAP\TAPI DEVICES\xxxWMAC key ; OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(MAXIMUM_ALLOWED) BaseKey shell "" HtCreateRegKey $(BaseKey) "TAPI DEVICES\"$(driverName) ifstr(i) $($R0) != NO_ERROR Debug-Output $(InfName)": Error creating registry key!" GoTo FatalRegistry endif Set TapiDeviceKey = $($R1) ; ; Get old address list from given key ; Set ValueData = {} Set ValueItem = "" Set ValueList = {} EnumRegValue $(TapiDeviceKey) ValueList ForListDo $(ValueList) Set ValueItem = $($) Set ValueName = *($(ValueItem),1) Set ValueData = *($(ValueItem),4) Debug-Output $(InfName)": address "$(ValueData) ifstr(i) $(ValueName) == "Address" ForListDo $(ValueData) Set ValueItem = $($) Set ValueName = *($(ValueItem),1) Set TapiAddressList = >($(TapiAddressList),$(ValueName)) Debug-Output $(InfName)": tapi address list "$(TapiAddressList) EndForListDo endif EndForListDo Set NewValueList = {+ {Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+ {"Media Type",$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)}+ } Shell $(UtilityInf), AddValueList, $(TapiDeviceKey), $(NewValueList) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error." GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR Debug-Output $(InfName)": Registry error: Add value list" GoTo FatalRegistry endif CloseRegKey $(TapiDeviceKey) CloseRegKey $(BaseKey) ;---------------------------------------------------------------------------- ; ; if RAS is not installed, then shell ras setup INF file to install RAS ; else invoke RAS to allow user to configure RAS for the ISDN lines. ; Read-Syms InvokeRasDlg$(!STF_LANGUAGE) Shell "oemnsvra.inf" CheckRasInstalled IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), + "STATUS", $(InvokeRasError) IfInt $($ShellCode) != $(!SHELL_CODE_OK) GoTo ShellCodeError EndIf GoTo SuccessfulOption EndIf Set RasInstalled = $($R0) Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled) ; ; display a message to the user that RAS setup will now be invoked ; IfStr(i) $(RasInstalled) == FALSE Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", + $(InvokeRasSetupMsg) IfInt $($ShellCode) != $(!SHELL_CODE_OK) GoTo SuccessfulOption EndIf Else Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", + $(InvokeRasConfigMsg) IfInt $($ShellCode) != $(!SHELL_CODE_OK) GoTo SuccessfulOption EndIf EndIf ; ; FIXME - RAS INF will not locate the files if it is spawned here. ; EndWait GoTo SuccessfulOption ; ; Set the flags based on whether this is an IDW installation ; IfStr(i) $(!STF_IDW) == TRUE Set AddCopy = NO Set DoCopy = NO Set DoConfig = NO Else Set AddCopy = YES Set DoCopy = YES Set DoConfig = YES EndIf ; ; change the global install mode flag to configure if RAS is already installed ; IfStr(i) $(RasInstalled) == TRUE Set SaveNTN_InstallMode = $(!NTN_InstallMode) Set !NTN_InstallMode = configure EndIf ; ; now invoke RAS setup to do the right thing ; Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig) ; ; restore the global instal mode flag if it was changed ; IfStr(i) $(RasInstalled) == TRUE Set !NTN_InstallMode = $(SaveNTN_InstallMode) EndIf IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", + $(InvokeRasError) IfInt $($ShellCode) != $(!SHELL_CODE_OK) GoTo ShellCodeError EndIf GoTo SuccessfulOption EndIf EndWait GoTo SuccessfulOption ;---------------------------------------------------------------------------- ; ;---------------------------------------------------------------------------- BindingAdapter =+ Debug-Output $(InfName)": Binding: Sorry, not yet implemented" Set Error = "Binding: Sorry, not yet implemented." GoTo FatalError ;*********************************************************************** ; ;*********************************************************************** RemoveAdapter = + Set dialogDLLName = $(oemUtilPath)"\"$(configDLLName).dll ifstr(i) $(SoftwareKeyName) == $(!NTN_RegBase) Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error" GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR GoTo FatalRegistry endif else Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), + $(ProductSoftwareName), $(!NTN_RegBase) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error" GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR GoTo FatalRegistry endif endif ; ; remove NDIS driver name from manufacturer key ; LoadLibrary "" $(dialogDLLName) hConfig LibraryProcedure Result, $(hConfig) setupNdisDriver, + $(!STF_HWND) $(Option) $(!NTN_InstallMode) + $(ProductSoftwareName) $(Manufacturer) FreeLibrary $(hConfig) ifstr(i) $(Result) != "OK" Debug-Output " clear ndis driver name failed" goto fatalregistry endif ; ; Delete the support files ; set removeList = {} set removeList = >($(removeList), #(Files-RemoveList, DRIVERSYS, 1)) set removeList = >($(removeList), #(Files-RemoveList, MESSAGEDLL, 1)) ;check registry from CAPI before we can remove this file ;set removeList = >($(removeList), #(Files-RemoveList, CONFIGDLL, 1)) ForListDo $(removeList) Debug-Output "Removing "$($) LibraryProcedure Status , $(!LIBHANDLE), DelFile $($) Debug-Output "Status is "$(Status) endForListDo GoTo end ;*********************************************************************** ; ;*********************************************************************** UpgradeSoftware = + ifstr(i) $(SoftwareKeyName) == $(!NTN_RegBase) OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareKeyName) $(MAXIMUM_ALLOWED) KeyProduct ifstr $(KeyProduct) != $(KeyNull) GetRegValue $(KeyProduct),"MajorVersion", VersionInfo Set Version = *($(VersionInfo), 4) Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error" GoTo ShellCodeError endif Set !UG_Filename = $($R0) ifstr(i) $(!UG_Filename) != "" install "Install-Update" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS GoTo FatalError endif endif SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)} SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)} IfInt $(Version) != $(ProductVersion) endif CloseRegKey $(KeyProduct) else GoTo FatalRegistry endif else OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) + $(MAXIMUM_ALLOWED) NetworkCardKey ifstr(i) $(NetworkCardKey) != $(KeyNull) GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo Set ServiceName = *($(ServiceNameInfo), 4) OpenRegKey $(NetworkCardKey) "" "NetRules" + $(MAXIMUM_ALLOWED) NetRuleKey ifstr(i) $(NetRuleKey) != $(KeyNull) else GoTo FatalRegistry endif CloseRegKey $(NetRules) CloseRegKey $(NetworkCardKey) else GoTo FatalRegistry endif OpenRegKey $(!REG_H_LOCAL) "" + $(!NTN_ServiceBase)"\"$(ServiceName) + $(MAXIMUM_ALLOWED) ServiceKey ifstr(i) $(ServiceKey) != $(KeyNull) CloseRegKey $(ServiceKey) else GoTo FatalRegistry endif endif GoTo end ;*********************************************************************** ; ;*********************************************************************** SuccessfulOption = + GoTo end ;*********************************************************************** ; ;*********************************************************************** Abandon = + ForListDo $(OEM_ABANDON_OPTIONS) Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), + $(ProductSoftwareName), $($) IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error" GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != 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 $(InfName)": ShellCode error" GoTo ShellCodeError endif Set RegistryErrorIndex = $($R0) ifstr(i) $(RegistryErrorIndex) != NO_ERROR GoTo FatalRegistry endif endif GoTo end ;*********************************************************************** ; ;*********************************************************************** WarningMsg = + 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) endif GoTo end ;*********************************************************************** ; ;*********************************************************************** NonFatalInfo = + Set Severity = STATUS Set CommonStatus = STATUS_USERCANCEL 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) endif GoTo end ;*********************************************************************** ; ;*********************************************************************** FatalRegistry = + Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex) IfInt $($ShellCode) != $(!SHELL_CODE_OK) GoTo ShellCodeError endif Set Error = $($R0) GoTo FatalError ;*********************************************************************** ; ;*********************************************************************** FatalDetect = + Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT IfInt $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string." GoTo ShellCodeError endif Set Error = $($R0) GoTo FatalError ;*********************************************************************** ; ;*********************************************************************** FatalError = + 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 = + Debug-Output $(InfName)": end of installation process" Set !DebugOutputControl = $(OldDebugControl) Return $(CommonStatus) ;*********************************************************************** ; ;*********************************************************************** [HtCreateRegKey] Debug-Output $(InfName)": Entering [HtCreateRegKey]" Set ECR_Result = NO_ERROR Set ECR_BaseKeyHandle = $($0) Set ECR_NewPath = $($1) Set KeyNull = "" Set MAXIMUM_ALLOWED = 33554432 Debug-Output $(InfName)": HtCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle) Debug-Output $(InfName)": ECR_NewPath = "$(ECR_NewPath) Debug-Output $(InfName)": MAXIMUM_ALLOWED = "$(MAXIMUM_ALLOWED) Debug-Output $(InfName)": KeyNull = "$(KeyNull) OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) + ECR_BaseKey Debug-Output $(InfName)": ECR_BaseKey = "$(ECR_BaseKey) Debug-Output $(InfName)": OpenRegKey returned "$($R0) ifstr $(ECR_BaseKey) == $(KeyNull) Debug-Output $(InfName)": ECR_BaseKey == KeyNull" else Debug-Output $(InfName)": ECR_BaseKey != KeyNull" Set ECR_KeyHandle = $(ECR_BaseKey) GoTo ECR_Return endif Set ECR_TmpPath = "" Split-String $(ECR_NewPath) "\" ECR_PList Debug-Output $(InfName)": ECR_PList = "$(ECR_PList) ForListDo $(ECR_PList) ifstr(i) $($) != "\" IfInt $(#) == 1 Set ECR_TmpPath = $($) else Set ECR_TmpPath = $(ECR_TmpPath)"\"$($) endif Debug-Output $(InfName)": Determining if "$(ECR_TmpPath)" exists" OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey ifstr $(ECR_BaseKey) == $(KeyNull) Debug-Output $(InfName)": Creating "$(ECR_TmpPath) CreateRegKey $(ECR_BaseKeyHandle) {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle ifstr(i) $(ECR_KeyHandle) == $(KeyNull) Set ECR_Result = $($R0) GoTo ECR_Return endif endif endif EndForListDo ECR_Return = + Return $(ECR_Result) $(ECR_KeyHandle) ;*********************************************************************** ; ;*********************************************************************** [DebugConfiguration] Debug-Output $(!p:InfName)": **CONFIGURATION STATE: "$($0) Debug-Output $(!p:InfName)": InterruptNumber is "$(!p:InterruptNumber) Debug-Output $(!p:InfName)": ioBaseAddress is "$(!p:ioBaseAddress) Return ;*********************************************************************** ; ;*********************************************************************** [Install-Option] Set STF_VITAL = "" ifstr(i) $(AddCopy) == "YES" AddSectionFilesToCopyList Files-Driver $(SrcDir) $(oemDriverPath) AddSectionFilesToCopyList Files-DLL $(SrcDir) $(oemUtilPath) 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-Driver $(SrcDir) $(oemDriverPath) AddSectionFilesToCopyList Files-Inf $(SrcDir) $(oemUtilPath) AddSectionFilesToCopyList Files-DLL $(SrcDir) $(oemUtilPath) Set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList Exit ;------------------------------------------------------------------------- ; ;------------------------------------------------------------------------- [Install-StartupFiles] Set STF_VITAL = "" Set STF_OVERWRITE = "VERIFYSOURCEOLDER" AddSectionFilesToCopyList Files-Startup $(SrcDir) $(oemUtilPath) Set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList Exit ;*********************************************************************** ; ;*********************************************************************** [Source Media Descriptions] 1 = $(ProductDiskLogo) , TAGFILE = $(driverName).sy_ ;*********************************************************************** ; ;*********************************************************************** [ProductType] STF_PRODUCT = Winnt STF_PLATFORM = I386 ;*********************************************************************** ; ;*********************************************************************** [Files-Inf] 1, oemsetnt.inf, SIZE=1000, RENAME=$(!UG_Filename) ;*********************************************************************** ; ;*********************************************************************** [Files-Driver] 1, $(driverName).sy_, SIZE=110000,DECOMPRESS,RENAME=$(driverName).sys [Files-DLL] 1, $(messageDLLName).dl_, SIZE=20000,DECOMPRESS,RENAME=$(messageDLLName).dll [Files-Startup] 1, $(configDLLName).dl_, SIZE=20000,DECOMPRESS,RENAME=$(configDLLName).dll [Files-RemoveList] DRIVERSYS = $(oemDriverPath)\$(ProductSoftwareName).sys MESSAGEDLL = $(oemUtilPath)\$(messageDLLName).dll CONFIGDLL = $(oemUtilPath)\$(configDLLName).dll ;*********************************************************************** ; ;*********************************************************************** [DialogConstantsENG] Help = "&Help" Exit = "Cancel" OK = "OK" HelpContext = "" Continue = "Continue" Cancel = "Cancel" ;*********************************************************************** ; ;*********************************************************************** [FileDependentDlgENG] Combo1Label = "IRQ Level:" Combo2Label = "Port Address:" Combo3Label = "&D-Channel Protocol:" Combo4Label = "RAS/TAPI &incoming number:" Combo5Label = "RAS/TAPI &outgoing number:" Combo6Label = "a/b speech coding:" Edit1Label = "SPID1 (on&ly for N1/2):" Edit2Label = "SPID2 (onl&y for N1/2):" Edit3Label = "MSN &1:" Edit4Label = "MSN &2:" DlgType = "RadioCombination" DlgTemplate = "MACSETUP_PNP" Caption = $(FunctionTitle)" "$(Option) Combo1List = $(IRQ_List) Combo1Out = $(dummyValue) Combo2List = $(RAM_Hex_List) Combo2Out = $(dummyValue) Combo3List = $(firmwareList) Combo3Out = $(fwType) Combo4List = $(msnInList) Combo4Out = $(msnInNumber) Combo5List = $(msnOutList) Combo5Out = $(msnOutNumber) Combo6List = $(abG711List) Combo6Out = $(abG711Type) EditTextIn = { $(capiSPID1), $(capiSPID2), $(phoneID1), $(phoneID2) } EditTextLim = {20, 20, 40, 40} ComboListItemsIn = {Combo1List, Combo2List,Combo3List,Combo4List,Combo5List,Combo6List} ComboListItemsOut = {Combo1Out, Combo2Out,Combo3Out,Combo4Out,Combo5Out,Combo6Out} CBOptionsGreyed = {} NotifyFields = {NO, NO} ; HelpContext = $(!IDH_DB_OEMNADN2_INS) ;*********************************************************************** ; ;*********************************************************************** [InvokeRasDlgENG] InvokeRasSetupMsg = "ISDN card setup is complete. "+ "Remote Access Services (RAS) must now be installed. "+ "Please configure the ISDN driver ports in RAS "+ "setup to enable you to use RAS over the isdn driver." InvokeRasConfigMsg = "ISDN setup is complete. "+ "Remote Access Services (RAS) setup must now be invoked. "+ "Please configure the isdn driver ports in RAS "+ "setup to enable you to use RAS over the isdn driver." InvokeRasError = "ISDN setup encountered an error "+ "while invoking the RAS setup INF file (OEMNSVRA.INF). "+ "Please make sure that the file is present in the "+ "System32 directory and is the proper file."Download 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.