home *** CD-ROM | disk | FTP | other *** search
/ Tiny System Restore Pack / RESTORE.iso / DRIVERS / NETWORK / 3C509B / OEMSETUP.INF < prev    next >
Encoding:
INI File  |  1996-07-01  |  51.9 KB  |  1,307 lines

  1. ;
  2. ; *******************************************************************
  3. ; *
  4. ; *    DESCRIPTION: OEMSETUP.INF for Etherlink III (ISA, EISA, MCA)
  5. ; *
  6. ; *    HISTORY:
  7. ; *                     v 1.0 - Microsoft Orginal file for only ELNK3 (ISA)
  8. ; *                     v 1.1 - Adapted to support EISA and MCA as well.
  9. ; *                     v 1.2 - Adapted to support Windows NT 3.5/3.51
  10. ; *                     v 1.3 - Changed DIR structure for setup in root
  11. ; *
  12. ; *******************************************************************
  13. ;
  14.  
  15. [Identification]
  16.     OptionType = NetAdapter
  17.  
  18. [PlatformsSupported]
  19.     ISA
  20.     EISA
  21.     MCA
  22.     "Jazz-Internal Bus"
  23.  
  24. [Options]
  25.     ELNK3ISA509
  26.     ELNK3EISA
  27.     ELNK3MCA
  28.  
  29. [FileConstants]
  30. UtilityInf                              = "UTILITY.INF"
  31. ParamInf                                = "NCPARAM.INF"
  32. subroutineinf                           = "SUBROUTN.INF"
  33. SoftwareType                            = "driver"
  34. Exit_Code                               = 0
  35. NetEventDLL                             = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\elnk3.sys"
  36. IoLogMsgDLL                             = "%SystemRoot%\System32\IoLogMsg.dll"
  37. MS_Manufacturer                         = "Microsoft"
  38. Manufacturer                            = "3Com"
  39. ProductMajorVersion             = "3"
  40. ProductMinorVersion             = "51"
  41. ProductVersion                          = $(ProductMajorVersion)"."$(ProductMinorVersion)
  42. ProductSoftwareName             = "Elnk3"
  43. ProductSoftwareImagePath        = "\SystemRoot\System32\drivers\elnk3.sys"
  44. NetRuleSoftwareType             = "elnk3Sys ndisDriver elnk3Driver"
  45. NetRuleSoftwareUse              = $(SoftwareType)
  46. NetRuleSoftwareBindForm         = """Elnk3Sys"" yes no container"
  47. NetRuleSoftwareClass            = {"elnk3Driver basic"}
  48. NetRuleSoftwareBindable         = {"elnk3Driver elnk3Adapter non exclusive 100"}
  49. ProductHardwareName             = "elnk3"
  50. NetRuleHardwareType             = "elnk3 elnk3Adapter"
  51. NetRuleHardwareBindForm         = " yes yes container"
  52. NetRuleHardwareClass            = {"elnk3Adapter basic"}
  53.  
  54. ProductKeyName                          = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  55. MS_ProductKeyName                       = $(!NTN_SoftwareBase)"\"$(MS_Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  56. ParamKeyName                            = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  57.  
  58. ELNK3EISA_COMPRESSID            = 5270864
  59. ELNK3EISA_1BYTE                         = 2421189968
  60. ELNK3EISA_MASK                          = 4043309055
  61. ELNK3MCA_1BYTE                          = { 124, 125, 219, 246, 247 }
  62. ELNK3MCA_2BYTE                          = { 98, 98, 97, 98, 98 }
  63. NETCARD_ID                              = { 25212, 25213, 25051, 25334, 25335 }
  64.  
  65. [GeneralConstants]
  66. !G:DebugOutputControl           = 1
  67. from                                            = ""
  68. to                                              = ""
  69. ExitCodeOk                              = 0
  70. ExitCodeCancel                          = 1
  71. ExitCodeFatal                           = 2
  72. KeyNull                                 = ""
  73. MAXIMUM_ALLOWED                         = 33554432
  74. RegistryErrorIndex                      = NO_ERROR
  75. KeyProduct                              = ""
  76. KeyParameters                           = ""
  77. TRUE                                            = 1
  78. FALSE                                           = 0
  79. NoTitle                                         = 0
  80. ExitState                                       = "Active"
  81. OldVersionExisted                       = $(FALSE)
  82. DriverPath                                      = $(!STF_NTPATH)\drivers
  83.  
  84. [date]
  85.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  86.  
  87. [Identify]
  88.     read-syms Identification
  89.     set Status     = STATUS_SUCCESSFUL
  90.     set Identifier = $(OptionType)
  91.     ;set Media      = #("Source Media Descriptions", 1, 1)
  92.     set Media      = #("Source Media Descriptions", 3, 1)
  93.     Return $(Status) $(Identifier) $(Media)
  94.  
  95. [ReturnOptions]
  96.     set Status        = STATUS_FAILED
  97.     set OptionList     = {}
  98.     set OptionTextList = {}
  99.     set LanguageList = ^(LanguagesSupported, 1)
  100.     Ifcontains(i) $($0) in $(LanguageList)
  101.         ifstr(i) $($1) == ""
  102.                         goto returnoptions
  103.         endif
  104.         set PlatformList = ^(PlatformsSupported, 1)
  105.         Ifcontains(i) $($1) in $(PlatformList)
  106.                         goto returnoptions
  107.         else
  108.                         set Status = STATUS_NOTSUPPORTED
  109.                         goto finish_ReturnOptions
  110.         endif
  111.     else
  112.                 set Status = STATUS_NOLANGUAGE
  113.                 goto finish_ReturnOptions
  114.     endif
  115.  
  116. returnoptions = +
  117.     set OptionList     = ^(Options, 1)
  118.     set OptionTextList = ^(OptionsText$($0), 1)
  119.     set Status         = STATUS_SUCCESSFUL
  120.  
  121. finish_ReturnOptions = +
  122.     Return $(Status) $(OptionList) $(OptionTextList)
  123.  
  124. [InstallOption]
  125.     set Status   = STATUS_FAILED
  126.     set Option   = $($1)
  127.     set SrcDir   = $($2)
  128.     set AddCopy  = $($3)
  129.     set DoCopy   = $($4)
  130.     set DoConfig = $($5)
  131.     set LanguageList = ^(LanguagesSupported, 1)
  132.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  133.         Return STATUS_NOLANGUAGE
  134.     endif
  135.     set-subst LF = "\n"
  136.     read-syms GeneralConstants
  137.     read-syms FileConstants
  138.     read-syms DialogConstants$(!STF_LANGUAGE)
  139.     ifstr(i) $(!NTN_Origination) == "NCPA"
  140.         set Continue = $(OK)
  141.     endif
  142.     read-syms FileConstants$(!STF_LANGUAGE)
  143.     detect date
  144.     set-title  $(FunctionTitle)
  145.     set to   = Begin
  146.     set from = Begin
  147.     set CommonStatus = STATUS_SUCCESSFUL
  148.     EndWait
  149. Begin = +
  150.     Set ActivateDetection = FALSE
  151.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  152.         set StartLabel = removeadapter
  153.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  154.         set StartLabel = UpgradeSoftware
  155.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  156.         set StartLabel = bindingadapter
  157.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  158.         set CommonStatus = STATUS_REBOOT
  159.         set ActivateDetection = TRUE
  160.  
  161.         ifstr(i) $(Option) != ELNK3ISA509
  162.             set StartLabel = ELNK3EISA&MCAconfigureadapter
  163.         else
  164.             set StartLabel = ELNK3ISA509configureadapter
  165.         endif
  166.  
  167.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  168.             Debug-Output "Cannot configure the EtherLink III driver software."
  169.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  170.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  171.                 Debug-Output "ShellCode error: cannot get an error string."
  172.                 goto ShellCodeError
  173.             endif
  174.             set Error = $($R0)
  175.             set from = end
  176.             set to = end
  177.             goto nonfatalinfo
  178.         endif
  179.     else
  180.         set ActivateDetection = TRUE
  181.         ifstr(i) $(Option) != ELNK3ISA509
  182.             set StartLabel = ELNK3EISA&MCAinstalladapter
  183.         else
  184.             set StartLabel = ELNK3ISA509installadapter
  185.         endif
  186.         set OEM_ABANDON_OPTIONS = {}
  187.         set OEM_ABANDON_SOFTWARE = FALSE
  188.         set OEM_ABANDON_ON = TRUE
  189.     endif
  190.     Debug-Output "oemsetup.inf: =================================================="
  191.     Debug-Output "oemsetup.inf: STF_CWDIR is: "$(!STF_CWDIR)
  192.     Debug-Output "oemsetup.inf: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  193.     Debug-Output "oemsetup.inf: Option is: "$(Option)
  194.     Debug-Output "oemsetup.inf: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  195.     Debug-Output "oemsetup.inf: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  196.     Debug-Output "oemsetup.inf: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  197.     Debug-Output "oemsetup.inf: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  198.     Debug-Output "oemsetup.inf: =================================================="
  199.     Set DetectedCard = FALSE
  200.  
  201.     Ifstr(i) $(ActivateDetection) != TRUE
  202.         Set from = $(fatal)
  203.         Set to = $(fatal)
  204.         Goto $(StartLabel)
  205.     Endif
  206.  
  207.     ; We don't do the Detection here for an ISA card, it's
  208.     ; available via EISA, MCA, or PCI...
  209.     ;
  210.     Ifstr(i) $(Option) != ELNK3ISA509
  211.         Set from = $(fatal)
  212.         Set to = $(fatal)
  213.         Goto $(StartLabel)
  214.     Endif
  215.  
  216.     ; Don't need to set the IOBase in install mode for ISA adapters.
  217.     ;
  218.     ifstr(i) $(!NTN_InstallMode) != configure
  219.         goto SkipBuildTypeList
  220.     endif
  221.  
  222.     ;set Transceiver = 0
  223.     ;Set TypeList = {{IRQ, IRQList, IRQValue},+
  224.     ;               {IOADDR, IOADDR_Addr_List, IOBaseAddrValue},+
  225.     ;               {TRANSCEIVER, TransceiverList_ignore, Transceiver}}
  226.     Set TypeList = {{IOADDR, IOADDR_Addr_List, IOBaseAddrValue}}
  227.     Debug-Output "oemsetup.inf: Calling Param_BuildTypeLists"
  228.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  229.     Set Status = $($R0)
  230.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  231.         Goto fataldetect
  232.     Endif
  233.     Debug-Output "oemsetup.inf: Calling Param_SetDefaults"
  234.     Shell $(ParamInf) Param_SetDefaults {{IOADDR,768}}
  235.     Shell $(ParamInf) HexListFromDecList $(IOADDR_Addr_List)
  236.     Set IOADDR_Hex_List = $($R0)
  237.     ;Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  238.     ;Set IRQList = $($R0)
  239.     Ifstr(i) $(!STF_NCDETECT) == YES
  240.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  241.            Set DetectedCard = TRUE
  242.            Debug-Output "oemsetup.inf: Setting DetectedCard to TRUE"
  243.         Endif
  244.     Endif
  245.     Shell "" DebugConfiguration "After parameter querying"
  246. SkipBuildTypeList = +
  247.     Set from = $(fatal)
  248.     Set to = $(fatal)
  249.     Debug-Output "$(InfFile) $(Option): Jumping to $(StartLabel)"
  250.     Goto $(StartLabel)
  251.  
  252. ;*******************************************************************************
  253. ;
  254. ; Etherlink III ISA Specific routines for the this .inf file.
  255. ;
  256. ;
  257. ELNK3ISA509installadapter = +
  258.     Debug-Output "$(InfFile) $(Option): Installadapter"
  259.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  260.     Ifstr $(KeyProduct) != $(KeyNull)
  261.         CloseRegKey $(KeyProduct)
  262.         ; @@1
  263.         ifstr(i) $(!NTN_RegBase) == $(ProductKeyName)
  264.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  265.                $(ProductVersion)
  266.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  267.                Debug-Output "ShellCode error: cannot get an error string."
  268.                goto ShellCodeError
  269.            endif
  270.            goto end
  271.         else
  272.            Shell $(UtilityInf), CardExistedDlg
  273.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  274.                Debug-Output "ShellCode error: cannot get an error string."
  275.                goto ShellCodeError
  276.            endif
  277.            ifstr(i) $($R1) != "OK"
  278.                set CommonStatus = STATUS_USERCANCEL
  279.                goto end
  280.            endif
  281.            set OldVersionExisted = $(TRUE)
  282.         endif
  283.     endif
  284.     Set CurrParamSettings = {}
  285.     Ifstr(i) $(DetectedCard) != TRUE
  286.         Goto ELNK3ISA509adaptersetup2
  287.     Endif
  288.     StartWait
  289.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  290.     EndWait
  291.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  292.         Goto ELNK3ISA509adaptersetup2
  293.     Endif
  294.     Set DetectedParams = $($R1)
  295.     Debug-Output "oemsetup.inf: Calling Param_SetDefaults to merge detected params"
  296.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  297.     goto ELNK3ISA509adaptersetup2
  298.  
  299. ELNK3ISA509configureadapter = +
  300.     Debug-Output "$(InfFile) $(Option): Configureadapter"
  301.     Ifstr $(KeyProduct) == $(KeyNull)
  302.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  303.         Ifstr $(KeyProduct) == $(KeyNull)
  304.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  305.             Debug-Output "Cannot find component product key"
  306.             goto fatalregistry
  307.         Endif
  308.     Endif
  309.     Debug-Output "INF: Shelling to FindService"
  310.     Shell $(UtilityInf) FindService, $(KeyProduct)
  311.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  312.         Debug-Output "INF: FindService shell failure"
  313.         Goto ShellCodeError
  314.     Endif
  315.     Ifstr(i) $($R0) != NO_ERROR
  316.         Debug-Output "INF: FindService Shell error: "$($R0)
  317.         Goto fatalregistry
  318.     endif
  319.     Set KeyParameters = $($R2)
  320.     CloseRegKey $($R1)
  321.     Ifstr $(KeyParameters) == $(KeyNull)
  322.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  323.         Debug-Output "Cannot find component service"
  324.         goto fatalregistry
  325.     endif
  326.     set OldVersionExisted = $(TRUE)
  327.     set ValueName = ""
  328.     set ValueData = ""
  329.     set ValueStr  = ""
  330.     set ValueList = {}
  331.     EnumRegValue $(KeyParameters) ValueList
  332.     ForListDo $(ValueList)
  333.         set ValueItem = $($)
  334.         set ValueName = *($(ValueItem),1)
  335.         set ValueData = *($(ValueItem),4)
  336.         Ifstr(i) $(ValueName) == "IoBaseAddress"
  337.             set IOBaseAddrValue = $(ValueData)
  338.         ;else-ifstr(i) $(ValueName) == "InterruptNumber"
  339.         ;    set IRQValue = $(ValueData)
  340.         ;else-ifstr(i) $(ValueName) == "Transceiver"
  341.         ;    set Transceiver = $(ValueData)
  342. ;;************************************************************************************************
  343. ;; Specific to WinNT v3.5 and above..
  344.         else-ifstr(i) $(ValueName) == "BusType"
  345.              set BusInterfaceType = $(ValueData)
  346.         else-ifstr(i) $(ValueName) == "BusNumber"
  347.              set BusNumber = $(ValueData)
  348. ;;************************************************************************************************
  349.         endif
  350.     EndForListDo
  351.     Shell $(ParamInf) Param_SaveValues
  352.     Set CurrParamSettings = $($R0)
  353.     Debug-Output "CurrParamSettings: $(CurrParamSettings)"
  354.  
  355. ELNK3ISA509adaptersetup = +
  356.     Debug-Output "$(InfFile) $(Option): AdapterSetup"
  357.     Shell "" DebugConfiguration "before displaying dialog"
  358.     Set from = ELNK3ISA509adapteroptions
  359.     Set IOADDR_Hex_Value = *($(IOADDR_Hex_List), ~($(IOADDR_Addr_List),$(IOBaseAddrValue)))
  360.     ;set-add Transceiver = $(Transceiver),1
  361.     ;set TransceiverValue = *($(TransceiverList), $(Transceiver))
  362.     Shell $(ParamInf) Param_ParameterConfidence
  363.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  364.         Debug-Output "oemsetup.inf: parameter confidence too low to bypass configuration"
  365.         Goto ELNK3ISA509adapteroptions
  366.     Endif
  367. ELNK3ISA509adaptersetup2 = +
  368.     Ifstr(i) $(DetectedCard) == TRUE
  369.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  370.             Goto ELNK3ISA509adapterverify
  371.         Endif
  372.     Endif
  373.  
  374. ELNK3ISA509adapteroptions = +
  375.     Debug-Output "$(InfFile) $(Option): AdapterOptions"
  376.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  377.         ifstr(i) $(!AutoNetInterfaceType) != ""
  378.             set BusInterfaceType = $(!AutoNetInterfaceType)
  379.         else
  380.             set BusInterfaceType = 1
  381.         endif
  382.         ifstr(i) $(!AutoNetBusNumber) != ""
  383.             set BusNumber = $(!AutoNetBusNumber)
  384.         else
  385.             set BusNumber = 0
  386.         endif
  387.         goto ELNK3ISA509adapterverify
  388.     endif
  389.     Ifstr(i) $(!NTN_InstallMode) != configure
  390.         goto getbustype
  391.     Endif
  392.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  393.     ;Debug-Output "Combo1List: $(Combo1List)"
  394.     ;Debug-Output "Combo2List: $(Combo2List)"
  395.     ;Debug-Output "Combo3List: $(Combo3List)"
  396.     ui start "InputDlg"
  397.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  398.         set IOADDR_Hex_Value = $(Combo1Out)
  399.         Set IOBaseAddrValue = *($(IOADDR_Addr_List), ~($(IOADDR_Hex_List),$(IOADDR_Hex_Value)))
  400.         ;set IRQValue = $(Combo2Out)
  401.         ;set Transceiver = ~($(TransceiverList),$(Combo3Out))
  402.         ui pop 1
  403.     else-ifstr(i) $(DLGEVENT) == "BACK"
  404.         set CommonStatus = STATUS_USERCANCEL
  405.         Debug-Output "Action: exit. Bye."
  406.         ui pop 1
  407.         goto end
  408.     else
  409.         Debug-Output "Action: unknown. Bye."
  410.         ui pop 1
  411.         goto end
  412.     endif
  413. ;;************************************************************************************************
  414. ;; Specific to WinNT v3.5 and above..
  415. getbustype = +
  416.     ifstr(i) $(!STF_NCDETINFO) == {}
  417. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  418. ;; Try to solve the problem of unacceptable BusType for ISA adapters...
  419. ;; The BusType of ISA is assigned 1 and the BusType of EISA is assigned 2.
  420. tryagaingetbustype = +
  421.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  422.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  423.             Debug-Output "ShellCode error."
  424.             goto ShellCodeError
  425.         endif
  426.         set BusInterfaceType = $($R1)
  427.         set BusNumber = $($R2)
  428.         ifint $(BusInterfaceType) == 1
  429.             goto ELNK3ISA509adapterverify
  430.         else-ifint $(BusInterfaceType) == 2
  431.             goto ELNK3ISA509adapterverify
  432.         else
  433.             set Error = "The Bus Type of 3Com EtherLink III (3c509) Adapter must be either ISA or EISA."
  434.             set from = end
  435.             set to = tryagaingetbustype
  436.             goto warning
  437.         endif
  438. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  439.     else
  440.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  441.         set BusNumber = *($(!STF_NCDETINFO),6)
  442.     endif
  443. ;;************************************************************************************************
  444.  
  445. ELNK3ISA509adapterverify = +
  446.     Debug-Output "$(InfFile) $(Option): Adapterverify"
  447.     ;Ifstr(i) $(!NTN_InstallMode) != configure
  448.     ;   Goto ELNK3ISA509skipoptions
  449.     ;Endif
  450.     ;set-sub Transceiver = $(Transceiver),1
  451.     Shell "" DebugConfiguration "after running dialog"
  452.     Ifstr(i) $(DetectedCard) != TRUE
  453.         Shell $(ParamInf) Param_SaveValues
  454.         Set NewParamSettings = $($R0)
  455.         Debug-Output "NewParamSettings: $(NewParamSettings)"
  456.         Ifstr(i) $(CurrParamSettings) == {}
  457.             Set DiffParamSettings = $(NewParamSettings)
  458.         Else
  459.             Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
  460.             Set DiffParamSettings = $($R0)
  461.         Endif
  462.         Debug-Output "oemsetup.inf: Calling Param_VerifyResources"
  463.         Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
  464.         Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  465.             Debug-Output "oemsetup.inf: Param_VerifyResources succeeded"
  466.             Goto ELNK3ISA509skipoptions
  467.         Endif
  468.     Else
  469.         Set CardVerifyIndex = $(!STF_NCDETCARD)
  470.         Debug-Output "oemsetup.inf: Calling Param_VerifyCard"
  471.         Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  472.         Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  473.             Debug-Output "oemsetup.inf: Param_VerifyCard succeeded"
  474.             Goto ELNK3ISA509skipoptions
  475.         Endif
  476.     Endif
  477.     Set from = ELNK3ISA509adapteroptions
  478.     Set to = ELNK3ISA509skipoptions
  479.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  480.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  481.         Debug-Output "ShellCode error: cannot get an error string."
  482.         goto ShellCodeError
  483.     endif
  484.     set Error = $($R0)
  485.     Goto Warning
  486.  
  487. ELNK3ISA509skipoptions =+
  488.     Debug-Output "$(InfFile) $(Option): SkipOptions"
  489.     ifint $(OldVersionExisted) == $(TRUE)
  490.         ifstr(i) $(!NTN_InstallMode) == configure
  491.             goto ELNK3ISA509writeparameters
  492.         endif
  493.     endif
  494.     StartWait
  495.     ifint $(OldVersionExisted) == $(FALSE)
  496.         ifstr(i) $(!NTN_InstallMode) == "install"
  497.            Ifstr(i) $(DoCopy) == "YES"
  498.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  499.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  500.                   Goto ShellCodeError
  501.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  502.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  503.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  504.                       goto ShellCodeError
  505.                   endif
  506.                   set Error = $($R0)
  507.                   Goto fatal
  508.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  509.                   Goto successful
  510.               Endif
  511.               Set SrcDir = $($R1)
  512.            Endif
  513.            install "Install-Option"
  514.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  515.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  516.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  517.                   goto ShellCodeError
  518.               endif
  519.               set Error = $($R0)
  520.               goto fatal
  521.            endif
  522.         endif
  523.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  524.             $(ProductSoftwareName), +
  525.             $(ProductSoftwareName), +
  526.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  527.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  528.             $(NetEventDLL)
  529.         Set OEM_ABANDON_SOFTWARE = TRUE
  530.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  531.             Debug-Output "ShellCode error"
  532.             goto ShellCodeError
  533.         endif
  534.         set RegistryErrorIndex = $($R0)
  535.         set KeyProduct      = $($R1)
  536.         Set SoftNetRulesKey = $($R2)
  537.         CloseRegKey $($R3)
  538.         CloseRegKey $($R4)
  539.         CloseRegKey $($R5)
  540.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  541.             EndWait
  542.             Debug-Output "Registry error: add software components"
  543.             CloseRegKey $(KeyProduct)
  544.             CloseRegKey $(SoftNetRulesKey)
  545.             goto fatalregistry
  546.         endif
  547.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  548.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  549.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  550.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  551.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  552.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  553.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  554.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  555.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  556.             Debug-Output "ShellCode error."
  557.             goto ShellCodeError
  558.         endif
  559.         set RegistryErrorIndex = $($R0)
  560.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  561.             EndWait
  562.             Debug-Output "Registry error: add value list."
  563.             CloseRegKey $(KeyProduct)
  564.             CloseRegKey $(SoftNetRulesKey)
  565.             goto fatalregistry
  566.         endif
  567.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  568.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  569.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  570.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  571.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  572.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  573.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  574.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  575.             Debug-Output "ShellCode error."
  576.             goto ShellCodeError
  577.         endif
  578.         set RegistryErrorIndex = $($R0)
  579.         CloseRegKey $(KeyProduct)
  580.         CloseRegKey $(SoftNetRulesKey)
  581.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  582.             EndWait
  583.             Debug-Output "Resgitry error: add value list."
  584.             goto fatalregistry
  585.         endif
  586.     endif
  587.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  588.     ifint $($R4) != -1
  589.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  590.     endif
  591.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  592.         Debug-Output "Cannot add hardware component"
  593.         goto ShellCodeError
  594.     endif
  595.     set RegistryErrorIndex = $($R0)
  596.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  597.         EndWait
  598.         Debug-Output "Registry error: add hardware component"
  599.         CloseRegKey $($R1)
  600.         CloseRegKey $($R2)
  601.         CloseRegKey $($R3)
  602.         goto fatalregistry
  603.     endif
  604.     set KeyParameters = $($R3)
  605.     set KeyAdapterRules = $($R2)
  606.     set AdapterNumber = $($R4)
  607.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  608.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  609.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  610.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  611.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  612.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  613.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  614.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  615.         Debug-Output "ShellCode error"
  616.         goto ShellCodeError
  617.     endif
  618.     CloseRegKey $($R1)
  619.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  620.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  621.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  622.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  623.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  624.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  625.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  626.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  627.         Debug-Output "ShellCode error."
  628.         goto ShellCodeError
  629.     endif
  630.     set RegistryErrorIndex = $($R0)
  631.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  632.         EndWait
  633.         Debug-Output "Resgitry error: add value list."
  634.         CloseRegKey $(KeyParameters)
  635.         CloseRegKey $(KeyAdapterRules)
  636.         goto fatalregistry
  637.     endif
  638.     CloseRegKey $(KeyAdapterRules)
  639.     goto ELNK3ISA509writeparameters
  640.  
  641. ELNK3ISA509writeparameters = +
  642.     Debug-Output "$(InfFile) $(Option): Write"
  643.     ;Set NewValueList = {+
  644.     ;                  {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  645.     ;                  {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  646.     ;                  {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  647.     ;                  {CardType,$(NoTitle),$(!REG_VT_DWORD),0},+
  648.     ;                  {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  649.     ;                  {Transceiver,$(NoTitle),$(!REG_VT_DWORD),$(Transceiver)},+
  650.     ;                  {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  651.     Ifstr(i) $(!NTN_InstallMode) != configure
  652.         Set NewValueList = {+
  653.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  654.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  655.                        {CardType,$(NoTitle),$(!REG_VT_DWORD),0},+
  656.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1}}
  657.     Else
  658.         Set NewValueList = {+
  659.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  660.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  661.                        {CardType,$(NoTitle),$(!REG_VT_DWORD),0},+
  662.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  663.                        {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  664.     Endif
  665.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  666.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  667.         Shell $(UtilityInf), AddDefaultNetCardParameters, $(KeyParameters)
  668.     endif
  669.     CloseRegKey $(KeyParameters)
  670.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  671.         Debug-Output "ShellCode error."
  672.         goto ShellCodeError
  673.     endif
  674.     set RegistryErrorIndex = $($R0)
  675.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  676.         Debug-Output "Registry error: Add value list"
  677.         goto fatalregistry
  678.     endif
  679.     EndWait
  680.     goto successful
  681.  
  682. ;*******************************************************************************
  683. ;
  684. ; Etherlink III EISA & MCA Specific routines for the this .inf file.
  685. ;
  686. ;
  687. ELNK3EISA&MCAinstalladapter = +
  688.     Debug-Output "$(InfFile) $(Option): Installadapter"
  689.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  690.     Ifstr $(KeyProduct) != $(KeyNull)
  691.         CloseRegKey $(KeyProduct)
  692.         ; @@1
  693.         ifstr(i) $(!NTN_RegBase) == $(ProductKeyName)
  694.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  695.                $(ProductVersion)
  696.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  697.                Debug-Output "ShellCode error: cannot get an error string."
  698.                goto ShellCodeError
  699.            endif
  700.            goto end
  701.         else
  702.            Shell $(UtilityInf), CardExistedDlg
  703.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  704.                Debug-Output "ShellCode error: cannot get an error string."
  705.                goto ShellCodeError
  706.            endif
  707.            ifstr(i) $($R1) != "OK"
  708.                set CommonStatus = STATUS_USERCANCEL
  709.                goto end
  710.            endif
  711.            set OldVersionExisted = $(TRUE)
  712.         endif
  713.     endif
  714.     ;CloseRegKey $(KeyProduct)
  715.     goto ELNK3EISA&MCAnextstep
  716.  
  717. ELNK3EISA&MCAconfigureadapter = +
  718.     Debug-Output "$(InfFile) $(Option): configadapter"
  719.     Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  720.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  721.         Debug-Output "ShellCode error: cannot get an error string."
  722.         goto ShellCodeError
  723.     endif
  724.     set Error = $($R0)
  725.     set from = end
  726.     set to = end
  727.     goto nonfatalinfo
  728.  
  729. ELNK3EISA&MCAnextstep = +
  730.     Debug-Output "$(InfFile) $(Option): nextstep"
  731.     StartWait
  732.         ifstr(i) $(Option) == ELNK3EISA
  733.             set cardlist = {}
  734.             Shell $(UtilityInf), EISAFindBus, $(ELNK3EISA_1BYTE), $(ELNK3EISA_MASK)
  735.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  736.                 goto ShellCodeError
  737.             endif
  738.             ifstr $($R0) != "NO_ERROR"
  739.                 set Error = $($R0)
  740.                 goto fatal
  741.             endif
  742.             set cardlist = $($R1)
  743.         else
  744.             set cardlist = {}
  745.             Shell $(UtilityInf), MCAFindBus, *($(ELNK3MCA_1BYTE),1), *($(ELNK3MCA_2BYTE),1)
  746.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  747.                 goto ShellCodeError
  748.             endif
  749.             ifstr $($R0) != "NO_ERROR"
  750.                 set Error = $($R0)
  751.                 goto fatal
  752.             endif
  753.             ifstr(i) $($R1) != {}
  754.                 set cardlist = $($R1)
  755.             endif
  756.             Shell $(UtilityInf), MCAFindBus, *($(ELNK3MCA_1BYTE),2), *($(ELNK3MCA_2BYTE),2)
  757.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  758.                 goto ShellCodeError
  759.             endif
  760.             ifstr $($R0) != "NO_ERROR"
  761.                 set Error = $($R0)
  762.                 goto fatal
  763.             endif
  764.             ifstr(i) $($R1) != {}
  765.                 ifstr(i) $(cardlist) != {}
  766.                     set cardlist = >($(cardlist),$($R1))
  767.                 else
  768.                     set cardlist = $($R1)
  769.                 endif
  770.             endif
  771.             Shell $(UtilityInf), MCAFindBus, *($(ELNK3MCA_1BYTE),3), *($(ELNK3MCA_2BYTE),3)
  772.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  773.                 goto ShellCodeError
  774.             endif
  775.             ifstr $($R0) != "NO_ERROR"
  776.                 set Error = $($R0)
  777.                 goto fatal
  778.             endif
  779.             ifstr(i) $($R1) != {}
  780.                 ifstr(i) $(cardlist) != {}
  781.                     set cardlist = >($(cardlist),$($R1))
  782.                 else
  783.                     set cardlist = $($R1)
  784.                 endif
  785.             endif
  786.             Shell $(UtilityInf), MCAFindBus, *($(ELNK3MCA_1BYTE),4), *($(ELNK3MCA_2BYTE),4)
  787.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  788.                 goto ShellCodeError
  789.             endif
  790.             ifstr $($R0) != "NO_ERROR"
  791.                 set Error = $($R0)
  792.                 goto fatal
  793.             endif
  794.             ifstr(i) $($R1) != {}
  795.                 ifstr(i) $(cardlist) != {}
  796.                     set cardlist = >($(cardlist),$($R1))
  797.                 else
  798.                     set cardlist = $($R1)
  799.                 endif
  800.             endif
  801.             Shell $(UtilityInf), MCAFindBus, *($(ELNK3MCA_1BYTE),5), *($(ELNK3MCA_2BYTE),5)
  802.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  803.                 goto ShellCodeError
  804.             endif
  805.             ifstr $($R0) != "NO_ERROR"
  806.                 set Error = $($R0)
  807.                 goto fatal
  808.             endif
  809.             ifstr(i) $($R1) != {}
  810.                 ifstr(i) $(cardlist) != {}
  811.                     set cardlist = >($(cardlist),$($R1))
  812.                 else
  813.                     set cardlist = $($R1)
  814.                 endif
  815.             endif
  816.         endif
  817.  
  818.     ifstr(i) $(cardlist) == {}
  819.         ;set Error = $(CANNOT_FIND_ANY_CARD)
  820.         ifstr(i) $(Option) == ELNK3EISA
  821.             set Error = "Cannot find any 3Com Etherlink III (3c579) EISA Adapters."
  822.         else
  823.             set Error = "Cannot find any 3Com Etherlink III (3c529) MCA Adapters."
  824.         endif
  825.         set CommonStatus = STATUS_USERCANCEL
  826.         set from = "end"
  827.         goto nonfatal
  828.     endif
  829.  
  830.     set AdapterList = $(cardlist)
  831.     ifint $(OldVersionExisted) == $(FALSE)
  832.         ifstr(i) $(!NTN_InstallMode) == "install"
  833.            Ifstr(i) $(DoCopy) == "YES"
  834.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  835.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  836.                   Goto ShellCodeError
  837.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  838.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  839.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  840.                       goto ShellCodeError
  841.                   endif
  842.                   set Error = $($R0)
  843.                   Goto fatal
  844.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  845.                   Goto successful
  846.               Endif
  847.               Set SrcDir = $($R1)
  848.            Endif
  849.            install "Install-Option"
  850.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  851.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  852.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  853.                   goto ShellCodeError
  854.               endif
  855.               set Error = $($R0)
  856.               goto fatal
  857.            endif
  858.         endif
  859.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  860.             $(ProductSoftwareName), +
  861.             $(ProductSoftwareName), +
  862.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  863.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  864.             $(NetEventDLL)
  865.         Set OEM_ABANDON_SOFTWARE = TRUE
  866.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  867.             goto ShellCodeError
  868.         endif
  869.         set RegistryErrorIndex = $($R0)
  870.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  871.             EndWait
  872.             CloseRegKey $($R1)
  873.             CloseRegKey $($R2)
  874.             CloseRegKey $($R3)
  875.             CloseRegKey $($R4)
  876.             CloseRegKey $($R5)
  877.             goto fatalregistry
  878.         endif
  879.         set SoftProductKey      = $($R1)
  880.         Set SoftNetRuleKey      = $($R2)
  881.         Set SoftServiceKey      = $($R3)
  882.         Set SoftParameterKey    = $($R4)
  883.         Set SoftLinkageKey      = $($R5)
  884.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  885.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  886.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  887.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  888.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  889.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  890.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  891.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  892.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  893.             goto ShellCodeError
  894.         endif
  895.         set RegistryErrorIndex = $($R0)
  896.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  897.             EndWait
  898.             CloseRegKey $(SoftProductKey)
  899.             CloseRegKey $(SoftNetRuleKey)
  900.             CloseRegKey $(SoftServiceKey)
  901.             CloseRegKey $(SoftParameterKey)
  902.             CloseRegKey $(SoftLinkageKey)
  903.             goto fatalregistry
  904.         endif
  905.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  906.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  907.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  908.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  909.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  910.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  911.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  912.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  913.             goto ShellCodeError
  914.         endif
  915.         set RegistryErrorIndex = $($R0)
  916.         CloseRegKey $(SoftProductKey)
  917.         CloseRegKey $(SoftNetRuleKey)
  918.         CloseRegKey $(SoftServiceKey)
  919.         CloseRegKey $(SoftParameterKey)
  920.         CloseRegKey $(SoftLinkageKey)
  921.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  922.             EndWait
  923.             goto fatalregistry
  924.         endif
  925.     endif
  926.     ForListDo $(AdapterList)
  927.         set BusNum = *($($),1)
  928.         set SlotNum = *($($),2)
  929.                 Ifstr(i)  $(Option) == ELNK3MCA
  930.                         set McaPosId = *($($),3)
  931.                 endif
  932.         Debug-Output $(BusNum)
  933.         Debug-Output $(SlotNum)
  934.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  935.             $(SlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)
  936.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  937.             goto ShellCodeError
  938.         endif
  939.         ifstr $($R0) != "NO_ERROR"
  940.             set Error = $($R0)
  941.             goto fatal
  942.         endif
  943.         ifstr(i) $($R1) != "YES"
  944.                 Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  945.                 ifint $($R4) != -1
  946.                     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  947.                 endif
  948.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  949.                     goto ShellCodeError
  950.                 endif
  951.                 set RegistryErrorIndex = $($R0)
  952.                 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  953.                     EndWait
  954.                     CloseRegKey $($R1)
  955.                     CloseRegKey $($R2)
  956.                     CloseRegKey $($R3)
  957.                     goto fatalregistry
  958.                 endif
  959.                 Set HardNetCardKey      = $($R1)
  960.                 Set HardNetRuleKey      = $($R2)
  961.                 Set HardParameterKey    = $($R3)
  962.                 set AdapterNumber       = $($R4)
  963.                 set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  964.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  965.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  966.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  967.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  968.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  969.                 Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  970.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  971.                     goto ShellCodeError
  972.                 endif
  973.                 Ifstr(i) $(Option) == ELNK3EISA
  974.                     set NewValueList = {+
  975.                         {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  976.                         {CardType,$(NoTitle),$(!REG_VT_DWORD),1},+
  977.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  978.                         {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  979.                         {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(ELNK3EISA_COMPRESSID)},+
  980.                         {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  981.                 else
  982.                     set NewValueList = {+
  983.                         {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  984.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),3},+
  985.                         {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(McaPosId)},+
  986.                         {CardType,$(NoTitle),$(!REG_VT_DWORD),2},+
  987.                         {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  988.                         {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  989.                 endif
  990.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  991.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  992.                     goto ShellCodeError
  993.                 endif
  994.                  set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  995.                  set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  996.                  set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  997.                                      {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  998.                                      {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  999.                                      {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1000.                 Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  1001.                 CloseRegKey $(HardNetCardKey)
  1002.                 CloseRegKey $(HardNetRuleKey)
  1003.                 CloseRegKey $(HardParameterKey)
  1004.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1005.                     goto ShellCodeError
  1006.                 endif
  1007.         endif
  1008.     EndForListDo
  1009.     goto ELNK3EISA&MCAwriteparameters
  1010. ELNK3EISA&MCAwriteparameters = +
  1011.     EndWait
  1012.     goto successful
  1013.  
  1014. ;*******************************************************************************
  1015. ;
  1016. ; Common routines for the entire .inf file.
  1017. ;
  1018. ;
  1019. bindingadapter =+
  1020.     set Error = "Binding: Sorry, not yet implemented."
  1021.     goto fatal
  1022. removeadapter = +
  1023.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1024.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1025.             $(ProductSoftwareName)
  1026.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1027.             Debug-Output "ShellCode error"
  1028.             goto ShellCodeError
  1029.         endif
  1030.         set RegistryErrorIndex = $($R0)
  1031.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1032.             goto fatalregistry
  1033.         endif
  1034.     else
  1035.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1036.             $(ProductSoftwareName), $(!NTN_RegBase)
  1037.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1038.             Debug-Output "ShellCode error"
  1039.             goto ShellCodeError
  1040.         endif
  1041.         set RegistryErrorIndex = $($R0)
  1042.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1043.             goto fatalregistry
  1044.         endif
  1045.     endif
  1046.     goto end
  1047. UpgradeSoftware = +
  1048.     Debug-Output "Looking at Key: "$(ProductKeyName)
  1049.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1050.         ;
  1051.         ; Also update if Microsoft installed the driver.
  1052.         ;
  1053.     Ifstr $(KeyProduct) == $(KeyNull)
  1054.             Debug-Output "Looking at Key: "$(MS_ProductKeyName)
  1055.             OpenRegKey $(!REG_H_LOCAL) "" $(MS_ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1056.     endif
  1057.     Ifstr $(KeyProduct) != $(KeyNull)
  1058.         Debug-Output "Adding files to install list"
  1059.         install "Install-Update"
  1060.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1061.             goto fatal
  1062.         endif
  1063.         Debug-Output "Changing Reg Version Nubmers!"
  1064.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1065.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1066.         CloseRegKey $(KeyProduct)
  1067.     else
  1068.         goto fatalregistry
  1069.     endif
  1070.     goto end
  1071.  
  1072. successful = +
  1073.         goto end
  1074.  
  1075. abandon = +
  1076.     ForListDo $(OEM_ABANDON_OPTIONS)
  1077.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1078.             $(ProductSoftwareName), $($)
  1079.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1080.             Debug-Output "ShellCode error"
  1081.             goto ShellCodeError
  1082.         endif
  1083.         set RegistryErrorIndex = $($R0)
  1084.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1085.             goto fatalregistry
  1086.         endif
  1087.     EndForListDo
  1088.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1089.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1090.             $(ProductSoftwareName), FALSE
  1091.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1092.             Debug-Output "ShellCode error"
  1093.             goto ShellCodeError
  1094.         endif
  1095.         set RegistryErrorIndex = $($R0)
  1096.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1097.             goto fatalregistry
  1098.         endif
  1099.     endif
  1100.     goto end
  1101. warning = +
  1102.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1103.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1104.         goto ShellCodeError
  1105.     endif
  1106.     ifstr(i) $($R1) == "OK"
  1107.         goto $(to)
  1108.     else-ifstr(i) $($R1) == "CANCEL"
  1109.         goto $(from)
  1110.     else
  1111.         goto "end"
  1112.     endif
  1113. nonfatalinfo = +
  1114.     Set Severity = STATUS
  1115.     Set CommonStatus = STATUS_USERCANCEL
  1116.     goto nonfatalmsg
  1117. nonfatal = +
  1118.     Set Severity = NONFATAL
  1119.     goto nonfatalmsg
  1120. nonfatalmsg = +
  1121.     ifstr(i) $(Error) == ""
  1122.         Set Severity = NONFATAL
  1123.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1124.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1125.             goto ShellCodeError
  1126.         endif
  1127.         set Error = $($R0)
  1128.     endif
  1129.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1130.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1131.         goto ShellCodeError
  1132.     endif
  1133.     ifstr(i) $($R1) == "OK"
  1134.         goto $(from)
  1135.     else
  1136.         goto "end"
  1137.     endif
  1138. fatalregistry = +
  1139.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1140.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1141.         goto ShellCodeError
  1142.     endif
  1143.     set Error = $($R0)
  1144.     goto fatal
  1145. fataldetect = +
  1146.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1147.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1148.         Debug-Output "ShellCode error: cannot get an error string."
  1149.         goto ShellCodeError
  1150.     endif
  1151.     set Error = $($R0)
  1152.     Goto fatal
  1153. fatal = +
  1154.     ifstr(i) $(Error) == ""
  1155.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1156.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1157.             goto ShellCodeError
  1158.         endif
  1159.         set Error = $($R0)
  1160.     endif
  1161.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1162.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1163.         goto ShellCodeError
  1164.     endif
  1165.     goto setfailed
  1166. ShellCodeError = +
  1167.     set DlgType      = "MessageBox"
  1168.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1169.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  1170.     set STF_MB_TYPE  = 1
  1171.     set STF_MB_ICON  = 3
  1172.     set STF_MB_DEF   = 1
  1173.     ui start "Error Message"
  1174.     goto setfailed
  1175. setfailed = +
  1176.     set CommonStatus = STATUS_FAILED
  1177.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1178.         set OEM_ABANDON_ON = FALSE
  1179.         goto abandon
  1180.     endif
  1181.     goto end
  1182. end = +
  1183.     goto term
  1184. term = +
  1185.     Return $(CommonStatus)
  1186.  
  1187. [DebugConfiguration]
  1188.     Set InfName = "Oemsetup.INF"
  1189.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  1190.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  1191.     return
  1192.  
  1193. [Install-Option]
  1194.     set STF_VITAL = ""
  1195.     ifstr(i) $(AddCopy) == "YES"
  1196.             Debug-Output $(InfName)"Adding files: Files-$(Option), SrcDir=$(SrcDir)"
  1197.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir)WINNT $(!STF_WINDOWSSYSPATH)\drivers
  1198.             AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1199.     endif
  1200.     ifstr(i) $(DoCopy) == "YES"
  1201.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1202.        CopyFilesInCopyList
  1203.     endif
  1204.     Exit
  1205.  
  1206. [Install-Update]
  1207.    set STF_VITAL        = ""
  1208.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1209.    Debug-Output $(InfName)"Adding files: Files-$(Option), SrcDir=$(SrcDir)"
  1210.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir)WINNT $(!STF_WINDOWSSYSPATH)\drivers
  1211.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1212.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1213.    CopyFilesInCopyList
  1214.    exit
  1215.  
  1216. [Source Media Descriptions]
  1217.     1  = "Windows NT Setup Disk #1"  , TAGFILE = disk1
  1218.     2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  1219.         3  = "3Com Etherdisk for Etherlink III", TAGFILE = 3c5x9cfg.exe
  1220.  
  1221. [Signature]
  1222.     FileType = MICROSOFT_FILE
  1223.  
  1224. [GetSignature]
  1225.     read-syms Signature
  1226.     return $(FileType)
  1227.  
  1228. [ProductType]
  1229. STF_PRODUCT  = Winnt
  1230. STF_PLATFORM = I386
  1231.  
  1232. ;3,     oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  1233. [Files-Inf]
  1234. 3,      oemsetup.inf,    SIZE=45000, BACKUP=*, RENAME=oemnade3.inf
  1235. 3,      oemsetup.inf,    SIZE=45000, BACKUP=*, RENAME=oemnadee.inf
  1236. 3,      oemsetup.inf,    SIZE=45000, BACKUP=*, RENAME=oemnaden.inf
  1237.  
  1238. [Files-ELNK3ISA509]
  1239. 3,ELNK3.SYS , SIZE=35328
  1240.  
  1241. [Files-ELNK3EISA]
  1242. 3,ELNK3.SYS , SIZE=35328
  1243.  
  1244. [Files-ELNK3MCA]
  1245. 3,ELNK3.SYS , SIZE=35328
  1246.  
  1247. [LanguagesSupported]
  1248.     ENG
  1249.  
  1250. [OptionsTextENG]
  1251.     ELNK3ISA509  = "3Com Etherlink III (3c509) ISA Adapter"
  1252.     ELNK3EISA    = "3Com Etherlink III (3c579) EISA Adapter"
  1253.     ELNK3MCA     = "3Com Etherlink III (3c529) MCA Adapter"
  1254.  
  1255. [FileConstantsENG]
  1256. ProCaption   = "Windows NT Setup"
  1257. ProCancel    = "Cancel"
  1258. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1259.                "Are you sure you want to cancel copying files?"
  1260. ProCancelCap = "Network Setup Message"
  1261. ProText1     = "Copying:"
  1262. ProText2     = "To:"
  1263. FunctionTitle                           = "3Com Etherlink III Adapter Card Setup"
  1264. ProductSoftwareDescription              = "3Com Etherlink III Adapter Driver"
  1265. ProductSoftwareTitle                    = "3Com Etherlink III Adapter Driver"
  1266. ProductHardwareELNK3ISA509Title         = "3Com Etherlink III (3c509) ISA Adapter"
  1267. ProductHardwareELNK3ISA509Description   = "3Com Etherlink III (3c509) ISA Adapter"
  1268. ProductHardwareELNK3EISATitle           = "3Com Etherlink III (3c579) EISA Adapter"
  1269. ProductHardwareELNK3EISADescription     = "3Com Etherlink III (3c579) EISA Adapter"
  1270. ProductHardwareELNK3MCATitle            = "3Com Etherlink III (3c529) MCA Adapter"
  1271. ProductHardwareELNK3MCADescription      = "3Com Etherlink III (3c529) MCA Adapter"
  1272. ShellCodeErrorTitle                     = "Error: "$(FunctionTitle)
  1273. ShellCodeErrorText                      = "Shell Code Error."
  1274. TransceiverList = {"10 Base T", "Thick Net (AUI/DIX)", "Thin Net (BNC/COAX)"}
  1275. TransceiverDisplayList = {"10 Base T", "Thick Net (AUI/DIX)", "Thin Net (BNC/COAX)"}
  1276.  
  1277. [DialogConstantsENG]
  1278. Help        = "&Help"
  1279. Exit        = "Cancel"
  1280. OK          = "OK"
  1281. HelpContext = ""
  1282. Continue    = "Continue"
  1283. Cancel      = "Cancel"
  1284.  
  1285. [FileDependentDlgENG]
  1286. Label1 = "I/O &Port Address:"
  1287. ;Label2 = "&Interrupt Number:"
  1288. ;Label3 = "&Transceiver Type:"
  1289. ;DlgType = "Combination"
  1290. ;DlgTemplate = "UBNDIS"
  1291. DlgType = "MultiCombo"
  1292. DlgTemplate = "SINGLE_COMBO"
  1293. Caption = $(FunctionTitle)
  1294. Combo1List = $(IOADDR_Hex_List)
  1295. Combo1Out  = $(IOADDR_Hex_Value)
  1296. ;Combo2List = $(IRQList)
  1297. ;Combo2Out = $(IRQValue)
  1298. ;Combo3List = $(TransceiverDisplayList)
  1299. ;Combo3Out = $(TransceiverValue)
  1300. ComboListItemsIn = {Combo1List}
  1301. ComboListItemsOut = {Combo1Out}
  1302. EditTextIn = ""
  1303. EditTextLim = ""
  1304. CBOptionsGreyed = {}
  1305. NotifyFields = {NO, NO, NO}
  1306. HelpContext = $(!IDH_DB_OEMNADE3_INS)
  1307.