OEMSETUP.INF Driver File Contents (nt3C980c.exe)

 
[IntstallOptions]
 Install_3NIC_Diag = "YES"
 Install_Shortcuts = "YES"
 Install_Installer = "NO"
 Install_On_Server = "YES"

[Identification]
 OptionType        = NetAdapter

[PlatformsSupported]
 ISA
 EISA
 "Jazz-Internal Bus"
 PCI

[Options]
3C980
3C90X 
3C905 
3C900 

[DriverFilenameConstantsNDIS3]
 NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\el90xnd3.sys"
 ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\el90xnd3.sys"
 ProductSoftwareUpgradePath = "\SystemRoot\System32\drivers\el90xnd3.sys"

[DriverFilenameConstantsPythonNDIS3]
 NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\el980n3.sys"
 ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\el980n3.sys"
 ProductSoftwareUpgradePath = "\SystemRoot\System32\drivers\el980n3.sys"

[DriverFilenameConstantsNDIS4]
 NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\el90xnd4.sys"
 ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\el90xnd4.sys"
 ProductSoftwareUpgradePath = "\SystemRoot\System32\drivers\el90xnd4.sys"

[DriverFilenameConstantsPythonNDIS4]
 NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\el98xn4.sys"
 ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\el98xn4.sys"
 ProductSoftwareUpgradePath = "\SystemRoot\System32\drivers\el98xn4.sys"

[FileConstants-Client]
 ProductSoftwareName = "El90x"
 NetRuleSoftwareType = "El90xSys ndisDriver El90xDriver"
 NetRuleSoftwareBindForm = """El90xSys"" yes no container"
 NetRuleSoftwareClass = {"El90xDriver basic"}
 NetRuleSoftwareBindable = {"El90xDriver El90xAdapter non exclusive 100"}
 ProductHardwareName = "El90x"
 FunctionTitle = "3Com 3C90x Adapter Card Setup"
 ProductSoftwareDescription = "3Com 3C90x Adapter Driver"
 ProductSoftwareTitle = "3Com 3C90x Adapter Driver"
 GROUP_NAME = "3Com Fast Etherlink XL/Etherlink XL"
 NetRuleHardwareType = "El90x El90xAdapter"
 NetRuleHardwareClass = {"El90xAdapter basic"}

[FileConstants-Server]
 ProductSoftwareName = "EL980N4"   ; Used to be el980n4
 NetRuleSoftwareType = "El980n4Sys ndisDriver El980n4Driver"
 NetRuleSoftwareBindForm = """El980n4Sys"" yes no container"
 NetRuleSoftwareClass = {"El980n4Driver basic"}
 NetRuleSoftwareBindable = {"El980n4Driver El980n4Adapter non exclusive 100"}
 ProductHardwareName = "EL980N4"  ; Used to be El980n4
 FunctionTitle = "3Com 3C980C Adapter Card Setup"
 ProductSoftwareDescription = "3Com 3C980C Adapter Driver"
 ProductSoftwareTitle = "3Com 3C980C Adapter Driver"
 GROUP_NAME = "3Com Etherlink Server 10/100 PCI"
 NetRuleHardwareType = "El980n4 El980n4Adapter"
 NetRuleHardwareClass = {"El980n4Adapter basic"}

[FileConstants]
 UtilityInf = "UTILITY.INF"
 subroutineinf = "SUBROUTN.INF"
 SoftwareType = "driver"
 Exit_Code = 0
 IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
 TrayIconExe = "TCAUDIAG.EXE"
 NetworkCardsKey = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"

 Manufacturer = "3Com"
 EtherDiskVersion 			= "4.0"
 ProductMajorVersion = "1"
 ProductMinorVersion = "0"
 ProductReview = "1"
 ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
 NetRuleSoftwareUse = $(SoftwareType)
 NetRuleHardwareBindForm = " yes yes container"
 3CNUMBER = "3C90X" 

 ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
 ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"

 ProductHardwareXXXXXTitle = "3Com Fast EtherLink/Etherlink XL PCI Busmaster NC"
 ProductHardwareXXXXXDescription = "3Com Fast EtherLink/Etherlink XL PCI Busmaster NIC"

 ProductHardware36945Title = "3Com Fast EtherLink XL NIC (3C905-T4)"
 ProductHardware36945Description = "3Com Fast EtherLink XL 10/100Mb T4 Ethernet NIC (3C905-T4)"

 ProductHardware36954Title = "3Com Fast EtherLink XL NIC (3C905B-FX)"
 ProductHardware36954Description = "3Com Fast EtherLink XL 10/100Mb FX Ethernet NIC (3C905B-FX)"

 ProductHardware36864Title = "3Com EtherLink XL NIC (3C900-TPO)"
 ProductHardware36864Description = "3Com EtherLink XL TPO 10Mb Ethernet NIC (3C900-TPO)" 

ProductHardware36865Title = "3Com EtherLink XL NIC (3C900-COMBO)"
 ProductHardware36865Description = "3Com EtherLink XL COMBO 10Mb Ethernet NIC (3C900-COMBO)" 

ProductHardware36868Title = "3Com EtherLink XL NIC (3C900B-TPO)"
 ProductHardware36868Description = "3Com EtherLink XL TPO 10Mb Ethernet NIC (3C900B-TPO)" 

ProductHardware36869Title = "3Com EtherLink XL NIC (3C900B-COMBO)"
 ProductHardware36869Description = "3Com EtherLink XL COMBO 10Mb Ethernet NIC (3C900B-COMBO)" 

ProductHardware36870Title = "3Com EtherLink XL NIC (3C900B-TPC)"
 ProductHardware36870Description = "3Com EtherLink XL TPC 10Mb Ethernet NIC (3C900B-TPC)" 

ProductHardware36874Title = "3Com EtherLink XL NIC (3C900B-FL)"
 ProductHardware36874Description = "3Com EtherLink XL FL 10Mb Ethernet NIC (3C900B-FL)" 

ProductHardware36952Title = "3Com EtherLink XL NIC (3C905B-COMBO)"
 ProductHardware36952Description = "3Com EtherLink XL COMBO 10/100Mb Ethernet NIC (3C905B-COMBO)"
 
ProductHardware38912Title   = "3Com EtherLink Server 10/100 PCI NIC"
ProductHardware38912Description = "3C980B-TX Adapter w/ Server Software ver. 2.0"

ProductHardware38917Title   = "3Com EtherLink Server 10/100 PCI NIC"
ProductHardware38917Description = "3C980C-TXM Adapter w/ Server Software ver. 2.0"

ProductHardware36949Title   = "3Com EtherLink Server NIC (10/100Mb PCI NIC)"
ProductHardware36949Description = "3C905B-TX Adapter w/ Server Software ver. 2.0"

ProductHardware37376Title   = "3Com EtherLink Server NIC (10/100Mb PCI NIC)"
ProductHardware37376Description = "3C905C-TX-S Adapter w/ Server Software ver. 2.0"

ProductHardware36944Title   = "3Com EtherLink Server NIC (10/100Mb PCI NIC)"
ProductHardware36944Description = "3C905-TX Adapter w/ Server Software ver. 2.0"

AdapterType = 5 

;;; To allow the NT4 installer to recognize only the 9800 and 9805 device IDs, use
;;; the second version of the CFIDList assignment. Otherwise, use the first one.

;;CFIDList = {36944, 36945, 36949, 36952, 36954, 36864, 36865, 36868, 36869, 36870, 36874, 38912, 38917, ;;37376}
 
CFIDList = {38912, 38917}	// Device ID support for Python980B and Python980C (9800 & 9805)

TrayIconExe = TCAUDIAG
 InstallerExe = TCAUDIAG
 UnInstallerEXE = UN3C90XA
[GeneralConstants]
 from = ""
 to = ""
 ExitCodeOk = 0
 ExitCodeCancel = 1 
ExitCodeFatal = 2
 KeyNull = ""
 MAXIMUM_ALLOWED = 33554432
 RegistryErrorIndex = NO_ERROR
 KeyProduct = ""
 KeyParameters = ""
 TRUE = 1
 FALSE = 0
 NoTitle = 0
 ExitState = "Active"
 OldVersionExisted = $(FALSE)
 DriverPath = $(!STF_NTPATH)\drivers
 NT350VersionConstant = "3.50"
 NT310VersionConstant = "3.10"
 NT400VersionConstant = "(4.0)"
 INF_PROCESSER = "I386"
 DIAGCARDTYPE = "TCAUM90X"

[date]
 Now = {} ? $(!LIBHANDLE) GetSystemDate

[Identify]
 read-syms Identification
 set Status = STATUS_SUCCESSFUL
 set Identifier = $(OptionType)
 set Media = #("Source Media Descriptions", 1, 1)
 Return $(Status) $(Identifier) $(Media)

[ReturnOptions]
 set Status = STATUS_FAILED
 set OptionList = {}
 set OptionTextList = {}
 set LanguageList = ^(LanguagesSupported, 1)
 Ifcontains(i) $($0) in $(LanguageList)
 ifstr(i) $($1) == ""
 goto returnoptions
 endif
 set PlatformList = ^(PlatformsSupported, 1)
 Ifcontains(i) $($1) in $(PlatformList)
 goto returnoptions
 else
 set Status = STATUS_NOTSUPPORTED
 goto finish_ReturnOptions
 endif
 else
 set Status = STATUS_NOLANGUAGE
 goto finish_ReturnOptions
 endif

returnoptions = +
 read-syms IntstallOptions
 ifstr(i) $(Install_On_Server) == "YES"
  set OptionList = {"3C980"}
  set OptionTextList = {"3Com EtherLink Server 10/100 PCI"}
 else
  set OptionList = ^(Options, 1)
  set OptionTextList = ^(OptionsText$($0), 1)
 endif

 set Status = STATUS_SUCCESSFUL

finish_ReturnOptions = +
 Return $(Status) $(OptionList) $(OptionTextList)

[DiagRegistry]

 OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE" $(!REG_KEY_WRITE) SOFTKEY
 OpenRegKey $(SOFTKEY) "" "3Com" $(!REG_KEY_WRITE) COMKEY
 ifstr $(COMKEY) == ""
 CreateRegKey $(SOFTKEY) {"3Com", 0, GenericClass} "" $(!REG_KEY_WRITE) "" COMKEY
 endif

;;; Add in hot plug support
 OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Compaq\Cpqrcmc\ClassDLLs\NicMiniPort" $(!REG_KEY_WRITE) MiniPortKey
 ifstr $(MiniPortKey) != ""
   CreateRegKey $(MiniPortKey) {"EL980N4", 0, GenericClass} "" $(!REG_KEY_WRITE) "" HotPlugServiceKey
   SetRegValue $(HotPlugServiceKey), {BaseOIDAddress, $(NoTitle),$(!REG_VT_DWORD), 4278322176} ;; 0xFF020400 in Hex
   SetRegValue $(HotPlugServiceKey), {SetOIDAddress, $(NoTitle),$(!REG_VT_DWORD), 4278321920}  ;; 0xFF020300 in Hex 
 endif
 CloseRegKey $(MiniPortKey)
 CloseRegKey $(HotPlugServiceKey)

OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\HotSrv\SupportedDevices" $(!REG_KEY_WRITE) SupportedDevicesKey
ifstr $(SupportedDevicesKey) != ""
  CreateRegKey $(SupportedDevicesKey) {"10B7-9800-10B7-1000", 0, GenericClass} "" $(!REG_KEY_WRITE) "" 9800HotPlugKey
  CreateRegKey $(SupportedDevicesKey) {"10B7-9805-10B7-1000", 0, GenericClass} "" $(!REG_KEY_WRITE) "" 9805HotPlugKey
  SetRegValue $(9800HotPlugKey) {"FriendlyName", 0, $(!REG_VT_SZ), "3Com EtherLink Server 10/100 PCI NIC"}
  SetRegValue $(9800HotPlugKey) {"DriverService", 0, $(!REG_VT_SZ), "EL980N4"}
  SetRegValue $(9805HotPlugKey) {"FriendlyName", 0, $(!REG_VT_SZ), "3Com EtherLink Server 10/100 PCI NIC"}
  SetRegValue $(9805HotPlugKey) {"DriverService", 0, $(!REG_VT_SZ), "EL980N4"}
endif
CloseRegKey $(SupportedDevicesKey)
CloseRegKey $(9800HotPlugKey)
CloseRegKey $(9805HotPlugKey)

