home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 20 NDrivers / 20-NDrivers.zip / 3c562x.exe / OEMSETNT.INF < prev    next >
INI File  |  1997-01-06  |  39KB  |  1,302 lines

  1. [Identification]
  2.  OptionType = NetAdapter
  3.  
  4. [PlatformsSupported]
  5.  ISA
  6.  EISA
  7.  MCA
  8.  PCI
  9.  
  10. [Options]
  11.  elpc3nD
  12.  elpc3n
  13.  
  14. [OptionsTextENG]
  15.  elpc3nD = "3Com EtherLink III LAN+Modem PC Card (3C562D/3C563D)"
  16.  elpc3n = "3Com EtherLink III LAN+Modem PC Card (3C562 3C562B/3C563B 3C562C/3C563C)"
  17.  
  18. [AllFileConstants]
  19.  GenericInfVersion = " V1.50"
  20.  UtilityInf = "UTILITY.INF"
  21.  ParamInf = "NCPARAM.INF"
  22.  subroutineinf = "SUBROUTN.INF"
  23.  SoftwareType = "driver"
  24.  Exit_Code = 0
  25.  NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  26.  IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  27.  Manufacturer = "3Com"
  28.  
  29. [FileConstants-elpc3n]
  30.  GenericAdapterName = "3Com EtherLink III LAN+Modem PC Card"
  31.  GenericDriverName = "3Com EtherLink III LAN+Modem Driver"
  32.  GenericSysName = "elpc3n.sys"
  33.  
  34.  
  35. ProductMajorVersion = "4"
  36.  ProductMinorVersion = "00"
  37.  ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  38.  
  39.  
  40. ProductSoftwareName = "elpc3n"
  41.  ProductSoftwareDesc = "3Com EtherLink III LAN+Modem Driver"
  42.  ProductSoftwareImage = "\SystemRoot\System32\drivers\"$(GenericSysName)
  43.  NetRuleSoftwareType = "elpc3nSys ndisDriver elpc3nDriver"
  44.  NetRuleSoftwareUse = $(SoftwareType)
  45.  NetRuleSoftwareBindForm = """elpc3nSys"" yes no container"
  46.  NetRuleSoftwareClass = {"elpc3nDriver basic"}
  47.  NetRuleSoftwareBindable = {"elpc3nDriver elpc3nAdapter non exclusive 100"}
  48.  
  49.  
  50. ProductHardwareName = "elpc3n"
  51.  ProductHardwareDesc = "3Com EtherLink III LAN+Modem PC Card"
  52.  NetRuleHardwareType = "elpc3n elpc3nAdapter"
  53.  NetRuleHardwareBindForm = " yes yes container"
  54.  NetRuleHardwareClass = {"elpc3nAdapter basic"}
  55.  
  56.  
  57. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  58.  ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. [GeneralConstants]
  70.  from = ""
  71.  to = ""
  72.  ExitCodeOk = 0
  73.  ExitCodeCancel = 1
  74.  ExitCodeFatal = 2
  75.  KeyNull = ""
  76.  MAXIMUM_ALLOWED = 33554432
  77.  RegistryErrorIndex = NO_ERROR
  78.  KeyProduct = ""
  79.  KeyParameters = ""
  80.  TRUE = 1
  81.  FALSE = 0
  82.  NoTitle = 0
  83.  ExitState = "Active"
  84.  OldVersionExisted = $(FALSE)
  85.  DriverPath = $(!STF_NTPATH)\drivers
  86.  
  87. [date]
  88.  
  89. Now = {} ? $(!LIBHANDLE) GetSystemDate
  90.  
  91. [Identify]
  92.  read-syms Identification
  93.  set Status = STATUS_SUCCESSFUL
  94.  set Identifier = $(OptionType)
  95.  set Media = #("Source Media Descriptions", 1, 1)
  96.  Return $(Status) $(Identifier) $(Media)
  97.  
  98. [ReturnOptions]
  99.  set Status = STATUS_FAILED
  100.  set OptionList = {}
  101.  set OptionTextList = {}
  102.  
  103.  
  104. set LanguageList = ^(LanguagesSupported, 1)
  105.  Ifcontains(i) $($0) in $(LanguageList)
  106.     
  107.     ifstr(i) $($1) == ""
  108.      goto returnoptions
  109.     endif
  110.     set PlatformList = ^(PlatformsSupported, 1)
  111.     Ifcontains(i) $($1) in $(PlatformList)
  112.      goto returnoptions
  113.     else
  114.      set Status = STATUS_NOTSUPPORTED
  115.      goto finish_ReturnOptions
  116.     endif
  117.  else
  118.      set Status = STATUS_NOLANGUAGE
  119.      goto finish_ReturnOptions
  120.  endif
  121.  
  122. returnoptions = +
  123.  set OptionList = ^(Options, 1)
  124.  set OptionTextList = ^(OptionsText$($0), 1)
  125.  set Status = STATUS_SUCCESSFUL
  126.  
  127. finish_ReturnOptions = +
  128.  Return $(Status) $(OptionList) $(OptionTextList)
  129.  
  130. [InstallOption]
  131.  set Status = STATUS_FAILED
  132.  set Option = $($1)
  133.  set SrcDir = $($2)
  134.  set AddCopy = $($3)
  135.  set DoCopy = $($4)
  136.  set DoConfig = $($5)
  137.  Set !DebugOutputControl = 1
  138.  
  139.  
  140. set LanguageList = ^(LanguagesSupported, 1)
  141.  Ifcontains(i) $($0) NOT-IN $(LanguageList)
  142.     Return STATUS_NOLANGUAGE
  143.  endif
  144.  
  145.  Set AdapterTypeValue = 4096
  146.  Ifstr(i) $(Option) == elpc3nD
  147.     Set AdapterTypeValue = 4355
  148.  endif
  149.  set OldOption = $(Option)
  150.  set Option = elpc3n
  151.  
  152.  set-subst LF = "\n"
  153.  read-syms GeneralConstants
  154.  read-syms AllFileConstants
  155.  read-syms FileConstants"-"$(Option)
  156.  read-syms DialogConstants$(!STF_LANGUAGE)"-"$(Option)
  157.  ifstr(i) $(!NTN_Origination) == "NCPA"
  158.     set Continue = $(OK)
  159.  endif
  160.  read-syms AllFileConstants$(!STF_LANGUAGE)
  161.  read-syms FileConstants$(!STF_LANGUAGE)"-"$(Option)
  162.  detect date
  163.  set-title $(FunctionTitle)
  164.  set to = Begin
  165.  set from = Begin
  166.  
  167.  set CommonStatus = STATUS_SUCCESSFUL
  168.  EndWait
  169.  
  170. Begin = +
  171.  Set ActivateDetection = FALSE
  172.  Ifstr(i) $(!NTN_InstallMode) == deinstall
  173.     set StartLabel = removeadapter
  174.  else-Ifstr(i) $(!NTN_InstallMode) == Update
  175.     set StartLabel = UpgradeSoftware
  176.  else-Ifstr(i) $(!NTN_InstallMode) == bind
  177.     set StartLabel = bindingadapter
  178.  else-Ifstr(i) $(!NTN_InstallMode) == configure
  179.     set StartLabel = configureadapter
  180.     
  181.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  182.      Debug-Output "<DBG> Cannot configure the software."
  183.      Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  184.      ifint $($ShellCode) != $(!SHELL_CODE_OK)
  185.         Debug-Output "<DBG> ShellCode error: cannot get an error string."
  186.         goto ShellCodeError
  187.      endif
  188.      set Error = $($R0)
  189.      set from = end
  190.      set to = end
  191.      goto nonfatalinfo
  192.     endif
  193.  else
  194.     set StartLabel = installadapter
  195.     set OEM_ABANDON_OPTIONS = {}
  196.     set OEM_ABANDON_SOFTWARE = FALSE
  197.     set OEM_ABANDON_ON = TRUE
  198.  endif
  199.  
  200.  
  201. ifstr(i) $(Option) == elpc3n
  202.     set IOBaseAddrValue = *($(IOBaseAddrList), 17) 
  203.     set MemoryAddrValue = *($(MemoryAddrList), 9) 
  204.     set IRQValue = *($(IRQList), 1) 
  205.     set MediaTypeValue = *($(MediaTypeList), 1) 
  206.     set ModemIOBaseAddressValue = *($(ModemIOBaseAddressList), 2) 
  207.     set ModemInterruptNumberValue = *($(IRQList), 1) 
  208.     set ComPortValue = *($(ComPortList), 2) 
  209.     set LANOnlyValue = *($(LANOnlyList), 1) 
  210.         set Static1Label = "Note: Modem and Network use same interrupt"
  211.  
  212.  endif
  213.                                              
  214. Set from = $(fatal)
  215.  Set to = $(fatal)
  216.  Goto $(StartLabel)
  217.  
  218. installadapter = +
  219.  
  220. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  221.  Ifstr $(KeyProduct) != $(KeyNull)
  222.     
  223.     
  224.     CloseRegKey $(KeyProduct)
  225.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  226.      
  227.      Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  228.      $(ProductVersion)
  229.      ifint $($ShellCode) != $(!SHELL_CODE_OK)
  230.      Debug-Output "<DBG> ShellCode error: cannot get an error string."
  231.      goto ShellCodeError
  232.      endif
  233.      goto end
  234.     else
  235.      
  236.      Shell $(UtilityInf), CardExistedDlg
  237.      ifint $($ShellCode) != $(!SHELL_CODE_OK)
  238.      Debug-Output "<DBG> ShellCode error: cannot get an error string."
  239.      goto ShellCodeError
  240.      endif
  241.      ifstr(i) $($R1) != "OK"
  242.      goto end
  243.      endif
  244.      set OldVersionExisted = $(TRUE)
  245.     endif
  246.  endif
  247.  
  248.  
  249. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  250.  Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  251.     Goto ShellCodeError
  252.  Else-Ifstr(i) $($R0) == STATUS_FAILED
  253.     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  254.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  255.      goto ShellCodeError
  256.     endif
  257.     set Error = $($R0)
  258.     Goto fatal
  259.  Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  260.     Goto successful
  261.  Endif
  262.  
  263.  Set SrcDir = $($R1)
  264.  install "Install-Dll"
  265.  goto adaptersetup
  266.  
  267. configureadapter = +
  268.  Ifstr $(KeyProduct) == $(KeyNull)
  269.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  270.     Ifstr $(KeyProduct) == $(KeyNull)
  271.      set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  272.      Debug-Output "<DBG> Cannot find component product key"
  273.      goto fatalregistry
  274.     Endif
  275.  Endif
  276.  
  277.  
  278. Debug-Output "<DBG> INF: Shelling to FindService"
  279.  Shell $(UtilityInf) FindService, $(KeyProduct)
  280.  Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  281.     Debug-Output "<DBG> INF: FindService shell failure"
  282.     Goto ShellCodeError
  283.  Endif
  284.  Ifstr(i) $($R0) != NO_ERROR
  285.     Debug-Output "<DBG> INF: FindService Shell error: "$($R0)
  286.     Goto fatalregistry
  287.  endif
  288.  
  289.  Set KeyParameters = $($R2)
  290.  
  291.  
  292. CloseRegKey $($R1)
  293.  Ifstr $(KeyParameters) == $(KeyNull)
  294.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  295.     Debug-Output "<DBG> Cannot find component service"
  296.     goto fatalregistry
  297.  endif
  298.  set OldVersionExisted = $(TRUE)
  299.  set ValueName = ""
  300.  set ValueData = ""
  301.  set ValueStr = ""
  302.  set ValueList = {}
  303.  
  304.  
  305. EnumRegValue $(KeyParameters) ValueList
  306.  ifstr(i) $(Option) == elpc3n
  307.     ForListDo $(ValueList)
  308.      set ValueItem = $($)
  309.      set ValueName = *($(ValueItem),1)
  310.      set ValueData = *($(ValueItem),4)
  311.      ifstr(i) $(ValueName) == "IoBaseAddress" 
  312.         set IOBaseAddrIndex = $(ValueData)
  313.      else-ifstr(i) $(ValueName) == "PCCARDAttributeMemoryAddress"
  314.         set MemoryAddrIndex = $(ValueData)
  315.      else-ifstr(i) $(ValueName) == "InterruptNumber"
  316.         set IRQValueIndex = $(ValueData)
  317.      else-ifstr(i) $(ValueName) == "ModemInterruptNumber"
  318.         set ModemInterruptNumberIndex = $(ValueData)
  319.      else-ifstr(i) $(ValueName) == "ComPort"
  320.         set ComPortIndex = $(ValueData)
  321.      else-ifstr(i) $(ValueName) == "Transceiver"
  322.         set MediaTypeIndex = $(ValueData)
  323.      else-ifstr(i) $(ValueName) == "LANOnly"
  324.         set LANOnlyIndex = $(ValueData)
  325.      endif
  326.     EndForListDo
  327.  
  328.     set IRQValue = *($(IRQValues), ~($(IRQList), $(IRQValueIndex)))
  329.     
  330.     set ModemInterruptNumberValue = *($(IRQValues), ~($(IRQList), $(IRQValueIndex)))
  331.  
  332.     set MemoryAddrValue = *($(MemoryAddrList), ~($(MemoryAddrValues),$(MemoryAddrIndex)))
  333.     ifstr(i) $(MemoryAddrValue) == ""
  334.      set MemoryAddrValue = *($(MemoryAddrValues), 2)
  335.     endif
  336.  
  337.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  338.     ifstr(i) $(IOBaseAddrValue) == ""
  339.      set IOBaseAddrValue = *($(IOBaseAddrList), 1) 
  340.     endif
  341.  
  342.     set ModemIOBaseAddressValue = *($(ModemIOBaseAddressList), ~($(ComPortValues),$(ComPortIndex)))
  343.     Debug-Output "<DBG> Configure/ComPortIndex "$(ComPortIndex)
  344.     Debug-Output "<DBG> Configure/ModemIOBaseAddressValue "$(ModemIOBaseAddressValue)
  345.     ifstr(i) $(ModemIOBaseAddressValue) == ""
  346.      set ModemIOBaseAddressValue = *($(ModemIOBaseAddressValues), 2)
  347.     endif
  348.      
  349.     set ComPortValue = *($(ComPortList), ~($(ComPortValues),$(ComPortIndex)))
  350.     ifstr(i) $(ComPortValue) == ""
  351.      set ComPortValue = *($(ComPortValues), 2)
  352.     endif
  353.  
  354.     set MediaTypeValue = *($(MediaTypeList), ~($(MediaTypeValues),$(MediaTypeIndex)))
  355.     ifstr(i) $(MediaTypeValue) == ""
  356.      set MediaTypeValue = *($(MediaTypeValues), 1)
  357.     endif
  358.  
  359.     set LANOnlyValue = *($(LANOnlyList), ~($(LANOnlyValues),$(LANOnlyIndex)))
  360.     ifstr(i) $(LANOnlyValue) == ""
  361.      set LANOnlyValue = *($(LANOnlyValues), 1)
  362.     endif
  363.  
  364.  endif
  365.  
  366. adaptersetup = +
  367.  Set from = adapteroptions
  368.  
  369. adapteroptions = +
  370.  LoadLibrary "disk 1" $(DialogDllName) hLib
  371.  read-syms FileDependentDlg$(!STF_LANGUAGE)"-"$(Option)
  372.  
  373. Debug-Output "<DBG> ----- Before calling my dialog -----"
  374.  Debug-Output "<DBG> Combo1Out "$(Combo1Out)
  375.  Debug-Output "<DBG> Combo2Out "$(Combo2Out)
  376.  Debug-Output "<DBG> Combo3Out "$(Combo3Out)
  377.  Debug-Output "<DBG> Combo6Out "$(Combo6Out)
  378.  Debug-Output "<DBG> Combo7Out "$(Combo7Out)
  379.  Debug-Output "<DBG> Combo8Out "$(Combo8Out)
  380.  Debug-Output "<DBG> ButtonPressed "$(ButtonPressed)
  381.  ui start "InputDlg" $(hLib)
  382.  Debug-Output "<DBG> ----- After calling my dialog -----"
  383.  set ExitButton = $(ButtonPressed)
  384.  Debug-Output "<DBG> Combo1Out "$(Combo1Out)
  385.  Debug-Output "<DBG> Combo2Out "$(Combo2Out)
  386.  Debug-Output "<DBG> Combo3Out "$(Combo3Out)
  387.  Debug-Output "<DBG> Combo6Out "$(Combo6Out)
  388.  Debug-Output "<DBG> Combo7Out "$(Combo7Out)
  389.  Debug-Output "<DBG> Combo8Out "$(Combo8Out)
  390.  Debug-Output "<DBG> ButtonPressed "$(ButtonPressed)
  391.  
  392.  FreeLibrary $(hLib)
  393.  ifstr(i) $(DLGEVENT) == "CONTINUE"
  394.     ifstr(i) $(Option) == elpc3n
  395.      set IOBaseAddrIndex = $(Combo1Out)
  396.      set MemoryAddrIndex = $(Combo2Out)
  397.      set IRQValueIndex = $(Combo3Out) 
  398.      set MediaTypeIndex = $(Combo4Out) 
  399.      set ModemInterruptNumberIndex = $(Combo6Out)
  400.      set ComPortIndex = $(Combo7Out)
  401.      set LANOnlyIndex = $(Combo8Out)
  402.      set ExitButton = $(ButtonPressed)
  403.     endif
  404.     ui pop 1
  405.  else-ifstr(i) $(DLGEVENT) == "EXIT"
  406.     set CommonStatus = STATUS_USERCANCEL
  407.     ui pop 1
  408.     goto end
  409.  else
  410.     set CommonStatus = STATUS_USERCANCEL
  411.     ui pop 1
  412.     Debug-Output "<DBG> Action: unknown. Bye."
  413.     goto end
  414.  endif
  415.  
  416. skipoptions =+
  417.  ifint $(OldVersionExisted) == $(TRUE)
  418.     ifstr(i) $(!NTN_InstallMode) == configure
  419.      goto writeparameters
  420.     endif
  421.  endif
  422.  StartWait
  423.  
  424.  
  425. ifint $(OldVersionExisted) == $(FALSE)
  426.     ifstr(i) $(!NTN_InstallMode) == "install"
  427.      Ifstr(i) $(DoCopy) == "YES"
  428.         Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  429.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  430.          Goto ShellCodeError
  431.         Else-Ifstr(i) $($R0) == STATUS_FAILED
  432.          Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  433.          ifint $($ShellCode) != $(!SHELL_CODE_OK)
  434.             goto ShellCodeError
  435.          endif
  436.          set Error = $($R0)
  437.          Goto fatal
  438.         Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  439.          Goto successful
  440.         Endif
  441.         Set SrcDir = $($R1)
  442.      Endif
  443.      install "Install-Option"
  444.      ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  445.         Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  446.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  447.          goto ShellCodeError
  448.         endif
  449.         set Error = $($R0)
  450.         goto fatal
  451.      endif
  452.     endif
  453.  
  454.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  455.      $(ProductSoftwareName), +
  456.      $(ProductSoftwareName), +
  457.      $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  458.      $(ProductSoftwareImage), "kernel", "NDIS", {}, "",+
  459.      $(NetEventDLL)
  460.  
  461.     Set OEM_ABANDON_SOFTWARE = TRUE
  462.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  463.      Debug-Output "<DBG> ShellCode error"
  464.      goto ShellCodeError
  465.     endif
  466.  
  467.     
  468.     
  469.     
  470.     
  471.     
  472.     
  473.     set RegistryErrorIndex = $($R0)
  474.     set KeyProduct = $($R1)
  475.     Set SoftNetRulesKey = $($R2)
  476.     CloseRegKey $($R3)
  477.     CloseRegKey $($R4)
  478.     CloseRegKey $($R5)
  479.  
  480.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  481.      EndWait
  482.      Debug-Output "<DBG> Registry error: add software components"
  483.      CloseRegKey $(KeyProduct)
  484.      CloseRegKey $(SoftNetRulesKey)
  485.      goto fatalregistry
  486.     endif
  487.  
  488.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  489.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  490.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  491.              {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  492.              {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDesc)},+
  493.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  494.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  495.  
  496.     Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  497.     Debug-Output "<DBG> AddValueList - SoftwareType, MajorVersion,..."
  498.  
  499.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  500.      Debug-Output "<DBG> ShellCode error."
  501.      goto ShellCodeError
  502.     endif
  503.     set RegistryErrorIndex = $($R0)
  504.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  505.      EndWait
  506.      Debug-Output "<DBG> Registry error: add value list."
  507.      CloseRegKey $(KeyProduct)
  508.      CloseRegKey $(SoftNetRulesKey)
  509.      goto fatalregistry
  510.     endif
  511.  
  512.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  513.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  514.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  515.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  516.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  517.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(OldOption)}}
  518.  
  519.     Shell $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  520.     Debug-Output "<DBG> AddValueList - type, use, bindform, class, ..."
  521.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  522.      Debug-Output "<DBG> ShellCode error."
  523.      goto ShellCodeError
  524.     endif
  525.  
  526.     set RegistryErrorIndex = $($R0)
  527.     CloseRegKey $(KeyProduct)
  528.     CloseRegKey $(SoftNetRulesKey)
  529.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  530.      EndWait
  531.      Debug-Output "<DBG> Resgitry error: add value list."
  532.      goto fatalregistry
  533.     endif
  534.  endif
  535.  
  536.  Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  537.  ifint $($R4) != -1
  538.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  539.  endif
  540.  
  541.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  542.     Debug-Output "<DBG> Cannot add hardware component"
  543.     goto ShellCodeError
  544.  endif
  545.  
  546.  set RegistryErrorIndex = $($R0)
  547.  Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  548.     EndWait
  549.     Debug-Output "<DBG> Registry error: add hardware component"
  550.     CloseRegKey $($R1)
  551.     CloseRegKey $($R2)
  552.     CloseRegKey $($R3)
  553.     goto fatalregistry
  554.  endif
  555.  
  556.  set KeyParameters = $($R3)
  557.  set KeyAdapterRules = $($R2)
  558.  set AdapterNumber = $($R4)
  559.  
  560.  set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  561.          {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  562.          {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDesc)},+
  563.          {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  564.          {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  565.          {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  566.  
  567.  Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  568.  Debug-Output "<DBG> AddValueList - Manufacturer, Title, Description,..."
  569.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  570.     Debug-Output "<DBG> ShellCode error"
  571.     goto ShellCodeError
  572.  endif
  573.  
  574.  CloseRegKey $($R1)
  575.  
  576.  set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  577.  set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  578.  
  579.  set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  580.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  581.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  582.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(OldOption)}}
  583.  
  584.  Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  585.  Debug-Output "<DBG> AddValueList - type, bindform, class, InfOption"
  586.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  587.     Debug-Output "<DBG> ShellCode error."
  588.     goto ShellCodeError
  589.  endif
  590.  
  591.  set RegistryErrorIndex = $($R0)
  592.  
  593.  Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  594.     EndWait
  595.     Debug-Output "<DBG> Resgitry error: add value list."
  596.     CloseRegKey $(KeyParameters)
  597.     CloseRegKey $(KeyAdapterRules)
  598.     goto fatalregistry
  599.  endif
  600.  
  601.  CloseRegKey $(KeyAdapterRules)
  602.  goto writeparameters
  603.  
  604. writeparameters = +
  605.  Shell $(UtilityInf), GetBusTypeNum
  606.  set BusTypeNum = $($R1)
  607.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  608.     Debug-Output "<DBG> ShellCode error."
  609.     goto ShellCodeError
  610.  endif
  611.  set BusTypeNum = 1    
  612.  
  613.  ifstr(i) $(Option) == elpc3n
  614.     set MemoryAddrValue = *($(MemoryAddrValues), ~($(MemoryAddrList), $(MemoryAddrIndex))) 
  615.     set-add CommonMemoryAddrValue = $(MemoryAddrValue), 8192 
  616.     set IRQValue = *($(IRQValues), ~($(IRQList), $(IRQValueIndex)))
  617.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList), $(IOBaseAddrIndex))) 
  618.     set MediaTypeValue = *($(MediaTypeValues), ~($(MediaTypeList), $(MediaTypeIndex)))
  619.     set ComPortValue = *($(ComPortValues), ~($(ComPortList), $(ComPortIndex)))
  620.     set ModemInterruptNumberValue = *($(IRQValues), ~($(IRQList), $(IRQValueIndex)))
  621.     set ModemIOBaseAddressValue = *($(ModemIOBaseAddressValues), ~($(ComPortList), $(ComPortIndex)))
  622.     Debug-Output "<DBG> Install/ComPortIndex "$(ComPortIndex)
  623.     Debug-Output "<DBG> Install/ModemIOBaseAddressValue "$(ModemIOBaseAddressValue)
  624.     set LANOnlyValue = *($(LANOnlyValues), ~($(LANOnlyList), $(LANOnlyIndex)))
  625.     set NewValueList = {{IoBaseAddress, $(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+ 
  626.              {IoLength, $(NoTitle),$(!REG_VT_DWORD), 16},+
  627.              {IoBaseAddress_1, $(NoTitle),$(!REG_VT_DWORD),$(ModemIOBaseAddressValue)},+ 
  628.              {IoLength_1, $(NoTitle),$(!REG_VT_DWORD), 8},+
  629.              {PCCARDAttributeMemoryAddress, $(NoTitle),$(!REG_VT_DWORD),$(MemoryAddrValue)},+
  630.              {PCCARDAttributeMemorySize, $(NoTitle),$(!REG_VT_DWORD),8192},+
  631.              {PCCARDAttributeMemoryOffset, $(NoTitle),$(!REG_VT_DWORD),0},+
  632.              {MemoryMappedBaseAddress, $(NoTitle),$(!REG_VT_DWORD),$(CommonMemoryAddrValue)},+
  633.              {MemoryMappedSize, $(NoTitle),$(!REG_VT_DWORD),4096},+
  634.              {PCCARDMemoryWindowOffset, $(NoTitle),$(!REG_VT_DWORD),0},+
  635.              {Transceiver, $(NoTitle),$(!REG_VT_DWORD),$(MediaTypeValue)},+
  636.              {ModemIOBaseAddress, $(NoTitle),$(!REG_VT_DWORD),$(ModemIOBaseAddressValue)},+
  637.              {ModemInterruptNumber, $(NoTitle),$(!REG_VT_DWORD),$(ModemInterruptNumberValue)},+
  638.              {InterruptNumber, $(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  639.              {ComPort, $(NoTitle),$(!REG_VT_DWORD),$(ComPortValue)},+
  640.              {LANOnly, $(NoTitle),$(!REG_VT_DWORD),$(LANOnlyValue)},+
  641.              {InternalCTRL, $(NoTitle),$(!REG_VT_DWORD),1310722},+
  642.              {BusType, $(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  643.              {BusNumber, $(NoTitle),$(!REG_VT_DWORD),0},+
  644.              {CardType, $(NoTitle),$(!REG_VT_DWORD),3},+
  645.              {Pcmcia, $(NoTitle),$(!REG_VT_DWORD),1},+
  646.              {OSType, $(NoTitle), $(!REG_VT_DWORD),1},+
  647.              {MediaType, $(NoTitle), $(!REG_VT_DWORD),1},+
  648.              {AdapterType, $(NoTitle), $(!REG_VT_DWORD), $(AdapterTypeValue)}}
  649.  endif
  650.  Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  651.  Debug-Output "<DBG> AddValueList - IoBaseAddress,..."
  652.  CloseRegKey $(KeyParameters)
  653.  
  654.  
  655.  
  656.  
  657. ifstr(i) $(Option) == elpc3n
  658.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  659.     Ifstr $(MyPcmciaHandle) == $(KeyNull)
  660.      Debug-Output "<DBG> CreateRegKey (3C562)"
  661.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation" $(MAXIMUM_ALLOWED) MyPcmciaKey
  662.      CreateRegKey $(MyPcmciaKey) {"3C562",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyPcmcialHandle
  663.      CloseRegKey $(MyPcmciaKey)
  664.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  665.     endif
  666.     set NewValueList = {{Driver,$(NoTitle),$(!REG_VT_SZ),"elpc3n"}}
  667.     Shell $(UtilityInf), AddValueList, $(MyPcmciaHandle), $(NewValueList)
  668.     Debug-Output "<DBG> AddValueList - Driver:REG_SZ:elpc3n"
  669.     CloseRegKey $(MyPcmciaHandle)
  670.  
  671.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562B/3C563B" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  672.     Ifstr $(MyPcmciaHandle) == $(KeyNull)
  673.      Debug-Output "<DBG> CreateRegKey (3C562B/3C563B)"
  674.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation" $(MAXIMUM_ALLOWED) MyPcmciaKey
  675.      CreateRegKey $(MyPcmciaKey) {"3C562B/3C563B",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyPcmcialHandle
  676.      CloseRegKey $(MyPcmciaKey)
  677.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562B/3C563B" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  678.     endif
  679.     set NewValueList = {{Driver,$(NoTitle),$(!REG_VT_SZ),"elpc3n"}}
  680.     Shell $(UtilityInf), AddValueList, $(MyPcmciaHandle), $(NewValueList)
  681.     Debug-Output "<DBG> AddValueList - Driver:REG_SZ:elpc3n"
  682.     CloseRegKey $(MyPcmciaHandle)
  683.  
  684.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562C/3C563C" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  685.     Ifstr $(MyPcmciaHandle) == $(KeyNull)
  686.      Debug-Output "<DBG> CreateRegKey (3C562C/3C563C)"
  687.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation" $(MAXIMUM_ALLOWED) MyPcmciaKey
  688.      CreateRegKey $(MyPcmciaKey) {"3C562C/3C563C",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyPcmcialHandle
  689.      CloseRegKey $(MyPcmciaKey)
  690.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562C/3C563C" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  691.     endif
  692.     set NewValueList = {{Driver,$(NoTitle),$(!REG_VT_SZ),"elpc3n"}}
  693.     Shell $(UtilityInf), AddValueList, $(MyPcmciaHandle), $(NewValueList)
  694.     Debug-Output "<DBG> AddValueList - Driver:REG_SZ:elpc3n"
  695.     CloseRegKey $(MyPcmciaHandle)
  696.  
  697.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562D/3C563D" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  698.     Ifstr $(MyPcmciaHandle) == $(KeyNull)
  699.      Debug-Output "<DBG> CreateRegKey (3C562D/3C563D)"
  700.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation" $(MAXIMUM_ALLOWED) MyPcmciaKey
  701.      CreateRegKey $(MyPcmciaKey) {"3C562D/3C563D",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyPcmcialHandle
  702.      CloseRegKey $(MyPcmciaKey)
  703.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\3Com Corporation\3C562D/3C563D" $(MAXIMUM_ALLOWED) MyPcmciaHandle
  704.     endif
  705.     set NewValueList = {{Driver,$(NoTitle),$(!REG_VT_SZ),"elpc3n"}}
  706.     Shell $(UtilityInf), AddValueList, $(MyPcmciaHandle), $(NewValueList)
  707.     Debug-Output "<DBG> AddValueList - Driver:REG_SZ:elpc3n"
  708.     CloseRegKey $(MyPcmciaHandle)
  709.  endif
  710.  
  711.  
  712.  
  713.  
  714. ifcontains(i) $(Option) in {"elpc3n", "ELPC3"}
  715.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Serial\Parameters\Serialelpc3n" $(MAXIMUM_ALLOWED) MyNewSerialHandle
  716.     Ifstr $(MyNewSerialHandle) == $(KeyNull)
  717.      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Serial\Parameters" $(MAXIMUM_ALLOWED) SerialKey
  718.      CreateRegKey $(SerialKey) {"Serialelpc3n",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyNewSerialHandle
  719.      CloseRegKey $(SerialKey)
  720.     endif
  721.     set NewValueList = {{DosDevices, $(NoTitle),$(!REG_VT_SZ), "COM"$(ComPortValue)},+ 
  722.              {ForceFifoEnable, $(NoTitle), $(!REG_VT_DWORD), 0},+ 
  723.              {Interrupt, $(NoTitle), $(!REG_VT_DWORD), $(ModemInterruptNumberValue)},+ 
  724.              {PortAddress, $(NoTitle),$(!REG_VT_DWORD), $(ModemIOBaseAddressValue)}} 
  725.     Shell $(UtilityInf), AddValueList, $(MyNewSerialHandle), $(NewValueList)
  726.     Debug-Output "<DBG> AddValueList - DosDevices, ForceFifiEnable,..."
  727.     CloseRegKey $(MyNewSerialHandle)
  728.  
  729.     OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP\SERIALCOMM" $(MAXIMUM_ALLOWED) MyNewSerialHandle
  730.     Ifstr $(MyNewSerialHandle) == $(KeyNull)
  731.      OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(MAXIMUM_ALLOWED) SerialKey
  732.      CreateRegKey $(SerialKey) {"SERIALCOMM",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyNewSerialHandle
  733.      CloseRegKey $(SerialKey)
  734.     endif
  735.     SetRegValue $(MyNewSerialHandle) {"Serialelpc3n",$(NoTitle),$(!REG_VT_SZ),"COM"$(ComPortValue)}
  736.     CloseRegKey $(MyNewSerialHandle)
  737.  
  738.     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" $(MAXIMUM_ALLOWED) MyNewSerialHandle
  739.     Ifstr $(MyNewSerialHandle) == $(KeyNull)
  740.      OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" $(MAXIMUM_ALLOWED) SerialKey
  741.      CreateRegKey $(SerialKey) {"Ports",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyNewSerialHandle
  742.      CloseRegKey $(SerialKey)
  743.     endif
  744.     SetRegValue $(MyNewSerialHandle) {"COM"$(ComPortValue)":",$(NoTitle),$(!REG_VT_SZ), "9600,n,8,1"}
  745.     CloseRegKey $(MyNewSerialHandle)
  746.  endif
  747.  
  748.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  749.     Debug-Output "<DBG> ShellCode error."
  750.     goto ShellCodeError
  751.  endif
  752.  
  753.  set RegistryErrorIndex = $($R0)
  754.  
  755.  Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  756.     Debug-Output "<DBG> Registry error: Add value list"
  757.     goto fatalregistry
  758.  endif
  759.  
  760.  EndWait
  761.  
  762.  goto successful
  763.  
  764. bindingadapter =+
  765.  set Error = "Binding: Sorry, not yet implemented."
  766.  goto fatal
  767.  
  768. removeadapter = +
  769.  Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  770.     
  771.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  772.     $(ProductSoftwareName)
  773.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  774.      Debug-Output "<DBG> ShellCode error"
  775.      goto ShellCodeError
  776.     endif
  777.  
  778.     set RegistryErrorIndex = $($R0)
  779.  
  780.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  781.      goto fatalregistry
  782.     endif
  783.  else
  784.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  785.      $(ProductSoftwareName), $(!NTN_RegBase)
  786.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  787.      Debug-Output "<DBG> ShellCode error"
  788.      goto ShellCodeError
  789.     endif
  790.  
  791.     set RegistryErrorIndex = $($R0)
  792.  
  793.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  794.      goto fatalregistry
  795.     endif
  796.  endif
  797.  goto end
  798.  
  799. UpgradeSoftware = +
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808. ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  809.     
  810.     
  811.     
  812.     
  813.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  814.  
  815.     Ifstr $(KeyProduct) != $(KeyNull)
  816.      GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  817.      set Version = *($(VersionInfo), 4)
  818.      
  819.      
  820.      
  821.      Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  822.      ifint $($ShellCode) != $(!SHELL_CODE_OK)
  823.         Debug-Output "<DBG> ShellCode error"
  824.         goto ShellCodeError
  825.      endif
  826.      set !UG_Filename = $($R0)
  827.  
  828.      ifstr(i) $(!UG_Filename) != ""
  829.         install "Install-Update"
  830.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  831.          goto fatal
  832.         endif
  833.      endif
  834.  
  835.      
  836.      
  837.      SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  838.      SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  839.  
  840.      
  841.      
  842.      
  843.      ifint $(Version) != $(ProductVersion)
  844.      
  845.      
  846.      
  847.      
  848.      
  849.      
  850.      
  851.      endif
  852.      CloseRegKey $(KeyProduct)
  853.     else
  854.      
  855.      
  856.      
  857.      goto fatalregistry
  858.     endif
  859.  else
  860.     
  861.     
  862.     
  863.     
  864.     
  865.     
  866.     
  867.     
  868.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  869.      $(MAXIMUM_ALLOWED) NetworkCardKey
  870.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  871.      
  872.      
  873.      
  874.      GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  875.      set ServiceName = *($(ServiceNameInfo), 4)
  876.  
  877.      
  878.      
  879.      
  880.      OpenRegKey $(NetworkCardKey) "" "NetRules" +
  881.         $(MAXIMUM_ALLOWED) NetRuleKey
  882.      Ifstr(i) $(NetRuleKey) != $(KeyNull)
  883.         
  884.         
  885.         
  886.      else
  887.         
  888.         
  889.         
  890.         goto fatalregistry
  891.      endif
  892.  
  893.      CloseRegKey $(NetRules)
  894.      CloseRegKey $(NetworkCardKey)
  895.     else
  896.      
  897.      
  898.      
  899.      goto fatalregistry
  900.     endif
  901.     
  902.     
  903.     
  904.     
  905.     OpenRegKey $(!REG_H_LOCAL) "" +
  906.      $(!NTN_ServiceBase)"\"$(ServiceName) +
  907.      $(MAXIMUM_ALLOWED) ServiceKey
  908.  
  909.     Ifstr(i) $(ServiceKey) != $(KeyNull)
  910.      
  911.      
  912.      
  913.      
  914.      
  915.      CloseRegKey $(ServiceKey)
  916.     else
  917.      
  918.      
  919.      
  920.      goto fatalregistry
  921.     endif
  922.  endif
  923.  
  924.  goto end
  925.  
  926.  
  927.  
  928.  
  929. successful = +
  930.  goto end
  931.  
  932. abandon = +
  933.  ForListDo $(OEM_ABANDON_OPTIONS)
  934.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  935.      $(ProductSoftwareName), $($)
  936.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  937.      Debug-Output "<DBG> ShellCode error"
  938.      goto ShellCodeError
  939.     endif
  940.  
  941.     set RegistryErrorIndex = $($R0)
  942.  
  943.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  944.      goto fatalregistry
  945.     endif
  946.  EndForListDo
  947.  
  948.  Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  949.     
  950.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  951.      $(ProductSoftwareName), FALSE
  952.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  953.      Debug-Output "<DBG> ShellCode error"
  954.      goto ShellCodeError
  955.     endif
  956.  
  957.     set RegistryErrorIndex = $($R0)
  958.  
  959.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  960.      goto fatalregistry
  961.     endif
  962.  endif
  963.  
  964.  goto end
  965.  
  966. warning = +
  967.  Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  968.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  969.     goto ShellCodeError
  970.  endif
  971.  ifstr(i) $($R1) == "OK"
  972.     goto $(to)
  973.  else-ifstr(i) $($R1) == "CANCEL"
  974.     goto $(from)
  975.  else
  976.     goto "end"
  977.  endif
  978.  
  979. nonfatalinfo = +
  980.  Set Severity = STATUS
  981.  Set CommonStatus = STATUS_USERCANCEL
  982.  goto nonfatalmsg
  983. nonfatal = +
  984.  Set Severity = NONFATAL
  985.  goto nonfatalmsg
  986. nonfatalmsg = +
  987.  ifstr(i) $(Error) == ""
  988.     Set Severity = NONFATAL
  989.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  990.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  991.      goto ShellCodeError
  992.     endif
  993.     set Error = $($R0)
  994.  endif
  995.  Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  996.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  997.     goto ShellCodeError
  998.  endif
  999.  ifstr(i) $($R1) == "OK"
  1000.     goto $(from)
  1001.  else
  1002.     goto "end"
  1003.  endif
  1004.  
  1005. fatalregistry = +
  1006.  Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1007.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1008.     goto ShellCodeError
  1009.  endif
  1010.  set Error = $($R0)
  1011.  goto fatal
  1012.  
  1013. fataldetect = +
  1014.  Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1015.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1016.     Debug-Output "<DBG> ShellCode error: cannot get an error string."
  1017.     goto ShellCodeError
  1018.  endif
  1019.  set Error = $($R0)
  1020.  Goto fatal
  1021.  
  1022. fatal = +
  1023.  ifstr(i) $(Error) == ""
  1024.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1025.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1026.      goto ShellCodeError
  1027.     endif
  1028.     set Error = $($R0)
  1029.  endif
  1030.  Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1031.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1032.     goto ShellCodeError
  1033.  endif
  1034.  
  1035.  goto setfailed
  1036.  
  1037. ShellCodeError = +
  1038.  set DlgType = "MessageBox"
  1039.  set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1040.  set STF_MB_TEXT = $(ShellCodeErrorText) 
  1041. set STF_MB_TYPE = 1
  1042.  set STF_MB_ICON = 3
  1043.  set STF_MB_DEF = 1
  1044.  ui start "Error Message"
  1045.  goto setfailed
  1046.  
  1047. setfailed = +
  1048.  set CommonStatus = STATUS_FAILED
  1049.  
  1050.  
  1051.  
  1052. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1053.     set OEM_ABANDON_ON = FALSE
  1054.     goto abandon
  1055.  endif
  1056.  goto end
  1057.  
  1058. end = +
  1059.  goto term
  1060.  
  1061. term = +
  1062.  Return $(CommonStatus)
  1063.  
  1064. [DebugConfiguration]
  1065.  Set InfName = "OEMSETNT.INF"
  1066.  Debug-Output $(InfName)"<DBG> **CONFIGURATION STATE: "$($0)
  1067.  Debug-Output $(InfName)"<DBG> IRQ_Level is "$(!p:IRQ_Level)
  1068.  Debug-Output $(InfName)"<DBG> IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  1069.  Debug-Output $(InfName)"<DBG> TransceiverValue is "$(!p:TransceiverValue)
  1070.  Debug-Output $(InfName)"<DBG> MemoryAddr is "$(!p:MemoryAddr)
  1071.  Debug-Output $(InfName)"<DBG> MappedValue is "$(!p:MappedValue)
  1072.  return
  1073.  
  1074. [Install-Option]
  1075.  set STF_VITAL = ""
  1076.  
  1077.  ifstr(i) $(AddCopy) == "YES"
  1078.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1079.  endif
  1080.  
  1081.  ifstr(i) $(DoCopy) == "YES"
  1082.  
  1083.  
  1084.  
  1085. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1086.  CopyFilesInCopyList
  1087.  endif
  1088.  Exit
  1089.  
  1090. [Install-Update]
  1091.  set STF_VITAL = ""
  1092.  set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1093.  AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1094.  AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1095.  set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1096.  CopyFilesInCopyList
  1097.  exit
  1098.  
  1099. [Install-Dll]
  1100.  set STF_VITAL = ""
  1101.  AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1102.  set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1103.  CopyFilesInCopyList
  1104.  exit
  1105.  
  1106. [Source Media Descriptions]
  1107.  1 = "EtherLink III Lan+Modem PC Card EtherDisk for NT", TAGFILE = elpc3n.DSK
  1108.  
  1109. [ProductType]
  1110.  STF_PRODUCT = Winnt
  1111.  STF_PLATFORM = I386
  1112.  
  1113. [Files-Inf]
  1114. 1, OEMSETNT.INF, SIZE=43500, RENAME=$(!UG_Filename)
  1115.  
  1116. [Files-Dll]
  1117. 1, elpc3n.DLL, SIZE=100000
  1118.  
  1119. [Files-elpc3n]
  1120. 1, elpc3n.SYS, SIZE=50000
  1121.  
  1122. [LanguagesSupported]
  1123. ENG
  1124.  
  1125. [AllFileConstantsENG]
  1126. ProCaption = "Windows NT Setup"
  1127. ProCancel = "Cancel"
  1128. ProCancelMsg = "Windows NT Networking is not correctly installed. "+
  1129.      "Are you sure you want to cancel copying files?"
  1130. ProCancelCap = "Network Setup Message"
  1131. ProText1 = "Copying:"
  1132. ProText2 = "To:"
  1133. DialogDllName = "elpc3n.DLL"
  1134.  
  1135. [FileConstantsENG-elpc3n]
  1136. FunctionTitle = "EtherLink III LAN+Modem PC Card"$(GenericInfVersion)
  1137. ProductSoftwareTitle = $(GenericDriverName)
  1138. ProductHardwareTitle = $(GenericAdapterName)
  1139. IRQList = ^(IRQChoices, 1)
  1140. IRQValues = ^(IRQChoices, 2)
  1141. IOBaseAddrList = ^(IOBaseChoices, 1) 
  1142. IOBaseAddrValues = ^(IOBaseChoices, 2)
  1143. MemoryAddrList = ^(MemoryAddrChoices,1)
  1144. MemoryAddrValues = ^(MemoryAddrChoices,2)
  1145. MediaTypeList = ^(MediaTypeChoices, 1)
  1146. MediaTypeValues = ^(MediaTypeChoices, 2)
  1147. ComPortList = ^(ComPortChoices, 1)
  1148. ComPortValues = ^(ComPortChoices, 2)
  1149. LANOnlyList = ^(LANOnlyChoices, 1)
  1150. LANOnlyValues = ^(LANOnlyChoices, 2)
  1151. ModemIOBaseAddressList = ^(ModemIOBaseChoices,1)
  1152. ModemIOBaseAddressValues = ^(ModemIOBaseChoices,2)
  1153.  
  1154. [DialogConstantsENG-elpc3n]
  1155. Help = "Help"
  1156. Exit = "Cancel"
  1157. OK = "OK"
  1158. HelpContext = ""
  1159. Continue = "Continue"
  1160. Cancel = "Cancel"
  1161.  
  1162. [FileDependentDlgENG-elpc3n]
  1163. DlgType = "RadioCombination"
  1164. DlgTemplate = "elpc3n"
  1165. Caption = $(FunctionTitle)
  1166. HelpContext = $(!IDH_DB_OEMNADE2_INS)
  1167. CBOptionsGreyed = {}
  1168. NotifyFields = {NO, NO, NO, NO, NO, NO, NO}
  1169. Combo1Label = "I/O Port Address:" 
  1170. Combo2Label = "Memory Address:"
  1171. Combo3Label = "Network Interrupt:"
  1172. Combo4Label = "Media Type:"
  1173. Combo5Label = "Modem Port Address:"
  1174. Combo6Label = "Modem Interrupt:"
  1175. Combo7Label = "Com Port:"
  1176. Combo8Label = "LANOnly Mode:"
  1177. Combo1List = $(IOBaseAddrList)
  1178. Combo1Out = $(IOBaseAddrValue)
  1179. Combo2List = $(MemoryAddrList)
  1180. Combo2Out = $(MemoryAddrValue)
  1181. Combo3List = $(IRQList)
  1182. Combo3Out = $(IRQValue)
  1183. Combo4List = $(MediaTypeList)
  1184. Combo4Out = $(MediaTypeValue)
  1185. Combo5List = $(ModemIOBaseAddressList)
  1186. Combo5Out = $(ModemIOBaseAddressValue)
  1187. Combo6List = $(IRQList)
  1188. Combo6Out = $(ModemInterruptNumberValue)
  1189. Combo7List = $(ComPortList)
  1190. Combo7Out = $(ComPortValue)
  1191. Combo8List = $(LANOnlyList)
  1192. Combo8Out = $(LANOnlyValue)
  1193. ComboListItemsIn = {Combo1List,Combo2List,Combo3List,Combo4List,Combo5List,Combo6List,Combo7List,Combo8List}
  1194. ComboListItemsOut = {Combo1Out,Combo2Out,Combo3Out,Combo4Out,Combo5Out,Combo6Out,Combo7Out,Combo8Out}
  1195. EditTextIn = {"",""}
  1196. EditTextLim = {"",""}
  1197.  
  1198. [MemoryAddrChoices]
  1199. MA_1 = "0xC8000", 819200
  1200. MA_2 = "0xC9000", 823296
  1201. MA_3 = "0xCA000", 827392
  1202. MA_4 = "0xCB000", 831488
  1203. MA_5 = "0xCC000", 835584
  1204. MA_6 = "0xCD000", 839680
  1205. MA_7 = "0xCE000", 843776
  1206. MA_8 = "0xCF000", 847872
  1207. MA_9 = "0xD0000", 851968
  1208. MA_10 = "0xD1000", 856064
  1209. MA_11 = "0xD2000", 860160
  1210. MA_12 = "0xD3000", 864256
  1211. MA_13 = "0xD4000", 868352
  1212. MA_14 = "0xD5000", 872448
  1213. MA_15 = "0xD6000", 876544
  1214. MA_16 = "0xD7000", 880640
  1215. MA_17 = "0xD8000", 884736
  1216. MA_18 = "0xD9000", 888832
  1217. MA_19 = "0xDA000", 892928
  1218. MA_20 = "0xDB000", 897024
  1219. MA_21 = "0xDC000", 901120
  1220. MA_22 = "0xDD000", 905216
  1221. MA_23 = "0xDE000", 909312
  1222. MA_24 = "0xDF000", 913408
  1223. MA_25 = "0xE0000", 917504
  1224. MA_26 = "0xE1000", 921600
  1225. MA_27 = "0xE2000", 925696
  1226. MA_28 = "0xE3000", 929792
  1227. MA_29 = "0xE4000", 933888
  1228. MA_30 = "0xE5000", 937984
  1229. MA_31 = "0xE6000", 942080
  1230. MA_32 = "0xE7000", 946176
  1231. MA_33 = "0xE8000", 950272
  1232. MA_34 = "0xE9000", 954368
  1233. MA_35 = "0xEA000", 958464
  1234. MA_36 = "0xEB000", 962560
  1235. MA_37 = "0xEC000", 966656
  1236. MA_38 = "0xED000", 970752
  1237. MA_39 = "0xEE000", 974848
  1238. MA_40 = "0xEF000", 978944
  1239.  
  1240. [IRQChoices]
  1241. IRQ_1 = "3",3
  1242. IRQ_2 = "4",4
  1243. IRQ_3 = "5",5
  1244. IRQ_4 = "7",7
  1245. IRQ_5 = "9",9
  1246. IRQ_6 = "10",10
  1247. IRQ_7 = "11",11
  1248. IRQ_8 = "15",15
  1249.      
  1250. [ModemIOBaseChoices]
  1251. MdmIOBase_1 = "0x3F8",1016
  1252. MdmIOBase_2 = "0x2F8",760
  1253. MdmIOBase_3 = "0x3E8",1000
  1254. MdmIOBase_4 = "0x2E8",744
  1255.      
  1256. [ComPortChoices]
  1257. CP_1 = "COM1", 1
  1258. CP_2 = "COM2", 2
  1259. CP_3 = "COM3", 3
  1260. CP_4 = "COM4", 4
  1261.  
  1262. [LANOnlyChoices]
  1263. MS_1 = "Disabled", 0
  1264. MS_2 = "Enabled", 1
  1265.  
  1266. [IOBaseChoices]
  1267. IOBase_1 = "0x200",512
  1268. IOBase_2 = "0x210",528
  1269. IOBase_3 = "0x220",544
  1270. IOBase_4 = "0x230",560
  1271. IOBase_5 = "0x240",576
  1272. IOBase_6 = "0x250",592
  1273. IOBase_7 = "0x260",608
  1274. IOBase_8 = "0x270",624
  1275. IOBase_9 = "0x280",640
  1276. IOBase_10 = "0x290",656
  1277. IOBase_11 = "0x2A0",672
  1278. IOBase_12 = "0x2B0",698
  1279. IOBase_13 = "0x2C0",714
  1280. IOBase_14 = "0x2D0",730
  1281. IOBase_15 = "0x2E0",746
  1282. IOBase_16 = "0x2F0",752
  1283. IOBase_17 = "0x300",768
  1284. IOBase_18 = "0x310",784
  1285. IOBase_19 = "0x320",800
  1286. IOBase_20 = "0x330",816
  1287. IOBase_21 = "0x340",832
  1288. IOBase_22 = "0x350",848
  1289. IOBase_23 = "0x360",864
  1290. IOBase_24 = "0x370",880
  1291. IOBase_25 = "0x380",896
  1292. IOBase_26 = "0x390",912
  1293. IOBase_27 = "0x3A0",928
  1294. IOBase_28 = "0x3B0",944
  1295. IOBase_29 = "0x3C0",960
  1296. IOBase_30 = "0x3D0",976
  1297.  
  1298. [MediaTypeChoices]
  1299. MT_1 = "TP (10BaseT)", 0
  1300. MT_2 = "COAX (10Base2)", 1
  1301.  
  1302.