home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 December / MICD_2000_12_NR1.iso / Dreamnet / drivery / SMC / ETHER.EXE / OEMSETUP.INF < prev    next >
INI File  |  1997-12-10  |  48KB  |  1,434 lines

  1. ;
  2. ; 12/02/96  v 3.05b 
  3. ;
  4. ; Windows NT 4.0 .inf file 
  5. ;
  6. ; SMC Ethernet (8416, 8216, 8013, MCA, etc..,) 
  7. ;
  8.  
  9. [Identification]
  10.     OptionType = NetAdapter
  11. [PlatformsSupported]
  12.     MCA     
  13.     ISA
  14.     EISA
  15.     "Jazz-Internal Bus"
  16. [Options]
  17.     SMC8416
  18.     SMC8216
  19.     SMC8013
  20.     SMC8003
  21.  
  22. [CardInfo]
  23. SMCISA = 0, 0, smcisa, 0
  24.  
  25. [FileConstants]
  26. ParamInf        = "NCPARAM.INF"
  27. UtilityInf      = "UTILITY.INF"
  28. subroutineinf   = "SUBROUTN.INF"
  29. SoftwareType    = "driver"
  30. Exit_Code       = 0
  31. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  32. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  33. CardList = ^(CardInfo,0)
  34. Card1ByteList = ^(CardInfo, 1)
  35. Card2ByteList = ^(CardInfo, 2)
  36. CardRuleList = ^(CardInfo, 3)
  37. CardIDList = ^(CardInfo, 4 )
  38. Card1Byte = *($(Card1ByteList), ~($(CardList), $(Option)))
  39. Card2Byte = *($(Card2ByteList), ~($(CardList), $(Option)))
  40. NETCARD_ID = *($(CardIDList), ~($(CardList), $(Option)))
  41. CardRule = *($(CardRuleList), ~($(CardList), $(Option)))
  42.  
  43. EthernetCards  = { SMCISA }
  44.  
  45. TokenRingCards = { WD8115TR }
  46. Manufacturer    = "SMC"
  47. ProductMajorVersion     = "3"
  48. ProductMinorVersion     = "05"
  49. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  50. ProductSoftwareName     = "SMC8000N"
  51. ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\smc8000n.sys"
  52. NetRuleSoftwareType     = "smc8000nSys ndisDriver smc8000nDriver"
  53. NetRuleSoftwareUse      = $(SoftwareType)
  54. NetRuleSoftwareBindForm = """Smc8000nDriver"" yes no container"
  55. NetRuleSoftwareClass    = {"smc8000nDriver basic"}
  56. ProductHardwareName     = $(Option)
  57. ;NetRuleHardwareType     = "smcisa smcisaAdapter"
  58. NetRuleHardwareType     = $(CardRule)" "$(CardRule)"Adapter"
  59. NetRuleHardwareTypeMCA  = $(CardRule)" "$(CardRule)"Adapter"
  60. NetRuleHardwareBindForm = " yes yes container"
  61. ;NetRuleHardwareClass    = {"smcisaAdapter basic"}
  62. NetRuleHardwareClass    = {""$(CardRule)"Adapter basic"}
  63. NetRuleHardwareClassMCA = {""$(CardRule)"Adapter basic"}
  64. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  65. ParamKeyName    = $(!NTN_ServiceBase)$(ProductHardwareName)"\Parameters"
  66. [GeneralConstants]
  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. [SmcIrqs]
  85.     IRQ0 = "3",3
  86.     IRQ1 = "5",5
  87.     IRQ2 = "7",7
  88.     IRQ3 = "9",9
  89.     IRQ4 = "10",10
  90.     IRQ5 = "11",11
  91.     IRQ6 = "15",15
  92.  
  93. [SmcIoBase]
  94.     Base0  = "0x300",0x0300
  95.     Base1  = "0x200",0x0200
  96.     Base2  = "0x220",0x0220
  97.     Base3  = "0x240",0x0240
  98.     Base4  = "0x260",0x0260
  99.     Base5  = "0x280",0x0280
  100.     Base6  = "0x2A0",0x02A0
  101.     Base7  = "0x2C0",0x02C0
  102.     Base8  = "0x2E0",0x02E0
  103.     Base9  = "0x320",0x0320
  104.     Base10 = "0x340",0x0340
  105.     Base11 = "0x360",0x0360
  106.     Base12 = "0x380",0x0380
  107.     Base13 = "0x3A0",0x03A0
  108.     Base14 = "0x3C0",0x03C0
  109.     Base15 = "0x3E0",0x03E0
  110.  
  111. [SmcMemAddr]
  112.     MemAddr0 = "IOMapped",IOMapped
  113.     MemAddr0 = "0xC0000",0xC0000
  114.     MemAddr0 = "0xC2000",0xC2000
  115.     MemAddr0 = "0xC4000",0xC4000
  116.     MemAddr0 = "0xC6000",0xC6000
  117.     MemAddr0 = "0xC8000",0xC8000
  118.     MemAddr0 = "0xCA000",0xCA000
  119.     MemAddr0 = "0xCC000",0xCC000
  120.     MemAddr0 = "0xCE000",0xCE000
  121.     MemAddr0 = "0xD0000",0xD0000
  122.     MemAddr0 = "0xD2000",0xD2000
  123.     MemAddr0 = "0xD4000",0xD4000
  124.     MemAddr0 = "0xD6000",0xD6000
  125.     MemAddr0 = "0xD8000",0xD8000
  126.     MemAddr0 = "0xDA000",0xDA000
  127.     MemAddr0 = "0xDC000",0xDC000
  128.     MemAddr0 = "0xDE000",0xDE000
  129. [date]
  130.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  131. [Identify]
  132.     read-syms Identification
  133.     set Status     = STATUS_SUCCESSFUL
  134.     set Identifier = $(OptionType)
  135.     set Media      = #("Source Media Descriptions", 3, 1)
  136.     Return $(Status) $(Identifier) $(Media)
  137. [ReturnOptions]
  138.     set Status        = STATUS_FAILED
  139.     set OptionList     = {}
  140.     set OptionTextList = {}
  141.     set LanguageList = ^(LanguagesSupported, 1)
  142.     Ifcontains(i) $($0) in $(LanguageList)
  143.     ifstr(i) $($1) == ""
  144.        goto returnoptions
  145.     endif
  146.     set PlatformList = ^(PlatformsSupported, 1)
  147.     Ifcontains(i) $($1) in $(PlatformList)
  148.        goto returnoptions
  149.     else
  150.        set Status = STATUS_NOTSUPPORTED
  151.        goto finish_ReturnOptions
  152.     endif
  153.     else
  154.     set Status = STATUS_NOLANGUAGE
  155.     goto finish_ReturnOptions
  156.     endif
  157. returnoptions = +
  158.     set OptionList     = ^(Options, 1)
  159.  
  160.     ifstr(i) $(!NTN_InstallMode) == Update
  161.     set OptionList = >($(OptionList),SMCISA)
  162.     endif
  163.     set OptionTextList = ^(OptionsText$($0), 1)
  164.     set Status         = STATUS_SUCCESSFUL
  165. finish_ReturnOptions = +
  166.     Return $(Status) $(OptionList) $(OptionTextList)
  167. [InstallOption]
  168.  
  169.     set JOption   = $($1)
  170.  
  171.     set Option = SMCISA
  172.  
  173.     set SrcDir   = $($2)
  174.     set AddCopy  = $($3)
  175.     set DoCopy   = $($4)
  176.     set DoConfig = $($5)
  177.     set LanguageList = ^(LanguagesSupported, 1)
  178.  
  179.     ; The following lines were to set the dllpath properly
  180.     ; in NT 3.51, they are not needed in NT 4.0
  181.  
  182.     ; Split-String $(!p:AdapterINF) "\" DestList
  183.     ; set Drve = *($(DestList),1)
  184.     ; Split-String $(!STF_WINDOWSSYSPATH) "\" DestList
  185.     ; set RtDrve = *($(DestList),1)
  186.     ; ifstr(i) $(Drve) == $(RtDrve)
  187.     ;    set DLLPATH = $(SrcDir)
  188.     ; else
  189.     ;    set DLLPATH = $(!STF_WINDOWSSYSPATH)
  190.     ; endif
  191.  
  192.     set DLLPATH = $(SrcDir)
  193.  
  194.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  195.     Return STATUS_NOLANGUAGE
  196.     endif
  197.  
  198.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  199.     set-subst LF = "\n"
  200.     read-syms GeneralConstants
  201.     read-syms FileConstants
  202.     Shell $(UtilityInf), GetBindingInfo, "WD"
  203.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  204.     Debug-Output "ShellCode error: cannot get an error string."
  205.     goto ShellCodeError
  206.     endif
  207.     set NetRuleSoftwareBindable = $($R1)
  208.     read-syms DialogConstants$(!STF_LANGUAGE)
  209.     ifstr(i) $(!NTN_Origination) == "NCPA"
  210.     set Continue = $(OK)
  211.     endif
  212.     read-syms FileConstants$(!STF_LANGUAGE)
  213.     detect date
  214.     set-title  $(FunctionTitle)
  215.     set to   = Begin
  216.     set from = Begin
  217.     set CommonStatus = STATUS_SUCCESSFUL
  218.     EndWait
  219. Begin = +
  220.     set ActivateDetection = FALSE
  221.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  222.         set StartLabel = removeadapter
  223.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  224.         set StartLabel = UpgradeSoftware
  225.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  226.         set StartLabel = bindingadapter
  227.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  228.         set CommonStatus = STATUS_REBOOT
  229.         set ActivateDetection = TRUE
  230.         set StartLabel = configureadapter
  231.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  232.             Debug-Output "Cannot configure the DEC 100 driver software."
  233.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  234.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  235.             Debug-Output "ShellCode error: cannot get an error string."
  236.             goto ShellCodeError
  237.         endif
  238.         set Error = $($R0)
  239.         set from = end
  240.         set to = end
  241.         goto nonfatalinfo
  242.     endif
  243.     else
  244.         set StartLabel = installadapter
  245.         set OEM_ABANDON_OPTIONS = {}
  246.         set OEM_ABANDON_SOFTWARE = FALSE
  247.         set OEM_ABANDON_ON = TRUE
  248.         set ActivateDetection = TRUE
  249.     endif
  250.  
  251.     ifstr $(Option) != SMCISA
  252.         goto skipdetection
  253.     endif
  254.  
  255.     Debug-Output "OEMNADWD.INF: =================================================="
  256.     Debug-Output "OEMNADWD.INF: STF_CWDIR is: "$(!STF_CWDIR)
  257.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  258.     Debug-Output "OEMNADWD.INF: Option is: "$(Option)
  259.     Debug-Output "OEMNADWD.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  260.     Debug-Output "OEMNADWD.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  261.     Debug-Output "OEMNADWD.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  262.     Debug-Output "OEMNADWD.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  263.     Debug-Output "OEMNADWD.INF: =================================================="
  264.     Set DetectedCard = FALSE
  265.  
  266.     Ifstr(i) $(ActivateDetection) != TRUE
  267.     Goto skipdetection
  268.     Endif
  269.     Set TypeList = {{IRQ,IRQ_List,IRQLevel},+
  270.             {IOADDR, IOBaseAddressDecList, IOBaseValue},+
  271.             {MEMADDR, WinBaseAddressDecList, WinBaseValue}}
  272.     Debug-Output "OEMNADWD.INF: Calling Param_BuildTypeLists"
  273.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  274.     Set Status = $($R0)
  275.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  276.     Goto fataldetect
  277.     Endif
  278.     Debug-Output "OEMNADWD.INF: Calling Param_SetDefaults"
  279.  
  280.     Shell $(ParamInf) Param_SetDefaults {}
  281.     Shell $(ParamInf) HexListFromDecList $(IOBaseAddressDecList)
  282.     Set IOBaseAddressHexList = $($R0)
  283.     Shell $(ParamInf) HexListFromDecList $(WinBaseAddressDecList)
  284.     Set WinBaseAddressHexList = $($R0)
  285.     Debug-Output "The !STFNCOPTION is "$(!STF_NCOPTION) 
  286.     Ifstr(i) $(!STF_NCDETECT) == YES
  287.        Ifstr(i) $(!STF_NCOPTION) == $(JOption)
  288.           Set DetectedCard = $(TRUE)
  289.           Debug-Output "OEMNADWD.INF: Setting DetectedCard to TRUE"
  290.        Endif
  291.     Endif
  292. skipdetection =+
  293.     set from = $(fatal)
  294.     set to = $(fatal)
  295.     goto $(StartLabel)
  296. installadapter = +
  297.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  298.     Debug-Output "ProductKeyName= "$(ProductKeyName)
  299.     set OldVerIO = 999
  300.     Ifstr $(KeyProduct) != $(KeyNull)
  301.     CloseRegKey $(KeyProduct)
  302.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  303.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  304.            $(ProductVersion)
  305.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  306.            Debug-Output "ShellCode error: cannot get an error string."
  307.            goto ShellCodeError
  308.        endif
  309.        goto end
  310.     else
  311.        Shell $(UtilityInf), CardExistedDlg
  312.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  313.            Debug-Output "ShellCode error: cannot get an error string."
  314.            goto ShellCodeError
  315.        endif
  316.        ifstr(i) $($R1) != "OK"
  317.            set CommonStatus = STATUS_USERCANCEL
  318.            goto end
  319.        endif
  320.        set OldVersionExisted = $(TRUE)
  321.        set numcinst = 0
  322. findcardnum = +
  323.        set-add numcinst = $(numcinst),1
  324.        set currregloc = "SYSTEM\CurrentControlSet\Services\SMCISA"$(numcinst)
  325.        OpenRegKey $(!REG_H_LOCAL) "" $(currregloc) $(MAXIMUM_ALLOWED) TKey
  326.        ifint $(numcinst) < 5
  327.       Ifstr $(TKey) == $(KeyNull)
  328.          goto findcardnum
  329.       endif
  330.        endif
  331.        
  332.        CloseRegKey $(TKey) 
  333.        set Old_RegBase = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(numcinst)
  334.        OpenRegKey $(!REG_H_LOCAL) "" $(Old_RegBase) $(MAXIMUM_ALLOWED) PKey
  335.        Ifstr $(PKey) != $(KeyNull)
  336.             Shell $(UtilityInf) FindService, $(PKey)
  337.  
  338.             Ifstr(i) $($R0) == NO_ERROR
  339.             Set KeyParameters = $($R2)
  340.             CloseRegKey $($R1)
  341.             Ifstr $(KeyParameters) != $(KeyNull)
  342.  
  343.                 set ValueName = ""
  344.                 set ValueData = ""
  345.                 set ValueStr  = ""
  346.                 set ValueList = {}
  347.  
  348.                 EnumRegValue $(KeyParameters) ValueList
  349.                 ForListDo $(ValueList)
  350.                 set ValueItem = $($)
  351.                 set ValueName = *($(ValueItem),1)
  352.                 set ValueData = *($(ValueItem),4)
  353.                 Ifstr(i) $(ValueName) == "IOBase"
  354.                     set OldVerIO = $(ValueData)
  355.                 endif
  356.                 EndForListDo
  357.             endif
  358.             endif
  359.        endif
  360.     endif
  361.     endif
  362.  
  363. ;MCA
  364.     CloseRegKey $(PKey)
  365.  
  366.     Ifstr $(Option) != SMCISA
  367.         Goto installproduct
  368.     Endif
  369.     install "Install-Option"
  370.     Shell "" PrepareDetectionDll "smcncdet.dll"
  371. detectloop = +    
  372.     Shell $(ParamInf) Param_SetDefaults {}
  373.     set TextStatus = "Setup found no "$(JOption)", using default settings"
  374.     set DetectedIO = ""
  375.     set JError = 1
  376.     ifint $(DetectedCard) != $(TRUE)
  377.        set !STF_NCOPTION = ""
  378.        shell $(ParamInf) Param_DetectCard
  379.        set JError = *($($R0),1)
  380.        ifint $(JError) == 0
  381.           set JIndex = *($($R0),3) 
  382.           set !STF_NCDETCARD = $(JIndex)
  383.           set JAdptr = *($($R0),2)
  384.           ifstr(i) $(JAdptr) == ""
  385.              set JError = 1
  386.           endif
  387.           set !STF_NCOPTION = $(JAdptr)
  388.           ifstr(i) $(!STF_NCOPTION) == "SMCSCND"
  389.              set !STF_NCOPTION = $(JOption)
  390.           endif
  391.        else
  392.           Debug-Output "Param_DetectCard failed with result="$(JError)
  393.        endif
  394.     endif
  395.  
  396.     Debug-Output "OEMNADWD: The JOption is "$(JOption)
  397.     Debug-Output "OEMNADWD: The !STFNCOPTION is "$(!STF_NCOPTION) 
  398.     
  399.     ifstr(i) $(JOption) == $(!STF_NCOPTION)
  400.        shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  401.        ifstr(i) $($R0) == STATUS_SUCCESSFUL
  402.           set DetectedParams = $($R1)
  403.           set TextStatus = "Setup detected an "$(JOption)" and these parameters"
  404.           shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  405.           ForListDo $(DetectedParams)
  406.              set PItem = $($)
  407.              set PLabel = *($(PItem),1)
  408.              set PValue = *($(PItem),2)
  409.              Ifstr(i) $(PLabel) == "IOADDR"
  410.                                 set IOBaseValueDet = $(PValue)
  411.                 set DetectedIO = $(PValue)
  412.              endif
  413.              Ifstr(i) $(PLabel) == "IRQ"
  414.                                 set IRQLevelDet = $(PValue)
  415.              endif
  416.              Ifstr(i) $(PLabel) == "MEMADDR"
  417.                                 set WinBaseValueDet = $(PValue)
  418.              endif
  419.           endForListDo
  420.        else
  421.           Debug-Output "Param_QueryCard Failed, status = "$($R0)
  422.        endif
  423.     else
  424.        ifint $(JError) == 0
  425.           goto detectloop
  426.        endif
  427.     endif
  428.  
  429.     ifint $(DetectedIO) == $(OldVerIO)
  430.         goto detectloop
  431.     endif
  432.  
  433.     Shell $(ParamInf) Param_ControlDetection DTEND
  434.     goto adapteroptions
  435. configureadapter = +
  436.  
  437.     set JOption   = $($1)
  438.     ifstr $(Option) != SMCISA
  439.         goto end
  440.     endif
  441.  
  442.     set TextStatus = "These are the currently configured settings"
  443.  
  444.     set DLLPATH = $(!STF_CWDDIR)
  445.     Ifstr $(KeyProduct) == $(KeyNull)
  446.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  447.     Ifstr $(KeyProduct) == $(KeyNull)
  448.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  449.         goto fatalregistry
  450.     Endif
  451.     Endif
  452.     Debug-Output "INF: Shelling to FindService"
  453.     Shell $(UtilityInf) FindService, $(KeyProduct)
  454.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  455.     Debug-Output "INF: FindService shell failure"
  456.     Goto ShellCodeError
  457.     Endif
  458.     Ifstr(i) $($R0) != NO_ERROR
  459.     Debug-Output "INF: FindService Shell error: "$($R0)
  460.     Goto fatalregistry
  461.     endif
  462.     set KeyParameters = $($R2)
  463.     CloseRegKey $($R1)
  464.     Ifstr $(KeyParameters) == $(KeyNull)
  465.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  466.     Debug-Output "Cannot find component service"
  467.     goto fatalregistry
  468.     endif
  469.     set OldVersionExisted = $(TRUE )
  470.     set ValueName = ""
  471.     set ValueData = ""
  472.     set ValueStr  = ""
  473.     set ValueList = {}
  474.     EnumRegValue $(KeyParameters) ValueList
  475.     ForListDo $(ValueList)
  476.     set ValueItem = $($)
  477.     set ValueName = *($(ValueItem),1)
  478.     set ValueData = *($(ValueItem),4)
  479.     Ifstr(i) $(ValueName) == "Irq"
  480.         set IRQLevel = $(ValueData)
  481.     else-Ifstr(i) $(ValueName) == "IOBase"
  482.         set IOBaseValue = $(ValueData)
  483.     else-Ifstr(i) $(ValueName) == "RamAddress"
  484.         set WinBaseValue = $(ValueData)
  485.     endif
  486.     EndForListDo
  487.  
  488. adaptersetup =+
  489.     Shell $(ParamInf) Param_ParameterConfidence
  490.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  491.     Debug-Output "OEMNADWD.INF: parameter confidence too low to bypass configuration"
  492.     Goto adapteroptions
  493.     Endif
  494.     Ifstr(i) $(DetectedCard) == TRUE
  495.     Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  496.         Goto adapterverify
  497.     Endif
  498.     Endif
  499.     goto adapteroptions
  500. adapteroptions = +
  501.     set from = adapteroptions
  502.     set WinBaseAddress = *($(WinBaseAddressHexList), ~($(WinBaseAddressDecList),+
  503.     $(WinBaseValue)))
  504.     set IOBaseAddress = *($(IOBaseAddressHexList), ~($(IOBaseAddressDecList),+
  505.     $(IOBaseValue)))
  506.  
  507.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  508.  
  509.     ifstr(i) $(WinBaseValue) == "10"
  510.         set Combo3Out = "IOMapped"
  511.         ; set Combo3List = {"IOMapped"}
  512.     endif
  513.  
  514.     ifstr(i) $(WinBaseValue) == "0"
  515.         set Combo3Out = "IOMapped"
  516.         ; set Combo3List = {"IOMapped"}
  517.     endif
  518.     
  519.     ; set Combo2List = {$(IOBaseAddress)}
  520.  
  521.     set EditTextIn = {}
  522.     set NotifyFields   = {NO, NO, NO}
  523.     set EditTextLim    = {12}
  524.     set EditFocusOn    = ""
  525.     ifstr(i) $(DLLPATH) != ""
  526.     Split-String $(DLLPATH) "\" TempList
  527.     QueryListSize ListSize $(TempList)
  528.     ifstr(i) *($(TempList), $(ListSize)) != "\"
  529.         set DLLPATH = $(DLLPATH)"\"
  530.     endif
  531.     endif
  532.  
  533.     SetHelpFile $(!STF_WINDOWSSYSPATH)\smc8000.hlp 30100 30105
  534.     loadlibrary "SMC 8000 Install Diskette" $(!STF_WINDOWSSYSPATH)\SMC8000.dll DllHandle
  535.     loadlibrary "SMC 8000 Install Diskette" $(!STF_WINDOWSSYSPATH)\smcncdet.dll DetHandle
  536.  
  537.     ifstr(i) $(StartLabel) == "configureadapter"
  538.        set JOption = "SMC8416"
  539.        set JError = 0
  540.     endif
  541. diaretry = +
  542.     ui start "InputDlg" $(DllHandle)
  543.  
  544.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  545.        ifint $(JError) == 0
  546.        ifstr(i) $(JOption) == "SMC8416"
  547.         ifstr(i) $(IOBaseAddress) != $(Combo2Out)
  548.             set Result = "Clear"
  549.             ifstr(i) $(StartLabel) == "configureadapter"
  550.                 set Result = "Config"
  551.             endif
  552.             Debug-Output "The chosen is diferent from the previous."
  553.             set IODec = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  554.                 $(IOBaseAddress)))
  555.             set ComboDec = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  556.                 $(Combo2Out)))
  557.             Debug-Output "The iobaseaddress is "$(IODec) 
  558.             Debug-Output "The chosen address is "$(ComboDec)
  559.             ifstr(i) $(OldVerIO) == $(ComboDec)
  560.                 set Result = "Used"
  561.             endif
  562.             ifstr(i) $(Result) == "Clear"
  563.                 ifstr(i) $(OldVerIO) != 999
  564.                     Debug-Output "The oldversion io is being given to chkandput: "$(OldVerIO)
  565.                     LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) $(OldVerIO)
  566.                 else
  567.                     LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 
  568.                 endif
  569.             endif
  570.             
  571.             ifstr(i) $(Result) == "Config"
  572.                 shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) WARNING "When restarting your computer, be sure to power off the machine for the new settings to take effect."
  573.                 ifstr(i) $($R1) == "OK"
  574.                     LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 8
  575.                 else
  576.                     ifstr(i) $($R1) == "CANCEL"
  577.                         ui pop 1
  578.                         set Combo2Out = $(IOBaseAddress)
  579.                         goto diaretry
  580.                     endif
  581.                 endif    
  582.             endif
  583.  
  584.             ifstr(i) $(Result) == "Pnpwarn"
  585.                 shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) WARNING "Changing the I/O base will disable PnP on your card."
  586.                 ifstr(i) $($R1) == "OK"
  587.                     shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) WARNING "When restarting your computer, be sure to power off the machine for the new settings to take effect."
  588.  
  589.                     ifstr(i) $($R1) == "OK"
  590.                         ifstr(i) $(StartLabel) == "configureadapter"
  591.                             LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 6
  592.                         else
  593.                             LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 7
  594.                         endif
  595.                     endif
  596.                  endif
  597.                  ifstr(i) $($R1) == "CANCEL"
  598.                     ui pop 1
  599.                     set Combo2Out = $(IOBaseAddress)
  600.                     goto diaretry
  601.                  endif
  602.             endif
  603.  
  604.             ifstr(i) $(Result) == "Used"
  605.                 set TextStatus = "That i/o address is taken, choose another"
  606.                 ui pop 1
  607.                 goto diaretry
  608.             endif
  609.           endif     ; end for if the iorange is diferent 
  610.           endif     ; end for if it is an 8416 
  611.         endif       ; end for if the JError is 0 (a detected card)
  612.         ui pop 1
  613.         freelibrary $(DllHandle)
  614.         freelibrary $(DetHandle)
  615.         set IRQLevel = $(Combo1Out)
  616.         set IOBaseAddress = $(Combo2Out)
  617.         set WinBaseAddress = $(Combo3Out)
  618.     else-ifstr(i) $(DLGEVENT) == "BACK"
  619.         set CommonStatus = STATUS_USERCANCEL
  620.         Debug-Output "Action: exit. Bye."
  621.         ui pop 1
  622.         freelibrary $(DllHandle)
  623.         freelibrary $(DetHandle)
  624.         goto end
  625.     else
  626.         ui pop 1
  627.         freelibrary $(DllHandle)
  628.         freelibrary $(DetHandle)
  629.         Debug-Output "Action: unknown. Bye."
  630.         goto end
  631.     endif
  632.  
  633.     set WinBaseValue = *($(WinBaseAddressDecList), ~($(WinBaseAddressHexList),+
  634.     $(WinBaseAddress)))
  635.     set IOBaseValue = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  636.     $(IOBaseAddress)))
  637.     
  638. adapterverify =+
  639.     Ifstr(i) $(DetectedCard) != TRUE
  640.         Goto skipoptions
  641.     Endif
  642.     Debug-Output "OEMNADWD.INF: Calling Param_VerifyCard"
  643.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  644.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  645.     Debug-Output "OEMNADWD.INF: Param_VerifyCard succeeded"
  646.     Goto skipoptions
  647.     Endif
  648.     Set from = adapteroptions
  649.     Set to = skipoptions
  650.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  651.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  652.     Debug-Output "ShellCode error: cannot get an error string."
  653.     goto ShellCodeError
  654.     endif
  655.     set Error = $($R0)
  656.     Goto Warning
  657.  
  658. ;MCA
  659.  
  660. installproduct = +
  661.  
  662.     StartWait
  663.  
  664.     Shell $(UtilityInf), MCAFindBus, $(Card1Byte), $(Card2Byte)
  665.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  666.         goto ShellCodeError
  667.     endif
  668.     ifstr $($R0) != "NO_ERROR"
  669.         set Error = $($R0)
  670.     goto fatal
  671.     endif
  672.     ifstr(i) $($R1) == {}
  673.         set Error = $(CANNOT_FIND_ANY_CARD)
  674.         set CommonStatus = STATUS_USERCANCEL
  675.         set from = "end"
  676.         goto nonfatal
  677.     endif
  678.     set AdapterList = $($R1)
  679.  
  680. ;       goto mcaincluded
  681.  
  682. skipoptions = +
  683.     ifint $(OldVersionExisted) == $(TRUE)
  684.         ifstr(i) $(!NTN_InstallMode) == configure
  685.             ifstr $(Option) == SMCISA
  686.                 goto writeparameters
  687. ;MCA
  688.             else
  689.                 set Error = "Configure: Sorry, not yet implemented."
  690.                 goto fatal
  691.             endif
  692.         endif
  693.     endif
  694.  
  695. mcaincluded = +
  696.     set AdapterList = $($R1)
  697.     ifint $(OldVersionExisted) == $(FALSE)
  698.         ; ifstr(i) $(DLLPATH) == $(SrcDir)
  699.         ifstr(i) $(!NTN_InstallMode) == "install"
  700.            Ifstr(i) $(DoCopy) == "YES"
  701.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  702.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  703.                   Goto ShellCodeError
  704.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  705.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  706.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  707.                       goto ShellCodeError
  708.                   endif
  709.                   set Error = $($R0)
  710.                   Goto fatal
  711.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  712.                   Goto successful
  713.               Endif
  714.               Set SrcDir = $($R1)
  715.            Endif
  716.            ; install "Install-Option"
  717.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  718.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  719.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  720.                   goto ShellCodeError
  721.               endif
  722.               set Error = $($R0)
  723.               goto fatal
  724.            endif
  725.         endif
  726.         ; endif
  727.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  728.             $(ProductSoftwareName), +
  729.             $(ProductSoftwareName), +
  730.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  731.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  732.             $(NetEventDLL)
  733.         Set OEM_ABANDON_SOFTWARE = TRUE
  734.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  735.             Debug-Output "ShellCode error"
  736.             goto ShellCodeError
  737.         endif
  738.     set RegistryErrorIndex = $($R0)
  739.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  740.         EndWait
  741.         Debug-Output "Registry error: add software components"
  742.         CloseRegKey $($R1)
  743.         CloseRegKey $($R2)
  744.         CloseRegKey $($R3)
  745.         CloseRegKey $($R4)
  746.         CloseRegKey $($R5)
  747.         goto fatalregistry
  748.     endif
  749.     Set SoftProductKey      = $($R1)
  750.     Set SoftNetRuleKey      = $($R2)
  751.     Set SoftServiceKey      = $($R3)
  752.     Set SoftParameterKey    = $($R4)
  753.     Set SoftLinkageKey      = $($R5)
  754.  
  755.     Debug-Output "softlinkage #1 :"$($R5)
  756.  
  757.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  758.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  759.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  760.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  761.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  762.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  763.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  764.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  765.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  766.         Debug-Output "ShellCode error."
  767.         goto ShellCodeError
  768.     endif
  769.     set RegistryErrorIndex = $($R0)
  770.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  771.         EndWait
  772.         Debug-Output "Resgitry error: add value list."
  773.         CloseRegKey $(SoftProductKey)
  774.         CloseRegKey $(SoftNetRuleKey)
  775.         CloseRegKey $(SoftServiceKey)
  776.         CloseRegKey $(SoftParameterKey)
  777.         CloseRegKey $(SoftLinkageKey)
  778.         goto fatalregistry
  779.     endif
  780.  
  781.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  782.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  783.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  784.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  785.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  786.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  787.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  788.  
  789.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  790.         Debug-Output "ShellCode error."
  791.         goto ShellCodeError
  792.     endif
  793.     set RegistryErrorIndex = $($R0)
  794.     CloseRegKey $(SoftProductKey)
  795.     CloseRegKey $(SoftNetRuleKey)
  796.     CloseRegKey $(SoftServiceKey)
  797.     CloseRegKey $(SoftParameterKey)
  798.     CloseRegKey $(SoftLinkageKey)
  799.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  800.         EndWait
  801.         Debug-Output "Resgitry error: add value list."
  802.         goto fatalregistry
  803.     endif
  804.     endif
  805.  
  806.     set BusNum = *($($),1)
  807.  
  808. ;MCA
  809.  
  810.     ifstr $(Option) != SMCISA
  811.         ForListDo $(AdapterList)
  812.             set BusNum = *($($),1)
  813.             set SlotNum = *($($),2)
  814.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  815.             $(SlotNum), $(ProductHardwareDescriptionMCA), $(ProductHardwareName)
  816.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  817.             goto ShellCodeError
  818.         endif
  819.         ifstr $($R0) != "NO_ERROR"
  820.             set Error = $($R0)
  821.             goto fatal
  822.         endif
  823.         ifstr(i) $($R1) != "YES"
  824.         Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  825.         ifint $($R4) != -1
  826.            Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  827.         endif
  828.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  829.             goto ShellCodeError
  830.         endif
  831.         set RegistryErrorIndex = $($R0)
  832.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  833.             EndWait
  834.             CloseRegKey $($R1)
  835.             CloseRegKey $($R2)
  836.             CloseRegKey $($R3)
  837.             goto fatalregistry
  838.         endif
  839.         Set HardNetCardKey      = $($R1)
  840.         Set HardNetRuleKey      = $($R2)
  841.         Set HardParameterKey    = $($R3)
  842.         set AdapterNumber = $($R4)
  843.         set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  844.                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitleMCA)},+
  845.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescriptionMCA)},+
  846.                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  847.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  848.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  849.         Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  850.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  851.             goto ShellCodeError
  852.         endif
  853.         Shell $(UtilityInf), GetBusTypeNum
  854.         set BusTypeNum = $($R1)
  855.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  856.             Debug-Output "ShellCode error."
  857.             goto ShellCodeError
  858.         endif
  859.         IfContains $(Option) in $(EthernetCards)
  860.             set CardMediaType = 1
  861.             set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  862.                        {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(NETCARD_ID)},+
  863.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  864.                        {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  865.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD), $(CardMediaType)}}
  866.         else
  867.             set CardMediaType = 2
  868.             set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  869.                        {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(NETCARD_ID)},+
  870.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  871.                        {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  872.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD), $(CardMediaType)},+
  873.                        {MaximumPacketSize,$(NoTitle),$(!REG_VT_DWORD), 8192}}
  874.         endif
  875.         Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  876.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  877.             goto ShellCodeError
  878.         endif
  879.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  880.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  881.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareTypeMCA)},+
  882.                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  883.                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClassMCA)}, +
  884.                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  885.         Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  886.         CloseRegKey $(HardNetCardKey)
  887.         CloseRegKey $(HardNetRuleKey)
  888.         CloseRegKey $(HardParameterKey)
  889.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  890.             goto ShellCodeError
  891.         endif
  892.         endif
  893.         EndForListDo
  894.         EndWait
  895.         goto successful
  896.     endif
  897.  
  898.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  899.     ifint $($R4) != -1
  900.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  901.     endif
  902.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  903.     Debug-Output "Cannot add hardware component"
  904.     goto ShellCodeError
  905.     endif
  906.     set RegistryErrorIndex = $($R0)
  907.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  908.     EndWait
  909.     Debug-Output "Registry error: add hardware component"
  910.     Debug-Output $(RegistryErrorIndex)
  911.     CloseRegKey $($R1)
  912.     CloseRegKey $($R2)
  913.     CloseRegKey $($R3)
  914.     goto fatalregistry
  915.     endif
  916.     set KeyParameters = $($R3)
  917.     set KeyAdapterRules = $($R2)
  918.     set AdapterNumber = $($R4)
  919.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  920.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  921.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  922.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  923.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  924.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  925.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  926.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  927.     Debug-Output "ShellCode error"
  928.     goto ShellCodeError
  929.     endif
  930.     CloseRegKey $($R1)
  931.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  932.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  933.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  934.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  935.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  936.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  937.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  938.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  939.     Debug-Output "ShellCode error."
  940.     goto ShellCodeError
  941.     endif
  942.     set RegistryErrorIndex = $($R0)
  943.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  944.     EndWait
  945.     Debug-Output "Resgitry error: add value list."
  946.     CloseRegKey $(KeyParameters)
  947.     CloseRegKey $(KeyAdapterRules)
  948.     goto fatalregistry
  949.     endif
  950.     CloseRegKey $(KeyAdapterRules)
  951.     goto writeparameters
  952. writeparameters = +
  953.     Shell $(UtilityInf), GetBusTypeNum
  954.     set BusTypeNum = $($R1)
  955.  
  956.     ;  The following checks if the reported bus type is PCi, if it is,
  957.     ;  then we assume that the machine is a two-bus system and change
  958.     ;  BusTypeNum to ISA.
  959.  
  960.     ifint $(BusTypeNum) == 5
  961.         set BusTypeNum = 1
  962.     endif
  963.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  964.     Debug-Output "ShellCode error."
  965.     goto ShellCodeError
  966.     endif
  967.     IfContains $(Option) in $(EthernetCards)
  968.     set CardMediaType = 1
  969.     set NewValueList = {+
  970.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  971.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  972.                {IOBase,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  973.                {Irq,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  974.                {RamAddress,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseValue)},+
  975.                {IOBaseDet,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValueDet)},+
  976.                {IrqDet,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevelDet)},+
  977.                {RamAddressDet,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseValueDet)},+
  978.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)}+
  979.                }
  980.     else
  981.     set CardMediaType = 2
  982.     set NewValueList = {+
  983.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  984.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  985.                {IOBase,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  986.                {Irq,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  987.                {RamAddress,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseAddress)},+
  988.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)},+
  989.                {MaximumPacketSize,$(NoTitle),$(!REG_VT_DWORD),8192}+
  990.                }
  991.     endif
  992.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  993.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  994.     Debug-Output "ShellCode error."
  995.     goto ShellCodeError
  996.     endif
  997.     set RegistryErrorIndex = $($R0)
  998.     CloseRegKey $(KeyParameters)
  999.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1000.     Debug-Output "Registry error: Add value list"
  1001.     goto fatalregistry
  1002.     endif
  1003.     EndWait
  1004.     goto successful
  1005. bindingadapter =+
  1006.     set Error = "Binding: Sorry, not yet implemented."
  1007.     goto fatal
  1008. removeadapter = +
  1009.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1010.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1011.         $(ProductSoftwareName)
  1012.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1013.         Debug-Output "ShellCode error"
  1014.         goto ShellCodeError
  1015.     endif
  1016.     set RegistryErrorIndex = $($R0)
  1017.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1018.         goto fatalregistry
  1019.     endif
  1020.     else
  1021.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1022.         $(ProductSoftwareName), $(!NTN_RegBase)
  1023.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1024.         Debug-Output "ShellCode error"
  1025.         goto ShellCodeError
  1026.     endif
  1027.     set RegistryErrorIndex = $($R0)
  1028.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1029.         goto fatalregistry
  1030.     endif
  1031.     endif
  1032.     goto end
  1033. UpgradeSoftware = +
  1034.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1035.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1036.     Ifstr $(KeyProduct) != $(KeyNull)
  1037.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1038.         set Version = *($(VersionInfo), 4)
  1039.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1040.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1041.         Debug-Output "ShellCode error"
  1042.         goto ShellCodeError
  1043.         endif
  1044.         set !UG_Filename = $($R0)
  1045.         ifstr(i) $(!UG_Filename) != ""
  1046.         install "Install-Update"
  1047.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1048.             goto fatal
  1049.         endif
  1050.         endif
  1051.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1052.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1053.         ifint $(Version) != $(ProductVersion)
  1054.         endif
  1055.         CloseRegKey $(KeyProduct)
  1056.     else
  1057.         goto fatalregistry
  1058.     endif
  1059.     else
  1060.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1061.           $(MAXIMUM_ALLOWED) NetworkCardKey
  1062.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1063.         GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1064.         set ServiceName = *($(ServiceNameInfo), 4)
  1065.         OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1066.         $(MAXIMUM_ALLOWED) NetRuleKey
  1067.         Ifstr(i) $(NetRuleKey) != $(KeyNull)
  1068.         else
  1069.         goto fatalregistry
  1070.         endif
  1071.         CloseRegKey $(NetRules)
  1072.         CloseRegKey $(NetworkCardKey)
  1073.     else
  1074.         goto fatalregistry
  1075.     endif
  1076.     OpenRegKey $(!REG_H_LOCAL) "" +
  1077.           $(!NTN_ServiceBase)"\"$(ServiceName) +
  1078.           $(MAXIMUM_ALLOWED) ServiceKey
  1079.     Ifstr(i) $(ServiceKey) != $(KeyNull)
  1080.         CloseRegKey $(ServiceKey)
  1081.     else
  1082.         goto fatalregistry
  1083.     endif
  1084.     endif
  1085.  
  1086.  
  1087.     ;
  1088.     ; All I want to do is copy a new driver over the old one
  1089.     ;
  1090.  
  1091.  
  1092.       install "Install-Update"
  1093.  
  1094.       ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1095.       goto fatal
  1096.       endif
  1097.  
  1098.     goto end
  1099. successful = +
  1100.     goto end
  1101. abandon = +
  1102.     ForListDo $(OEM_ABANDON_OPTIONS)
  1103.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1104.         $(ProductSoftwareName), $($)
  1105.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1106.         Debug-Output "ShellCode error"
  1107.         goto ShellCodeError
  1108.     endif
  1109.     set RegistryErrorIndex = $($R0)
  1110.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1111.         goto fatalregistry
  1112.     endif
  1113.     EndForListDo
  1114.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1115.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1116.         $(ProductSoftwareName), FALSE
  1117.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1118.         Debug-Output "ShellCode error"
  1119.         goto ShellCodeError
  1120.     endif
  1121.     set RegistryErrorIndex = $($R0)
  1122.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1123.         goto fatalregistry
  1124.     endif
  1125.     endif
  1126.     goto end
  1127. warning = +
  1128.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1129.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1130.     goto ShellCodeError
  1131.     endif
  1132.     ifstr(i) $($R1) == "OK"
  1133.     goto $(to)
  1134.     else-ifstr(i) $($R1) == "CANCEL"
  1135.     goto $(from)
  1136.     else
  1137.     goto "end"
  1138.     endif
  1139. nonfatalinfo = +
  1140.     Set CommonStatus = STATUS_USERCANCEL
  1141.     Set Severity = STATUS
  1142.     goto nonfatalmsg
  1143. nonfatal = +
  1144.     Set Severity = NONFATAL
  1145.     goto nonfatalmsg
  1146. nonfatalmsg = +
  1147.     ifstr(i) $(Error) == ""
  1148.     Set Severity = NONFATAL
  1149.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1150.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1151.         goto ShellCodeError
  1152.     endif
  1153.     set Error = $($R0)
  1154.     endif
  1155.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1156.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1157.     goto ShellCodeError
  1158.     endif
  1159.     ifstr(i) $($R1) == "OK"
  1160.     goto $(from)
  1161.     else
  1162.     goto "end"
  1163.     endif
  1164. fatalregistry = +
  1165.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1166.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1167.     goto ShellCodeError
  1168.     endif
  1169.     set Error = $($R0)
  1170.     goto fatal
  1171. fataldetect = +
  1172.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1173.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1174.     Debug-Output "ShellCode error: cannot get an error string."
  1175.     goto ShellCodeError
  1176.     endif
  1177.     set Error = $($R0)
  1178.     Goto fatal
  1179. fatal = +
  1180.     ifstr(i) $(Error) == ""
  1181.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1182.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1183.         goto ShellCodeError
  1184.     endif
  1185.     set Error = $($R0)
  1186.     endif
  1187.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1188.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1189.     goto ShellCodeError
  1190.     endif
  1191.     goto setfailed
  1192. ShellCodeError = +
  1193.     set DlgType      = "MessageBox"
  1194.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1195.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  1196.     set STF_MB_TYPE  = 1
  1197.     set STF_MB_ICON  = 3
  1198.     set STF_MB_DEF   = 1
  1199.     ui start "Error Message"
  1200.     goto setfailed
  1201. setfailed = +
  1202.     set CommonStatus = STATUS_FAILED
  1203.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1204.     set OEM_ABANDON_ON = FALSE
  1205.     goto abandon
  1206.     endif
  1207.     goto end
  1208. end = +
  1209.     goto term
  1210. term = +
  1211.     Return $(CommonStatus)
  1212. [Install-DetDll]
  1213.     set STF_VITAL = ""
  1214.     AddSectionFilesToCopyList Files-smcncdet $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1215.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1216.     CopyFilesInCopyList
  1217.     Exit
  1218. [Install-Option]
  1219.     set STF_VITAL = ""
  1220.     ifstr(i) $(AddCopy) == "YES"
  1221.     AddSectionFilesToCopyList Files-SMCISA $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1222.     AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1223.     endif
  1224.     ifstr(i) $(DoCopy) == "YES"
  1225.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1226.        CopyFilesInCopyList
  1227.     endif
  1228.     ifstr(i) $(DoConfig) == "YES"
  1229.     endif
  1230.     Exit
  1231. [Install-Update]
  1232.    set STF_VITAL        = ""
  1233.    ;set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1234.    AddSectionFilesToCopyList Files-SMCISA $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1235. ;   AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1236.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1237.    CopyFilesInCopyList
  1238.    exit
  1239. [Source Media Descriptions]
  1240. ;    1  = "Windows NT Setup Disk #1"  , TAGFILE = disk1
  1241. ;    2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  1242.     3  = "SMC SUPER DISK"     
  1243. [ProductType]
  1244. STF_PRODUCT  = Winnt
  1245. STF_PLATFORM = I386
  1246. [Files-Inf]
  1247. 3,oemsetup.inf,  SIZE=1000,     RENAME=$(!UG_Filename)
  1248. [Files-SMCISA]
  1249. 3,win95nt\SMC8000.SY_ , SIZE=40000, RENAME=smc8000n.sys
  1250.  
  1251. [Files-Dll]
  1252. 3,win95nt\smc8000.dl_, SIZE=40000, RENAME=smc8000.dll
  1253. 3,win95nt\smc8000.hl_, SIZE=40000, RENAME=smc8000.hlp
  1254.  
  1255. [Files-smcncdet]
  1256.     3, win95nt\smcncdet.dl_, SIZE=40000, RENAME=smcncdet.dll
  1257. [LanguagesSupported]
  1258.     ENG
  1259. [OptionsTextENG]
  1260.     SMC8416     = "SMC8416 EtherEZ"
  1261.     SMC8216     = "SMC8216 EtherCard Elite16 Ultra"
  1262.     SMC8013     = "SMC8013 EtherCard Elite"
  1263.     SMC8003     = "SMC8003 EtherCard PLUS" 
  1264.  
  1265. [FileConstantsENG]
  1266. ProCaption   = "Windows NT Setup"
  1267. ProCancel    = "Cancel"
  1268. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1269.            "Are you sure you want to cancel copying files?"
  1270. ProCancelCap = "Network Setup Message"
  1271. ProText1     = "Copying:"
  1272. ProText2     = "To:"
  1273. FunctionTitle   = "SMC Adapter Card Setup"
  1274. ProductSoftwareDescription      = "SMC EtherCard Family Driver"
  1275. ProductHardwareDescription      = "SMC ISA EtherCard Family "
  1276. ProductHardwareDescriptionMCA   = "SMC "$(Option)" EtherCard "
  1277. ProductSoftwareTitle    = "SMC EtherCard Family Driver"
  1278. ProductHardwareTitle    = "SMC EtherCard Family "
  1279. ;ProductHardwareTitleMCA = "SMC Micro Channel Adapter"
  1280. ProductHardwareTitleMCA = $(Option)" EtherCard Plus Elite"
  1281. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  1282. ShellCodeErrorText      = "Shell Code Error."
  1283. [DialogConstantsENG]
  1284. Help        = "&Help"
  1285. Exit        = "Cancel"
  1286. OK          = "OK"
  1287. ContextSMC8000 = 30100
  1288. HelpContext = $(ContextSMC8000)
  1289. Continue    = "Continue"
  1290. Cancel      = "Cancel"
  1291.  
  1292. [FileDependentDlgENG]
  1293.     DlgType           = "RadioCombination"
  1294.     DlgTemplate       = "SMC8000" ; **** This has to be $(Option) *****
  1295.     CaptionSMC8000    = $(JOption)" Ethernet Adapter Card Setup"
  1296.     Caption           = $(CaptionSMC8000)
  1297.     Combo1Label       = "&IRQ Level:"
  1298.     Combo2Label       = "I/O &Base:"
  1299.     Combo3Label       = "&Memory Address:"
  1300.     Label3            = "&Network Address:"
  1301.     IrqList           = ^(SmcIrqs, 1)
  1302.     IoBaseList        = ^(SmcIoBase, 1)
  1303.     MemAddrList       = ^(SmcMemAddr, 1)
  1304.     Combo1List        = $(IrqList)
  1305.     Combo1Out         = $(IRQLevel)
  1306.     Combo2List        = $(IoBaseList)
  1307.     Combo2Out         = $(IOBaseAddress)
  1308.     Combo3List        = $(MemAddrList)
  1309.     Combo3Out         = $(WinBaseAddress)
  1310.     ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  1311.     ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  1312.     CBOptionsGreyed   = {}
  1313.     RCCtlFocusOn      = 403
  1314.  
  1315. [PrepareDetectionDll]
  1316.     read-syms GeneralConstants
  1317.     read-syms FileConstants
  1318.     read-syms FileConstants$(!STF_LANGUAGE)
  1319.  
  1320.     Set NewDllName   = $($0)
  1321.     set SrcDir       = $(!p:SrcDir)
  1322.     Set Status       = STATUS_FAILED
  1323.     Set DllValueName = "NetcardDlls"
  1324.  
  1325.     ifstr(i) $(SrcDir) != ""
  1326.     Split-String $(SrcDir) "\" TempList
  1327.     QueryListSize ListSize $(TempList)
  1328.     ifstr(i) *($(TempList), $(ListSize)) != "\"
  1329.         set SrcDir = $(SrcDir)"\"
  1330.     endif
  1331.     endif
  1332.  
  1333.     OpenRegKey $(!REG_H_LOCAL) "" "System\Setup" $(MAXIMUM_ALLOWED) KeySetup
  1334.     Ifstr(i) $(KeySetup) == $(KeyNull)
  1335.     Debug-Output "System\Setup key is NULL"
  1336.     Goto PDD_Return
  1337.     Endif
  1338.  
  1339.        
  1340.     Set DllFound = 0
  1341.     GetRegValue $(KeySetup) $(DllValueName) DllNamesValue
  1342.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1343.     Debug-Output "LastError != Success"
  1344.     Shell $(UtilityInf),RegistryErrorString,$(RegLastError)
  1345.     Shell "" FatalError $($R0)
  1346.     Goto PDD_Return
  1347.     Endif
  1348.  
  1349.     Set DllNames = *($(DllNamesValue),4)
  1350.     Debug-Output "DLL names are: "$(DllNames)
  1351.     ForListDo $(DllNames)
  1352.     Ifstr(i) $($) == $(NewDllName)
  1353.         Set DllFound = 1
  1354.     Endif
  1355.     EndForListDo
  1356.     Ifint $(DllFound) == 0
  1357.         Set DllNames = >($(DllNames),$(NewDllName))
  1358.         Set ValueInfo = {$(DllValueName), $(NoTitle), $(!REG_VT_MULTI_SZ), $(DllNames)}
  1359.         SetRegValue $(KeySetup) $(ValueInfo)
  1360.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1361.             ; Shell "" SetCopy "YES" $(AddCopy) $(SrcDir) "Install-Detection-Dll"
  1362.                 set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1363.         install "Install-DetDll"
  1364.             Shell $(ParamInf) Param_ControlDetection DTEND
  1365.             Shell $(ParamInf) Param_ControlDetection DTSTART
  1366.             Set Status = STATUS_SUCCESSFUL
  1367.         Else
  1368.             Shell $(UtilityInf),RegistryErrorString,$(RegLastError)
  1369.             Shell "" FatalError $($R0)
  1370.         Endif
  1371.     Else
  1372.             Shell $(ParamInf) Param_ControlDetection DTEND
  1373.                 set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1374.         install "Install-DetDll"
  1375.             ; Shell "" SetCopy "YES" $(AddCopy) $(SrcDir) "Install-Detection-Dll"
  1376.             Shell $(ParamInf) Param_ControlDetection DTSTART
  1377.         set Status = STATUS_SUCCESSFUL
  1378.     Endif
  1379.     CloseRegKey $(KeySetup)
  1380. PDD_Return = +
  1381.     Debug-Output "Status from PrepareDetectionDll = "$(Status)
  1382.     Return $(Status)
  1383.  
  1384. [Install-Detection-Dll]
  1385.     LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(SrcDir)"\smcncdet.dll" $(!STF_WINDOWSSYSPATH)"\smcncdet.dll" 
  1386.     exit
  1387.  
  1388. [SetCopy]
  1389.     read-syms GeneralConstants
  1390.     read-syms FileConstants
  1391.     read-syms FileConstants$(!STF_LANGUAGE)
  1392.  
  1393.     set DoCopy = $($0)
  1394.     set AddCopy = $($1)
  1395.     set SrcDir  = $($2)
  1396.     set InstallSection = $($3)
  1397.     set Needcopy = $(FALSE)
  1398.  
  1399.     Ifstr(i) $(DoCopy) == "YES"
  1400.     set NeedCopy = $(TRUE)
  1401.     else-ifstr(i) $(AddCopy) == "YES"
  1402.     set NeedCopy = $(TRUE)
  1403.     else
  1404.     Return $(TRUE)
  1405.     endif
  1406.  
  1407.     set BuiltIn = "YES"
  1408.     ifstr(i) $(!NTN_Origination) == "NCPA"
  1409.     set BuiltIn = "NO"
  1410.     endif
  1411.  
  1412.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) $(BuiltIn)
  1413.  
  1414.     Ifstr(i) $($R0) == STATUS_FAILED
  1415.     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  1416.     Shell "" FatalError $($R0)
  1417.     Return $(FALSE)
  1418.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  1419.     Return $(FALSE)
  1420.     Endif
  1421.  
  1422.     Set SrcDir = $($R1)
  1423.  
  1424.     install $(InstallSection)
  1425.  
  1426.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1427.     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  1428.     Shell "" FatalError $($R0)
  1429.     Return $(FALSE)
  1430.     endif
  1431.  
  1432.     Return $(TRUE)
  1433.  
  1434.