OpenRegKey $(COMKEY) "" "TCAUDIAG" $(!REG_KEY_ALL_ACCESS) TCAUDIAGKEY
 ifstr $(TCAUDIAGKEY) == ""
 CreateRegKey $(COMKEY) {"TCAUDIAG", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" TCAUDIAGKEY
 endif

OpenRegKey $(TCAUDIAGKEY) "" "TCAUM980" $(!REG_KEY_WRITE) TCAUM980KEY
 ifstr $(TCAUM980KEY) == ""
 CreateRegKey $(TCAUDIAGKEY) {"TCAUM980", 0, GenericClass} "" $(!REG_KEY_WRITE) "" TCAUM980KEY
 endif

SetRegValue $(TCAUM980KEY) {"DriverNames", 0, $(!REG_VT_SZ), "SYSTEM32\EL98XN4.SYS"}
 
OpenRegKey $(TCAUM980KEY) "" "Extensions" $(!REG_KEY_WRITE) ExtensionsKEY
 ifstr $(ExtensionsKEY) == ""
 CreateRegKey $(TCAUM980KEY) {"Extensions", 0, GenericClass} "" $(!REG_KEY_WRITE) "" ExtensionsKEY
 endif
 
OpenRegKey $(TCAUDIAGKEY) "" "TCAUM90X" $(!REG_KEY_ALL_ACCESS) TCAUM90XKEY
 ifstr $(TCAUM90XKEY) == ""
 CreateRegKey $(TCAUDIAGKEY) {"TCAUM90X", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" TCAUM90XKEY
 endif

;;; We need to keep whatever was stored in DriverNames plus add to that string
GetRegValue $(TCAUM90XKEY) "DriverNames" DriverNamesList

set DriverNames = *($(DriverNamesList), 4)

set PythonDriverNames = "SYSTEM32\DRIVERS\EL98XN4.SYS;"

set NewDriverNames = $(PythonDriverNames)$(DriverNames)

SetRegValue $(TCAUM90XKEY) {"DriverNames", 0, $(!REG_VT_SZ), $(NewDriverNames)}
 
OpenRegKey $(TCAUM90XKEY) "" "Extensions" $(!REG_KEY_WRITE) ExtensionsKEY
 ifstr $(ExtensionsKEY) == ""
 CreateRegKey $(TCAUM90XKEY) {"Extensions", 0, GenericClass} "" $(!REG_KEY_WRITE) "" ExtensionsKEY
 endif
 
OpenRegKey $(ExtensionsKEY) "" "DA" $(!REG_KEY_WRITE) DAKEY
 ifstr $(DAKEY) == ""
 CreateRegKey $(ExtensionsKEY) {"DA", 0, GenericClass} "" $(!REG_KEY_WRITE) "" DAKEY
 endif
 
SetRegValue $(DAKEY) {"CPLName", 0, $(!REG_VT_SZ), "DASERVER.CPL"}
 
CloseRegKey $(SOFTKEY)
 CloseRegKey $(COMKEY)
 CloseRegKey $(TCAUDIAGKEY)
 CloseRegKey $(TCAUM90XKEY)
 CloseRegKey $(TCAUM980KEY)
 CloseRegKey $(ExtensionsKEY)
 CloseRegKey $(DAKEY)
 return
 
[InstallOption]
 set CurrLang = $($0)
 set Option = $($1)
 set SrcDir = $($2)
 set AddCopy = $($3)
 set DoCopy = $($4)
 set DoConfig = $($5)
 set LanguageList = ^(LanguagesSupported, 1)
 Ifcontains(i) $($0) NOT-IN $(LanguageList)
 Return STATUS_NOLANGUAGE
 endif
 set-subst LF = "\n"

 read-syms IntstallOptions
 ifstr(i) $(Install_On_Server) == "YES"
  read-syms FileConstants-Server
 else
  read-syms FileConstants-Client
 endif

 read-syms GeneralConstants
 read-syms FileConstants
 read-syms DialogConstants$(!STF_LANGUAGE)

 ifstr(i) $(!NTN_Origination) == "NCPA"
 set Continue = "OK"
 endif
 read-syms FileConstants$(!STF_LANGUAGE)
 detect date
 set-title $(FunctionTitle)
 set to = Begin
 set from = Begin
 set CommonStatus = STATUS_SUCCESSFUL
 EndWait

Begin = + 
set CurrentVersionValue = ""
 OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
 Ifstr(i) $(KeyNt) != ""
 GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
 Debug-Output "$(InfFile) : WinNT CurrentVersion ="$(CurrentVersionValue)
 CloseRegKey $(KeyNt)
 Endif
 

ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant)
 set NDIS_VER = NDIS4
else
 set NDIS_VER = NDIS3 
endif

ifstr(i) $(Option) == "3C980"
  read-syms DriverFilenameConstantsPython$(NDIS_VER)
else
  read-syms DriverFilenameConstants$(NDIS_VER)
endif

 ifstr(i) (*($(CurrentVersionValue),4)) == $(NT310VersionConstant) 
Debug-Output "$(InfFile) : Configureadapter"
 set Error = "Windows NT v3.10 is not support by this product"
 goto fatal
 endif

; Check for the proper level of installed service pack
Ifstr(i) $(!NTN_InstallMode) == "Update"
  goto start_of_version_detection
else-Ifstr(i) $(!NTN_InstallMode) == "install"

start_of_version_detection = +

  OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Control\ProductOptions" $(!REG_KEY_READ) ProductOptionsKey
  Ifstr(i) $(ProductOptionsKey) != "" ; key exists
    GetRegValue $(ProductOptionsKey) "ProductSuite" ProductSuiteList
    set TerminalServerName = *($(ProductSuiteList), 4)
    set NewTerminalServerName = *($(TerminalServerName), 1)
    ifstr(i) $(NewTerminalServerName) == "Terminal Server"
      OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
      Ifstr(i) $(KeyNt) != "" ; key exists
        GetRegValue $(KeyNt) "CSDVersion" ServicePackInfoList
        ; check for service pack 5, 6, 7, 8, 9, 10, 11, or 12
        set servicePackID = *($(ServicePackInfoList), 4)
        ifstr(i) $(servicePackID) != "Service Pack 4"
          ifstr(i) $(servicePackID) != "Service Pack 5"
            ifstr(i) $(servicePackID) != "Service Pack 6"
              ifstr(i) $(servicePackID) != "Service Pack 7"
                ifstr(i) $(servicePackID) != "Service Pack 8"
                  ifstr(i) $(servicePackID) != "Service Pack 9"
                    ifstr(i) $(servicePackID) != "Service Pack 10"
                      ifstr(i) $(servicePackID) != "Service Pack 11"
		        ifstr(i) $(servicePackID) != "Service Pack 12"
                          Shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) "FATAL" +
                            "Microsoft Windows NT Terminal Server, Service Pack 4 or greater must be installed first." +
		            $(!LF)"The program will exit now without making any changes."
		          set CommonStatus = STATUS_USERCANCEL
			  CloseRegKey $(KeyNt)
                          CloseRegKey $(ProductOptionsKey)
  		          goto end
                        endif
                      endif
                    endif
                  endif
                endif
              endif
            endif
          endif
        endif
      Endif
    else
      ;;; Now, if we are executing this code, the OS is not Terminal Server.
      ;;; The latest Service Pack required for this OS is 5 or greater.
      OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
      Ifstr(i) $(KeyNt) != "" ; key exists
        GetRegValue $(KeyNt) "CSDVersion" ServicePackInfoList
        ; check for service pack 5, 6, 7, 8, 9, 10, 11, or 12
        set servicePackID = *($(ServicePackInfoList), 4)
        ifstr(i) $(servicePackID) != "Service Pack 5"
          ifstr(i) $(servicePackID) != "Service Pack 6"
            ifstr(i) $(servicePackID) != "Service Pack 7"
              ifstr(i) $(servicePackID) != "Service Pack 8"
                ifstr(i) $(servicePackID) != "Service Pack 9"
                  ifstr(i) $(servicePackID) != "Service Pack 10"
                    ifstr(i) $(servicePackID) != "Service Pack 11"
		      ifstr(i) $(servicePackID) != "Service Pack 12"
                        Shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) "FATAL" +
                          "Microsoft Windows NT Service Pack 5 or greater must be installed first." +
		          $(!LF)"The program will exit now without making any changes."
  		        set CommonStatus = STATUS_USERCANCEL
                        CloseRegKey $(KeyNt)
                        CloseRegKey $(ProductOptionsKey)
	  	        goto end
                      endif
                    endif
                  endif
                endif
              endif
            endif
          endif
        endif
      Endif
    Endif
  Endif
  CloseRegKey $(KeyNt)
  CloseRegKey $(ProductOptionsKey)

  ;;; Begin of upgrade scenario
  ;;; Check whether any old versions of Python drivers are installed (those older than 1.2)
  set oldDriverFound = "NO"
  set pythonKeyFound = "NO"
  OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
  Ifstr(i) $(ServicesKey) != "" ; key exists
    EnumRegKey $(ServicesKey) DriverList
    ForListDo $(DriverList)
      ;;; Check for a version string which implies a Python 1.2 driver is installed
      set Driver = *($($), 1)
      ;;; Check for the presence of the "VersionNo" key
      OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\"$(Driver)"\Parameters" +
        $(!REG_KEY_ALL_ACCESS) DriverKey
      Ifstr(i) $(DriverKey) != "" ; key exists
        set DriverVersionList = {"","","",""}
        GetRegValue $(DriverKey) "VersionNo" DriverVersionList
        Split-String "$(Driver)" "n" DriverTokens
        set DriverName = *($(DriverTokens), 1)
	ifstr(i) $(Driver) != "El980n4"
          ifstr(i) $(DriverName) == "El980"
            ;;; We have found a Python-related key
            ;;; check for old version (before 1.4)
            set driverVersionID = *($(DriverVersionList), 4)
            ifstr(i) $(driverVersionID) == ""
                set oldDriverFound = "PRE12"
	    else-Ifstr(i) $(driverVersionID) != "20" 
	      set oldDriverFound = "PYTHON12"
            Endif
          Endif
        Endif
      Endif
      CloseRegKey $(DriverKey)
    EndForListDo
  Endif
  CloseRegKey $(ServicesKey)

  ifstr(i) $(oldDriverFound) == "PYTHON12"  
    ;; Perform the following to upgrade to Python 2.0:
    ;;   Add a value to HKLM\SW\3Com\el980n4:  TCAUDIAG   reg_sz  TCAUM90X.
    ;;   Remove all three values under HKLM\SW\3Com\el980n4.
    ;;   Remove the following value under HKLM\SW\3Com\el980n4\CurrentVersion: EDVersion.
    ;;   Remove the following value under HKLM\SW\3Com\el980n4\CurrentVersion: Review.
    ;;   Under HKLM\SW\3Com\el980n4\CurrentVersion, update the following:
    ;;     MajorVersion   DWORD   0x2
    ;;     MinorVersion   DWORD   0x0
    ;;     Description    reg_sz  3Com 3C980C Adapter Driver
    ;;     Title          reg_sz  3Com 3C980C Adapter Driver
    ;;  Under HKLM\SYSTEM\CurrentControlSet\Services\el980n4, update the following values:
    ;;     DisplayName    reg_sz  3Com 3C980C Adapter Driver
    ;;     ImagePath      reg_sz  \SystemRoot\System32\drivers\el98xn4.sys
    ;;  Remove the following value from HKLM\SYSTEM\CurrentControlSet\Services\el980n4:
    ;;     TotCards       DWORD   0x2
    ;;  For HKLM\SYSTEM\CurrentControlSet\Services\el980n41/42/..., update these values:
    ;;     VersionNo      DWORD   0x86   (Change value to 0x14)
    ;;  For HKLM\SYSTEM\CurrentControlSet\Services\el980n41/42/..., remove these values:
    ;;     AlertType      DWORD   0x4
    ;;     Vlan_op        DWORD   0
    ;;     WINNT          reg_sz  Yes
    ;;  For HKLM\SYSTEM\CurrentControlSet\Services\el980n41/42/..., add these values:
    ;;     FlowControl    reg_sz  YES
    ;;     WakeOnMagic    reg_sz  YES
    ;;     WakeOnLink     reg_sz  NO
    ;;     shdinformmsgs  reg_sz  0
    ;;     shdwarnmsgs    reg_sz  0
    ;;     shderrormsgs   reg_sz  0x1

    ;; First, copy over the new uninstaller which includes a file deletion utility
    install "Install-Uninstaller"

    ;; Remove all shortcuts and registry entries that are going to be changed
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-diag" 

    ;; Delete all files that are obsoleted by the upgrade
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\980instl.exe" 
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\980instl.hlp"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\3c90xcfg.dll"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\3nicdiag.exe"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\3nicdiag.hlp"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\3varaddr.txt"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\comsmd.exe"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\da15cfg.exe"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\da15cfg.hlp"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\daserver.exe"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\..\daserver.exe"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\..\..\daserver.exe"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\etherbox.dll"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\pacecfg.dll"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\pacecfg.hlp"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\pcomdrv.sys"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\un3c90x.exe"
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\drivers\el980n4.sys"

    ;; Copy over the new driver for NT4 and Python 2.0.
    install "Install-Option"
    install "Install-3nicdiag"
    install "Install-Service"
    install "Install-SHD"
    install "Install-Patches"

    OpenRegKey $(!REG_H_LOCAL) "" "Software\3Com\el980n4" $(!REG_KEY_ALL_ACCESS) SWel980n4Key
    ifstr(i) $(SWel980n4Key) != ""
      DeleteRegValue $(SWel980n4Key) 3CUNINSTALL
      DeleteRegValue $(SWel980n4Key) FamilyMember
      DeleteRegValue $(SWel980n4Key) PACENAME

      OpenRegKey $(SWel980n4Key) "" "CurrentVersion" $(!REG_KEY_ALL_ACCESS) SWel980n4CVKey
      ifstr(i) $(SWel980n4CVKey) != ""
        DeleteRegValue $(SWel980n4CVKey) EDVersion
        DeleteRegValue $(SWel980n4CVKey) Review
        SetRegValue $(SWel980n4CVKey) {"Description", 0, $(!REG_VT_SZ), "3Com 3C980C Adapter Driver"}
        SetRegValue $(SWel980n4CVKey) {"Title", 0, $(!REG_VT_SZ), "3Com 3C980C Adapter Driver"}
        SetRegValue $(SWel980n4CVKey), {MajorVersion, $(NoTitle),$(!REG_VT_DWORD),2} 
        SetRegValue $(SWel980n4CVKey), {MinorVersion, $(NoTitle),$(!REG_VT_DWORD),0} 
        OpenRegKey $(SWel980n4CVKey) "" "NetRules" $(!REG_KEY_ALL_ACCESS) SWel980n4NRKey
        ifstr(i) $(SWel980n4NRKey) != ""
          set INFCounter = 0
          set NotFound = FALSE

          startOfLoop = +
          set NewINFName = oemnad$(INFCounter).inf          
          detect checkInfFileExist
          set INFFile = *($(INFFileFound), 1)
          ifstr(i) $(INFFile) != $(NewINFName)
            SetRegValue $(SWel980n4NRKey) {"InfName", 0, $(!REG_VT_SZ), $(NewINFName)}
            set NewINFFileName = $(NewINFName)
            install "Install-NewINF"
            set NotFound = TRUE
          else
            set TempCounter = $(INFCounter)
            set-add INFCounter = $(TempCounter), 1
          endif
          
          ifstr(i) $(NotFound) == FALSE
            goto startOfLoop
          endif

          ;;; Make changes to support hot plug for I.B.M.
          ;;; Save all entries under SW\3Com to memory so that the key can be erased
          ;;; and then renamed without losing the info. under this key
	  GetRegValue $(SWel980n4CVKey) "InstallDate"  SavedInstallDate
	  GetRegValue $(SWel980n4CVKey) "RefCount"     SavedRefCount

          OpenRegKey $(!REG_H_LOCAL) "" "Software\3Com" $(!REG_KEY_ALL_ACCESS) SW3ComKey
          ifstr(i) $(SW3ComKey) != ""
            DeleteRegTree $(SW3ComKey) "el980n4"
            CreateRegKey $(SW3ComKey) {"EL980N4", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" Newel980n4Key
            ifstr $(Newel980n4Key) != ""
              SetRegValue $(Newel980n4Key) {"TCAUDIAG", 0, $(!REG_VT_SZ), "TCAUM90X"}
              CreateRegKey $(Newel980n4Key) {"CurrentVersion", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" Newel980n4CVKey
              ifstr $(Newel980n4CVKey) != ""
                CreateRegKey $(Newel980n4CVKey) {"NetRules", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" Newel980n4CVNRKey
                ifstr $(Newel980n4CVNRKey) != ""
                  ;; Add back in the settings for the CurrentVersion and NetRules key
                  SetRegValue $(Newel980n4CVKey) {"Description", 0, $(!REG_VT_SZ), "3Com 3C980C Adapter Driver"}
                  SetRegValue $(Newel980n4CVKey) {"Title", 0, $(!REG_VT_SZ), "3Com 3C980C Adapter Driver"}
                  SetRegValue $(Newel980n4CVKey), {MajorVersion, $(NoTitle),$(!REG_VT_DWORD),2} 
                  SetRegValue $(Newel980n4CVKey), {MinorVersion, $(NoTitle),$(!REG_VT_DWORD),0} 
                  SetRegValue $(Newel980n4CVKey), {InstallDate, $(NoTitle),$(!REG_VT_DWORD),*($(SavedInstallDate), 4)} 
                  SetRegValue $(Newel980n4CVKey), {RefCount, $(NoTitle),$(!REG_VT_DWORD),*($(SavedRefCount), 4)} 
                  SetRegValue $(Newel980n4CVKey) {"ServiceName", 0, $(!REG_VT_SZ), "EL980N4"}
                  SetRegValue $(Newel980n4CVKey) {"SoftwareType", 0, $(!REG_VT_SZ), "driver"}

                  SetRegValue $(Newel980n4CVNRKey) {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}
                  SetRegValue $(Newel980n4CVNRKey) {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}
                  SetRegValue $(Newel980n4CVNRKey) {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}
                  SetRegValue $(Newel980n4CVNRKey) {"InfName", 0, $(!REG_VT_SZ), $(NewINFFileName)}
                  SetRegValue $(Newel980n4CVNRKey) {"InfOption", 0, $(!REG_VT_SZ), "3C980"}
                  SetRegValue $(Newel980n4CVNRKey) {"type", 0, $(!REG_VT_SZ), "El980n4Sys ndisDriver El980n4Driver"}
                  SetRegValue $(Newel980n4CVNRKey) {"use", 0, $(!REG_VT_SZ), "driver"}
                endif
              endif
            endif
          endif

          CloseRegKey $(SW3ComKey)
          CloseRegKey $(Newel980n4Key)
          CloseRegKey $(Newel980n4CVKey)
          CloseRegKey $(Newel980n4CVNRKey)
          ;;; End of changes to support hot plug

        endif
      endif
    endif

    OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\Windows NT\CurrentVersion\NetworkCards" $(!REG_KEY_ALL_ACCESS) SWNWCardsKey
    ifstr(i) $(SWNWCardsKey) != ""
      EnumRegKey $(SWNWCardsKey) DriverList
      ForListDo $(DriverList)
        set Driver = *($($), 1)
        OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(Driver) +
          $(!REG_KEY_ALL_ACCESS) DriverRootKey
        Ifstr(i) $(DriverRootKey) != "" ; key exists
          GetRegValue $(DriverRootKey) "ProductName" CurrentProductName
          ifstr(i) (*($(CurrentProductName),4)) == "(El980n4)"
            OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(Driver)"\NetRules" +
              $(!REG_KEY_ALL_ACCESS) DriverNetRulesKey
            Ifstr(i) $(DriverNetRulesKey) != "" ; key exists
              SetRegValue $(DriverNetRulesKey) {"InfName" , 0, $(!REG_VT_SZ), $(NewINFFileName)}
            Endif

            ;;; Change to support I.B.M. hot plug
            SetRegValue $(DriverRootKey) {"ProductName" , 0, $(!REG_VT_SZ), "EL980N4"}
            GetRegValue $(DriverRootKey) "ServiceName" CurrentServiceNameString
            set CurrentServiceName = *($(CurrentServiceNameString), 4)
            Split-String "$(CurrentServiceName)" "n" ServiceNameTokens
            set ServiceSuffix = *($(ServiceNameTokens), 3)
            set FullServiceName = "EL980N"$(ServiceSuffix)
            SetRegValue $(DriverRootKey) {"ServiceName", 0, $(!REG_VT_SZ), $(FullServiceName)}
            ;;; End of changes to support hot plug

            ;;; Change the description and title fields
            GetRegValue $(DriverRootKey) "Description" CurrentDescriptionString           
	    GetRegValue $(DriverRootKey) "Title" CurrentTitleString
            set CurrentDescription = *($(CurrentDescriptionString), 4)
            set CurrentTitle = *($(CurrentTitleString), 4)

            ifstr(i) $(CurrentDescription) == "10/100Mb PCI"
              SetRegValue $(DriverRootKey) {"Description", 0, $(!REG_VT_SZ), "3C980B-TX Adapter w/ Server Software ver. 2.0"}
              Split-String "$(CurrentTitle)" "m" TitleTokens
              set TitlePrefix = *($(TitleTokens), 1)
              set FullTitle = $(TitlePrefix)"m EtherLink Server 10/100 PCI NIC"
              SetRegValue $(DriverRootKey) {"Title", 0, $(!REG_VT_SZ), $(FullTitle)}
            Endif
          Endif
        Endif
        CloseRegKey $(DriverRootKey)
        CloseRegKey $(DriverNetRulesKey)
      EndForListDo
    endif
    CloseRegKey $(SWNWCardsKey)

    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
    ifstr(i) $(ServicesKey) != ""
      EnumRegKey $(ServicesKey) DriverList
      ForListDo $(DriverList)
        set Driver = *($($), 1)
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\"$(Driver)"\Parameters" +
          $(!REG_KEY_ALL_ACCESS) DriverKey
        Ifstr(i) $(DriverKey) != "" ; key exists
          Split-String "$(Driver)" "n" DriverTokens
          set DriverName = *($(DriverTokens), 1)
	  ifstr(i) $(Driver) != "El980n4"
            ifstr(i) $(DriverName) == "El980"

              ;;; This is a 980-Series 3Com driver. The name must be changed to uppercase
              ;;; Changes to support hot plug for I.B.M.
              ;;; First, save the old settings for this driver instance

              OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\"$(Driver) +
                $(!REG_KEY_ALL_ACCESS) DriverInstanceKey
              Ifstr(i) $(DriverInstanceKey) != "" ; key exists
                GetRegValue $(DriverInstanceKey) "ErrorControl" SavedErrorControl
                GetRegValue $(DriverInstanceKey) "Start"        SavedStart
                GetRegValue $(DriverInstanceKey) "Type"         SavedType

                OpenRegKey $(DriverInstanceKey) "" "Linkage" $(!REG_KEY_ALL_ACCESS) DriverLinkageKey
                Ifstr(i) $(DriverLinkageKey) != "" ; key exists
                  GetRegValue $(DriverLinkageKey) "Bind"   SavedBind
                  GetRegValue $(DriverLinkageKey) "Export" SavedExport
                  GetRegValue $(DriverLinkageKey) "Route"  SavedRoute

                  OpenRegKey $(DriverLinkageKey) "" "Disabled" $(!REG_KEY_ALL_ACCESS) DriverLinkageDisabledKey
                  Ifstr(i) $(DriverLinkageDisabledKey) != "" ; key exists
                    GetRegValue $(DriverLinkageDisabledKey) "Bind"   SavedDisabledBind
                    GetRegValue $(DriverLinkageDisabledKey) "Export" SavedDisabledExport
                    GetRegValue $(DriverLinkageDisabledKey) "Route"  SavedDisabledRoute
                  endif
                endif
                
                OpenRegKey $(DriverInstanceKey) "" "Parameters" $(!REG_KEY_ALL_ACCESS) DriverParametersKey
                Ifstr(i) $(DriverParametersKey) != "" ; key exists
                  GetRegValue $(DriverParametersKey) "ADAPTERNUMBER"    SavedADAPTERNUMBER
                  GetRegValue $(DriverParametersKey) "AdapterSeq"       SavedAdapterSeq
                  GetRegValue $(DriverParametersKey) "Base_Mac_Address" SavedBaseMacAddress
                  GetRegValue $(DriverParametersKey) "BusNumber"        SavedBusNumber
                  GetRegValue $(DriverParametersKey) "BusType"          SavedBusType
                  GetRegValue $(DriverParametersKey) "CardType"         SavedCardType
                  GetRegValue $(DriverParametersKey) "ErrorTolerance"   SavedErrorTolerance
                  GetRegValue $(DriverParametersKey) "MediaType"        SavedMediaType
                  GetRegValue $(DriverParametersKey) "Network_Address"  SavedNetworkAddress
                  GetRegValue $(DriverParametersKey) "SamplingRatio"    SavedSamplingRatio
                  GetRegValue $(DriverParametersKey) "SamplingWindow"   SavedSamplingWindow
                  GetRegValue $(DriverParametersKey) "SelfCheckLevel"   SavedSelfCheckLevel
                  GetRegValue $(DriverParametersKey) "Slot"             SavedSlot
                  GetRegValue $(DriverParametersKey) "SlotNumber"       SavedSlotNumber

                  OpenRegKey $(DriverParametersKey) "" "Tcpip" $(!REG_KEY_ALL_ACCESS) DriverTCPIPKey
                  Ifstr(i) $(DriverTCPIPKey) != "" ; key exists
                    GetRegValue $(DriverTCPIPKey) "DefaultGateway"        SavedDefaultGateway
                    GetRegValue $(DriverTCPIPKey) "EnableDHCP"            SavedEnableDHCP
                    GetRegValue $(DriverTCPIPKey) "IPAddress"             SavedIPAddress
                    GetRegValue $(DriverTCPIPKey) "IPInterfaceContext"    SavedIPInterfaceContext
                    GetRegValue $(DriverTCPIPKey) "IPInterfaceContextMax" SavedIPInterfaceContextMax
                    GetRegValue $(DriverTCPIPKey) "LLInterface"           SavedLLInterface
                    GetRegValue $(DriverTCPIPKey) "PPTPFiltering"         SavedPPTPFiltering
                    GetRegValue $(DriverTCPIPKey) "RawIPAllowedProtocols" SavedRawIPAllowedProtocols
                    GetRegValue $(DriverTCPIPKey) "SubnetMask"            SavedSubnetMask
                    GetRegValue $(DriverTCPIPKey) "TCPAllowedPorts"       SavedTCPAllowedPorts
                    GetRegValue $(DriverTCPIPKey) "UDPAllowedPorts"       SavedUDPAllowedPorts
                    GetRegValue $(DriverTCPIPKey) "UseZeroBroadcast"      SavedUseZeroBroadcast
                  endif
                endif
              endif

              CloseRegKey $(DriverTCPIPKey)
              CloseRegKey $(DriverParametersKey)
              CloseRegKey $(DriverLinkageDisabledKey)
              CloseRegKey $(DriverLinkageKey)
              CloseRegKey $(DriverInstanceKey)

              ;;; Delete this driver instance and recreate it with all caps

              DeleteRegTree $(ServicesKey) $(Driver)

              ;; Convert the driver instance name to all caps

              Split-String "$(Driver)" "n" DriverNameTokens
              set DriverNameSuffix = *($(DriverNameTokens), 3)
              set DriverNameAsCAPS = "EL980N"$(DriverNameSuffix)

              CreateRegKey $(ServicesKey) {$(DriverNameAsCAPS), 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewDriverKey
              ifstr $(NewDriverKey) != ""
                SetRegValue $(NewDriverKey), {ErrorControl, $(NoTitle),$(!REG_VT_DWORD),*($(SavedErrorControl), 4)} 
                SetRegValue $(NewDriverKey), {Start, $(NoTitle),$(!REG_VT_DWORD),*($(SavedStart), 4)} 
                SetRegValue $(NewDriverKey), {Type, $(NoTitle),$(!REG_VT_DWORD),*($(SavedType), 4)} 

                CreateRegKey $(NewDriverKey) {"Linkage", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewDriverLinkageKey
                ifstr $(NewDriverLinkageKey) != ""
                  ;;; Add in the values for the Linkage key
                  SetRegValue $(NewDriverLinkageKey) {Bind,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedBind), 4)}
                  SetRegValue $(NewDriverLinkageKey) {Export,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedExport), 4)}
                  SetRegValue $(NewDriverLinkageKey) {Route,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedRoute), 4)}

                  CreateRegKey $(NewDriverLinkageKey) {"Disabled", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewDriverLinkageDisabledKey
                  ifstr $(NewDriverLinkageDisabledKey) != ""
                    ;;; Add in the values for the Disabled key
                    SetRegValue $(NewDriverLinkageDisabledKey) {Bind,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedDisabledBind), 4)}
                    SetRegValue $(NewDriverLinkageDisabledKey) {Export,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedDisabledExport), 4)}
                    SetRegValue $(NewDriverLinkageDisabledKey) {Route,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedDisabledRoute), 4)}
                  endif
                endif

                CreateRegKey $(NewDriverKey) {"Parameters", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewDriverParamKey
                ifstr $(NewDriverParamKey) != ""
                  SetRegValue $(NewDriverParamKey), {VersionNo, $(NoTitle),$(!REG_VT_DWORD),20} 
                  SetRegValue $(NewDriverParamKey), {shdinformmsgs, $(NoTitle),$(!REG_VT_DWORD),0} 
                  SetRegValue $(NewDriverParamKey), {shdwarnmsgs, $(NoTitle),$(!REG_VT_DWORD),0} 
                  SetRegValue $(NewDriverParamKey), {shderrormsgs, $(NoTitle),$(!REG_VT_DWORD),1} 
                  SetRegValue $(NewDriverParamKey) {"FlowControl", 0, $(!REG_VT_SZ), "YES"}
                  SetRegValue $(NewDriverParamKey) {"WakeOnMagic", 0, $(!REG_VT_SZ), "YES"}
                  SetRegValue $(NewDriverParamKey) {"WakeOnLink" , 0, $(!REG_VT_SZ), "NO"}
                  SetRegValue $(NewDriverParamKey) {"RWUMagic", 0, $(!REG_VT_SZ), "ENABLE"}
                  SetRegValue $(NewDriverParamKey), {ADAPTERNUMBER, $(NoTitle),$(!REG_VT_DWORD),*($(SavedADAPTERNUMBER), 4)} 
                  SetRegValue $(NewDriverParamKey), {AdapterSeq, $(NoTitle),$(!REG_VT_DWORD),*($(SavedAdapterSeq), 4)} 
                  SetRegValue $(NewDriverParamKey) {"Base_Mac_Address" , 0, $(!REG_VT_SZ), *($(SavedBaseMacAddress), 4)}
                  SetRegValue $(NewDriverParamKey), {BusNumber, $(NoTitle),$(!REG_VT_DWORD),*($(SavedBusNumber), 4)} 
                  SetRegValue $(NewDriverParamKey), {BusType, $(NoTitle),$(!REG_VT_DWORD),*($(SavedBusType), 4)} 
                  SetRegValue $(NewDriverParamKey), {CardType, $(NoTitle),$(!REG_VT_DWORD),*($(SavedCardType), 4)} 
                  SetRegValue $(NewDriverParamKey) {"ErrorTolerance" , 0, $(!REG_VT_SZ), *($(SavedErrorTolerance), 4)}
                  SetRegValue $(NewDriverParamKey), {MediaType, $(NoTitle),$(!REG_VT_DWORD),*($(SavedMediaType), 4)} 
                  SetRegValue $(NewDriverParamKey) {"Network_Address" , 0, $(!REG_VT_SZ), *($(SavedNetworkAddress), 4)}
                  SetRegValue $(NewDriverParamKey), {SamplingRatio, $(NoTitle),$(!REG_VT_DWORD),*($(SavedSamplingRatio), 4)} 
                  SetRegValue $(NewDriverParamKey), {SamplingWindow, $(NoTitle),$(!REG_VT_DWORD),*($(SavedSamplingWindow), 4)} 
                  SetRegValue $(NewDriverParamKey) {"SelfCheckLevel" , 0, $(!REG_VT_SZ), *($(SavedSelfCheckLevel), 4)}
                  SetRegValue $(NewDriverParamKey), {Slot, $(NoTitle),$(!REG_VT_DWORD),*($(SavedSlot), 4)} 
                  SetRegValue $(NewDriverParamKey), {SlotNumber, $(NoTitle),$(!REG_VT_DWORD),*($(SavedSlotNumber), 4)} 

                  CreateRegKey $(NewDriverParamKey) {"Tcpip", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewDriverTCPIPKey
                  ifstr $(NewDriverTCPIPKey) != ""
                    ;;; Add in the values for the Tcpip key
                    SetRegValue $(NewDriverTCPIPKey) {DefaultGateway,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedDefaultGateway), 4)}
                    SetRegValue $(NewDriverTCPIPKey), {EnableDHCP, $(NoTitle),$(!REG_VT_DWORD),*($(SavedEnableDHCP), 4)} 
                    SetRegValue $(NewDriverTCPIPKey) {IPAddress,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedIPAddress), 4)}
                    SetRegValue $(NewDriverTCPIPKey), {IPInterfaceContext, $(NoTitle),$(!REG_VT_DWORD),*($(SavedIPInterfaceContext), 4)} 
                    SetRegValue $(NewDriverTCPIPKey), {IPInterfaceContextMax, $(NoTitle),$(!REG_VT_DWORD),*($(SavedIPInterfaceContextMax), 4)} 
                    SetRegValue $(NewDriverTCPIPKey) {"LLInterface" , 0, $(!REG_VT_SZ), *($(SavedLLInterface), 4)}
                    SetRegValue $(NewDriverTCPIPKey), {PPTPFiltering, $(NoTitle),$(!REG_VT_DWORD),*($(SavedPPTPFiltering), 4)} 
                    SetRegValue $(NewDriverTCPIPKey) {RawIPAllowedProtocols,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedRawIPAllowedProtocols), 4)}
                    SetRegValue $(NewDriverTCPIPKey) {SubnetMask,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedSubnetMask), 4)}
                    SetRegValue $(NewDriverTCPIPKey) {TCPAllowedPorts,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedTCPAllowedPorts), 4)}
                    SetRegValue $(NewDriverTCPIPKey) {UDPAllowedPorts,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedUDPAllowedPorts), 4)}
                    SetRegValue $(NewDriverTCPIPKey), {UseZeroBroadcast, $(NoTitle),$(!REG_VT_DWORD),*($(SavedUseZeroBroadcast), 4)} 
                  endif
                endif
              endif

              ;;; End of key recreation

              ;;; END OF MASSIVE CHANGES
              ;;; End of changes for hot plug

            Endif
          Else   
            ;;; Full driver name = El980n4 -> Change this to uppercase
            ;;; Changes to support hot plug for I.B.M.
            ;;; Save all parameters to memory before recreating the keys
            OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\el980n4" $(!REG_KEY_ALL_ACCESS) RootSvcsKey
            Ifstr(i) $(RootSvcsKey) != "" ; key exists
               OpenRegKey $(RootSvcsKey) "" "Security" $(!REG_KEY_ALL_ACCESS) RootSvcsSecurityKey
              ifstr(i) $(RootSvcsSecurityKey) != ""
                GetRegValue $(RootSvcsSecurityKey) "Security"  SavedSecurity
                CloseRegKey $(RootSvcsSecurityKey)
              endif

              OpenRegKey $(RootSvcsKey) "" "Linkage" $(!REG_KEY_ALL_ACCESS) RootSvcsLinkageKey
              ifstr(i) $(RootSvcsLinkageKey) != ""
                GetRegValue $(RootSvcsLinkageKey) "Bind"    SavedBind
	        GetRegValue $(RootSvcsLinkageKey) "Export"  SavedExport
                GetRegValue $(RootSvcsLinkageKey) "Route"   SavedRoute

                OpenRegKey $(RootSvcsLinkageKey) "" "Disabled" $(!REG_KEY_ALL_ACCESS) RootSvcsLinkageDisabledKey
                ifstr(i) $(RootSvcsLinkageDisabledKey) != ""
                  GetRegValue $(RootSvcsLinkageDisabledKey) "Bind"    SavedDisabledBind
                  GetRegValue $(RootSvcsLinkageDisabledKey) "Export"  SavedDisabledExport
                  GetRegValue $(RootSvcsLinkageDisabledKey) "Route"   SavedDisabledRoute
                  CloseRegKey $(RootSvcsLinkageDisabledKey)
                endif
                CloseRegKey $(RootSvcsLinkageKey)
              endif

              DeleteRegTree $(ServicesKey) "el980n4"
  
              ;;; Start of key recreation

            CreateRegKey $(ServicesKey) {"EL980N4", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewEL980N4Key
            ifstr $(NewEL980N4Key) != ""
              SetRegValue $(NewEL980N4Key), {ErrorControl, $(NoTitle),$(!REG_VT_DWORD),0} 
              SetRegValue $(NewEL980N4Key), {Start, $(NoTitle),$(!REG_VT_DWORD),2} 
              SetRegValue $(NewEL980N4Key), {Type, $(NoTitle),$(!REG_VT_DWORD),1} 
              SetRegValue $(NewEL980N4Key) {"DisplayName", 0, $(!REG_VT_SZ), "3Com 3C980C Adapter Driver"}
              SetRegValue $(NewEL980N4Key) {"ImagePath", 0, $(!REG_VT_SZ), "\SystemRoot\System32\drivers\el98xn4.sys"}
              SetRegValue $(NewEL980N4Key) {"Group", 0, $(!REG_VT_SZ), "NDIS"}

              CreateRegKey $(NewEL980N4Key) {"Linkage", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewEL980N4LinkageKey
              ifstr $(NewEL980N4LinkageKey) != ""
                ;;; Add in the values for the Linkage key
                SetRegValue $(NewEL980N4LinkageKey) {Bind,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedBind), 4)}
                SetRegValue $(NewEL980N4LinkageKey) {Export,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedExport), 4)}
                SetRegValue $(NewEL980N4LinkageKey) {Route,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedRoute), 4)}

                CreateRegKey $(NewEL980N4LinkageKey) {"Disabled", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewEL980N4LinkageDisabledKey
                ifstr $(NewEL980N4LinkageDisabledKey) != ""
                  ;;; Add in the values for the Disabled key
                  SetRegValue $(NewEL980N4LinkageDisabledKey) {Bind,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedDisabledBind), 4)}
                  SetRegValue $(NewEL980N4LinkageDisabledKey) {Export,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedDisabledExport), 4)}
                  SetRegValue $(NewEL980N4LinkageDisabledKey) {Route,$(NoTitle),$(!REG_VT_MULTI_SZ),*($(SavedDisabledRoute), 4)}
                endif
              endif

              CreateRegKey $(NewEL980N4Key) {"Parameters", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewEL980N4ParamKey
              ifstr $(NewEL980N4ParamKey) != ""
                set WakeOnLan = YES
                set WakeOnLink = NO 
                set ValueEnable = ENABLE 

                Set NewValueList = {{WakeOnMagic,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLan)},+
		  {WakeOnLink,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLink)},+
		  {RWUMagic,$(NoTitle),$(!REG_VT_SZ),$(ValueEnable)},+
		  {FLOWCONTROL,$(NoTitle),$(!REG_VT_SZ),$(ValueEnable)}}

                OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\EL980N4\Parameters" +
                  $(!REG_KEY_ALL_ACCESS) NewSoftParameterKey 
                ifstr $(NewSoftParameterKey) != ""	
                  Shell $(UtilityInf), AddValueList, $(NewSoftParameterKey), $(NewValueList)
                  CreateRegKey $(NewSoftParameterKey) {"3CDefault" , 0, GenericClass} "" +
                    $(!REG_KEY_ALL_ACCESS) "" KeyNt2 

                  Set ThisValueList = {RWUMagic,$(NoTitle),$(!REG_VT_SZ),$(ValueEnable)}

                  OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\EL980N4" $(!REG_KEY_ALL_ACCESS) NDKeyNt 
                  ifstr $(KeyNt2) != ""	
                    SetRegValue $(KeyNt2 ) $(ThisValueList) 
                    CloseRegKey $(KeyNt2 )
                  endif
                endif
                CloseRegKey $(NewSoftParameterKey)
                CloseRegKey $(NDKeyNt)  ;l
              endif

                CreateRegKey $(NewEL980N4Key) {"Security", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewEL980N4SecurityKey
                ifstr $(NewEL980N4SecurityKey) != ""
                  ;;; Add in the values for the Security key
                  SetRegValue $(NewEL980N4SecurityKey) {Security,$(NoTitle),$(!REG_VT_BIN),*($(SavedSecurity), 4)}
                endif
              endif
               ;;; End of key recreation

            endif
          endif
          ;;; End of changes for hot plug

        Endif
        CloseRegKey $(DriverKey)
      EndForListDo
    endif

    CloseRegKey $(SWel980n4Key)
    CloseRegKey $(SWel980n4CVKey)
    CloseRegKey $(SWel980n4NRKey)
    CloseRegKey $(ServicesKey)

    ;; Handle some things we have not done yet before finishing up Python 1.2 -> 2.0 Upgrade
    ;; Install Touchdown
    set TD_Manufacturer			= "3Com"
    set TD_TCAITDISoftwareName		= "TCAITDI"
    set TD_TCAITDIKeyName     		= $(!NTN_SoftwareBase)"\"$(TD_Manufacturer)"\"$(TD_TCAITDISoftwareName)"\CurrentVersion"
    set TD_MAXIMUM_ALLOWED    		= 33554432
    set TD_KeyNull			= ""
    set TD_TCAITDISoftwareDisplayName	= "3Com Diagnostic Communication Module" 
    set TD_TCAITDISoftwareImagePath	= "%SystemRoot%\System32\drivers\TCAITDI.sys"
    set TD_NetEventDLL			= "%SystemRoot%\System32\netevent.dll"
    set TD_NoTitle			= 0
    set TD_SoftwareType			= "service"
    set TD_TCAITDIMajorVersion		= "1"
    set TD_TCAITDIMinorVersion		= "0"
    set TD_TCAITDISoftwareTitle		= $(TD_TCAITDISoftwareDisplayName)
    set TD_TCAITDISoftwareDescription	= "This module controls communication between the diagnostic and the 3Com NIC drivers.  You can unbind this module from non-3Com NICs. This module can be removed by clicking on the Remove button on this screen. Removing all of the NIC drivers will also remove this module."
    set TD_NetRuleSoftwareType		= "TCAITDI lmNetService ndisTransport"
    set TD_NetRuleSoftwareUse		= $(TD_SoftwareType)" yes yes"
    set TD_NetRuleSoftwareBindForm	= """TCAITDI"" yes yes simple"

    Shell $(UtilityInf), AddSoftwareComponent, $(TD_Manufacturer), +
      $(TD_TCAITDISoftwareName), +
      $(TD_TCAITDISoftwareName), +
      $(TD_TCAITDISoftwareDisplayName), $(STF_CONTEXTINFNAME), +
      $(TD_TCAITDISoftwareImagePath), "kernel", "TDI", {}, "",+
      $(TD_NetEventDLL)

    Set SoftTCAITDIKey = $($R1)
    Set SoftNetRuleKey = $($R2)
    Set SoftServiceKey = $($R3)
    set KeyParameters = $($R4)
    Set SoftLinkageKey = $($R5)
    set NewValueList = {{SoftwareType,$(TD_NoTitle),$(!REG_VT_SZ),$(TD_SoftwareType)},+
    {MajorVersion,$(TD_NoTitle),$(!REG_VT_DWORD),$(TD_TCAITDIMajorVersion)},+
    {MinorVersion,$(TD_NoTitle),$(!REG_VT_DWORD),$(TD_TCAITDIMinorVersion)},+
    {"Locked",$(TD_NoTitle),$(!REG_VT_SZ),"ON"},+
    {"Uninstall",$(TD_NoTitle),$(!REG_VT_SZ),"NO"},+
    {Title,$(TD_NoTitle),$(!REG_VT_SZ),$(TD_TCAITDISoftwareTitle)},+
    {Description,$(TD_NoTitle),$(!REG_VT_SZ),$(TD_TCAITDISoftwareDescription)},+
    {ServiceName,$(TD_NoTitle),$(!REG_VT_SZ),$(TD_TCAITDISoftwareName)},+
    {InstallDate,$(TD_NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
    Shell $(UtilityInf), AddValueList, $(SoftTCAITDIKey), $(NewValueList)

    set NewValueList = {{type ,$(TD_NoTitle),$(!REG_VT_SZ),$(TD_NetRuleSoftwareType)}, +
    {use ,$(TD_NoTitle),$(!REG_VT_SZ),$(TD_NetRuleSoftwareUse)}, +
    {bindform,$(TD_NoTitle),$(!REG_VT_SZ),$(TD_NetRuleSoftwareBindForm)}, +
    {InfOption,$(TD_NoTitle),$(!REG_VT_SZ),"TCAITDI"}}
    Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)

    Set NewValueList = {{NbProvider,$(TD_NoTitle),$(!REG_VT_SZ),"_nb"}}
    Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)

    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE" $(!REG_KEY_WRITE) SOFTWAREKEY
    OpenRegKey $(SOFTWAREKEY) "" "3Com" $(!REG_KEY_WRITE) COMKEY
    ifstr $(COMKEY) == ""
      CreateRegKey $(SOFTWAREKEY) {"3Com", 0, GenericClass} "" $(!REG_KEY_WRITE) "" COMKEY
    endif

    ;;; Add in hot plug support
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Compaq\Cpqrcmc\ClassDLLs\NicMiniPort" $(!REG_KEY_WRITE) MiniPortKey
    ifstr $(MiniPortKey) != ""
      CreateRegKey $(MiniPortKey) {"EL980N4", 0, GenericClass} "" $(!REG_KEY_WRITE) "" HotPlugServiceKey
      SetRegValue $(HotPlugServiceKey), {BaseOIDAddress, $(NoTitle),$(!REG_VT_DWORD), 4278322176} ;; 0xFF020400 in Hex
      SetRegValue $(HotPlugServiceKey), {SetOIDAddress, $(NoTitle),$(!REG_VT_DWORD), 4278321920}  ;; 0xFF020300 in Hex 
    endif
    CloseRegKey $(MiniPortKey)
    CloseRegKey $(HotPlugServiceKey)

    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\HotSrv\SupportedDevices" $(!REG_KEY_WRITE) SupportedDevicesKey
    ifstr $(SupportedDevicesKey) != ""
      CreateRegKey $(SupportedDevicesKey) {"10B7-9800-10B7-1000", 0, GenericClass} "" $(!REG_KEY_WRITE) "" 9800HotPlugKey
      CreateRegKey $(SupportedDevicesKey) {"10B7-9805-10B7-1000", 0, GenericClass} "" $(!REG_KEY_WRITE) "" 9805HotPlugKey
      SetRegValue $(9800HotPlugKey) {"FriendlyName", 0, $(!REG_VT_SZ), "3Com EtherLink Server 10/100 PCI NIC"}
      SetRegValue $(9800HotPlugKey) {"DriverService", 0, $(!REG_VT_SZ), "EL980N4"}
      SetRegValue $(9805HotPlugKey) {"FriendlyName", 0, $(!REG_VT_SZ), "3Com EtherLink Server 10/100 PCI NIC"}
      SetRegValue $(9805HotPlugKey) {"DriverService", 0, $(!REG_VT_SZ), "EL980N4"}
    endif
    CloseRegKey $(SupportedDevicesKey)
    CloseRegKey $(9800HotPlugKey)
    CloseRegKey $(9805HotPlugKey)
	 
    OpenRegKey $(COMKEY) "" "TCAUDIAG" $(!REG_KEY_WRITE) KeyAutoEcho
    ifstr $(KeyAutoEcho) == ""
      CreateRegKey $(COMKEY) {"TCAUDIAG", 0, GenericClass} "" $(!REG_KEY_WRITE) "" KeyAutoEcho
    endif
    Set NewValueList = {{AutoEcho,$(TD_NoTitle),$(!REG_VT_SZ),"YES"}}
    Shell $(UtilityInf), AddValueList, $(KeyAutoEcho), $(NewValueList)

    CloseRegKey $(KeyAutoEcho)
    CloseRegKey $(COMKEY)
    CloseRegKey $(SOFTWAREKEY)

    ;; Finish adding in the entries to the registry for Touchdown (under the 3Com key)
    Shell "", DiagRegistry 

    ;;; Add in entries to support the DA/Touchdown integration
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAUDIAG" $(!REG_KEY_ALL_ACCESS) DiagKey
    Ifstr(i) $(DiagKey) != "" ; key exists
      CreateRegKey $(DiagKey) {"RealNICs", 0, GenericClass} "" $(!REG_KEY_WRITE) "" RealNICsKey
      Ifstr(i) $(RealNICsKey) != "" ; key exists

        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
        Ifstr(i) $(ServicesKey) != "" ; key exists
          EnumRegKey $(ServicesKey) DriverList
          ForListDo $(DriverList)
            ;;; Check whether any python driver instances are present still
            ;;; If not, remove Touchdown and delete some leftover files
            set foundPythonInstance = FALSE
            set Driver = *($($), 1)
            Split-String "$(Driver)" "N" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El980n4"
              ifstr(i) $(DriverName) == "El980"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            ifstr(i) $(Driver) != "El98xn4"
              ifstr(i) $(DriverName) == "El98x"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            Ifstr(i) $(foundPythonInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

            set found3ComClientInstance = FALSE
            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90x"
              ifstr(i) $(DriverName) == "El90"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Split-String "$(Driver)" "d" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90xnd"
              ifstr(i) $(DriverName) == "El90xn"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "EL99X"
              ifstr(i) $(DriverName) == "El99"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Ifstr(i) $(found3ComClientInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

          EndForListDo

          CloseRegKey $(ServicesKey)
        Endif
      Endif
    Endif

    CloseRegKey $(DiagKey)
    CloseRegKey $(RealNICsKey)

    ;; Delete the old tray manager
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" + 	 
      $(!REG_KEY_ALL_ACCESS) KeyNt
    DeleteRegValue $(KeyNt) "COMSMDEXE" 
    CloseRegKey $(KeyNt) 	 

    ;; Update the Start Menu with the correct names and links
    RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-setup" 

    ;; Update the Add\Remove Programs dialog box for the new diagnostics program
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" + 
      $(!REG_KEY_ALL_ACCESS) KeyNt 
    ifstr $(KeyNt) == "" 
      CreateRegKey $(!REG_H_LOCAL) {"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",+ 
        0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyNt 
    endif 

    OpenRegKey $(KeyNt) "" "3ComNicUnInstall" $(!REG_KEY_ALL_ACCESS) KeyNt2 
    ifstr $(KeyNt2) == "" 
      CreateRegKey $(KeyNt) {"3ComNicUnInstall" , 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) +
        "" KeyNt2 
    endif 

    set NewValueList = {{DisplayName, $(NoTitle), $(!REG_VT_SZ), "3Com NIC Diagnostics"},+ 
      {UninstallString, $(NoTitle), $(!REG_VT_SZ), "UN3C90XA.EXE -DIAG"}} 

    Shell $(UtilityInf), AddValueList, $(KeyNt2), $(NewValueList) 
    ifint $($ShellCode) != $(!SHELL_CODE_OK) 
      goto ShellCodeError 
    endif 

    CloseRegKey $(KeyNt) 
    CloseRegKey $(KeyNt2) 

    ;; Fix a bug that causes the InfName field for the Touchdown TCAITDI service to be filled in wrong
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAITDI\currentVersion\NetRules" +
      $(!REG_KEY_ALL_ACCESS) INFNameKey
    ifstr $(INFNameKey) != ""
      SetRegValue $(INFNameKey) {"InfName", 0, $(!REG_VT_SZ), "TCAI4TDI.INF"}
    endif

    CloseRegKey $(INFNameKey)

    ;;; Kick off the installation of DAServer1.7.2
    StartDetachedProcess STATUS_SUCCESSFUL "" "" $(!STF_WINDOWSSYSPATH)"\..\..\"daserver.exe

;    ;;; Kick off a bindings review
;   StartDetachedProcess STATUS_SUCCESSFUL "" "" $(!STF_WINDOWSSYSPATH)"\bind.exe z"

    read-syms PromptForReboot1DlgENG
    ui start PromptForReboot1DlgENG

    Return STATUS_SUCCESSFUL
  else-ifstr(i) $(oldDriverFound) == "PRE12"
    read-syms PromptForUpdateDlgENG
    ui start "PromptForUpdateDlgENG"
    ifstr(i) $(DLGEVENT) != "YES"
      Shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) "STATUS" +
        "You have chosen to Cancel the upgrade."$(!LF)"No changes have been made."
      set CommonStatus = STATUS_USERCANCEL
      ifstr(i) $(OEM_ABANDON_ON) == TRUE
        set OEM_ABANDON_ON = FALSE
        goto abandon
      endif
      goto end
    Endif
  else-ifstr(i) $(oldDriverFound) == "NO"
    goto continue_install
  Endif

  ;;; UPGRADE SCENARIO - REMOVE ALL HW COMPONENTS
  ifstr(i) $(oldDriverFound) == "PRE12"
    ; Remove any entries in the registry that have just been added
    ; but are no longer valid.
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com" $(!REG_KEY_ALL_ACCESS) KeyNt
    Ifstr(i) $(KeyNt) != "" ; key exists
      EnumRegKey $(KeyNt) DriverList
      ForListDo $(DriverList)
        ; For each Python driver in the list, delete it from the registry
        set Driver = *($($), 1)
        Split-String "$(Driver)" "0" DriverTokens
        set DriverName = *($(DriverTokens), 1)
        ifstr(i) $(DriverName) == "el98"
          ; We have found a Python-related key
          set FullDriverName = *($($), 1)
          DeleteRegTree $(KeyNt) $(FullDriverName)
        Endif
      EndForListDo
    Endif
    CloseRegKey $(KeyNt)

    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
    Ifstr(i) $(ServicesKey) != "" ; key exists
      EnumRegKey $(ServicesKey) DriverList
      ForListDo $(DriverList)
        ; For each Python driver in the list, delete it from the registry
        set Driver = *($($), 1)
        Split-String "$(Driver)" "0" DriverTokens
        set DriverName = *($(DriverTokens), 1)
        Ifstr(i) $(DriverName) == "el98"
          ; We have found a Python-related key
          set FullDriverName = *($($), 1)

          OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\"$(Driver)"\Parameters" +
            $(!REG_KEY_ALL_ACCESS) DriverKey
          Ifstr(i) $(DriverKey) != "" ; key exists
            set AdapterSequenceList = {"","","",""}
            ;;; Check for the presence of the SerrFix Value
            GetRegValue $(DriverKey) "AdapterSeq" AdapterSequenceList
            set CardIndex = *($(AdapterSequenceList), 4)
           Endif
          CloseRegKey $(DriverKey)

          ifstr(i) $(FullDriverName) != "el980n4"
            set $(!NTN_RegBase) = $(FullDriverName)
            Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
              $(ProductSoftwareName), "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(CardIndex)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
              goto ShellCodeError
            endif
            set RegistryErrorIndex = $($R0)
            Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
              goto fatalregistry
            endif

            Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
              $(ProductSoftwareName)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
              goto ShellCodeError
            endif
            set RegistryErrorIndex = $($R0)
            Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
              goto fatalregistry
            endif
 
            ifstr(i) $(!STF_PLATFORM) == $(INF_PROCESSER) 
              ifstr(i) $(oldDriverFound) == "PRE12"
                RunProgram ExitCode "Windows Directory" "" UN3C90X.EXE "-inf" 
              else-Ifstr(i) $(oldDriverFound) == "PYTHON12"
                RunProgram ExitCode "Windows Directory" "" UN3C90X.EXE "-inf" 
              else
                RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-inf" 
              endif
            endif
          Endif
        Endif
      EndForListDo
    Endif
    CloseRegKey $(ServicesKey)
  Endif

  AddFileToDeleteList "%SystemRoot%\System32\srv_conf.exe"
  AddFileToDeleteList "%SystemRoot%\System32\srv_conf.hlp"
  AddFileToDeleteList "%SystemRoot%\System32\980instl.exe"
  AddFileToDeleteList "%SystemRoot%\System32\980instl.hlp"
  AddFileToDeleteList "%SystemRoot%\System32\drivers\EL98xn4.SYS"
  AddFileToDeleteList "%SystemRoot%\System32\drivers\EL980n4.SYS"
  AddFileToDeleteList "%SystemRoot%\System32\drivers\EL980n4x.SYS"
  AddFileToDeleteList "%SystemRoot%\System32\daserver.exe"
  AddFileToDeleteList "%SystemRoot%\System32\..\daserver.exe"
  AddFileToDeleteList "%SystemRoot%\System32\..\..\daserver.exe"
  AddFileToDeleteList "%SystemRoot%\System32\daserver.cpl"
  AddFileToDeleteList "%SystemRoot%\System32\3nicdiag.exe"
  AddFileToDeleteList "%SystemRoot%\System32\3nicdiag.hlp"
  AddFileToDeleteList "%SystemRoot%\System32\3varaddr.txt"
  AddFileToDeleteList "%SystemRoot%\System32\pcomdrv.sys"
  AddFileToDeleteList "%SystemRoot%\System32\3c90xcfg.dll"
  AddFileToDeleteList "%SystemRoot%\System32\980instl.exe"
  AddFileToDeleteList "%SystemRoot%\System32\980instl.hlp"
  AddFileToDeleteList "%SystemRoot%\System32\etherbox.dll"
  AddFileToDeleteList "%SystemRoot%\System32\comsmd.exe"
  AddFileToDeleteList "%SystemRoot%\System32\undrmon.exe"
  AddFileToDeleteList "%SystemRoot%\System32\drmonnt.inf"
  AddFileToDeleteList "%SystemRoot%\System32\pacecfg.cpl"
  AddFileToDeleteList "%SystemRoot%\System32\pacecfg.hlp"
  AddFileToDeleteList "%SystemRoot%\System32\un3c90x.exe"
  AddFileToDeleteList "%SystemRoot%\System32\drivers\el980n4.sys"

  OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion" +
    $(!REG_KEY_ALL_ACCESS) CurrentVersionKey

  OpenRegKey $(CurrentVersionKey) "" "RunOnce" $(!REG_KEY_ALL_ACCESS) RunOnceKey

  ifstr(i) $(RunOnceKey) != ""
    DeleteRegValue $(RunOnceKey) DASERVER
  endif

  CloseRegKey $(RunOnceKey)
  CloseRegKey $(CurrentVersionKey)

  ;;; Check for an entry to delete comsmd.exe from the registry
  ;;; If it is there, undelete it because deleting it may cause problems
  ;;; if the OS attempts to execute it after rebooting the machine

  OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Control\Session Manager" +
    $(!REG_KEY_ALL_ACCESS) DeleteKey

  ifstr(i) $(DeleteKey) != ""
    EnumRegValue $(DeleteKey) DeleteEntries
    ;;; DO NOTHING FOR NOW - UNFINISHED !

  endif

  ;; The Root entry for the El980n4 series NICs in the Services database is 
  ;; not being removed when it should. Remove it manually.
  OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" +
    $(!REG_KEY_ALL_ACCESS) ServicesDeleteKey  
  DeleteRegTree $(ServicesDeleteKey) "El980n4"
  CloseRegKey $(ServicesDeleteKey)

  Shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) "STATUS" +
    "The network applet display will be refreshed after you close it."
  set CommonStatus = STATUS_SUCCESSFUL
  Return $(CommonStatus)
Endif

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; Continue installing an updated version of the Python driver
continue_install = +

Ifstr(i) $(!NTN_InstallMode) == deinstall
 set StartLabel = removeadapter
 else-Ifstr(i) $(!NTN_InstallMode) == Update
 set StartLabel = UpgradeSoftware
 else-Ifstr(i) $(!NTN_InstallMode) == bind
 set StartLabel = bindingadapter
 else-Ifstr(i) $(!NTN_InstallMode) == configure
 ifstr $(!STF_PLATFORM) == $(INF_PROCESSER) 
  ifstr(i) $(Install_On_Server) == "YES"
   RunProgram ExitCode "Windows Directory" "" srv_conf.exe 
 
   ; Determine whether the program has modified any SHD parameters
   ; If so, then prompt for a reboot. Also prompt for a reboot on
   ; an install or upgrade.
 
   OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com" $(!REG_KEY_ALL_ACCESS) KeyNt
   Ifstr(i) $(KeyNt) != ""
    GetRegValue $(KeyNt) "PromptForReboot" RebootRequiredList
    set RebootRequired = *($(RebootRequiredList), 4)

    Ifstr(i) $(RebootRequired) == "YES"
     ; Reset the reboot status to NO
     SetRegValue $(KeyNt), {PromptForReboot, $(NoTitle),$(!REG_VT_SZ),"NO"}
     set CommonStatus = STATUS_SUCCESSFUL
    else
     set CommonStatus = STATUS_USERCANCEL
    Endif
  Endif

  CloseRegKey $(KeyNt)
 else
  set CommonStatus = STATUS_USERCANCEL
 endif
 goto end
 else-Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
 Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set Error = $($R0)
 set from = end
 set to = end
 goto nonfatalinfo
 else
 set StartLabel = configureadapter
 endif
 else
 set StartLabel = installadapter
 set OEM_ABANDON_OPTIONS = {}
 set OEM_ABANDON_SOFTWARE = FALSE
 set OEM_ABANDON_ON = TRUE
 endif

 Debug-Output "$(InfFile) : =================================================="
 Debug-Output "$(InfFile) : STF_CWDIR is: "$(!STF_CWDIR)
 Debug-Output "$(InfFile) : STF_SRCDIR is: "$(!STF_SRCDIR)
 Debug-Output "$(InfFile) : STF_LANGUAGE is: "$(!STF_LANGUAGE)
 Debug-Output "$(InfFile) : Option is: "$(Option)
 Debug-Output "$(InfFile) : !STF_NCN_InstallMode is:"$(!NTN_InstallMode)
 Debug-Output "$(InfFile) : !STF_NCDETECT is: "$(!STF_NCDETECT)
 Debug-Output "$(InfFile) : !STF_NCOPTION is: "$(!STF_NCOPTION)
 Debug-Output "$(InfFile) : !STF_NCDETCARD is: "$(!STF_NCDETCARD)
 Debug-Output "$(InfFile) : !STF_NCDETINFO is: "$(!STF_NCDETINFO)
 Debug-Output "$(InfFile) : !STF_GUI_UNATTENDED is: "$(!STF_GUI_UNATTENDED)
 Debug-Output "$(InfFile) : !STF_BusType is $(!STF_BUSTYPE)" 
Debug-Output "$(InfFile) : !STF_BusTypeList is $(!STF_BUSTYPELIST)" 
Debug-Output "$(InfFile) : =================================================="

 set from = $(fatal)
 set to = $(fatal)
 goto $(StartLabel)

installadapter = +
 
Debug-Output "$(InfFile) : Installadapter" 
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_READ) KeyProduct
 Ifstr $(KeyProduct) != $(KeyNull)
 CloseRegKey $(KeyProduct)
 ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 Debug-Output "ShellCode error: cannot get an error string."
 goto ShellCodeError
 endif
 goto end
 else
 set OldVersionExisted = $(TRUE)
 endif
 Endif
 Goto adapteroptions 

configureadapter = +
 Debug-Output "$(InfFile) : Configureadapter"
 set Error = "Cannot configure the software component"
 goto fatal

adapteroptions = +
 Debug-Output "$(InfFile) : Adapteroptions"
 set from = adapteroptions
 ifstr(i) $(!NTN_InstallMode) == configure
 goto updateparameters
 endif

installproduct =+
 Debug-Output "$(InfFile) : installproduct"
 StartWait 
set AdapterList = $($R1)
 
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_READ) KeyNt
 CloseRegKey $(KeyNt)

 Ifstr(i) $(KeyNt) == ""
 Debug-Output "$(InfFile) : AddSoftwareComponent"
 Debug-Output "$(InfFile) : --> $(Manufacturer)"
 Debug-Output "$(InfFile) : --> $(ProductSoftwareName)"
 Debug-Output "$(InfFile) : --> $(ProductSoftwareTitle)"
 Debug-Output "$(InfFile) : --> $(STF_CONTEXTINFNAME)"
 Debug-Output "$(InfFile) : --> $(ProductSoftwareImagePath)"
 Debug-Output "$(InfFile) : --> $(NetEventDLL)"

 Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
   $(ProductSoftwareName), +
   $(ProductSoftwareName), +
   $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
   $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
   $(NetEventDLL)

Set OEM_ABANDON_SOFTWARE = TRUE
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif

 set RegistryErrorIndex = $($R0)
 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
 EndWait

CloseRegKey $($R1)
CloseRegKey $($R2)
CloseRegKey $($R3)
CloseRegKey $($R4)
CloseRegKey $($R5)
goto fatalregistry
 endif
 Set SoftProductKey = $($R1)
 Set SoftNetRuleKey = $($R2)
 Set SoftServiceKey = $($R3)
 Set SoftParameterKey = $($R4)
 Set SoftLinkageKey = $($R5)
 set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
 {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
 {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
 {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
 {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
 {Review,$(NoTitle),$(!REG_VT_DWORD),$(ProductReview)},+
 {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
 {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+
 {EDVersion,$(NoTitle),$(!REG_VT_SZ),$(EtherDiskVersion)}}

 Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)

 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set RegistryErrorIndex = $($R0)
 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
 EndWait
 CloseRegKey $(SoftProductKey)
 CloseRegKey $(SoftNetRuleKey)
 CloseRegKey $(SoftServiceKey)
 CloseRegKey $(SoftParameterKey)
 CloseRegKey $(SoftLinkageKey)
 goto fatalregistry
 endif

 set WakeOnLan = YES
 set WakeOnLink = NO 
 set ValueEnable = ENABLE 

 Set NewValueList = {{WakeOnMagic,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLan)},+
		     {WakeOnLink,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLink)},+
		     {RWUMagic,$(NoTitle),$(!REG_VT_SZ),$(ValueEnable)},+
		     {FLOWCONTROL,$(NoTitle),$(!REG_VT_SZ),$(ValueEnable)}}

 Shell $(UtilityInf), AddValueList, $(SoftParameterKey), $(NewValueList)
 CreateRegKey $(SoftParameterKey) {"3CDefault" , 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) +
   "" KeyNt2 

 Set ThisValueList = {RWUMagic,$(NoTitle),$(!REG_VT_SZ),$(ValueEnable)}

 OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\EL980N4" $(!REG_KEY_ALL_ACCESS) NDKeyNt 
 ifstr $(KeyNt2) != ""	
   SetRegValue $(KeyNt2 ) $(ThisValueList) 
   CloseRegKey $(KeyNt2 )
 endif

 CloseRegKey $(NDKeyNt)

 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
 Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set RegistryErrorIndex = $($R0)
 CloseRegKey $(SoftProductKey)
 CloseRegKey $(SoftNetRuleKey)
 CloseRegKey $(SoftServiceKey)
 CloseRegKey $(SoftParameterKey)
 CloseRegKey $(SoftLinkageKey)

 

set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
 Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 

Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
 EndWait
 goto fatalregistry
 endif
 endif 

Debug-Output "$(InfFile) : About to look for 3Com PCI Cards"

set TargetVersion = *($(CurrentVersionValue),4)
 Debug-Output "$(InfFile) : Current Version:"$(TargetVersion)

 ifstr $(TargetVersion) == $(NT350VersionConstant) 
Debug-Output "Running on WindowsNT 3.50"
 set Version350 = $(TRUE)
 else
 Debug-Output "Running on WindowsNT 3.51 or higher"
 set Version350 = $(FALSE)
 endif

 ifint $(Version350) == $(TRUE)
 Debug-Output "Running on WindowsNT v3.50, Not using PCI Detection!!!"
 ifstr $(!STF_GUI_UNATTENDED) == "YES"
 Debug-Output "$(InfFile) : Running in GUI unattended mode"
 ifstr(i) $(!AutoNetInterfaceType) != ""
 set BusInterfaceType = $(!AutoNetInterfaceType)
 else
 set BusInterfaceType = 5
 endif
 ifstr(i) $(!AutoNetBusNumber) != ""
 set BusNumber = $(!AutoNetBusNumber)
 else
 set BusNumber = 0
 endif
 set NTDetected = $(FALSE)
 set AdapterList = {{$(Option),0, XXXXX}} 
Debug-Output "$(InfFile) : BusInterfaceType = $(BusInterfaceType)"
 Debug-Output "$(InfFile) : BusNumber = $(BusNumber)"
 else 
Debug-Output "$(InfFile) : Running 3.50 Bus Dialog"
 set BusInterfaceType = 5
 set BusNumber = 0
 set NTDetected = $(FALSE)
 Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwareXXXXXDescription) $(BusInterfaceType) $(BusNumber)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 Debug-Output "ShellCode error."
 goto ShellCodeError
 endif
 set BusInterfaceType = $($R1)
 set BusNumber = $($R2)
 set AdapterList = {{$(Option),0, XXXXX}} 
Debug-Output "$(InfFile) : BusInterfaceType = $(BusInterfaceType)"
 Debug-Output "$(InfFile) : BusNumber = $(BusNumber)"
 endif 
else
 Debug-Output "$(InfFile) : Running 3.51 or higher using PCI Dectection"
 

set NTDetected = $(TRUE)
 set Vendor = 4279 
set CFIDList = $(CFIDList)
 Debug-Output "$(InfFile) : VendorID = $(Vendor)"
 Debug-Output "$(InfFile) : CFIDList = $(CFIDList)"
 set AdapterList = {}
 ForListDo $(CFIDList)
 set-div CFID = $($) 1
 set DeviceID = $($)
 Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CFID)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif

 ForListDo $($R0)
 set AdapterList = >($(AdapterList), {*($($),1), *($($),2), $(DeviceID)})
 EndForListDo
 EndForListDo
 ifstr(i) $(AdapterList) == {}
 set Error = $(CANNOT_FIND_ANY_CARD)

 ;;; Fix a bug that puts two additional entries in the registry that should not be
 ;;; there if no driver instances exist. If this is the case, delete these two entries
  set foundPythonInstance = FALSE
  OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
  Ifstr(i) $(ServicesKey) != "" ; key exists
    EnumRegKey $(ServicesKey) DriverList
    ForListDo $(DriverList)
      ;;; Check whether any python driver instances are present still
      ;;; If not, remove Touchdown and delete some leftover files
      set Driver = *($($), 1)
      Split-String "$(Driver)" "N" DriverTokens
      set DriverName = *($(DriverTokens), 1)
      ifstr(i) $(Driver) != "El980n4"
        ifstr(i) $(DriverName) == "El980"
          ;;; We have found a Python-related key
          set foundPythonInstance = TRUE
        endif
      endif
      ifstr(i) $(Driver) != "El98xn4"
        ifstr(i) $(DriverName) == "El98x"
          ;;; We have found a Python-related key
          set foundPythonInstance = TRUE
        endif
      endif
    EndForListDo

    Ifstr(i) $(foundPythonInstance) == "FALSE"
      ;; Delete all possible entries under SW\3Com
      OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com" $(!REG_KEY_ALL_ACCESS) 3ComKey
      Ifstr(i) $(3ComKey) != "" ; key exists
        DeleteRegTree $(3ComKey) "el980n4"
        DeleteRegTree $(3ComKey) "EL980N4"

	;;; If only server references remain in the real NICs key then, we can
        ;;; safely delete the Touchdown-related keys. Otherwise, we must leave Touchdown
        ;;; intact in case a 3Com client NIC is installed and still requires Touchdown

        set foundNonPythonInstance = FALSE

	OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAUDIAG\RealNICs" $(!REG_KEY_ALL_ACCESS) +                               RealNICsKey
        Ifstr(i) $(RealNICsKey) != "" ; key exists
          EnumRegKey $(RealNICsKey) RealDriverList
          ForListDo $(RealDriverList)
            ;;; Check whether any python driver instances are present still
            ;;; If not, remove Touchdown and delete some leftover files
            set RealDriver = *($($), 1)
            Split-String "$(RealDriver)" "N" RealDriverTokens
            set RealDriverName = *($(RealDriverTokens), 1)
            ifstr(i) $(RealDriverName) != "El980"
              ifstr(i) $(RealDriverName) != "El98x"
                ;;; We have found a non-Python key
                set foundNonPythonInstance = TRUE
              endif
            endif
          EndForListDo

          Ifstr(i) $(foundNonPythonInstance) == "FALSE"
            DeleteRegTree $(3ComKey) "TCAITDI"
            DeleteRegTree $(3ComKey) "TCAUDIAG"
          endif

        CloseRegKey $(RealNICsKey)

        ;;; remove hot plug support for 3Com NICs
        OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Compaq\Cpqrcmc\ClassDLLs\NicMiniPort" $(!REG_KEY_WRITE) MiniPortKey
        ifstr $(MiniPortKey) != ""
          DeleteRegTree $(MiniPortKey) "EL980N4"
        endif
        CloseRegKey $(MiniPortKey)

        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\HotSrv\SupportedDevices" $(!REG_KEY_WRITE) SupportedDevicesKey
        ifstr $(SupportedDevicesKey) != ""
          DeleteRegTree $(SupportedDevicesKey) "10B7-9800-10B7-1000"
          DeleteRegTree $(SupportedDevicesKey) "10B7-9805-10B7-1000"
        endif
        CloseRegKey $(SupportedDevicesKey)

        EnumRegKey $(3ComKey) 3ComList
        ForListDo $(3ComList)
          set 3ComName = *($($), 1)
          Ifstr(i) $(3ComName) != "" ; key exists
            goto endOf3ComSearch
          endif
        EndForListDo
      Endif

      OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE" $(!REG_KEY_ALL_ACCESS) SWKey
      Ifstr(i) $(SWKey) != "" ; key exists
        DeleteRegTree $(SWKey) "3Com"
      Endif
      CloseRegKey $(SWKey)

endOf3ComSearch = +

     ;; Delete any left-over entries under Services for the drivers
     DeleteRegTree $(ServicesKey) "EL980N4"
     DeleteRegTree $(ServicesKey) "EL98XN4"

     CloseRegKey $(ServicesKey)
     CloseRegKey $(3ComKey)
   Endif
 Endif

 set CommonStatus = USER_CANCEL
 set from = end
 goto nonfatal
 endif
 endif 

 set AdapterSeq = 0
 set CardNum    = 1

set ToInstallList = {}
 Debug-Output "$(InfFile) : Adapterlist = $(AdapterList)"

 ForListDo $(AdapterList)
 ifint $(NTDetected) == $(TRUE)
 set DetectedBusNum = *($($),1)
 set DetectedSlotNum = *($($),2)
 set DeviceID = *($($),3)
 Debug-Output "$(InfFile) : DetectedBusNumber = $(DetectedBusNum)"
 Debug-Output "$(InfFile) : DetectedSlotNum = $(DetectedSlotNum)"

 Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
 $(DetectedSlotNum), $(ProductHardware$(DeviceID)Description), $(ProductHardwareName), YES

 set ReturnStatus = $($R0)
 set ReturnCode   = $($R1)

ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
ifstr $(ReturnStatus) != "NO_ERROR"
 set Error = $(ReturnStatus)
 goto fatal
endif

ifstr(i) $(Install_On_Server) == "YES"
 ifstr(i) $(ReturnCode) != "YES"
  set ToInstallList = >($(ToInstallList), $($))
 endif
else
 ifstr(i) $(ToInstallList) == {}
  ifstr(i) $(ReturnCode) != "YES"
   set ToInstallList = >($(ToInstallList), $($))
  endif 
 endif 
endif
endif
EndForListDo
 
ifstr(i) $(ToInstallList) == {}
 set Error = $(CANNOT_FIND_ANY_UNINSTALLED_CARD)
 set CommonStatus = USER_CANCEL
 set from = end
 goto nonfatal
 endif

 ForListDo $(ToInstallList)
 set-add AdapterSeq = $(AdapterSeq) , 1
 set DetectedBusNum = *($($),1)
 set DetectedSlotNum = *($($),2)
 set DeviceID = *($($),3)

 Debug-Output "$(InfFile) : DetectedBusNumber = $(DetectedBusNum)"
 Debug-Output "$(InfFile) : DetectedSlotNum = $(DetectedSlotNum)"
 Debug-Output "$(InfFile) : Installing Card at $(DetectedBusNum):$(DetectedSlotNum)!"

 Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
 ifint $($R4) != -1
 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
 endif
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set RegistryErrorIndex = $($R0)
 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
 EndWait
 CloseRegKey $($R1)
 CloseRegKey $($R2)
 CloseRegKey $($R3)
 goto fatalregistry
 endif

 Set HardNetCardKey = $($R1)
 Set HardNetRuleKey = $($R2)
 Set HardParameterKey = $($R3)
 set AdapterNumber = $($R4)
 set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
 {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(DeviceID)Title)},+
 {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(DeviceID)Description)},+
 {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
 {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
 {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+
 {EDVersion,$(NoTitle),$(!REG_VT_SZ),$(EtherDiskVersion)}}
 Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 
set BusTypeNum = 5 
ifstr(i) $(DeviceID) == "36944"		; 9050 device ID
 set CardType = 0
 else-ifstr(i) $(DeviceID) == "36945"	; 9051 device ID
 set CardType = 0
 else-ifstr(i) $(DeviceID) == "36949"	; 9055 device ID
 set CardType = 0
 else-ifstr(i) $(DeviceID) == "38912"	; 9800 device ID
 set CardType = 0
 else-ifstr(i) $(DeviceID) == "38917"	; 9805 device ID
 set CardType = 0
 else
 set CardType = 2
 endif 

ifint $(NTDetected) == $(TRUE)
 set BusNumber = $(DetectedBusNum)
 set SlotNum = $(DetectedSlotNum) 
set BusInterfaceType = $(BusTypeNum)
 set WakeOnLan = YES
 set WakeOnLink = NO 
set FlowControl = YES 

Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
 
Set NewValueList = {+
 {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
 {Slot,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
 {WakeOnMagic,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLan)},+
 {WakeOnLink,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLink)},+
 {RWUMagic,$(NoTitle),$(!REG_VT_SZ),"ENABLE"},+
 {FlowControl,$(NoTitle),$(!REG_VT_SZ),$(FlowControl)},+
 }
 Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
 Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif

ifstr(i) $(Install_On_Server) == "YES"
 Set NewValueList = {+
  {ADAPTERNUMBER,$(NoTitle),$(!REG_VT_DWORD),$(AdapterNumber)},+
  {shdinformmsgs,$(NoTitle),$(!REG_VT_DWORD),0},+
  {shdwarnmsgs,$(NoTitle),$(!REG_VT_DWORD),0},+
  {shderrormsgs,$(NoTitle),$(!REG_VT_DWORD),1},+
  {AdapterSeq,$(NoTitle),$(!REG_VT_DWORD),$(AdapterSeq)},+
  {SelfCheckLevel,$(NoTitle),$(!REG_VT_SZ),"Basic"},+
  {SamplingWindow,$(NoTitle),$(!REG_VT_DWORD),1024},+
  {SamplingRatio,$(NoTitle),$(!REG_VT_DWORD),50},+
  {ErrorTolerance,$(NoTitle),$(!REG_VT_SZ),"Medium"},+
  {Base_Mac_Address,$(NoTitle),$(!REG_VT_SZ),""},+
  {Network_Address,$(NoTitle),$(!REG_VT_SZ),""},+
 }

 Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
 Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  goto ShellCodeError
 endif
endif

 Set NewValueList = { {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)} }
 Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
 Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 else
 Set NewValueList = {+
 {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
 }
 Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
 Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 endif

 Set NewValueList = {+
 {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
 {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
 {VersionNo,$(NoTitle),$(!REG_VT_DWORD),20},+
 {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
 }

 Debug-Output "$(InfFile) : Set HardwareParameterKey = $(NewValueList)"
 Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif

 
ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
 Shell $(UtilityInf), AddDefaultNetcardParameters, $(HardParameterKey)
 endif
 

set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
 set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
 {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
 
Debug-Output "$(InfFile) : HardwareRuleKey = $(NewValueList)"
 Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeEror
 endif
 CloseRegKey $(HardNetCardKey)
 CloseRegKey $(HardNetRuleKey)
 CloseRegKey $(HardParameterKey)
 EndForListDo

 


OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyService
 Ifstr $(KeyService) != ""
SetRegValue $(KeyService) {ImagePath,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareUpgradePath)}
 else 
goto fatalregistry 
endif 
CloseRegKey $(KeyService)
 


OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EventLog\System\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyEventLog
 Ifstr $(KeyEventLog) != ""
SetRegValue $(KeyEventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_SZ),$(NetEventDLL)} 
else 
goto fatalregistry 
endif 
CloseRegKey $(KeyEventLog) 










install "Install-Uninstaller" 



OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\"$(ProductSoftwareName) $(!REG_KEY_ALL_ACCESS) + 
KeyNt 

set TrayIconList = {TCAUDIAG,$(NoTitle),$(!REG_VT_SZ),$(DIAGCARDTYPE)} 
SetRegValue $(KeyNt) $(TrayIconList) 
CloseRegKey $(KeyNt) 




ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant) 
ifstr $(Install_3NIC_Diag) == "YES"

RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-upgrade" 

OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" + 
$(!REG_KEY_ALL_ACCESS) KeyNt 
ifstr $(KeyNt) == "" 
CreateRegKey $(!REG_H_LOCAL) {"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", + 
0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyNt 
endif 

OpenRegKey $(KeyNt) "" "3ComNicUnInstall" $(!REG_KEY_ALL_ACCESS) KeyNt2 
ifstr $(KeyNt2) == "" 
CreateRegKey $(KeyNt) {"3ComNicUnInstall" , 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) +
 "" KeyNt2 
endif 

set NewValueList = {{DisplayName, $(NoTitle), $(!REG_VT_SZ), "3Com NIC Diagnostics"}, + 
{UninstallString, $(NoTitle), $(!REG_VT_SZ), "UN3C90XA.EXE -DIAG"}} 

Shell $(UtilityInf), AddValueList, $(KeyNt2), $(NewValueList) 
ifint $($ShellCode) != $(!SHELL_CODE_OK) 
goto ShellCodeError 
endif 

CloseRegKey $(KeyNt) 
CloseRegKey $(KeyNt2) 

endif 
endif 





ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant) 
	 



OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" + 	 
$(!REG_KEY_ALL_ACCESS) KeyNt 	 
	 
set TrayIconList = {TCASUTIEXE,$(NoTitle),$(!REG_VT_SZ),$(TrayIconExe)" -off"}
DeleteRegValue $(KeyNt) "COMSMDEXE" 
SetRegValue $(KeyNt) $(TrayIconList) 	 
CloseRegKey $(KeyNt) 	 
		 
	 ifstr $(Install_3NIC_Diag) == "YES" 
	 Debug-Output "$(InfFile) : (Install_3NIC_Diag) == "YES"" 
	 
	 Shell "", DiagRegistry 
	 
install "Install-3nicdiag" 
	 
	 ifstr $(Install_Installer) == "YES" 
	  ifstr(i) $(!STF_GUI_UNATTENDED) != "YES" 
           ifstr(i) $(Install_On_Server) != "YES"
	    ForListDo $(ToInstallList) 
	     set BusNum = *($($),1) 
	     set SlotNum = *($($),2) 
	     RunProgram ExitCode "Windows Directory" "" $(InstallerExe).EXE + 
	     "cardtype=TCAUM90X" "bus="$(BusNum) "slot="$(SlotNum) 
	    EndForListDo 
	   else
 	    set InstallEntry = *($(ToInstallList), 1)
            set BusNum = *($(InstallEntry),1) 
 	    set SlotNum = *($(InstallEntry),2)
 
 	    RunProgram ExitCode "Windows Directory" "" $(InstallerExe).EXE + 
 	     "cardtype=TCAUM90X" "bus="$(BusNum) "slot="$(SlotNum) 
           endif 
 	  endif 
 	 endif 
 	 
 	 ifstr $(Install_On_Server) == "YES" 
 	  Debug-Output "$(InfFile) : (Install_On_Server) == "YES"" 
  	  install "Install-SHD"
	  install "Install-SERRFix"
 	 endif 
	 	 
set SRCDIR_OVERRIDE_Save = $(!STF_SRCDIR_OVERRIDE) 
set !STF_SRCDIR_OVERRIDE = $(SrcDir) 
Shell $(!STF_WINDOWSSYSPATH)\TCAI4TDI.INF, InstallOption, $(CurrLang),+ 
  "TCAITDI" ,$(SrcDir), YES, YES, YES, NO 
set !STF_SRCDIR_OVERRIDE = $(SRCDIR_OVERRIDE_Save) 

ifstr(i) $(Install_Shortcuts) == "YES" 
Debug-Output "$(InfFile) : (Install_Shortcuts) == "YES"" 
 ifstr(i) $(Install_On_Server) == "YES"
  RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-setup_server"
 else
  RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-setup_client" 
 endif

    ;;; Add in entries to support the DA/Touchdown integration
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAUDIAG" $(!REG_KEY_ALL_ACCESS) DiagKey
    Ifstr(i) $(DiagKey) != "" ; key exists
      CreateRegKey $(DiagKey) {"RealNICs", 0, GenericClass} "" $(!REG_KEY_WRITE) "" RealNICsKey
      Ifstr(i) $(RealNICsKey) != "" ; key exists

        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
        Ifstr(i) $(ServicesKey) != "" ; key exists
          EnumRegKey $(ServicesKey) DriverList
          ForListDo $(DriverList)
            ;;; Check whether any python driver instances are present still
            ;;; If not, remove Touchdown and delete some leftover files
            set foundPythonInstance = FALSE
            set Driver = *($($), 1)
            Split-String "$(Driver)" "N" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El980n4"
              ifstr(i) $(DriverName) == "El980"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            ifstr(i) $(Driver) != "El98xn4"
              ifstr(i) $(DriverName) == "El98x"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            Ifstr(i) $(foundPythonInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

            set found3ComClientInstance = FALSE
            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90x"
              ifstr(i) $(DriverName) == "El90"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Split-String "$(Driver)" "d" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90xnd"
              ifstr(i) $(DriverName) == "El90xn"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "EL99X"
              ifstr(i) $(DriverName) == "El99"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Ifstr(i) $(found3ComClientInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

          EndForListDo

          CloseRegKey $(ServicesKey)
        Endif
      Endif
    Endif

    CloseRegKey $(DiagKey)
    CloseRegKey $(RealNICsKey)

Debug-Output "$(InfFile) : Enabling Tray Icon" 
OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" +
 $(!REG_KEY_ALL_ACCESS) KeyNt 

set TrayIconList = {TCASUTIEXE,$(NoTitle),$(!REG_VT_SZ),$(TrayIconExe)" -off"} 
SetRegValue $(KeyNt) $(TrayIconList)
DeleteRegValue $(KeyNt) "COMSMDEXE" 
CloseRegKey $(KeyNt) 
endif 

	 endif 

endif 

ifint $(OldVersionExisted) == $(FALSE)
 Ifstr(i) $(DoCopy) == "YES"
 Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 Goto ShellCodeError
 Else-Ifstr(i) $($R0) == STATUS_FAILED
 Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set Error = $($R0)
 Goto fatal
 Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
 Goto successful
 Endif
 
Endif

 install "Install-Option"
 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
 Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set Error = $($R0)
 goto fatal
 endif
 
endif

 EndWait

 ifstr(i) $(Install_On_Server) == "YES"

;;; Check to see if the SERR bit is set on an Intel NX450 chipset. If so, then
;;; write an entry to the registry to inform any 3Com NIC drivers of this 
;;; condition

;;; This section has been commented out for now. If it is uncommented, the section
;;; that copies over the two files must also be uncommented out.

;;;set SerrBitValue = 0
;;;RunProgram SerrBitValue "Windows Directory" "" pci_fix.exe "-s"
;;;OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
;;;Ifstr(i) $(ServicesKey) != "" ; key exists
;;;  EnumRegKey $(ServicesKey) DriverList
;;;  ForListDo $(DriverList)
;;;    set Driver = *($($), 1)
;;;    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\"$(Driver)"\Parameters" +
;;;      $(!REG_KEY_ALL_ACCESS) DriverKey
;;;    Ifstr(i) $(DriverKey) != "" ; key exists
;;;      set SerrFixList = {"","","",""}
;;;      ;;; Check for the presence of the SerrFix Value
;;;      GetRegValue $(DriverKey) "SerrFix" SerrFixList
;;;      Split-String "$(Driver)" "8" DriverTokens
;;;      set DriverName = *($(DriverTokens), 1)
;;;      ifstr(i) $(Driver) != "El98xn4"
;;;        ifstr(i) $(DriverName) == "El9"
;;;          ;;; We have found a Python-related key
;;;	  ;; Now, update this key value with the Serr Bit value
;;;	  SetRegValue $(DriverKey) {SerrFix, $(NoTitle),$(!REG_VT_DWORD),$(SerrBitValue)} 
;;;        Endif
;;;      Endif
;;;    Endif
;;;    CloseRegKey $(DriverKey)
;;;  EndForListDo
;;;Endif
;;;CloseRegKey $(ServicesKey)

  RunProgram ExitCode "Windows Directory" "" srv_conf.exe 
  ; Determine whether the program has modified any SHD parameters
  ; If so, then prompt for a reboot. Also prompt for a reboot on
  ; an install or upgrade.
 
  OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com" $(!REG_KEY_ALL_ACCESS) KeyNt
  Ifstr(i) $(KeyNt) != ""
   GetRegValue $(KeyNt) "PromptForReboot" RebootRequiredList
   set RebootRequired = *($(RebootRequiredList), 4)

   Ifstr(i) $(RebootRequired) == "YES"
    ; Reset the reboot status to NO
    SetRegValue $(KeyNt), {PromptForReboot, $(NoTitle),$(!REG_VT_SZ),"NO"}
    set CommonStatus = STATUS_SUCCESSFUL
   else
    set CommonStatus = STATUS_USERCANCEL
   Endif
  Endif
  CloseRegKey $(KeyNt)

  ;;; This section has been requested by Dell
  ;;; 

  ;*******************************************
  ;* Driver History Information              *
  ;* The following code adds Driver History  *
  ;* Information to the system registry      *
  ;*******************************************

  ; Driver Information Entries
  Set DriverMfgr = "3Com"                          ; IHV name
  Set DriverVersionID = "2.00"                     ; The IHV driver package version
  Set BaseDriverFileName = "el98xn4.sys"           ; Key file for version check
  Set BaseDriverFileVersion = "2.16.00.0000"       ; Version in Key file

  Set DriverOEM = "3Com"                           ; name of the OEM
  Set DriverFamily = "NIC"                         ; device family (NIC, Storage, Video...)
  Set DriverProduct = "3C98x-TX Adapter"           ; Specific Name of device (chipset, for example)
  Set DriverDescription = "3Com EtherLink Server 10/100"  ; Description of device
  Set DriverOEMVersion = "2.00"                    ; OEM-specified version

  ; This section is added to all INFs to add registry entries for Driver Info.

  set DriverInfoRegList =   {"InstalledOptions",$(DriverOEM),$(DriverFamily),$(DriverMfgr),$(DriverProduct)}
  set DriverInfoKey = "SOFTWARE"
  OpenRegKey $(!REG_H_LOCAL) "" $(DriverInfoKey) $(!REG_KEY_CREATE_SUB_KEY) DriverInfoOldKeyHandle
  ifstr $(DriverInfoOldKeyHandle) == ""
     shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" + 
	"DriverInfo registry failed. Could not open HKLM\Software("$(RegLastError)")"
     set DriverInfoFailed = "FAIL"
  else
     ForListDo $(DriverInfoRegList)
        Set NewDriverInfoKey = $(DriverInfoKey)"\"$($)
        OpenRegKey $(!REG_H_LOCAL) "" $(NewDriverInfoKey) $(!REG_KEY_ALL_ACCESS) DriverInfoKeyHandle
        ifstr(i) $(DriverInfoKeyHandle) == ""
           CreateRegKey $(DriverInfoOldKeyHandle) {$($),0,GenericClass} "" $(!REG_KEY_ALL_ACCESS) ""   DriverInfoKeyHandle
           ifstr $(DriverInfoKeyHandle) == ""
              shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" +
		"DriverInfo registry failed. Could not create key:"$($)" ("$(RegLastError)")"
              set DriverInfoFailed = "FAIL"
           endif
        endif
        CloseRegKey $(DriverInfoOldKeyHandle)
        set DriverInfoOldKeyHandle = $(DriverInfoKeyHandle)
        set DriverInfoKey = $(NewDriverInfoKey)
     EndForListDo
  endif

  ifstr $(DriverInfoFailed) != "FAIL"
     SetRegValue $(DriverInfoKeyHandle) {"Description",0,$(!REG_VT_SZ),$(DriverDescription)}
     SetRegValue $(DriverInfoKeyHandle) {"CurrentVer",0,$(!REG_VT_SZ),$(DriverOEMVersion)}
     SetRegValue $(DriverInfoKeyHandle) {"Ver_"$(DriverOEMVersion),0,$(!REG_VT_SZ),$(DriverVersionID)}
     SetRegValue $(DriverInfoKeyHandle) {"BaseDriverFileName",0,$(!REG_VT_SZ),$(BaseDriverFileName)}
     SetRegValue $(DriverInfoKeyHandle) {"BaseDriverFileVersion",0,$(!REG_VT_SZ),$(BaseDriverFileVersion)}

     CloseRegKey $(DriverInfoKeyHandle)
  endif

  ;*******************************************
  ;* End of Driver History Information       *
  ;***********************************************

    ;;; Add in entries to support the DA/Touchdown integration
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAUDIAG" $(!REG_KEY_ALL_ACCESS) DiagKey
    Ifstr(i) $(DiagKey) != "" ; key exists
      OpenRegKey $(DiagKey) "" "RealNICs" $(!REG_KEY_ALL_ACCESS) RealNICsKey
      Ifstr(i) $(RealNICsKey) == "" ; key exists
        CloseRegKey $(RealNICsKey)
        CreateRegKey $(DiagKey) {"RealNICs", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" RealNICsKey
      Endif

      Ifstr(i) $(RealNICsKey) != "" ; key exists
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
        Ifstr(i) $(ServicesKey) != "" ; key exists
          EnumRegKey $(ServicesKey) DriverList
          ForListDo $(DriverList)
            ;;; Check whether any python driver instances are present still
            ;;; If not, remove Touchdown and delete some leftover files
            set foundPythonInstance = FALSE
            set Driver = *($($), 1)
            Split-String "$(Driver)" "N" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El980n4"
              ifstr(i) $(DriverName) == "El980"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            ifstr(i) $(Driver) != "El98xn4"
              ifstr(i) $(DriverName) == "El98x"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            Ifstr(i) $(foundPythonInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

            set found3ComClientInstance = FALSE
            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90x"
              ifstr(i) $(DriverName) == "El90"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Split-String "$(Driver)" "d" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90xnd"
              ifstr(i) $(DriverName) == "El90xn"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "EL99X"
              ifstr(i) $(DriverName) == "El99"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Ifstr(i) $(found3ComClientInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

          EndForListDo

          CloseRegKey $(ServicesKey)
        Endif
      Endif
    Endif

    CloseRegKey $(DiagKey)
    CloseRegKey $(RealNICsKey)

  ;;; Kick off the daserver.exe program to install DA.
  ;;; Prompt the user whether they would like to install DA.

  ;;; The next section has been recoded so that the next prompt will not be
  ;;; displayed because the DA installation program has it's own prompt at the
  ;;; very beginning. So to get rid of duplicate prompts, the next prompt is
  ;;; disabled

;  read-syms PromptForInstallDADlgENG
;  ui start "PromptForInstallDADlgENG"

  set DLGEVENT = "YES"

  ifstr(i) $(DLGEVENT) == "YES"
    StartDetachedProcess STATUS_SUCCESSFUL "" "" $(!STF_WINDOWSSYSPATH)"\..\..\"daserver.exe
    set CommonStatus = STATUS_SUCCESSFUL  ;  STATUS_NO_EFFECT
    goto end
  else
;    ;;; Kick off a bindings review
;    StartDetachedProcess STATUS_SUCCESSFUL "" "" $(!STF_WINDOWSSYSPATH)"\bind.exe z"
    set CommonStatus = STATUS_SUCCESSFUL
    goto end
  endif
 else
  ;;; Kick off the daserver.exe program to install DA.
  StartDetachedProcess STATUS_SUCCESSFUL "" "" $(!STF_WINDOWSSYSPATH)"\..\..\"daserver.exe
  goto successful
 endif

 ;;; FINISHED INSTALLATION ;;;

updateparameters =+
 Debug-Output "$(InfFile) : Updateparameters"
 set HardParameterKey = $($R3)
 
ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
endif
 CloseRegKey $(KeyParameters)

set CommonStatus = STATUS_SUCCESSFUL
goto successful

bindingadapter =+
 Debug-Output "$(InfFile) : bindingadapter"
 Return STATUS_SUCCESSFUL
 
set Error = "Binding: Sorry, not yet implemented."
 goto fatal

removeadapter = +
 ;;; Beginning of software removal

 ;;; First, remove the actual software and hardware component but remember the
 ;;; service name so that it can be deleted from the realNICs key if necessary.

 Debug-Output "$(InfFile) : removeadapter"
 Debug-Output "$(InfFile) : ----> $(ProductKeyName), $(!NTN_RegBase)"
 Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
   Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
     $(ProductSoftwareName)
   ifint $($ShellCode) != $(!SHELL_CODE_OK)
     goto ShellCodeError
   endif
   set RegistryErrorIndex = $($R0)
   Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
     goto fatalregistry
   endif
 else
   OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(!REG_KEY_ALL_ACCESS) CardIndexKey
   Ifstr(i) $(CardIndexKey) != "" ; key exists
     GetRegValue $(CardIndexKey) "ServiceName" ServiceNameList

     ;;; The name of the service being removed is stored in DriverInstance
     set DriverInstance = *($(ServiceNameList), 4)
   endif
   CloseRegKey $(CardIndexKey)

   Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
     $(ProductSoftwareName), $(!NTN_RegBase)

   ifint $($ShellCode) != $(!SHELL_CODE_OK)
     goto ShellCodeError
   endif
   set RegistryErrorIndex = $($R0)
   Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
     goto fatalregistry
   endif
 endif
 
 ;;; Finished with removing the hardware and software component.
 ;;; Now, do any cleanup that is required by the uninstaller program.

 ifstr(i) $(!STF_PLATFORM) == $(INF_PROCESSER) 
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-inf" 
 endif

 ;;; Remove the Service Name held in DriverInstance from the RealNICs key

 OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAUDIAG\RealNICs" $(!REG_KEY_ALL_ACCESS) RealNICsKey
 Ifstr(i) $(RealNICsKey) != "" ; key exists
   EnumRegValue $(RealNICsKey) RealNICsList
   set RealNICsValues = {}
   ForListDo $(RealNICsList)
     set RealNICsArray = *($($), 1)
     ForListDo $(RealNICsArray)
       set DriverInstanceName = *($($), 1)
       QueryListSize RealNICsValuesSize $(RealNICsValues)
       ifstr(i) $(RealNICsValuesSize) == 0
         set RealNICsValues = {$(DriverInstanceName)}
       else
         set RealNICsValues = >($(RealNICsValues), $(DriverInstanceName))
       endif
     EndForListDo
   EndForListDo

   set NewRealNICsValues = {}

   ForListDo $(RealNICsValues)
     ifstr(i) *($($), 1) != $(DriverInstance)
       set NewRealNICsValues = >($(NewRealNICsValues), *($($), 1))
     endif
   EndForListDo

   CloseRegKey $(DiagKey)
   OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAUDIAG" $(!REG_KEY_ALL_ACCESS) DiagKey
   Ifstr(i) $(DiagKey) != "" ; key exists
     DeleteRegTree $(DiagKey) "RealNICs"
     CreateRegKey $(DiagKey) {"RealNICs", 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" NewRealNICsKey
     Ifstr(i) $(NewRealNICsKey) != "" ; key exists
       ForListDo $(NewRealNICsValues)
         SetRegValue $(NewRealNICsKey) {*($($), 1), 0, $(!REG_VT_SZ), ""}
       EndForListDo
     Endif
   Endif
 Endif

 CloseRegKey $(NewRealNICsKey)
 CloseRegKey $(RealNICsKey)
 CloseRegKey $(DiagKey)

 ;;; Finished updating RealNICs key

 ;;; If this is the last Server NIC in the machine, remove server-related files
 ;;; and remove hot-plug support

 set foundPythonInstance = FALSE
 OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
 Ifstr(i) $(ServicesKey) != "" ; key exists
   EnumRegKey $(ServicesKey) DriverList
   ForListDo $(DriverList)
     ;;; Check whether any python driver instances are present still
     ;;; If not, remove Touchdown and delete some leftover files
     set Driver = *($($), 1)
     Split-String "$(Driver)" "N" DriverTokens
     set DriverName = *($(DriverTokens), 1)
     ifstr(i) $(Driver) != "El980n4"
       ifstr(i) $(DriverName) == "El980"
         ;;; We have found a Python-related key
         set foundPythonInstance = TRUE
       endif
     endif
     ifstr(i) $(Driver) != "El98xn4"
       ifstr(i) $(DriverName) == "El98x"
         ;;; We have found a Python-related key
         set foundPythonInstance = TRUE
       endif
     endif
   EndForListDo

   CloseRegKey $(ServicesKey)

   Ifstr(i) $(foundPythonInstance) == "FALSE"
     RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\srv_conf.exe" 
     RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\srv_conf.hlp"
     RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\drivers\el98xn4.sys"

     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com" $(!REG_KEY_ALL_ACCESS) 3ComKey
     Ifstr(i) $(3ComKey) != "" ; key exists
       DeleteRegTree $(3ComKey) "el980n4"
       DeleteRegTree $(3ComKey) "EL980N4"
     Endif

     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
     Ifstr(i) $(ServicesKey) != "" ; key exists
       DeleteRegTree $(ServicesKey) "EL980N4"
       DeleteRegTree $(ServicesKey) "EL98XN4"
     Endif

     ;;; remove Compaq hot-plug support
     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Compaq\Cpqrcmc\ClassDLLs\NicMiniPort" $(!REG_KEY_ALL_ACCESS) MiniPortKey
     ifstr $(MiniPortKey) != ""
       DeleteRegTree $(MiniPortKey) "EL980N4"
     endif
     CloseRegKey $(MiniPortKey)

     ;;; Remove IBM hot-plug support
     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\HotSrv\SupportedDevices" $(!REG_KEY_ALL_ACCESS) SupportedDevicesKey
     ifstr $(SupportedDevicesKey) != ""
       DeleteRegTree $(SupportedDevicesKey) "10B7-9800-10B7-1000"
       DeleteRegTree $(SupportedDevicesKey) "10B7-9805-10B7-1000"
     endif
     CloseRegKey $(SupportedDevicesKey)

     CloseRegKey $(ServicesKey)
     CloseRegKey $(3ComKey)

   Endif
 Endif

 ;;; If there are no entries left in the RealNICs key, then remove Touchdown from the PC

 ifstr(i) $(NewRealNICsValues) == ""
   Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), "TCAITDI"

   OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com" $(!REG_KEY_ALL_ACCESS) 3ComKey
   Ifstr(i) $(3ComKey) != "" ; key exists
     DeleteRegTree $(3ComKey) "TCAITDI"
     DeleteRegTree $(3ComKey) "TCAUDIAG"
   Endif

   OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
   Ifstr(i) $(ServicesKey) != "" ; key exists
     DeleteRegTree $(ServicesKey) "tcaicchg"
     DeleteRegTree $(ServicesKey) "TCAITDI"
   Endif

   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaudiag.exe"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaudiag.url"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaudiag.hlp"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcauprot.hlp"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaum90x.hlp"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaudcus.txt"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaudexp.txt"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcauprot.dll"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaum90x.dll"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcamhwac.dll"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaicchg.sys"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcai4tdi.inf"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\tcaudiag.gid"
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "FILENAME="$(!STF_WINDOWSSYSPATH)"\drivers\tcaitdi.sys"
 endif

 CloseRegKey $(3ComKey)
 CloseRegKey $(ServicesKey)

 ;;; End of removing Touchdown from the PC

 ;;; Finally, remove the 3Com key if no entries exist beneath it

 OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com" $(!REG_KEY_ALL_ACCESS) 3ComKey
 Ifstr(i) $(3ComKey) != "" ; key exists
   EnumRegKey $(3ComKey) 3ComChildren
   QueryListSize 3ComChildSize $(3ComChildren)

   ifstr(i) $(3ComChildSize) == 0
     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE" $(!REG_KEY_ALL_ACCESS) SWKey
     Ifstr(i) $(SWKey) != "" ; key exists
       DeleteRegTree $(SWKey) "3Com"
     Endif
   Endif
 Endif

 CloseRegKey $(3ComKey)
 CloseRegKey $(SWKey)

 ;;; End of software removal
   
goto end

UpgradeSoftware = +
 Debug-Output "$(InfFile) : UpdateSoftware" 
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_ALL_ACCESS) KeyProduct 
Ifstr $(KeyProduct) != "" 
Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) 
ifint $($ShellCode) != $(!SHELL_CODE_OK) 
Debug-Output "ShellCode error" 
goto ShellCodeError 
endif 
set !UG_Filename = $($R0) 

install "Install-INF" 
ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS 
goto fatal 
endif 

SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)} 
SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)} 
SetRegValue $(KeyProduct) {Review,$(NoTitle),$(!REG_VT_DWORD),$(ProductReview)} 
SetRegValue $(KeyProduct) {EDVersion,$(NoTitle),$(!REG_VT_SZ),$(EtherDiskVersion)} 
CloseRegKey $(KeyProduct) 



OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyService
 Ifstr $(KeyService) != ""
SetRegValue $(KeyService) {ImagePath,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareUpgradePath)}
 else 
goto fatalregistry 
endif 
CloseRegKey $(KeyService) 


OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EventLog\System\"$(ProductHardwareName) $(!REG_KEY_ALL_ACCESS) KeyEventLog
 Ifstr $(KeyEventLog) != ""
SetRegValue $(KeyEventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_SZ),$(NetEventDLL)} 
else 
goto fatalregistry 
endif 
CloseRegKey $(KeyEventLog) 


OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase) $(!REG_KEY_ALL_ACCESS) KeyNt 

set LoopList = {1,2,3,4,5,6,7,8} 
set WinNTList = {WinNT,$(NoTitle),$(!REG_VT_SZ),YES} 
Set NewValueList = {{WakeOnMagic,$(NoTitle),$(!REG_VT_SZ),"YES"},+ 
{WakeOnLink,$(NoTitle),$(!REG_VT_SZ),"NO"},+ 
{RWUMagic,$(NoTitle),$(!REG_VT_SZ),"ENABLE"},+
{FlowControl,$(NoTitle),$(!REG_VT_SZ),"YES"}} 

ForListDo $(LoopList) 
OpenRegKey $(KeyNt) "" $(ProductHardwareName)$($)"\Parameters" $(!REG_KEY_ALL_ACCESS) TestKey 

ifstr $(TestKey) != $(KeyNull) 
Shell $(UtilityInf), AddValueList, $(TestKey), $(NewValueList) 
ifint $($ShellCode) != $(!SHELL_CODE_OK) 
goto ShellCodeError 
endif 

OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKey)$($)"\NetRules" $(!REG_KEY_ALL_ACCESS) NetCardKey 

ifstr $(NetCardKey) != $(KeyNull)
SetRegValue $(NetCardKey) {"InfName",$(NoTitle),$(!REG_VT_SZ),$(!UG_Filename)} 
CloseRegKey $(NetCardKey) 
endif 
CloseRegKey $(TestKey) 
endif 

EndForListDo 
else 
goto fatalregistry 
endif 





ifstr $(!STF_PLATFORM) == $(INF_PROCESSER) 


install "Install-Uninstaller" 



OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\"$(ProductSoftwareName) $(!REG_KEY_ALL_ACCESS) + 
KeyNt 

set TrayIconList = {TCAUDIAG,$(NoTitle),$(!REG_VT_SZ),$(DIAGCARDTYPE)} 
SetRegValue $(KeyNt) $(TrayIconList) 
CloseRegKey $(KeyNt) 





ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant) 
ifstr $(Install_3NIC_Diag) == "YES" 

OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" + 
$(!REG_KEY_ALL_ACCESS) KeyNt 
ifstr $(KeyNt) == "" 
CreateRegKey $(!REG_H_LOCAL) {"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",+ 
0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyNt 
endif 

OpenRegKey $(KeyNt) "" "3ComNicUnInstall" $(!REG_KEY_ALL_ACCESS) KeyNt2 
ifstr $(KeyNt2) == "" 
CreateRegKey $(KeyNt) {"3ComNicUnInstall" , 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) +
 "" KeyNt2 
endif 

set NewValueList = {{DisplayName, $(NoTitle), $(!REG_VT_SZ), "3Com NIC Diagnostics"},+ 
{UninstallString, $(NoTitle), $(!REG_VT_SZ), "UN3C90XA.EXE -DIAG"}} 

Shell $(UtilityInf), AddValueList, $(KeyNt2), $(NewValueList) 
ifint $($ShellCode) != $(!SHELL_CODE_OK) 
goto ShellCodeError 
endif 

CloseRegKey $(KeyNt) 
CloseRegKey $(KeyNt2) 

endif 
endif 







	 
	 
	 ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant) 
	 
	 
	 
	 	 
	 OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" + 	 
	 $(!REG_KEY_ALL_ACCESS) KeyNt 	 
	 	 
	 set TrayIconList = {TCASUTIEXE,$(NoTitle),$(!REG_VT_SZ),$(TrayIconExe)" -off"} 	 
	 SetRegValue $(KeyNt) $(TrayIconList) 
	 
	 DeleteRegValue $(KeyNt) "COMSMDEXE"
	 CloseRegKey $(KeyNt) 	 
	 	 
	 
	 
	
	 
	 
	 
	 ifstr $(Install_3NIC_Diag) == "YES" 
	 Debug-Output "$(InfFile) : (Install_3NIC_Diag) == "YES"" 

	 
	 Shell "", DiagRegistry 
	 
	 install "Install-3nicdiag" 

	 
	 
	 
	 
	 
	 
	 
	 
	 set InstallMode_Save = $(!NTN_InstallMode) 
	 set !NTN_InstallMode = install 
	 set SRCDIR_OVERRIDE_Save = $(!STF_SRCDIR_OVERRIDE) 
	 set !STF_SRCDIR_OVERRIDE = $(SrcDir) 
	 Shell $(!STF_WINDOWSSYSPATH)\TCAI4TDI.INF, InstallOption, $(CurrLang), + 
	 "TCAITDI" ,$(SrcDir), YES, YES, YES, NO 
	 set !NTN_InstallMode = $(InstallMode_Save) 
	 set !STF_SRCDIR_OVERRIDE = $(SRCDIR_OVERRIDE_Save) 
	 



ifstr(i) $(Install_Shortcuts) == "YES" 
Debug-Output "$(InfFile) : (Install_Shortcuts) == "YES"" 
 ifstr(i) $(Install_On_Server) == "YES"
  RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-setup_server"
 else
  RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-setup_client" 
 endif

    ;;; Add in entries to support the DA/Touchdown integration
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\TCAUDIAG" $(!REG_KEY_ALL_ACCESS) DiagKey
    Ifstr(i) $(DiagKey) != "" ; key exists
      CreateRegKey $(DiagKey) {"RealNICs", 0, GenericClass} "" $(!REG_KEY_WRITE) "" RealNICsKey
      Ifstr(i) $(RealNICsKey) != "" ; key exists

        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_ALL_ACCESS) ServicesKey
        Ifstr(i) $(ServicesKey) != "" ; key exists
          EnumRegKey $(ServicesKey) DriverList
          ForListDo $(DriverList)
            ;;; Check whether any python driver instances are present still
            ;;; If not, remove Touchdown and delete some leftover files
            set foundPythonInstance = FALSE
            set Driver = *($($), 1)
            Split-String "$(Driver)" "N" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El980n4"
              ifstr(i) $(DriverName) == "El980"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            ifstr(i) $(Driver) != "El98xn4"
              ifstr(i) $(DriverName) == "El98x"
                ;;; We have found a Python-related key
                set foundPythonInstance = TRUE
              endif
            endif

            Ifstr(i) $(foundPythonInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

            Split-String "$(Driver)" "d" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90xnd"
              ifstr(i) $(DriverName) == "El90xn"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "EL99X"
              ifstr(i) $(DriverName) == "El99"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            set found3ComClientInstance = FALSE
            Split-String "$(Driver)" "x" DriverTokens
            set DriverName = *($(DriverTokens), 1)
            ifstr(i) $(Driver) != "El90x"
              ifstr(i) $(DriverName) == "El90"
                ;;; We have found a 3Com client-related key
                set found3ComClientInstance = TRUE
              endif
            endif

            Ifstr(i) $(found3ComClientInstance) == "TRUE"
              ;; Add this driver instance name to the list of realNICs
              SetRegValue $(RealNICsKey) {$(Driver), 0, $(!REG_VT_SZ), ""}
            endif

          EndForListDo

          CloseRegKey $(ServicesKey)
        Endif
      Endif
    Endif

    CloseRegKey $(DiagKey)
    CloseRegKey $(RealNICsKey)

Debug-Output "$(InfFile) : Enabling Tray Icon" 
OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" +
 $(!REG_KEY_ALL_ACCESS) KeyNt 

set TrayIconList = {TCASUTIEXE,$(NoTitle),$(!REG_VT_SZ),$(TrayIconExe)" -off"} 
SetRegValue $(KeyNt) $(TrayIconList)
DeleteRegValue $(KeyNt) "COMSMDEXE" 
CloseRegKey $(KeyNt) 
endif 
	 endif 
endif 
endif

 install "Install-Option" 
ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS 
Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE" 
ifint $($ShellCode) != $(!SHELL_CODE_OK) 
goto ShellCodeError 
endif 
set Error = $($R0) 
goto fatal 
endif

RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-upgrade" 

goto end

successful = +
 Debug-Output "$(InfFile) : Successful"
 goto end

abandon = +
 Debug-Output "$(InfFile) : Abandon"
 ForListDo $(OEM_ABANDON_OPTIONS)
 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
 $(ProductSoftwareName), $($)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set RegistryErrorIndex = $($R0)
 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
 goto fatalregistry
 endif
 EndForListDo
 Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
 $(ProductSoftwareName), FALSE
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif

 ifstr(i) $(!STF_PLATFORM) == $(INF_PROCESSER) 
   RunProgram ExitCode "Windows Directory" "" UN3C90XA.EXE "-inf" 
 endif

OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\TCAITDI" $(!REG_KEY_READ) KeyTCATDI 
ifstr $(KeyTCATDI) != "" 
Shell $(!STF_WINDOWSSYSPATH)\TCAI4TDI.INF UserAbort
 CloseRegKey $(KeyTCATDI) 
endif 

set RegistryErrorIndex = $($R0)
 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
 goto fatalregistry
 endif
 endif
 goto end

warning = +
 Debug-Output "$(InfFile) : warning"
 Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 ifstr(i) $($R1) == "OK"
 goto $(to)
 else-ifstr(i) $($R1) == "CANCEL"
 goto $(from)
 else
 goto "end"
 endif

nonfatalinfo = +
 Debug-Output "$(InfFile) : nonfatalinfo"
 Set CommonStatus = STATUS_USERCANCEL
 Set Severity = STATUS
 goto nonfatalmsg

nonfatal = +
 Debug-Output "$(InfFile) : nonfatal"
 Set Severity = NONFATAL
 goto nonfatalmsg

nonfatalmsg = +
 Debug-Output "$(InfFile) : nonfatalmsg"
 ifstr(i) $(Error) == ""
 Set Severity = NONFATAL
 Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set Error = $($R0)
 endif
 Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 ifstr(i) $($R1) == "OK"
 goto $(from)
 else
 
goto "RemoveAdapter"
 endif

fatalregistry = +
 Debug-Output "$(InfFile) : fatalregistry"
 Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set Error = $($R0)
 goto fatal

fatal = +
 Debug-Output "$(InfFile) : fatal"
 ifstr(i) $(Error) == ""
 Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 set Error = $($R0)
 endif
 Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
 ifint $($ShellCode) != $(!SHELL_CODE_OK)
 goto ShellCodeError
 endif
 goto setfailed

ShellCodeError = +
 ifint $($ShellCode) == $(!SHELL_CODE_NO_SUCH_INF)
 Debug-Output "$(InfFile) : ShellCodeError - SHELL_CODE_NO_SUCH_INF"
 else-ifint $($ShellCode) == $(!SHELL_CODE_NO_SUCH_SECTION)
 Debug-Output "$(InfFile) : ShellCodeError - SHELL_CODE_NO_SUCH_SECTION"
 else
 Debug-Output "$(InfFile) : ShellCodeError - SHELL_CODE_ERROR"
 endif
 set DlgType = "MessageBox"
 set STF_MB_TITLE = $(ShellCodeErrorTitle)
 set STF_MB_TEXT = $(ShellCodeErrorText) 
set STF_MB_TYPE = 1
 set STF_MB_ICON = 3
 set STF_MB_DEF = 1
 ui start "Error Message"
 goto setfailed

setfailed = +
 Debug-Output "$(InfFile) : Setfailed"
 set CommonStatus = STATUS_FAILED
 ifstr(i) $(OEM_ABANDON_ON) == TRUE
 set OEM_ABANDON_ON = FALSE
 goto abandon
 endif
 goto end

end = +
 goto term

term = +
 Return $(CommonStatus)
 
[checkUn3c90xaFileExist]
uninstFound = {} ? $(!LIBHANDLE) FindFileInstances $(!STF_WINDOWSSYSPATH)"\un3c90xa.exe" 

[checkUn3c90xFileExist]
uninstFound = {} ? $(!LIBHANDLE) FindFileInstances $(!STF_WINDOWSSYSPATH)"\un3c90x.exe" 

[checkInfFileExist]
INFFileFound = {} ? $(!LIBHANDLE) FindFileInstances $(!STF_WINDOWSSYSPATH)"\"$(NewINFName) 

[Install-Option]
 set STF_VITAL = ""
 set STF_OVERWRITE = "VERIFYSOURCEOLDER"
 Debug-Output $(InfName)"Adding files: Files-$(NDIS_VER), SrcDir=$(SrcDir)"
 ifstr(i) $(Option) == "3C980"
   AddSectionFilesToCopyList Files-Python$(NDIS_VER) $(SrcDir)\Winnt $(!STF_WINDOWSSYSPATH)\drivers
 else
   AddSectionFilesToCopyList Files-$(NDIS_VER) $(SrcDir)\Winnt $(!STF_WINDOWSSYSPATH)\drivers
 endif

 ifstr(i) (*($(CurrentVersionValue),4)) == $(NT400VersionConstant) 
AddSectionFilesToCopyList Files-DA $(SrcDir)\DAServer $(!STF_WINDOWSSYSPATH)"\..\.."
 endif
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 set !STF_OVERWRITE = TRUE
 CopyFilesInCopyList
 Exit

[Install-Uninstaller]
 set STF_VITAL = ""
 set STF_OVERWRITE = "VERIFYSOURCEOLDER"
 AddSectionFilesToCopyList Files-Uninstaller $(SrcDir)\Win32 $(!STF_WINDOWSSYSPATH)
 set !STF_OVERWRITE = TRUE
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 CopyFilesInCopyList
 Exit

 
[Install-3nicdiag]
 set STF_VITAL = ""
 set STF_OVERWRITE = "VERIFYSOURCEOLDER"

 ;; This section had to change because we are using a separate set of files for NT4 Touchdown
 ;; versus Win2K. Therefore, we need to retrieve them from a different path
 AddSectionFilesToCopyList Files-3nicdiag $(SrcDir)\Td $(!STF_WINDOWSSYSPATH)

 set !STF_OVERWRITE = TRUE
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 CopyFilesInCopyList
 Exit

[Install-TouchdownService]
 set STF_VITAL = ""
 set STF_OVERWRITE = "VERIFYSOURCEOLDER"

 ;; This section had to change because we are using a separate set of files for NT4 Touchdown
 ;; versus Win2K. Therefore, we need to retrieve them from a different path
 AddSectionFilesToCopyList Files-TouchdownService $(SrcDir)\Td $(!STF_WINDOWSSYSPATH)\drivers

 set !STF_OVERWRITE = TRUE
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 CopyFilesInCopyList
 Exit

[Install-SHD]
 set STF_VITAL = ""
 set STF_OVERWRITE = "VERIFYSOURCEOLDER"
 AddSectionFilesToCopyList Files-SHD $(SrcDir)\Winnt $(!STF_WINDOWSSYSPATH)
 set !STF_OVERWRITE = TRUE
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 CopyFilesInCopyList
 Exit

[Install-Patches]
 set STF_VITAL = ""
 set STF_OVERWRITE = "VERIFYSOURCEOLDER"
 AddSectionFilesToCopyList Files-Patches $(SrcDir)\Winnt $(!STF_WINDOWSSYSPATH)
 set !STF_OVERWRITE = TRUE
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 CopyFilesInCopyList
 Exit

[Install-SERRFix]
 set STF_VITAL = ""
 set STF_OVERWRITE = "VERIFYSOURCEOLDER"
 AddSectionFilesToCopyList Files-SERRFix $(SrcDir)\Winnt $(!STF_WINDOWSSYSPATH)
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 set !STF_OVERWRITE = TRUE
 CopyFilesInCopyList
 Exit

[Install-INF]
 set STF_VITAL = ""
 AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 set !STF_OVERWRITE = TRUE
 CopyFilesInCopyList
 Exit

[Install-NewINF]
 set STF_VITAL = ""
 AddSectionFilesToCopyList Files-NewInf $(SrcDir) $(!STF_WINDOWSSYSPATH)
 set !STF_NCPA_FLUSH_COPYLIST = TRUE
 set !STF_OVERWRITE = TRUE
 CopyFilesInCopyList
 Exit

[Source Media Descriptions]
1  = "3Com EtherLink Server NIC, ver 2.0, CDRom or Floppy (Disk 1 of 5)", TAGFILE = 3cdisk1
2  = "3Com EtherLink Server NIC, ver 2.0, CDRom or Floppy (Disk 2 of 5)", TAGFILE = 3cdisk2
3  = "3Com EtherLink Server NIC, ver 2.0, CDRom or Floppy (Disk 3 of 5)", TAGFILE = 3cdisk3
4  = "3Com EtherLink Server NIC, ver 2.0, CDRom or Floppy (Disk 4 of 5)", TAGFILE = 3cdisk4

[ProductType]
STF_PRODUCT = Winnt

[Files-Inf] 
2, oemsetup.inf,SIZE=36000, RENAME=$(!UG_Filename)

[Files-NewInf]
2, oemsetup.inf,SIZE=36000, RENAME=$(NewINFFileName)

[Files-3nicdiag]
2,TCAUDIAG.EXE, SIZE=165504    ; 3
3,TCAUDIAG.URL, SIZE=15
3,TCAUDIAG.HLP, SIZE=20877
3,TCAUPROT.HLP, SIZE=20877
3,TCAUM90X.HLP, SIZE=20877
3,TCAUDCUS.TXT, SIZE=113
3,TCAUDEXP.TXT, SIZE=113
3,TCAUPROT.DLL, SIZE=12345
3,TCAUM90X.DLL, SIZE=12345
3,TCAMHWAC.DLL, SIZE=20198
3,TCAICCHG.SYS, SIZE=5000
3,TCAI4TDI.INF, SIZE=15000

[Files-TouchdownService]
3,TCAITDI.SYS, SIZE=5000

[Files-SHD]
3,srv_conf.EXE, SIZE=307   ; 2
3,srv_conf.HLP, SIZE=500   ; 2

[Files-SERRFix]
;;; The next two lines may be uncommented if the Dell6300 SERR fix is required
;;; This will require one other section in this file to be uncommented.
;;;2,pci_fix.exe, SIZE=500
;;;2,pci_fix.sys, SIZE=500

[Files-Cpl]
4,DASERVER.CPL SIZE=15000

[Files-Uninstaller]
2,UN3C90XA.EXE, SIZE=6617

[Files-NDIS3]
2,EL90xnd3.SYS , SIZE=25001

[Files-PythonNDIS3]
2,EL980n3.SYS , SIZE=25001

[Files-NDIS4]
2,EL90xnd4.SYS , SIZE=25001

[Files-PythonNDIS4]
3,EL98xn4.SYS , SIZE=25001    ; 2

[Files-DA]
4,DASERVER.EXE, SIZE=800000

[Files-Patches]
;2,BIND.EXE, SIZE=1000

[LanguagesSupported]
 ENG

[OptionsTextENG]
 3C980 = "3Com EtherLink 10/100 PCI Server NIC"
 3C90X = "3Com Fast EtherLink/Etherlink XL PCI Busmaster NIC" 
 3C905 = "3Com 3C905 NIC"
 3C900 = "3Com 3C900 NIC"
 
[FileConstantsENG]
 ProCaption = "Windows NT NIC Setup"
 ProCancel = "Cancel"
 ProCancelMsg = "Windows NT Networking is not correctly installed. "+
 "Are you sure you want to cancel copying files?"
 ProCancelCap = "Network Setup Message"
 ProText1 = "Copying:"
 ProText2 = "To:"

ConnectionList = ^(ConnectionChoices, 1)
ConnectionValues = ^(ConnectionChoices, 2)
NoList = ^(NoChoices, 1)
NoValues = ^(NoChoices, 2)
ShellCodeErrorTitle = "Error: "$(Function$(Option)Title)
ShellCodeErrorText = "Shell Code Error."
CANNOT_FIND_ANY_CARD = "The newly installed network cards are not supported by this product."
CANNOT_FIND_ANY_UNINSTALLED_CARD = "All the NICs supported by this product have already been installed."

[PromptForRebootDlgENG]
DlgType = "MessageBox"
STF_MB_TITLE = "All previous adapter drivers have been removed"
STF_MB_TEXT  = "You must reboot the machine and then add in the new adapters."
STF_MB_TYPE  = 1
STF_MB_ICON  = 2
STF_MB_DEF   = 1

[PromptForReboot1DlgENG]
DlgType = "MessageBox"
STF_MB_TITLE = "All Python 1.2 drivers have been updated with Python 2.0 software"
STF_MB_TEXT  = "You must close the Network Panel and reboot the machine to complete the changes."
STF_MB_TYPE  = 1
STF_MB_ICON  = 2
STF_MB_DEF   = 1

[PromptForUpdateDlgENG]
DlgType = "MessageBox"
STF_MB_TITLE = "A more recent driver is available"
STF_MB_TEXT  = "If you choose to upgrade, all VLAN and RSL configurations will be erased."+
               $(!LF)$(!LF)"Do you want to upgrade all drivers to the latest one?"
STF_MB_TYPE  = 3
STF_MB_ICON  = 2
STF_MB_DEF   = 1

[PromptForInstallDADlgENG]
DlgType = "MessageBox"
STF_MB_TITLE = "The system is now ready to install Dynamic Access Server Software"
STF_MB_TEXT  = "If you choose to install it, it can be removed later."+
               $(!LF)$(!LF)"Do you want to install DA Server Software?"
STF_MB_TYPE  = 3
STF_MB_ICON  = 2
STF_MB_DEF   = 1

[DialogConstantsENG]
Help = "&Help"
Exit = "Cancel"
OK = "OK"
HelpContext = ""
Continue = "Continue"
Cancel = "Cancel"


;(%VER OEMSETUP.INF - Version 2.0.24)
Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: web2, load: 1.90