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