;ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;Ί ;Ί Cogent eMASTER+ 932 EISA Adapter ;Ί ;Ί OEMSETNT.INF -- Windows NT Setup Information File ;Ί ;Ί Copyright (c) 1993 Cogent Data Technologies, Inc. ;Ί P.O.Box 926, Friday Harbor, WA 98250 ;Ί ;ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; VERSION INFO ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; Master File = v. 1.00 940301 ; Platform File = v. 1.00 940301 ; Device File = v. 1.00 940302 ; ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; IDENTIFICATION INFO ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² [Identification] OptionType = NetAdapter [Options] EM932 ; ; -a table of information about each adapter supported by this .inf ; -the columns are made into lists in [ProductConstants] below ; [CardInfoEM932] ; cogid = eisa id, eisa_mask, netcard, cardrule, throttle, txmode 9001 = 26273549, 4294967295, 0, emIIIeisa, 100, 2 9003 = 59827981, 4294967295, 0, em932, 100, 2 9004 = 76605197, 4294967295, 0, em932tp, 100, 2 [PlatformsSupported] EISA ; "Jazz-Internal Bus" [LanguagesSupported] ENG [ProductType] STF_PRODUCT = Winnt STF_PLATFORM = I386 ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; CONSTANTS FOR USING DIALOGS ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² [FileConstants] ; ; File names, etc. ; UtilityInf = "UTILITY.INF" subroutineinf = "SUBROUTN.INF" SoftwareType = "driver" Exit_Code = 0 ; ; EventLog Message File ; NetEventDLL = "%SystemRoot%\System32\netevent.dll" IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll" [ProductConstants] ; ; Product Info ; Manufacturer = "Cogent" ProductMajorVersion = "1" ProductMinorVersion = "0" ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion) ; ; Software ; ProductSoftwareName = $(Option) ProductSoftwareImagePath = "\SystemRoot\system32\drivers\"$(Option)".sys" NetRuleSoftwareType = $(Option)"Sys ndisDriver "$(Option)"Driver" NetRuleSoftwareUse = $(SoftwareType) NetRuleSoftwareBindForm = """"$(Option)"Sys"" yes no container" NetRuleSoftwareClass = {$(Option)"Driver basic"} NetRuleSoftwareBindable = {$(Option)"Driver "$(Option)"Adapter non exclusive 100"} ; ; Hardware ; ProductHardwareName = $(Option) NetRuleHardwareType = $(Option)" "$(Option)"Adapter" NetRuleHardwareBindForm = " yes yes container" NetRuleHardwareClass = {$(Option)"Adapter basic"} ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion" ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters" ; ; Adapter Info ; EISA_ID_List = ^(CardInfo$(Option), 1) EISA_MASK_List = ^(CardInfo$(Option), 2) NetCardIDList = ^(CardInfo$(Option), 3) CardRuleList = ^(CardInfo$(Option), 4) BusTimerList = ^(CardInfo$(Option), 5) TxModeList = ^(CardInfo$(Option), 6) COGENT_EISA_ID = 9496333 [GeneralConstants] ; ; Program flow control ; from = "" to = "" ; ; Return Codes ; 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) DriverPath = $(!STF_NTPATH)\drivers InfName = $(Option)".INF" ; ; Detect Sections :--------------------------------- ; [date] Now = {} ? $(!LIBHANDLE) GetSystemDate ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; LANGUAGE SPECIFIC CONSTANTS FOR USING DIALOGS ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² [OptionsTextENG] EM932 = "Cogent eMASTER+ 932 EISA Adapter" [FileConstantsENG] 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:" ; ; Error codes ; CANNOT_FIND_ANY_CARD = "Network card is not present in the system" ShellCodeErrorTitle = "Error: "$(FunctionTitle) ShellCodeErrorText = "Shell Code Error." [ProductConstantsENG] ; ; Software ; ProductSoftwareDescription = "Cogent "$(Option)" Adapter Driver" ProductSoftwareTitle = "Cogent "$(Option)" Adapter Driver" ; ; Hardware ; ProductHardwareDescription = "Cogent "$(Option)" Ethernet Adapter" ProductHardwareTitle = "Cogent "$(Option)" Ethernet Adapter" ; ; Title ; FunctionTitle = "Cogent eMASTER+ Ethernet Adapter Setup" [DialogConstantsENG] Help = "&Help" Exit = "Cancel" OK = "OK" HelpContext = "" Continue = "C&ontinue" Cancel = "C&ancel" [FileDependentDlgENG] ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; SOURCE DESCRIPTION ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ;ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;Ί REQUIRED ;Ί SECTION: SourceMediaDescription ;Ί ;Ί PURPOSE: return info to Setup about type of driver serviced ;Ί ;Ί ARGUMENTS: none ;Ί ;Ί RETURNS: $R0 Status = status of query ;Ί $R1 Identifier = OptionType from [Identification] ;Ί $R2 Media = name of floppy with source ( element 1 of ;Ί item 1= in [Source Media Descriptions] section ) ;Ί ;ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ [Source Media Descriptions] 1 = "Cogent eMASTER+ Drivers Disk" [Files-Inf] 1, oemsetnt.inf, SIZE=1000, RENAME=$(!UG_Filename) [Files-EM932] 1, em932.sys, SIZE=59904 ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; CODE SECTIONS CALLED BY SETUP ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ;ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;Ί 1. REQUIRED ;Ί SECTION: Identify ;Ί ;Ί PURPOSE: return info to Setup about type of driver serviced ;Ί ;Ί ARGUMENTS: none ;Ί ;Ί RETURNS: $R0 Status = status of query ;Ί $R1 Identifier = OptionType from [Identification] ;Ί $R2 Media = name of floppy with source ( element 1 of ;Ί item 1= in [Source Media Descriptions] section ) ;Ί ;ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ [Identify] read-syms Identification set Status = STATUS_SUCCESSFUL set Identifier = $(OptionType) set Media = #("Source Media Descriptions", 1, 1) Return $(Status) $(Identifier) $(Media) ;ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;Ί 2. REQUIRED ;Ί SECTION: ReturnOptions ;Ί ;Ί PURPOSE: return info to Setup about type of driver serviced ;Ί ;Ί ARGUMENTS: $0 Languages ;Ί $1 Platforms (maybe NULL) ;Ί ;Ί RETURNS: $R0 Status = result of query ;Ί $R1 OptionList = list created from [Options] ;Ί $R2 OptionTextList = list created from [OptionsTextENG] ;Ί ;ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ [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) ;ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;Ί 3. REQUIRED ;Ί SECTION: InstallOption ;Ί ;Ί PURPOSE: install the driver ;Ί ;Ί ARGUMENTS: $0 = Language to use ;Ί $1 = OptionID to install ;Ί $2 = SourceDirectory ;Ί $3 = AddCopy (yes/no) ;Ί $4 = DoCopy (yes/no) ;Ί $5 = DoConfig (yes/no) ;Ί ;Ί RETURNS: $R0 CommonStatus ;Ί ;ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ [InstallOption] set Option = $($1) set SrcDir = "A:\WINNT" set AddCopy = $($3) set DoCopy = $($4) set DoConfig = $($5) set LanguageList = ^(LanguagesSupported, 1) Ifcontains(i) $($0) NOT-IN $(LanguageList) Return STATUS_NOLANGUAGE endif set-subst LF = "\n" read-syms GeneralConstants read-syms FileConstants read-syms ProductConstants read-syms DialogConstants$(!STF_LANGUAGE) read-syms FileConstants$(!STF_LANGUAGE) read-syms ProductConstants$(!STF_LANGUAGE) detect date set-title $(FunctionTitle) set to = Begin set from = Begin set CommonStatus = STATUS_SUCCESSFUL ; ; system debug flag must be set for debug output ; ;Set !DebugOutputControl = 1 Debug-Output $(InfName)": STF_CWDDIR is: "$(!STF_CWDDIR) Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE) Debug-Output $(InfName)": Option is: "$(Option) Debug-Output $(InfName)": SrcDir is: "$(SrcDir) Debug-Output $(InfName)": AddCopy is: "$(AddCopy) Debug-Output $(InfName)": DoCopy is: "$(DoCopy) Debug-Output $(InfName)": DoConfig is: "$(DoConfig) EndWait ;------------------------------------- ; branch ;------------------ Begin = + Debug-Output $(InfName)": install mode ="$(!NTN_InstallMode)" RegBase="$(!NTN_RegBase) 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 CommonStatus = STATUS_REBOOT Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) Debug-Output $(InfName)": Cannot configure the "$(Option)" driver software." Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE else Debug-Output $(InfName)": Cannot configure the "$(Option)" adapter card." Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE endif ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string. 1" goto ShellCodeError endif set Error = $($R0) set from = end set to = end goto nonfatalinfo else set StartLabel = installadapter set OEM_ABANDON_OPTIONS = {} set OEM_ABANDON_SOFTWARE = FALSE set OEM_ABANDON_ON = TRUE endif set from = $(fatal) set to = $(fatal) goto $(StartLabel) ;------------------------------------- ; installadapter ;------------------ installadapter = + Debug-Output $(InfName)": INSTALL-InstallAdapter" ; ; ; OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct Ifstr $(KeyProduct) != $(KeyNull) CloseRegKey $(KeyProduct) ifstr(i) !(NTN_RegBase) == $(ProductKeyName) Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+ $(ProductVersion) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string. 2" goto ShellCodeError endif goto end else Shell $(UtilityInf), CardExistedDlg ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error: cannot get an error string. 3" goto ShellCodeError endif ifstr(i) $($R1) != "OK" Set CommonStatus = STATUS_USERCANCEL goto end endif set OldVersionExisted = $(TRUE) endif endif goto nextstep ;------------------------------------- ; configureadapter ;------------------ configureadapter = + Debug-Output $(InfName)": INSTALL-ConfigureAdapter" set Error = "Configure: Unavailable on this platform.\n\n"+ "Use the Reference Diskette for this\n"+ "system to configure the "$(Option) goto fatal ;------------------------------------- ; install product ;------------------ nextstep = + StartWait installproduct = + Debug-Output $(InfName)": INSTALL-product install" ; ; SCAN THE BUS FOR ALL OF POSSIBLE IDS ; set cardlist = {} ; ; SCAN THE EISA BUS FOR ALL OF POSSIBLE POS IDS ; ForListDo $(EISA_ID_List) Debug-Output $(InfName)": EISAFindBus "$($)", "*($(EISA_MASK_List),$(#)) Shell $(UtilityInf), EISAFindBus, $($), *($(EISA_MASK_List),$(#)) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr $($R0) != "NO_ERROR" set Error = $($R0) goto fatal endif Shell "" Add2List $(cardlist) $($R1) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set cardlist = $($R0) EndForListDo ifstr(i) $(cardlist) == {} set Error = $(CANNOT_FIND_ANY_CARD) set CommonStatus = STATUS_USERCANCEL set from = "end" goto nonfatal endif Debug-Output $(InfName)": CardList="$(cardlist) ; ; SORT THE CARDLIST BY SLOT NUMBER ; Shell "" SortList $(cardlist) 2 ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set AdapterList = $($R0) Debug-Output $(InfName)": AdapterList="$(AdapterList) ; ; SORT THE CARDLIST BY BUS NUMBER (REMOVE ';' WHEN CODE NEEDED) ; ;Shell "" SortList $(cardlist) 1 ;ifint $($ShellCode) != $(!SHELL_CODE_OK) ; goto ShellCodeError ;endif ;set AdapterList = $($R0) ;Debug-Output $(InfName)": AdapterList="$(AdapterList) ; ; COPY THE DRIVER AND ADD SOFTWARE TO REGISTRY ; 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 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 ; ; REGISTRY -> CREATE SOFTWARE KEYS ; Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName), + $(ProductSoftwareName), + $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), + $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+ $(NetEventDLL) Set OEM_ABANDON_SOFTWARE = TRUE ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait CloseRegKey $($R1) CloseRegKey $($R2) CloseRegKey $($R3) CloseRegKey $($R4) CloseRegKey $($R5) goto fatalregistry endif Set SoftProductKey = $($R1) Set SoftNetRuleKey = $($R2) Set SoftServiceKey = $($R3) Set SoftParameterKey = $($R4) Set SoftLinkageKey = $($R5) ; ; SoftProductKey ; ; Registry -> HKEY_LOCAL_MACHINE\SOFTWARE\Cogent\em935 ; ; 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), $(ProductSoftwareDescription)},+ {ServiceName, $(NoTitle), $(!REG_VT_SZ), $(ProductSoftwareName)},+ {InstallDate, $(NoTitle), $(!REG_VT_DWORD), *($(Now),1)}} Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait CloseRegKey $(SoftProductKey) CloseRegKey $(SoftNetRuleKey) CloseRegKey $(SoftServiceKey) CloseRegKey $(SoftParameterKey) CloseRegKey $(SoftLinkageKey) goto fatalregistry endif ; ; SoftNetRuleKey ; ; Registry -> HKEY_LOCAL_MACHINE\SOFTWARE\Cogent\em935\NetRules ; 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, $(SoftNetRuleKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) CloseRegKey $(SoftProductKey) CloseRegKey $(SoftNetRuleKey) CloseRegKey $(SoftServiceKey) CloseRegKey $(SoftParameterKey) CloseRegKey $(SoftLinkageKey) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait goto fatalregistry endif endif ; ; ADD HARDWARE TO REGISTRY ; ForListDo $(AdapterList) set BusNum = *($($),1) set SlotNum = *($($),2) set EisaId = *($($),3) Debug-Output $(InfName)": BusNum="$(BusNum) Debug-Output $(InfName)": SlotNum="$(SlotNum) Debug-Output $(InfName)": EisaId ="$(EisaId) ; ; get CardType from 4th byte of EisaId ; set-sub CogentId = $(EisaId), $(COGENT_EISA_ID) set-div CogentId = $(CogentId), 16777216 ; ; get BusParameters using EisaId to get index to lists ; set CardInfoPos = ~($(EISA_ID_List),$(EisaId)) set BusTimer = *($(BusTimerList), $(CardInfoPos) ) set TxMode = *($(TxModeList), $(CardInfoPos) ) Debug-Output $(InfName)":infoIndex="$(CardInfoPos) Debug-Output $(InfName)": BusTimer="$(BusTimer) Debug-Output $(InfName)": TxMode="$(TxMode) Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), + $(SlotNum), $(ProductHardwareDescription), $(ProductHardwareName) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr $($R0) != "NO_ERROR" set Error = $($R0) goto fatal endif ifstr(i) $($R1) != "YES" ; ; Registry -> Create Hardware Keys ; 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) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait CloseRegKey $($R1) CloseRegKey $($R2) CloseRegKey $($R3) goto fatalregistry endif Set HardNetCardKey = $($R1) Set HardNetRuleKey = $($R2) Set HardParameterKey = $($R3) set AdapterNumber = $($R4) ; ; Get Network Node ID from card ; ;Shell "" ReadAddress $(SlotNum) ;set NetworkAddress = $($R0) ; ; HardNetCardKey ; ; Registry -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\01 ; set NewValueList = + {{Manufacturer, $(NoTitle), $(!REG_VT_SZ), $(Manufacturer)},+ {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)}} Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif Shell $(UtilityInf), GetBusTypeNum set BusTypeNum = $($R1) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error. /1" goto ShellCodeError endif ; ; HardParameterKey ; ; Registry -> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\em93501\Parameters ; set NewValueList = {{BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum)},+ {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)},+ {EisaCompressedId,$(NoTitle), $(!REG_VT_DWORD), $(COGENT_EISA_ID)},+ {CardType, $(NoTitle), $(!REG_VT_DWORD), $(CogentId)},+ {MediaType, $(NoTitle), $(!REG_VT_DWORD), 1},+ ; {NetworkAddress, $(NoTitle), $(REG_VT_SZ), $(NetAddress)},+ {SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(SlotNum)},+ {BusThrottleTimer,$(NoTitle), $(!REG_VT_DWORD), $(BusTimer)},+ {TransmitMode, $(NoTitle), $(!REG_VT_DWORD), $(TxMode)}} Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)"""" set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm) ; ; HardNetRuleKey ; ; Registry -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\01\NetRules ; 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, $(HardNetRuleKey), $(NewValueList) CloseRegKey $(HardNetCardKey) CloseRegKey $(HardNetRuleKey) CloseRegKey $(HardParameterKey) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif endif EndForListDo goto writeparameters writeparameters = + EndWait goto successful ;------------------------------------- ; bindingadapter ;------------------ bindingadapter =+ Debug-Output $(InfName)": INSTALL-BindingAdapter" set Error = "Binding: Not Implmemented yet" goto fatal ;------------------------------------- ; removeadapter ;------------------ removeadapter = + Debug-Output $(InfName)": INSTALL-RemoveAdapter" Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), + $(ProductSoftwareName) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error. /2" 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. /3" goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto fatalregistry endif endif goto end ;------------------------------------- ; upgradesoftware ;------------------ UpgradeSoftware = + Debug-Output $(InfName)": INSTALL-UpgradeSoftware" ifstr(i) $(ProductKeyName) == $(!NTN_RegBase) ; ; ; OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(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. /4" 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) ;* ??? 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 ;------------------------------------- ; returns ;------------------ successful = + goto end abandon = + ForListDo $(OEM_ABANDON_OPTIONS) Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), + $(ProductSoftwareName), $($) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output $(InfName)": ShellCode error. /5" 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. /6" goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != 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 CommonStatus = STATUS_USERCANCEL Set Severity = STATUS 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 $(RegistryErrorIndex) ifint $($ShellCode) != $(!SHELL_CODE_OK) 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) ;------------------------------------- ; Install Section (called with install command) ;--------------------- [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 ifstr(i) $(DoConfig) == "YES" ;* ??? 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 ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ; ; SHELL SUBROUTINES ; ;²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ;ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;Ί ;Ί procedure : [Add2List] ;Ί ;Ί purpose : create new list from old card list and any new list ;Ί from [MCA,EISA]FindBus ;Ί ;Ί parameters : $0 = $(cardlist) ;Ί $1 = $($R1) = goodies from [MCA,EISA]FindBus ;Ί ;Ί returns : $R0 = current or new cardlist ;Ί ;Ί history : created 12/14/1993 ;Ί ;ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ [Add2List] set newlist = {} Debug-Output $(!P:InfName)"-A2L: "$($0)" <- "$($1) ifstr(i) $($1) != {} ifstr(i) $($0) != {} ForListDo $($0) set newlist = >($(newlist), $($)) EndForListDo endif ForListDo $($1) set newlist = >($(newlist), $($)) EndForListDo Debug-Output $(!P:InfName)": BoardFound "$($R1) endif Add2List_return=+ Debug-Output $(!P:InfName)"-A2L: "$(newlist) ifstr(i) $(newlist) != {} return $(newlist) else return $($0) endif ;------------- ; Add2List endproc ;--------------------------- ;ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ;Ί ;Ί procedure : [SortList] ;Ί ;Ί purpose : Do a "bubble" sort of the card records in AdapterList ;Ί using the field number in $1 as the sort key ;Ί ;Ί parameters : $0 = list ;Ί $1 = field in card list record for sort ;Ί NOTE: ( bus=1, slot=2, posid=3 ) ;Ί ;Ί returns : $R0 = sorted list ;Ί ;Ί history : created 12/15/1993 ;Ί ;ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ [SortList] set CardList = $($0) QueryListSize ListSize $($0) set Limit = $(ListSize) Debug-Output $(!P:InfName)" sort card list " ; ; start bubble sort -- ; - successively move larger elements to end of list ; - loop from Limit to Limit=2 ; SL_Loop1=+ Debug-Output $(!P:InfName)" sort lst: "$(CardList) Debug-Output $(!P:InfName)" sort lim: "$(Limit) ifint $(Limit) >= 2 set newlist = {} set sorted = 1 set CurPos = 1 set CurRec = *($(CardList),$(CurPos)) Debug-Output $(!P:InfName)" sort rec: "$(CurRec) ; ; compare CurRec to NxtRec -- ; - save lower to list and larger for next compare ; - loop from 1 to Limit ( smaller each outer loop ) ; SL_Loop2=+ Debug-Output $(!P:InfName)" sort pos: "$(CurPos) ifint $(CurPos) < $(Limit) set-add NxtPos = $(CurPos), 1 set NxtRec = *($(CardList),$(NxtPos)) Debug-Output $(!P:InfName)" sort cmp: "$(NxtRec) ifint *($(CurRec),$($1)) > *($(NxtRec),$($1)) set newlist = >($(newlist),$(NxtRec)) set sorted = 0 Debug-Output $(!P:InfName)" sort swap" else set newlist = >($(newlist),$(CurRec)) set CurRec = $(NxtRec) Debug-Output $(!P:InfName)" sort new: "$(CurRec) endif set CurPos = $(NxtPos) goto SL_Loop2 endif set newlist = >($(newlist),$(CurRec)) ; ; add the rest of the list ; (like sorting records in files rather than arrays) ; SL_Loop3=+ ifint $(CurPos) < $(ListSize) set-add CurPos = $(CurPos), 1 set CurRec = *($(CardList),$(CurPos)) set newlist = >($(newlist),$(CurRec)) goto SL_Loop3 endif ; ; reset the Limit and CardList ; (leaving new max at CurPos=Limit) ; set-sub Limit = $(Limit), 1 set CardList = $(newlist) ifint $(sorted) != 1 goto SL_Loop1 else goto SL_Done endif endif SL_Done=+ Debug-Output $(!P:InfName)" sort complete" return $(CardList) ;------------- ; SortList endproc ;---------------------------