home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Network / 3COM / 3c90x / Ver4.01 / Minimum_Install / 90xks4.exe / OEMSETUP.INF < prev    next >
INI File  |  1999-02-18  |  41KB  |  1,240 lines

  1.  
  2. [IntstallOptions]
  3.  Install_3NIC_Diag = "NO"
  4.  Install_Shortcuts = "NO"
  5.  Install_Installer = "NO"
  6.  
  7. [Identification]
  8.  OptionType = NetAdapter
  9.  
  10. [PlatformsSupported]
  11.  ISA
  12.  EISA
  13.  "Jazz-Internal Bus"
  14.  PCI
  15.  
  16. [Options]
  17. 3C90X 
  18. 3C905 
  19. 3C900 
  20.  
  21. [DriverFilenameConstantsNDIS3]
  22.  NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\el90xnd3.sys"
  23.  ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\el90xnd3.sys"
  24.  ProductSoftwareUpgradePath = "\SystemRoot\System32\drivers\el90xnd3.sys"
  25.  
  26. [DriverFilenameConstantsNDIS4]
  27.  NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\el90xnd4.sys"
  28.  ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\el90xnd4.sys"
  29.  ProductSoftwareUpgradePath = "\SystemRoot\System32\drivers\el90xnd4.sys"
  30.  
  31. ;*************************************************************************
  32. ; For New NDIS4 driver that supports 905B and 905C
  33. ;*************************************************************************
  34.  
  35. [905BCDriverFilenameConstantsNDIS4]
  36. NetEventDLL905BC = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\EL90xnd4.sys"
  37. ProductSoftwareImagePath905BC = "%SystemRoot%\System32\drivers\EL90xnd4.sys"
  38. ProductSoftwareUpgradePath905BC = "\SystemRoot\System32\drivers\EL90xnd4.sys"
  39.  
  40. ;**************************************************************************
  41.  
  42. [FileConstants]
  43.  UtilityInf = "UTILITY.INF"
  44.  subroutineinf = "SUBROUTN.INF"
  45.  SoftwareType = "driver"
  46.  Exit_Code = 0
  47.  IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  48.  NetworkCardsKey = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"
  49.  
  50. Manufacturer = "3Com"
  51.  EtherDiskVersion = "5.0"
  52.  ProductMajorVersion = "1"
  53.  ProductMinorVersion = "0"
  54.  ProductReview = "1"
  55.  ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  56.  ProductSoftwareName = "El90x"
  57.  NetRuleSoftwareType = "El90xSys ndisDriver El90xDriver"
  58.  NetRuleSoftwareUse = $(SoftwareType)
  59.  NetRuleSoftwareBindForm = """El90xSys"" yes no container"
  60.  NetRuleSoftwareClass = {"El90xDriver basic"}
  61.  NetRuleSoftwareBindable = {"El90xDriver El90xAdapter non exclusive 100"}
  62.  ProductHardwareName = "El90x"
  63.  NetRuleHardwareBindForm = " yes yes container"
  64.  
  65.  ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  66.  ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  67.  
  68.  FunctionTitle = "3Com 3C90x Adapter Card Setup"
  69.  ProductSoftwareDescription = "3Com 3C90x Adapter Driver"
  70.  ProductSoftwareTitle = "3Com 3C90x Adapter Driver"
  71.  3CNUMBER = "3C90X"
  72.  
  73. GROUP_NAME = "3Com EtherLink PCI NIC"
  74.  NetRuleHardwareType = "El90x El90xAdapter"
  75.  NetRuleHardwareClass = {"El90xAdapter basic"}
  76.  
  77.  ProductHardwareXXXXXTitle = "3Com EtherLink PCI NIC "
  78.  ProductHardwareXXXXXDescription = "3Com EtherLink PCI NIC "
  79.  
  80. ;--------------------these NICs use old NDIS4 driver --------------------------------
  81.  
  82.  ProductHardware36944Title = "3Com EtherLink 10/100 PCI NIC (3C905-TX)"
  83.  ProductHardware36944Description = "3Com EtherLink 10/100 PCI NIC (3C905-TX)"
  84.  
  85.  ProductHardware36945Title = "3Com EtherLink 10/100 PCI T4 NIC (3C905-T4)"
  86.  ProductHardware36945Description = "3Com EtherLink 10/100 PCI T4 NIC (3C905-T4)"
  87.  
  88.  ProductHardware36864Title = "3Com EtherLink PCI TPO NIC (3C900-TPO)"
  89.  ProductHardware36864Description = "3Com EtherLink PCI TPO NIC (3C900-TPO)" 
  90.  
  91. ProductHardware36865Title = "3Com EtherLink PCI Combo  NIC (3C900-COMBO)"
  92.  ProductHardware36865Description = "3Com EtherLink PCI Combo  NIC (3C900-COMBO)" 
  93.  
  94. ;--------------------these NICs use new NDIS4 driver --------------------------------
  95.  
  96. ProductHardware36952Title = "3Com EtherLink 10/100 PCI Combo NIC (3C905B-COMBO)"
  97.  ProductHardware36952Description = "3Com EtherLink 10/100 PCI Combo NIC (3C905B-COMBO)"
  98.  
  99. ProductHardware37376Title = "3Com EtherLink 10/100 PCI NIC (3C905C-TX)"
  100.  ProductHardware37376Description = "3Com EtherLink 10/100 PCI For Complete PC Management NIC (3C905C-TX)"
  101.  
  102.  ProductHardware36949Title = "3Com EtherLink 10/100 PCI NIC (3C905B-TX)"
  103.  ProductHardware36949Description = "3Com EtherLink 10/100 PCI TX NIC (3C905B-TX)"
  104.  
  105.  ProductHardware36954Title = "3Com EtherLink 100 PCI Fiber NIC (3C905B-FX)"
  106.  ProductHardware36954Description = "3Com EtherLink 100 PCI Fiber NIC (3C905B-FX)" 
  107.  
  108. ProductHardware36868Title = "3Com EtherLink PCI TPO NIC (3C900B-TPO)"
  109.  ProductHardware36868Description = "3Com EtherLink PCI TPO NIC (3C900B-TPO)" 
  110.  
  111. ProductHardware36869Title = "3Com EtherLink PCI Combo NIC (3C900B-COMBO)"
  112.  ProductHardware36869Description = "3Com EtherLink PCI Combo NIC (3C900B-COMBO)" 
  113.  
  114. ProductHardware36870Title = "3Com EtherLink PCI TPC NIC (3C900B-TPC)"
  115.  ProductHardware36870Description = "3Com EtherLink PCI TPC NIC (3C900B-TPC)" 
  116.  
  117. ProductHardware36874Title = "3Com EtherLink PCI Fiber NIC (3C900B-FL)"
  118.  ProductHardware36874Description = "3Com EtherLink PCI Fiber NIC (3C900B-FL)" 
  119.  
  120. AdapterType = 5
  121.  
  122. ; List of NICs that use old NDIS4 driver
  123. CFIDList = {36944, 36945, 36864, 36865}
  124.  
  125. ; List of NICs that use new NDIS4 driver (905B and 095C)
  126. CFIDListFor905BC = {36868, 36869, 36870, 36874, 36949, 36952, 36954, 37376}
  127.  
  128. [GeneralConstants]
  129.  from = ""
  130.  to = ""
  131.  ExitCodeOk = 0
  132.  ExitCodeCancel = 1 
  133. ExitCodeFatal = 2
  134.  KeyNull = ""
  135.  MAXIMUM_ALLOWED = 33554432
  136.  RegistryErrorIndex = NO_ERROR
  137.  KeyProduct = ""
  138.  KeyParameters = ""
  139.  TRUE = 1
  140.  FALSE = 0
  141.  NoTitle = 0
  142.  ExitState = "Active"
  143.  OldVersionExisted = $(FALSE)
  144.  DriverPath = $(!STF_NTPATH)\drivers
  145.  NT350VersionConstant = "3.50"
  146.  NT310VersionConstant = "3.10"
  147.  NT400VersionConstant = "(4.0)"
  148.  INF_PROCESSER = "I386"
  149.  
  150. [date]
  151.  Now = {} ? $(!LIBHANDLE) GetSystemDate
  152.  
  153. [Identify]
  154.  read-syms Identification
  155.  set Status = STATUS_SUCCESSFUL
  156.  set Identifier = $(OptionType)
  157.  set Media = #("Source Media Descriptions", 1, 1)
  158.  Return $(Status) $(Identifier) $(Media)
  159.  
  160. [ReturnOptions]
  161.  set Status = STATUS_FAILED
  162.  set OptionList = {}
  163.  set OptionTextList = {}
  164.  set LanguageList = ^(LanguagesSupported, 1)
  165.  Ifcontains(i) $($0) in $(LanguageList)
  166.  ifstr(i) $($1) == ""
  167.  goto returnoptions
  168.  endif
  169.  set PlatformList = ^(PlatformsSupported, 1)
  170.  Ifcontains(i) $($1) in $(PlatformList)
  171.  goto returnoptions
  172.  else
  173.  set Status = STATUS_NOTSUPPORTED
  174.  goto finish_ReturnOptions
  175.  endif
  176.  else
  177.  set Status = STATUS_NOLANGUAGE
  178.  goto finish_ReturnOptions
  179.  endif
  180.  
  181. returnoptions = +
  182.  set OptionList = ^(Options, 1)
  183.  set OptionTextList = ^(OptionsText$($0), 1)
  184.  set Status = STATUS_SUCCESSFUL
  185.  
  186. finish_ReturnOptions = +
  187.  Return $(Status) $(OptionList) $(OptionTextList)
  188.  
  189. [InstallOption]
  190. set CurrLang = $($0)
  191.  set Option = $($1)
  192.  set SrcDir = $($2)
  193.  set AddCopy = $($3)
  194.  set DoCopy = $($4)
  195.  set DoConfig = $($5)
  196.  set LanguageList = ^(LanguagesSupported, 1)
  197.  Ifcontains(i) $($0) NOT-IN $(LanguageList)
  198.  Return STATUS_NOLANGUAGE
  199.  endif
  200.  set-subst LF = "\n"
  201.  read-syms IntstallOptions
  202.  read-syms GeneralConstants
  203.  read-syms FileConstants
  204.  read-syms DialogConstants$(!STF_LANGUAGE)
  205.  ifstr(i) $(!NTN_Origination) == "NCPA"
  206.  set Continue = "OK"
  207.  endif
  208.  read-syms FileConstants$(!STF_LANGUAGE)
  209.  detect date
  210.  set-title $(FunctionTitle)
  211.  set to = Begin
  212.  set from = Begin
  213.  set CommonStatus = STATUS_SUCCESSFUL
  214.  EndWait
  215.  
  216. Begin = +
  217.  
  218. ;*********** add this to check correct platform supported********
  219.    ifstr(i) $(!STF_PLATFORM) == "Alpha"      
  220.       set CommonStatus = STATUS_USERCANCEL
  221.       goto end
  222.    else-ifstr(i) $(!STF_PLATFORM) == "Alpha_AXP"
  223.       set CommonStatus = STATUS_USERCANCEL
  224.       goto end
  225.    endif
  226.  
  227. set CurrentVersionValue = ""
  228.  OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  229.  Ifstr(i) $(KeyNt) != ""
  230.  GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
  231.  Debug-Output "$(InfFile) : WinNT CurrentVersion ="$(CurrentVersionValue)
  232.  CloseRegKey $(KeyNt)
  233.  Endif
  234.  
  235.  
  236. ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant)
  237.  set NDIS_VER = NDIS4
  238. ;*********************************************************************************
  239.  read-syms 905BCDriverFilenameConstants$(NDIS_VER)
  240. ;**********************************************************************************
  241.  else
  242.  set NDIS_VER = NDIS3 
  243. endif
  244. read-syms DriverFilenameConstants$(NDIS_VER)
  245.  
  246.  ifstr(i) (*($(CurrentVersionValue),4)) == $(NT310VersionConstant) 
  247. Debug-Output "$(InfFile) : Configureadapter"
  248.  set Error = "Windows NT v3.10 is not support by this product"
  249.  goto fatal
  250.  endif
  251.  
  252. Ifstr(i) $(!NTN_InstallMode) == deinstall
  253.  set StartLabel = removeadapter
  254.  else-Ifstr(i) $(!NTN_InstallMode) == Update
  255.  set StartLabel = UpgradeSoftware
  256.  else-Ifstr(i) $(!NTN_InstallMode) == bind
  257.  set StartLabel = bindingadapter
  258.  else-Ifstr(i) $(!NTN_InstallMode) == configure
  259.  ifstr $(!STF_PLATFORM) == $(INF_PROCESSER) 
  260. set CommonStatus = STATUS_USERCANCEL
  261.  goto end
  262.  else-Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  263.  Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  264.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  265.  goto ShellCodeError
  266.  endif
  267.  set Error = $($R0)
  268.  set from = end
  269.  set to = end
  270.  goto nonfatalinfo
  271.  else
  272.  set StartLabel = configureadapter
  273.  endif
  274.  else
  275.  set StartLabel = installadapter
  276.  set OEM_ABANDON_OPTIONS = {}
  277.  set OEM_ABANDON_SOFTWARE = FALSE
  278.  set OEM_ABANDON_ON = TRUE
  279.  endif
  280.  
  281.  Debug-Output "$(InfFile) : =================================================="
  282.  Debug-Output "$(InfFile) : STF_CWDIR is: "$(!STF_CWDIR)
  283.  Debug-Output "$(InfFile) : STF_SRCDIR is: "$(!STF_SRCDIR)
  284.  Debug-Output "$(InfFile) : STF_LANGUAGE is: "$(!STF_LANGUAGE)
  285.  Debug-Output "$(InfFile) : Option is: "$(Option)
  286.  Debug-Output "$(InfFile) : !STF_NCN_InstallMode is:"$(!NTN_InstallMode)
  287.  Debug-Output "$(InfFile) : !STF_NCDETECT is: "$(!STF_NCDETECT)
  288.  Debug-Output "$(InfFile) : !STF_NCOPTION is: "$(!STF_NCOPTION)
  289.  Debug-Output "$(InfFile) : !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  290.  Debug-Output "$(InfFile) : !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  291.  Debug-Output "$(InfFile) : !STF_GUI_UNATTENDED is: "$(!STF_GUI_UNATTENDED)
  292.  Debug-Output "$(InfFile) : !STF_BusType is $(!STF_BUSTYPE)" 
  293. Debug-Output "$(InfFile) : !STF_BusTypeList is $(!STF_BUSTYPELIST)" 
  294. Debug-Output "$(InfFile) : =================================================="
  295.  
  296.  set from = $(fatal)
  297.  set to = $(fatal)
  298.  goto $(StartLabel)
  299.  
  300. installadapter = +
  301.  
  302. Debug-Output "$(InfFile) : Installadapter" 
  303. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_READ) KeyProduct
  304.  Ifstr $(KeyProduct) != $(KeyNull)
  305.  CloseRegKey $(KeyProduct)
  306.  ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  307.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  308.  Debug-Output "ShellCode error: cannot get an error string."
  309.  goto ShellCodeError
  310.  endif
  311.  goto end
  312.  else
  313.  set OldVersionExisted = $(TRUE)
  314.  endif
  315.  Endif
  316.  
  317.  Goto adapteroptions 
  318.  
  319. configureadapter = +
  320.  Debug-Output "$(InfFile) : Configureadapter"
  321.  
  322.  set Error = "Cannot configure the software component"
  323.  goto fatal
  324.  
  325. adapteroptions = +
  326.  Debug-Output "$(InfFile) : Adapteroptions"
  327.  set from = adapteroptions
  328.  ifstr(i) $(!NTN_InstallMode) == configure
  329.  goto updateparameters
  330.  endif
  331.  
  332. installproduct =+
  333.  Debug-Output "$(InfFile) : installproduct"
  334.  StartWait 
  335. set AdapterList = $($R1)
  336.  
  337. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_READ) KeyNt
  338.  CloseRegKey $(KeyNt)
  339.  
  340.  Ifstr(i) $(KeyNt) == ""
  341.  Debug-Output "$(InfFile) : AddSoftwareComponent"
  342.  Debug-Output "$(InfFile) : --> $(Manufacturer)"
  343.  Debug-Output "$(InfFile) : --> $(ProductSoftwareName)"
  344.  Debug-Output "$(InfFile) : --> $(ProductSoftwareTitle)"
  345.  Debug-Output "$(InfFile) : --> $(STF_CONTEXTINFNAME)"
  346.  Debug-Output "$(InfFile) : --> $(ProductSoftwareImagePath)"
  347.  Debug-Output "$(InfFile) : --> $(NetEventDLL)"
  348.  
  349.  Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  350.  $(ProductSoftwareName), +
  351.  $(ProductSoftwareName), +
  352.  $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  353.  $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  354.  $(NetEventDLL)
  355.  
  356. Set OEM_ABANDON_SOFTWARE = TRUE
  357.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  358.  goto ShellCodeError
  359.  endif
  360.  set RegistryErrorIndex = $($R0)
  361.  Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  362.  EndWait
  363.  CloseRegKey $($R1)
  364.  CloseRegKey $($R2)
  365.  CloseRegKey $($R3)
  366.  CloseRegKey $($R4)
  367.  CloseRegKey $($R5)
  368.  
  369. //=------------------
  370. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType905BC)},+
  371.  {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  372.  {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm905BC)}, +
  373.  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass905BC)}, +
  374.  {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable905BC)}, +
  375.  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  376.  Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  377.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  378.  goto ShellCodeError
  379.  endif
  380.  goto fatalregistry
  381.  endif
  382.  Set SoftProductKey = $($R1)
  383.  Set SoftNetRuleKey = $($R2)
  384.  Set SoftServiceKey = $($R3)
  385.  Set SoftParameterKey = $($R4)
  386.  Set SoftLinkageKey = $($R5)
  387.  set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  388.  {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  389.  {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  390.  {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  391.  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  392.  {Review,$(NoTitle),$(!REG_VT_DWORD),$(ProductReview)},+
  393.  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  394.  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+
  395.  {EDVersion,$(NoTitle),$(!REG_VT_SZ),$(EtherDiskVersion)}}
  396.  Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  397.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.  goto ShellCodeError
  399.  endif
  400.  set RegistryErrorIndex = $($R0)
  401.  Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  402.  EndWait
  403.  CloseRegKey $(SoftProductKey)
  404.  CloseRegKey $(SoftNetRuleKey)
  405.  CloseRegKey $(SoftServiceKey)
  406.  CloseRegKey $(SoftParameterKey)
  407.  CloseRegKey $(SoftLinkageKey)
  408.  goto fatalregistry
  409.  endif
  410.  set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  411.  {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  412.  {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  413.  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  414.  {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  415.  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  416.  Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  417.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  418.  goto ShellCodeError
  419.  endif
  420.  set RegistryErrorIndex = $($R0)
  421.  CloseRegKey $(SoftProductKey)
  422.  CloseRegKey $(SoftNetRuleKey)
  423.  CloseRegKey $(SoftServiceKey)
  424.  CloseRegKey $(SoftParameterKey)
  425.  CloseRegKey $(SoftLinkageKey)
  426.  
  427. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  428.  {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  429.  {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  430.  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  431.  {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  432.  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  433.  Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  434.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  435.  goto ShellCodeError
  436.  endif
  437.  
  438. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  439.  EndWait
  440.  goto fatalregistry
  441.  endif
  442.  endif 
  443.  
  444. Debug-Output "$(InfFile) : About to look for 3Com PCI Cards"
  445.  
  446. set TargetVersion = *($(CurrentVersionValue),4)
  447.  Debug-Output "$(InfFile) : Current Version:"$(TargetVersion)
  448.  
  449.  ifstr $(TargetVersion) == $(NT350VersionConstant) 
  450. Debug-Output "Running on WindowsNT 3.50"
  451.  set Version350 = $(TRUE)
  452.  else
  453.  Debug-Output "Running on WindowsNT 3.51 or higher"
  454.  set Version350 = $(FALSE)
  455.  endif
  456.  
  457.  ifint $(Version350) == $(TRUE)
  458.  Debug-Output "Running on WindowsNT v3.50, Not using PCI Detection!!!"
  459.  ifstr $(!STF_GUI_UNATTENDED) == "YES"
  460.  Debug-Output "$(InfFile) : Running in GUI unattended mode"
  461.  ifstr(i) $(!AutoNetInterfaceType) != ""
  462.  set BusInterfaceType = $(!AutoNetInterfaceType)
  463.  else
  464.  set BusInterfaceType = 5
  465.  endif
  466.  ifstr(i) $(!AutoNetBusNumber) != ""
  467.  set BusNumber = $(!AutoNetBusNumber)
  468.  else
  469.  set BusNumber = 0
  470.  endif
  471.  set NTDetected = $(FALSE)
  472.  set AdapterList = {{$(Option),0, XXXXX}} 
  473. Debug-Output "$(InfFile) : BusInterfaceType = $(BusInterfaceType)"
  474.  Debug-Output "$(InfFile) : BusNumber = $(BusNumber)"
  475.  else     ;;; GUI_UNATTENDED=NO
  476. Debug-Output "$(InfFile) : Running 3.50 Bus Dialog"
  477.  set BusInterfaceType = 5
  478.  set BusNumber = 0
  479.  set NTDetected = $(FALSE)
  480.  Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwareXXXXXDescription) $(BusInterfaceType) $(BusNumber)
  481.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  482.  Debug-Output "ShellCode error."
  483.  goto ShellCodeError
  484.  endif
  485.  set BusInterfaceType = $($R1)
  486.  set BusNumber = $($R2)
  487.  set AdapterList = {{$(Option),0, XXXXX}} 
  488. Debug-Output "$(InfFile) : BusInterfaceType = $(BusInterfaceType)"
  489.  Debug-Output "$(InfFile) : BusNumber = $(BusNumber)"
  490.  endif    ;;; end check GUI_UNATTENDED
  491. else      ;;; Version350=FALSE
  492.  Debug-Output "$(InfFile) : Running 3.51 or higher using PCI Dectection"
  493.  
  494.  
  495. set NTDetected = $(TRUE)
  496.  set Vendor = 4279 
  497. set CFIDList = $(CFIDList)
  498.  Debug-Output "$(InfFile) : VendorID = $(Vendor)"
  499.  Debug-Output "$(InfFile) : CFIDList = $(CFIDList)"
  500.  set AdapterList = {}
  501.  ForListDo $(CFIDList)
  502.  set-div CFID = $($) 1
  503.  set DeviceID = $($)
  504.  Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CFID)
  505.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  506.  goto ShellCodeError
  507.  endif
  508.  ForListDo $($R0)
  509.  set AdapterList = >($(AdapterList), {*($($),1), *($($),2), $(DeviceID)})
  510.  EndForListDo
  511.  EndForListDo
  512.  
  513. ;*********************** Check 905BC cards here *************************************
  514. ; assuming if there is more cards, they wil be added to the end of "AdapterList"
  515. ;************************************************************************************
  516.  
  517. set CFIDListFor905BC = $(CFIDListFor905BC)
  518. ForListDo $(CFIDListFor905BC)
  519.  set-div CFID = $($) 1
  520.  set DeviceID = $($)
  521.  Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CFID)
  522.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  523.  goto ShellCodeError
  524.  endif
  525.  ForListDo $($R0)
  526.  set AdapterList = >($(AdapterList), {*($($),1), *($($),2), $(DeviceID)})
  527.  EndForListDo
  528.  EndForListDo
  529.  
  530. ;*************************************************************************************
  531.  
  532. ifstr(i) $(AdapterList) == {}                 
  533.  set Error = $(CANNOT_FIND_ANY_CARD)
  534.  set CommonStatus = USER_CANCEL
  535.  set from = end
  536.  goto nonfatal
  537.  endif
  538.  endif 
  539.  
  540.  
  541. set ToInstallList = {}
  542.  Debug-Output "$(InfFile) : Adapterlist = $(AdatperList)"
  543.  ForListDo $(AdapterList)
  544.  ifint $(NTDetected) == $(TRUE)
  545.  set DetectedBusNum = *($($),1)
  546.  set DetectedSlotNum = *($($),2)
  547.  set DeviceID = *($($),3)
  548.  Debug-Output "$(InfFile) : DetectedBusNumber = $(DetectedBusNum)"
  549.  Debug-Output "$(InfFile) : DetectedSlotNum = $(DetectedSlotNum)"
  550.  
  551.  Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
  552.  $(DetectedSlotNum), $(ProductHardware$(DeviceID)Description), $(ProductHardwareName)
  553.  
  554. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  555.  goto ShellCodeError
  556.  endif
  557.  ifstr $($R0) != "NO_ERROR"
  558.  set Error = $($R0)
  559.  goto fatal
  560.  endif
  561. ifstr(i) $(ToInstallList) == {}
  562.  ifstr(i) $($R1) != "YES"
  563.  set ToInstallList = >($(ToInstallList), $($))
  564.  endif 
  565. endif
  566.  endif
  567.  EndForListDo
  568.  
  569.  
  570. ifstr(i) $(ToInstallList) == {}
  571.  set Error = $(CANNOT_FIND_ANY_UNINSTALLED_CARD)
  572.  set CommonStatus = USER_CANCEL
  573.  set from = end
  574.  goto nonfatal
  575.  endif
  576.  
  577.  ForListDo $(ToInstallList)
  578.  set DetectedBusNum = *($($),1)
  579.  set DetectedSlotNum = *($($),2)
  580.  set DeviceID = *($($),3)
  581.  
  582. ;**************************************************************************************
  583. ; Check if 905BC NIC, change driver name under Eventlog and ImagePath in the registry
  584. ; to the name of the new driver for 905BC. Only do this with NT4.0 which use NDIS4 driver
  585. ;***************************************************************************************
  586. set BoomCard = FALSE 
  587.  
  588. ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant)    
  589. ifstr(i) $(DeviceID) == "36944"
  590.     set BoomCard = TRUE
  591. else-ifstr(i) $(DeviceID) == "36945"
  592.     set BoomCard = TRUE
  593. else-ifstr(i) $(DeviceID) == "36864"
  594.     set BoomCard = TRUE
  595. else-ifstr(i) $(DeviceID) == "36865"
  596.     set BoomCard = TRUE
  597. endif
  598. endif   
  599.  
  600. ;**********************************************************************************
  601.  
  602.  Debug-Output "$(InfFile) : DetectedBusNumber = $(DetectedBusNum)"
  603.  Debug-Output "$(InfFile) : DetectedSlotNum = $(DetectedSlotNum)"
  604.  Debug-Output "$(InfFile) : Installing Card at $(DetectedBusNum):$(DetectedSlotNum)!"
  605.  Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  606.  ifint $($R4) != -1
  607.  Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  608.  endif
  609.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  610.  goto ShellCodeError
  611.  endif
  612.  set RegistryErrorIndex = $($R0)
  613.  Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  614.  EndWait
  615.  CloseRegKey $($R1)
  616.  CloseRegKey $($R2)
  617.  CloseRegKey $($R3)
  618.  goto fatalregistry
  619.  endif
  620.  Set HardNetCardKey = $($R1)
  621.  Set HardNetRuleKey = $($R2)
  622.  Set HardParameterKey = $($R3)
  623.  set AdapterNumber = $($R4)
  624.  set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  625.  {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(DeviceID)Title)},+
  626.  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(DeviceID)Description)},+
  627.  {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  628.  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  629.  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+
  630.  {EDVersion,$(NoTitle),$(!REG_VT_SZ),$(EtherDiskVersion)}}
  631.  Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  632.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  633.  goto ShellCodeError
  634.  endif
  635.  
  636. set BusTypeNum = 5 
  637. ifstr(i) $(DeviceID) == "36944"
  638.  set CardType = 0
  639.  else-ifstr(i) $(DeviceID) == "36945"
  640.  set CardType = 0
  641.  else-ifstr(i) $(DeviceID) == "36949"
  642.  set CardType = 0
  643.  else
  644.  set CardType = 2
  645.  endif 
  646.  
  647. ifint $(NTDetected) == $(TRUE)
  648.  set BusNumber = $(DetectedBusNum)
  649.  set SlotNum = $(DetectedSlotNum) 
  650. set BusInterfaceType = $(BusTypeNum)
  651.  set WakeOnLan = YES
  652.  set WakeOnLink = NO 
  653. set FlowControl = YES 
  654.  
  655. Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
  656.  
  657. Set NewValueList = {+
  658.  {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  659.  {Slot,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  660.  ;;;{WakeOnMagic,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLan)},+
  661.  ;;;{WakeOnLink,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLink)},+
  662.  ;;;{FlowControl,$(NoTitle),$(!REG_VT_SZ),$(FlowControl)},+
  663.  }
  664.  Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
  665.  Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  666.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  667.  goto ShellCodeError
  668.  endif
  669.  
  670.  Set NewValueList = { {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)} }
  671.  Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
  672.  Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  673.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  674.  goto ShellCodeError
  675.  endif
  676.  else
  677.  Set NewValueList = {+
  678.  {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  679.  }
  680.  Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
  681.  Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  682.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  683.  goto ShellCodeError
  684.  endif
  685.  endif
  686.  
  687.  Set NewValueList = {+
  688.  {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  689.  {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
  690.  {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  691.  }
  692.  
  693.  Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
  694.  Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  695.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  696.  goto ShellCodeError
  697.  endif
  698.  
  699. ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  700.  Shell $(UtilityInf), AddDefaultNetcardParameters, $(HardParameterKey)
  701.  endif
  702.  
  703. set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  704.  set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  705.  set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  706.  {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  707.  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  708.  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  709.  
  710. Debug-Output "$(InfFile) : HardwareRuleKey = $(NewValueList)"
  711.  Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  712.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  713.  goto ShellCodeEror
  714.  endif
  715.  CloseRegKey $(HardNetCardKey)
  716.  CloseRegKey $(HardNetRuleKey)
  717.  CloseRegKey $(HardParameterKey)
  718.  EndForListDo
  719.  
  720. ;********************************************************************************************
  721. ; Update NetEventdll and  ImagePath for 905B and 905C card
  722. ;********************************************************************************************
  723.  
  724. ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant) 
  725. ifstr(i) $(BoomCard) == FALSE 
  726.    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyService
  727.    Ifstr $(KeyService) != "" 
  728.       SetRegValue $(KeyService) {ImagePath,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareUpgradePath905BC)}
  729.    else 
  730.       goto fatalregistry 
  731.    endif 
  732.    CloseRegKey $(KeyService)
  733.  
  734.    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EventLog\System\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyEventLog
  735.    Ifstr $(KeyEventLog) != "" 
  736.       SetRegValue $(KeyEventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_SZ),$(NetEventDLL905BC)} 
  737.    else 
  738.       goto fatalregistry 
  739.    endif 
  740.    CloseRegKey $(KeyEventLog)
  741.    goto NextCommon 
  742. else
  743.    goto ForBoom
  744. endif
  745. endif
  746.  
  747. ForBoom =+
  748. ;********************************************************************************************
  749.  
  750. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyService
  751.  Ifstr $(KeyService) != "" 
  752. SetRegValue $(KeyService) {ImagePath,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareUpgradePath)}
  753.  else 
  754. goto fatalregistry 
  755. endif 
  756. CloseRegKey $(KeyService)
  757.  
  758. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EventLog\System\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyEventLog
  759.  Ifstr $(KeyEventLog) != "" 
  760. SetRegValue $(KeyEventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_SZ),$(NetEventDLL)} 
  761. else 
  762. goto fatalregistry 
  763. endif 
  764. CloseRegKey $(KeyEventLog) 
  765.  
  766. ;******************************************************************************************
  767. NextCommon =+
  768. ;******************************************************************************************
  769.  
  770. ifint $(OldVersionExisted) == $(FALSE)
  771.  Ifstr(i) $(DoCopy) == "YES"
  772.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  773.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  774.        Goto ShellCodeError
  775.     endif
  776.  Else-Ifstr(i) $($R0) == STATUS_FAILED
  777.      Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  778.      ifint $($ShellCode) != $(!SHELL_CODE_OK)
  779.         goto ShellCodeError
  780.      endif
  781.      set Error = $($R0)
  782.      Goto fatal
  783.  Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  784.      Goto successful
  785.  Endif 
  786. Endif
  787.  
  788. ;**************** check if 905BC and copy new NDIS4 driver ********************
  789.  
  790.  ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant)
  791.  ifstr(i) $(BoomCard) == FALSE  
  792.      install "Install-OptionNewNDIS"   
  793.  else    
  794.     goto oldndis;
  795.  endif
  796.  endif
  797.  oldndis =+
  798. ;********************************************************************************
  799.  
  800.  install "Install-Option" 
  801.       
  802.  ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  803.  Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  804.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  805.  goto ShellCodeError
  806.  endif
  807.  set Error = $($R0)
  808.  goto fatal
  809.  endif
  810.  
  811. endif
  812.  
  813.  EndWait
  814.  goto successful
  815.  
  816. updateparameters =+
  817.  Debug-Output "$(InfFile) : Updateparameters"
  818.  set HardParameterKey = $($R3)
  819.  
  820. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  821.  goto ShellCodeError
  822.  endif
  823.  CloseRegKey $(KeyParameters)
  824.  goto successful
  825.  
  826. bindingadapter =+
  827.  Debug-Output "$(InfFile) : bindingadapter"
  828.  Return STATUS_SUCCESSFUL
  829.  
  830. set Error = "Binding: Sorry, not yet implemented."
  831.  goto fatal
  832.  
  833. removeadapter = +
  834.  Debug-Output "$(InfFile) : removeadapter"
  835.  Debug-Output "$(InfFile) : ----> $(ProductKeyName), $(!NTN_RegBase)"
  836.  Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  837.  Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  838.  $(ProductSoftwareName)
  839.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  840.  goto ShellCodeError
  841.  endif
  842.  set RegistryErrorIndex = $($R0)
  843.  Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  844.  goto fatalregistry
  845.  endif
  846.  else
  847.  Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  848.  $(ProductSoftwareName), $(!NTN_RegBase)
  849.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  850.  goto ShellCodeError
  851.  endif
  852.  set RegistryErrorIndex = $($R0)
  853.  Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  854.  goto fatalregistry
  855.  endif
  856.  endif
  857.  
  858. goto end
  859.  
  860. UpgradeSoftware = +
  861.  
  862. ;****************************************************************************************
  863. ; Check if 905BC or Boomerang
  864. ;****************************************************************************************
  865.  
  866. set BoomCard = FALSE
  867. set CurrentCardPath =  $(!NTN_RegBase)
  868. set TitleValue = ""
  869. set CardTitle = ""
  870. set NameTokenList = ""
  871.  
  872. OpenRegKey $(!REG_H_LOCAL) "" $(CurrentCardPath) $(!REG_KEY_READ) CurrentCardKey
  873. Ifstr(i) $(CurrentCardKey) != ""
  874. GetRegValue $(CurrentCardKey) "Title" TitleValue
  875. set CardTitle = *($(TitleValue), 4)
  876. Split-String $(CardTitle) "()" NameTokenList
  877. set NameCode = *($(NameTokenList), 3)
  878.  
  879. Ifstr(i) $(NameCode) == "3C905-TX"
  880.    set BoomCard = TRUE 
  881. Else-Ifstr(i) $(NameCode) == "3C905-T4"
  882.    set BoomCard = TRUE 
  883. Else-Ifstr(i) $(NameCode) == "3C900-TPO"
  884.    set BoomCard = TRUE 
  885. Else-Ifstr(i) $(NameCode) == "3C900-COMBO"
  886.    set BoomCard = TRUE 
  887. endif
  888.  
  889. CloseRegKey $(CurrentCardKey)
  890. Endif                         ;end checking currentCardKey
  891.  
  892. ;****************************************************************************************
  893. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_ALL_ACCESS) KeyProduct 
  894. Ifstr $(KeyProduct) != "" 
  895. Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) 
  896. ifint $($ShellCode) != $(!SHELL_CODE_OK) 
  897. Debug-Output "ShellCode error" 
  898. goto ShellCodeError 
  899. endif 
  900. set !UG_Filename = $($R0) 
  901.  
  902. install "Install-INF" 
  903. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS 
  904. goto fatal 
  905. endif 
  906.  
  907. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)} 
  908. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)} 
  909. SetRegValue $(KeyProduct) {Review,$(NoTitle),$(!REG_VT_DWORD),$(ProductReview)} 
  910. SetRegValue $(KeyProduct) {EDVersion,$(NoTitle),$(!REG_VT_SZ),$(EtherDiskVersion)} 
  911. CloseRegKey $(KeyProduct) 
  912.  
  913. ;******************************************************************************************
  914. ; If 905BC card, update the new NDIS driver
  915. ;******************************************************************************************
  916.  
  917. ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant) 
  918. ifstr(i) $(BoomCard) == FALSE 
  919. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyService
  920.  Ifstr $(KeyService) != "" 
  921. SetRegValue $(KeyService) {ImagePath,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareUpgradePath905BC)}
  922.  else 
  923. goto fatalregistry 
  924. endif 
  925. CloseRegKey $(KeyService) 
  926. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EventLog\System\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyEventLog
  927.  Ifstr $(KeyEventLog) != "" 
  928. SetRegValue $(KeyEventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_SZ),$(NetEventDLL905BC)} 
  929. else 
  930. goto fatalregistry 
  931. endif 
  932. CloseRegKey $(KeyEventLog)
  933. goto ContinueUpgrade
  934. else 
  935.    goto UpdateToCorrectDriver
  936. endif                         ; end checking card
  937. endif                         ; end checking NT4.0 version
  938.  
  939. UpdateToCorrectDriver =+
  940.  
  941. ;******************************************************************************************
  942.  
  943. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyService
  944.  Ifstr $(KeyService) != "" 
  945. SetRegValue $(KeyService) {ImagePath,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareUpgradePath)}
  946.  else 
  947. goto fatalregistry 
  948. endif 
  949. CloseRegKey $(KeyService) 
  950.  
  951.  
  952. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EventLog\System\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyEventLog
  953.  Ifstr $(KeyEventLog) != "" 
  954. SetRegValue $(KeyEventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_SZ),$(NetEventDLL)} 
  955. else 
  956. goto fatalregistry 
  957. endif 
  958. CloseRegKey $(KeyEventLog) 
  959.  
  960. ;*****************************************************************************************
  961. ContinueUpgrade =+
  962. ;*****************************************************************************************
  963.  
  964. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase) $(!REG_KEY_ALL_ACCESS) KeyNt 
  965.  
  966. set LoopList = {1,2,3,4,5,6,7,8} 
  967. set WinNTList = {WinNT,$(NoTitle),$(!REG_VT_SZ),YES} 
  968. ;;;Set NewValueList = {{WakeOnMagic,$(NoTitle),$(!REG_VT_SZ),"YES"},+ 
  969. ;;;{WakeOnLink,$(NoTitle),$(!REG_VT_SZ),"NO"},+ 
  970. ;;;{FlowControl,$(NoTitle),$(!REG_VT_SZ),"YES"}} 
  971.  
  972. ForListDo $(LoopList) 
  973. OpenRegKey $(KeyNt) "" $(ProductHardwareName)$($)"\Parameters" $(!REG_KEY_ALL_ACCESS) TestKey 
  974.  
  975. ifstr $(TestKey) != $(KeyNull) 
  976. ;;;Shell $(UtilityInf), AddValueList, $(TestKey), $(NewValueList) 
  977. ;;;ifint $($ShellCode) != $(!SHELL_CODE_OK) 
  978. ;;;goto ShellCodeError 
  979. ;;;endif 
  980.  
  981. OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKey)$($)"\NetRules" $(!REG_KEY_ALL_ACCESS) NetCardKey 
  982.  
  983. ifstr $(NetCardKey) != $(KeyNull) 
  984. SetRegValue $(NetCardKey) {"InfName",$(NoTitle),$(!REG_VT_SZ),$(!UG_Filename)} 
  985. CloseRegKey $(NetCardKey) 
  986. endif 
  987. CloseRegKey $(TestKey) 
  988. endif 
  989.  
  990. EndForListDo 
  991. else 
  992. goto fatalregistry 
  993. endif 
  994.  
  995. endif
  996.  
  997.   ;**************** check if 905BC and copy new NDIS4 driver ********************
  998.  
  999.  ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant)
  1000.  ifstr(i) $(BoomCard) == FALSE  
  1001.      install "Install-OptionNewNDIS"
  1002.      goto laststep   
  1003.  else
  1004.     goto upgradeOldNDIS;
  1005.  endif
  1006.  endif
  1007.  upgradeOldNDIS =+
  1008.  ;********************************************************************************
  1009.  
  1010.  install "Install-Option"
  1011.  
  1012. ;*********************************************************************************
  1013. laststep =+
  1014. ;*********************************************************************************
  1015.  
  1016. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS 
  1017. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE" 
  1018. ifint $($ShellCode) != $(!SHELL_CODE_OK) 
  1019. goto ShellCodeError 
  1020. endif 
  1021. set Error = $($R0) 
  1022. goto fatal 
  1023. endif
  1024.  
  1025. RunProgram ExitCode "Windows Directory" "" $(UnInstallerEXE).EXE "-upgrade" 
  1026.  
  1027. goto end
  1028.  
  1029. successful = +
  1030.  Debug-Output "$(InfFile) : Successful"
  1031.  goto end
  1032.  
  1033. abandon = +
  1034.  Debug-Output "$(InfFile) : Abandon"
  1035.  ForListDo $(OEM_ABANDON_OPTIONS)
  1036.  Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1037.  $(ProductSoftwareName), $($)
  1038.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1039.  goto ShellCodeError
  1040.  endif
  1041.  set RegistryErrorIndex = $($R0)
  1042.  Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1043.  goto fatalregistry
  1044.  endif
  1045.  EndForListDo
  1046.  Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1047.  Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1048.  $(ProductSoftwareName), FALSE
  1049.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1050.  goto ShellCodeError
  1051.  endif
  1052.  
  1053. set RegistryErrorIndex = $($R0)
  1054.  Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1055.  goto fatalregistry
  1056.  endif
  1057.  endif
  1058.  goto end
  1059.  
  1060. warning = +
  1061.  Debug-Output "$(InfFile) : warning"
  1062.  Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1063.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1064.  goto ShellCodeError
  1065.  endif
  1066.  ifstr(i) $($R1) == "OK"
  1067.  goto $(to)
  1068.  else-ifstr(i) $($R1) == "CANCEL"
  1069.  goto $(from)
  1070.  else
  1071.  goto "end"
  1072.  endif
  1073.  
  1074. nonfatalinfo = +
  1075.  Debug-Output "$(InfFile) : nonfatalinfo"
  1076.  Set CommonStatus = STATUS_USERCANCEL
  1077.  Set Severity = STATUS
  1078.  goto nonfatalmsg
  1079.  
  1080. nonfatal = +
  1081.  Debug-Output "$(InfFile) : nonfatal"
  1082.  Set Severity = NONFATAL
  1083.  goto nonfatalmsg
  1084.  
  1085. nonfatalmsg = +
  1086.  Debug-Output "$(InfFile) : nonfatalmsg"
  1087.  ifstr(i) $(Error) == ""
  1088.  Set Severity = NONFATAL
  1089.  Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1090.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1091.  goto ShellCodeError
  1092.  endif
  1093.  set Error = $($R0)
  1094.  endif
  1095.  Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1096.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1097.  goto ShellCodeError
  1098.  endif
  1099.  ifstr(i) $($R1) == "OK"
  1100.  goto $(from)
  1101.  else
  1102.  
  1103. goto "RemoveAdapter"
  1104.  endif
  1105.  
  1106. fatalregistry = +
  1107.  Debug-Output "$(InfFile) : fatalregistry"
  1108.  Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1109.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1110.  goto ShellCodeError
  1111.  endif
  1112.  set Error = $($R0)
  1113.  goto fatal
  1114.  
  1115. fatal = +
  1116.  Debug-Output "$(InfFile) : fatal"
  1117.  ifstr(i) $(Error) == ""
  1118.  Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1119.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1120.  goto ShellCodeError
  1121.  endif
  1122.  set Error = $($R0)
  1123.  endif
  1124.  Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1125.  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1126.  goto ShellCodeError
  1127.  endif
  1128.  goto setfailed
  1129.  
  1130. ShellCodeError = +
  1131.  ifint $($ShellCode) == $(!SHELL_CODE_NO_SUCH_INF)
  1132.  Debug-Output "$(InfFile) : ShellCodeError - SHELL_CODE_NO_SUCH_INF"
  1133.  else-ifint $($ShellCode) == $(!SHELL_CODE_NO_SUCH_SECTION)
  1134.  Debug-Output "$(InfFile) : ShellCodeError - SHELL_CODE_NO_SUCH_SECTION"
  1135.  else
  1136.  Debug-Output "$(InfFile) : ShellCodeError - SHELL_CODE_ERROR"
  1137.  endif
  1138.  set DlgType = "MessageBox"
  1139.  set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1140.  set STF_MB_TEXT = $(ShellCodeErrorText) 
  1141. set STF_MB_TYPE = 1
  1142.  set STF_MB_ICON = 3
  1143.  set STF_MB_DEF = 1
  1144.  ui start "Error Message"
  1145.  goto setfailed
  1146.  
  1147. setfailed = +
  1148.  Debug-Output "$(InfFile) : Setfailed"
  1149.  set CommonStatus = STATUS_FAILED
  1150.  ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1151.  set OEM_ABANDON_ON = FALSE
  1152.  goto abandon
  1153.  endif
  1154.  goto end
  1155.  
  1156. end = +
  1157.  goto term
  1158.  
  1159. term = +
  1160.  Return $(CommonStatus)
  1161.  
  1162. [Install-Option]
  1163.  set STF_VITAL = ""
  1164.  set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1165.  Debug-Output $(InfName)"Adding files: Files-$(NDIS_VER), SrcDir=$(SrcDir)"
  1166.  AddSectionFilesToCopyList Files-$(NDIS_VER) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1167.  set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1168.  CopyFilesInCopyList
  1169.  Exit
  1170.  
  1171. ;***********************************************************************************
  1172. [Install-OptionNewNDIS]
  1173.  set STF_VITAL = ""
  1174.  set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1175.  Debug-Output $(InfName)"Adding files: Files-$(NDIS_VER), SrcDir=$(SrcDir)"
  1176.  AddSectionFilesToCopyList Files-905BC$(NDIS_VER) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1177.  set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1178.  CopyFilesInCopyList
  1179.  Exit
  1180. ;**************************************************************************************
  1181.  
  1182. [Install-INF]
  1183.  set STF_VITAL = ""
  1184.  AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1185.  set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1186.  CopyFilesInCopyList
  1187.  Exit
  1188.  
  1189. [Source Media Descriptions]
  1190.  1 = "3Com EtherDisk for EtherLink PCI NICs (Diskette 1)", TAGFILE = OEMSETUP.INF  
  1191.  
  1192. [ProductType]
  1193. STF_PRODUCT = Winnt
  1194.  
  1195. [Files-Inf] 
  1196. 1, oemsetup.inf,SIZE=36000, RENAME=$(!UG_Filename)
  1197.  
  1198. [Files-NDIS3]
  1199. 1,EL90xnd3.SYS , SIZE=25001
  1200.  
  1201. [Files-905BCNDIS4]
  1202. 1,EL90xnd4.SYS , SIZE=25001
  1203.  
  1204. [Files-NDIS4]
  1205. 1,EL90xnd4.SYS , SIZE=25001
  1206.  
  1207. [LanguagesSupported]
  1208.  ENG
  1209.  
  1210. [OptionsTextENG]
  1211.  3C90X = "3Com EtherLink PCI NIC"
  1212.  
  1213. [FileConstantsENG]
  1214.  ProCaption = "Windows NT NIC Setup"
  1215.  ProCancel = "Cancel"
  1216.  ProCancelMsg = "Windows NT Networking is not correctly installed. "+
  1217.  "Are you sure you want to cancel copying files?"
  1218.  ProCancelCap = "Network Setup Message"
  1219.  ProText1 = "Copying:"
  1220.  ProText2 = "To:"
  1221.  
  1222. ConnectionList = ^(ConnectionChoices, 1)
  1223. ConnectionValues = ^(ConnectionChoices, 2)
  1224. NoList = ^(NoChoices, 1)
  1225. NoValues = ^(NoChoices, 2)
  1226. ShellCodeErrorTitle = "Error: "$(Function$(Option)Title)
  1227. ShellCodeErrorText = "Shell Code Error."
  1228. CANNOT_FIND_ANY_CARD = "Network card is not present in the system"
  1229. CANNOT_FIND_ANY_UNINSTALLED_CARD = "All the NICs supported by this product have already been installed."
  1230.  
  1231. [DialogConstantsENG]
  1232. Help = "&Help"
  1233. Exit = "Cancel"
  1234. OK = "OK"
  1235. HelpContext = ""
  1236. Continue = "Continue"
  1237. Cancel = "Cancel"
  1238.  
  1239. ;(%VER OEMSETUP.INF - Installation file for 3C90X - v5.0.2)
  1240.