Disk_2/OEMSETUP.INF Driver File Contents (disk2.zip)

Driver Package File Name: disk2.zip
File Size: 574.9 KB

;=============================================================================
; 3Com 3c359 TokenLink Velocity XL PCI Adapter
; ISA OEM Network Setup Information file for Microsoft Windows NT Version 
; 3.51 & 4.0
; (C) Copyright 1995 3Com Corporation
; %VER 3Com TokenLink PCI Adapter Windows NT 3.51/4.0 PCI OEMSETUP.INF v6.6
;=============================================================================
;10-30-98   Greg White  NT4.0  Modified for Wake On Lan

[Identification]
    OptionType = NetAdapter
[PlatformsSupported]
    PCI
[Options]
    Tlnkp     
[FileConstants]
    GenericSysName     = "tlnkp.sys"
    GenericName        = "TLNKP"
    UtilityInf      = "UTILITY.INF"
    ParamInf        = "NCPARAM.INF"
    DialogDLL       = "tlnkpdlg.dll"
    DialogNT351DLL  = "tlnkp351.dll"
    subroutineinf   = "SUBROUTN.INF"
    SoftwareType    = "driver"
    Exit_Code       = 0
    NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
    IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
    Manufacturer    = "Microsoft"
    ProductMajorVersion     = "6"
    ProductMinorVersion     = "0"
    ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
    ProductSoftwareName     = "TLNKP"
    ProductSoftwareImagePath = "\SystemRoot\System32\drivers\"$(GenericSysName)
    NetRuleSoftwareType     = "tlnkpSys ndisDriver tlnkpDriver"
    NetRuleSoftwareUse      = $(SoftwareType)
    NetRuleSoftwareBindForm = """tlnkpSys"" yes no container"
    NetRuleSoftwareClass    = {"tlnkpDriver basic"}
    NetRuleSoftwareBindable = {"tlnkpDriver tlnkpAdapter non exclusive 100"}
    ProductHardwareName        = "TLNKP"
    NetRuleHardwareType        = "tlnkp tlnkpAdapter"
    NetRuleHardwareBindForm    = " yes yes container"
    NetRuleHardwareClass       = {"tlnkpAdapter basic"}
    ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
    ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
    3CNUMBER = "TLNKP"
    GROUP_NAME = "3Com TokenLink Velocity XL PCI Adapter"

[GeneralConstants]
from      = ""
to        = ""
ExitCodeOk     = 0
ExitCodeCancel = 1
ExitCodeFatal  = 2
KeyNull         = ""
MAXIMUM_ALLOWED   = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct      = ""
KeyParameters   = ""
Result = ""
TimeOut = 0
PriorityError = "ERROR"
PriorityEvent = "PriorityEvent" 
SignalSet = "EventSet"
Null = ""
Exitcode        = 0
TRUE            = 1
FALSE           = 0
NoTitle         = 0
ExitState   = "Active"
OldVersionExisted = $(FALSE)
DriverPath      = $(!STF_NTPATH)\drivers
INF_PROCESSOR = "I386"

[date]
    Now = {} ? $(!LIBHANDLE) GetSystemDate
[Identify]
    read-syms Identification
    set Status     = STATUS_SUCCESSFUL
    set Identifier = $(OptionType)
    set Media      = #("Source Media Descriptions", 1, 1)
    Set !G:DebugOutputControl = 1
    Set !DebugOutputControl = 1
    Set !STF_DISPLAYDEBUGOUTPUT = 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 = +
    set OptionList     = ^(Options, 1)
    set OptionTextList = ^(OptionsText$($0), 1)
    set Status         = STATUS_SUCCESSFUL
finish_ReturnOptions = +
    Return $(Status) $(OptionList) $(OptionTextList)
[InstallOption]
    set Status   = STATUS_FAILED
    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
    Debug-Output "OEMNAD3T.INF: STF_CWDIR is: "$(!STF_CWDIR)
    set-subst LF = "\n"
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

	; GET WINDOWS NT VERSION 
    set CurrentVersionValue = ""
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" $(!REG_KEY_READ) KeyWinNT
    ifstr(i) $(KeyWinNT) != ""
	GetRegValue $(KeyWinNT) "CurrentVersion" CurrentVersionValue
	CloseRegKey $(KeyWinNT)
    endif

    set m_WinNTVersion = *($(CurrentVersionValue),4)
    Debug-Output " m_WinNTVersion = "$(m_WinNTVersion)

	ifcontains(i) $(m_WinNTVersion) in {"3.50", "3.51"}
			; WinNT 3.5x
			set WINNT351 = 1

		else
			; WinNT 4.x
			set WINNT351 = 0

		endif

	; END GET WINDOWS NT VERSION

    read-syms DialogConstants$(!STF_LANGUAGE)
    ifstr(i) $(!NTN_Origination) == "NCPA"
	set Continue = $(OK)
	set Priority = $(Priority)
    endif
    Debug-Output "OEMNAD3T.INF: Priority is: "$(Priority)
    detect date
    set-title  $(FunctionTitle)
    set to   = Begin
    set from = Begin
    set CommonStatus = STATUS_SUCCESSFUL
    EndWait
Begin = +
    Debug-Output "OEMNAD3T.INF: Begin - In"
    Set ActivateDetection = FALSE
    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
	set StartLabel = configureadapter
	Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
	    Debug-Output "Cannot configure the driver software."
	    Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
	    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		Debug-Output "ShellCode error: cannot get an error string."
		goto ShellCodeError
	    endif
	    set Error = $($R0)
	    set from = end
	    set to = end
	    goto nonfatalinfo
	endif
    else
	set StartLabel = installadapter
	set OEM_ABANDON_OPTIONS = {}
	set OEM_ABANDON_SOFTWARE = FALSE
	set OEM_ABANDON_ON = TRUE
    endif

    Debug-Output "OEMNAD3T.INF: =================================================="
    Debug-Output "OEMNAD3T.INF: STF_CWDIR is: "$(!STF_CWDIR)
    Debug-Output "OEMNAD3T.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
    Debug-Output "OEMNAD3T.INF: Option is: "$(Option)
    Debug-Output "OEMNAD3T.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
    Debug-Output "OEMNAD3T.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
    Debug-Output "OEMNAD3T.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
    Debug-Output "OEMNAD3T.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
    Debug-Output "OEMNAD3T.INF: Priority is: "$(Priority)
    Debug-Output "OEMNAD3T.INF: =================================================="

    Debug-Output "OEMNAD3T.INF: Calling Param_SetDefaults"
    Shell $(ParamInf) Param_SetDefaults {}

    ;;
    ;; Default settings of the Adapter.
    ;;

    set AutoRingSpeedValue = *($(AutoRingSpeedList), 1)
    set PCIVendorIdValue = "Auto"
    set MemoryBaseAddrValue = "Auto"
    set Priority = $(Priority)
    set InterruptValue = "Auto"
    set NodeAddressValue = "Default"
    set WakeOnMagicValue = "Yes"
    set WakeOnLinkValue = "No"
    set WakeOnPatternValue = "Yes"
    set CurrentNodeAddressValue = "Default"
    set RxFragmentSizeValue = "Auto"
    set RxFragmentNumberValue = "Auto"
    set TxFragmentSizeValue = "Auto"
    set TxFragmentNumberValue = "Auto"
    set ChipRevisionValue = "Auto"
    set DriverStateValue = "Loading"
    set ConfiguredRingSpeedValue = ""
    set BusTypeValue = 5
    set BusNumberValue = 0
    set SlotNumberValue = 0

    Set from = $(fatal)
    Set to = $(fatal)
    Goto $(StartLabel)
installadapter = +
    Debug-Output "OEMNAD3T.INF: Entering Installadapter"

    set WINNT351 = 0
    set Vendor = 4279
    set CardID = 13712
    Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CardID)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
	goto ShellCodeError
    endif
    set AdapterList = $($R0)
    set NewAdapterList = {}
    set NumNew = 0
    ForListDo $(AdapterList)
	set BusNumber = *($($),1)
	set SlotNum = *($($),2)
	Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNumber), +
	$(SlotNum), $(GenericAdapterName), $(ProductHardwareName)
	ifstr(i) $($R1) != "YES"
	    set-add NumNew = $(NumNew),1

	    ifstr(i) $(NewAdapterList) == {}
		set NewAdapterList = {$($)}
	    else
		set NewAdapterList = >($(NewAdapterList),$($))
	    endif
	endif
    EndForListDo

    set AdapterList = $(NewAdapterList)

    ifint $(NumNew) == 0
	set AdapterList = {{0,0,0}}
    endif
    Debug-Output $(AdapterList)

    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
	CloseRegKey $(KeyProduct)
	ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
	    Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
	       $(ProductVersion)
	    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		Debug-Output "ShellCode error: cannot get an error string."
		goto ShellCodeError
	    endif
	    goto end
	else
	    Shell $(UtilityInf), CardExistedDlg
	    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		Debug-Output "ShellCode error: cannot get an error string."
		goto ShellCodeError
	    endif
	    ifstr(i) $($R1) != "OK"
		goto end
	    endif
	    set OldVersionExisted = $(TRUE)
	endif
    endif
    ifint $(OldVersionExisted) == $(FALSE)
	ifstr(i) $(!NTN_InstallMode) == "install"
	    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
		Set SrcDir = $($R1)
	    endif
	    ; install "Install-Helpfile"
	endif
    endif
    ;SetHelpFile "tlnkp.hlp" 1 11
    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
    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
    Set SrcDir = $($R1)
    Debug-Output "OEMNAD3T.INF: SrcDir is:"$($R1)
    install "Install-Dll"
;   goto adaptersetup
    ui pop 1
    goto adapterverify

configureadapter = +
    Debug-Output "OEMNAD3T.INF: Entering Configureadapter"
    ;SetHelpFile "tlnkp.hlp" 1 11
    Ifstr $(KeyProduct) == $(KeyNull)
	OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
	Ifstr $(KeyProduct) == $(KeyNull)
	    set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
	    Debug-Output "Cannot find component product key"
	    goto fatalregistry
	Endif
    Endif
    Debug-Output "INF: Shelling to FindService"
    Shell $(UtilityInf) FindService, $(KeyProduct)
    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
	Debug-Output "INF: FindService shell failure"
	Goto ShellCodeError
    Endif
    Ifstr(i) $($R0) != NO_ERROR
	Debug-Output "INF: FindService Shell error: "$($R0)
	Goto fatalregistry
    endif
    Set KeyParameters = $($R2)
    CloseRegKey $($R1)
    Ifstr $(KeyParameters) == $(KeyNull)
	set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
	Debug-Output "Cannot find component service"
	goto fatalregistry
    endif
    set OldVersionExisted = $(TRUE)
    set ValueName = ""
    set ValueData = ""
    set ValueStr  = ""
    set ValueList = {}
    EnumRegValue $(KeyParameters) ValueList
    ForListDo $(ValueList)
	set ValueItem = $($)
	set ValueName = *($(ValueItem),1)
	set ValueData = *($(ValueItem),4)
;08-28-98   Greg White    Wake On Lan changes
	ifstr(i) $(ValueName) == "InterruptNumber"
	    set InterruptValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "WakeOnMagic"
	    set WakeOnMagicValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "WakeOnLink"
	    set WakeOnLinkValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "WakeOnPattern"
	    set WakeOnPatternValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "AutoRingSpeed"
	    set AutoRingSpeedValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "MemoryBaseAddress"
	    set MemoryBaseAddrValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "NETWORKADDRESS"
	   set NodeAddressValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "TlnkpNetworkAddress"
	    set CurrentNodeAddressValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "RxFragmentSize"
	    set RxFragmentSizeValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "RxFragmentNumber"
	    set RxFragmentNumberValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "TxFragmentSize"
	    set TxFragmentSizeValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "TxFragmentNumber"
	    set TxFragmentNumberValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "ChipRevision"
	    set ChipRevisionValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "PCIVendorId"
	    set PCIVendorIdValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "DriverState"
	    set DriverStateValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "RingSpeed"
	    set ConfiguredRingSpeedValue = $(ValueData)
	else-ifstr(i) $(ValueName) == "BusType"
	    set BusInterfaceType = $(ValueData)
	else-ifstr(i) $(ValueName) == "BusNumber"
	    set BusNumber = $(ValueData)
	else-ifstr(i) $(ValueName) == "SlotNumber"
	    set SlotNumberValue = $(ValueData)

	endif
    EndForListDo
    Debug-Output "OEMNAD3T.INF: =================================================="
    Debug-Output "OEMNAD3T.INF: Interrupt is "$(InterruptValue)
	Debug-Output "OEMNAD3T.INF: WakeOnMagic is "$(WakeOnMagicValue)
	Debug-Output "OEMNAD3T.INF: WakeOnLink is "$(WakeOnLinkValue)
    Debug-Output "OEMNAD3T.INF: WakeOnPattern is "$(WakeOnPatternValue)
    Debug-Output "OEMNAD3T.INF: AutoRingSpeedValue is "$(AutoRingSpeedValue)
    Debug-Output "OEMNAD3T.INF: MemoryBaseAddrValue is "$(MemoryBaseAddrValue)
    Debug-Output "OEMNAD3T.INF: Node Address is "$(NodeAddressValue)
    Debug-Output "OEMNAD3T.INF: Current Node Address is "$(CurrentNodeAddressValue)
    Debug-Output "OEMNAD3T.INF: RxFragmentSizeValue is "$(RxFragmentSizeValue)
    Debug-Output "OEMNAD3T.INF: RxFragmentNumberValue is "$(RxFragmentNumberValue)
    Debug-Output "OEMNAD3T.INF: TxFragmentSizeValue is "$(TxFragmentSizeValue)
    Debug-Output "OEMNAD3T.INF: TxFragmentNumberValue is "$(TxFragmentNumberValue)
    Debug-Output "OEMNAD3T.INF: ChipRevisionValue is "$(ChipRevisionValue)
    Debug-Output "OEMNAD3T.INF: PCIVendorIdValue is "$(PCIVendorIdValue)
    Debug-Output "OEMNAD3T.INF: DriverStateValue is "$(DriverStateValue)
    Debug-Output "OEMNAD3T.INF: ConfiguredRingSpeedValue is "$(ConfiguredRingSpeedValue)
    Debug-Output "OEMNAD3T.INF: BusTypeValue is "$(BusTypeValue)
    Debug-Output "OEMNAD3T.INF: BusNumberValue is "$(BusNumber)
    Debug-Output "OEMNAD3T.INF: SlotNumberValue is "$(SlotNumberValue)

    Debug-Output "OEMNAD3T.INF: =================================================="

    set AutoRingSpeedValue = *($(AutoRingSpeedList), ~($(AutoRingSpeedValues),$(AutoRingSpeedValue)))
    ifint $(AutoRingSpeedValue) == 1
	set AutoRingSpeedValue = *($(AutoRingSpeedList), 1)
    endif

    ifint $(DriverStateValue) == 1
	set DriverStateValue = "Loaded"
    else-ifint $(DriverStateValue) == 2
	set DriverStateValue = "Unloaded"
    endif

    Debug-Output "OEMNAD3T.INF: =================================================="
    Debug-Output "OEMNAD3T.INF: AutoRingSpeedValue is "$(AutoRingSpeedValue)
    Debug-Output "OEMNAD3T.INF: =================================================="
    Debug-Output "OEMNAD3T.INF: "

adaptersetup = +
    Debug-Output "OEMNAD3T.INF: Entering adaptersetup"

    set Result = $(SignalSet)
    Set from = adapteroptions
adapteroptions = +
    Debug-Output "OEMNAD3T.INF: Entering adapteroptions"
    Debug-Output "OEMNAD3T.INF: Loading Dialog dll"

    ifint $(WINNT351) == 0    

    Debug-Output "OEMNAD3T.INF: Loading Dialog NT 4.0 dll"
    LoadLibrary $(Media) $(DialogDLL) hLib
    Debug-Output "OEMNAD3T.INF: Dialog name:"$(DialogDLL)

    else 

    Debug-Output "OEMNAD3T.INF: Loading Dialog NT 3.51 dll"
    LoadLibrary $(Media) $(DialogNT351DLL) hLib
    Debug-Output "OEMNAD3T.INF: Dialog name:"$(DialogNT351DLL)

    endif

    Debug-Output "OEMNAD3T.INF: Load Dialog dll finished"

    Debug-Output "OEMNAD3T.INF: =================================================="
    Debug-Output "OEMNAD3T.INF: Interrupt is "$(InterruptValue)
    Debug-Output "OEMNAD3T.INF: WakeOnMagicValue is "$(WakeOnMagicValue)
	Debug-Output "OEMNAD3T.INF: WakeOnLinkValue is "$(WakeOnLinkValue)
    Debug-Output "OEMNAD3T.INF: WakeOnPatternValue is "$(WakeOnPatternValue)
	Debug-Output "OEMNAD3T.INF: AutoRingSpeedValue is "$(AutoRingSpeedValue)
    Debug-Output "OEMNAD3T.INF: MemoryBaseAddrValue is "$(MemoryBaseAddrValue)
    Debug-Output "OEMNAD3T.INF: Node Address is "$(NodeAddressValue)
    Debug-Output "OEMNAD3T.INF: Current Node Address is "$(CurrentNodeAddressValue)
    Debug-Output "OEMNAD3T.INF: RxFragmentSizeValue is "$(RxFragmentSizeValue)
    Debug-Output "OEMNAD3T.INF: RxFragmentNumberValue is "$(RxFragmentNumberValue)
    Debug-Output "OEMNAD3T.INF: TxFragmentSizeValue is "$(TxFragmentSizeValue)
    Debug-Output "OEMNAD3T.INF: TxFragmentNumberValue is "$(TxFragmentNumberValue)
    Debug-Output "OEMNAD3T.INF: ChipRevisionValue is "$(ChipRevisionValue)
    Debug-Output "OEMNAD3T.INF: PCIVendorIdValue is "$(PCIVendorIdValue)
    Debug-Output "OEMNAD3T.INF: DriverStateValue is "$(DriverStateValue)
    Debug-Output "OEMNAD3T.INF: ConfiguredRingSpeedValue is "$(ConfiguredRingSpeedValue)
    Debug-Output "OEMNAD3T.INF: BusTypeValue is "$(BusTypeValue)
    Debug-Output "OEMNAD3T.INF: BusNumberValue is "$(BusNumber) 
    Debug-Output "OEMNAD3T.INF: SlotNumberValue is "$(SlotNumberValue)

    Debug-Output "OEMNAD3T.INF: =================================================="
    Debug-Output "OEMNAD3T.INF: "

    ifint $(WINNT351) == 0    
    read-syms FileDependentDlg$(!STF_LANGUAGE)

    set Label = $(EditLabel)
    set Value = *($(EditTextIn),1)

    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo2Label)
    set Value = *($(EditTextIn),2)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo3Label)
    set Value = *($(EditTextIn),3)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo4Label)
    set Value = *($(EditTextIn),4)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo7Label)
    set Value = *($(EditTextIn),5)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo10Label)
    set Value = *($(EditTextIn),6)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo11Label)
    set Value = *($(EditTextIn),7)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo12Label)
    set Value = *($(EditTextIn),8)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo13Label)
    set Value = *($(EditTextIn),9)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo14Label)
    set Value = *($(EditTextIn),10)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo15Label)
    set Value = *($(EditTextIn),15)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo16Label)
    set Value = *($(EditTextIn),16)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo17Label)
    set Value = *($(EditTextIn),17)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo5Label)
    set Value = *($(EditTextIn),11)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo6Label)
    set Value = *($(EditTextIn),12)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo8Label)
    set Value = *($(EditTextIn),13)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    set Label = $(Combo9Label)
    set Value = *($(EditTextIn),14)
    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    else 

    Debug-Output "read the NT 351 dialog"
    read-syms FileDependentDlgNTOLD$(!STF_LANGUAGE)

    set Label = $(EditLabel)
    set Value = *($(EditTextIn),1)

    Debug-Output "OEMNAD3T.INF: Pre ui, Value for $(Label) = $(Value)."

    endif

    Debug-Output "OEMNAD3T.INF: Begin UI"

    ui start "InputDlg" $(hLib)
    set ExitButton      = $(ButtonPressed)
    Debug-Output " OEMNAD3T.INF:ButtonPressed "$(ButtonPressed)
    Debug-Output $(DLGEVENT)

    Debug-Output " Calling WaitOnEvent"
    WaitOnEvent $(Result) $(PriorityEvent) $(TimeOut)
    Debug-Output " Calling FreeLibrary"
    FreeLibrary $(hLib)
    ifstr(i) $(DLGEVENT) == "CONTINUE"
	Debug-Output "OEMNAD3T.INF: CONTINUE"
	set ExitButton = $(ButtonPressed)

	set Label = $(EditLabel)
	set Value = *($(EditTextOut),1)
	set NodeAddressValue  = $(Value)
	Debug-Output "OEMNAD3T.INF: Post ui, Value for .$(Label). = .$(Value)."

	set AutoRingSpeedValue = $(Combo1Out)
	Debug-Output "OEMNAD3T.INF: AutoRingSpeedValue ="$(AutoRingSpeedValue)

	ifint $(WINNT351) == 0
	set Label = $(Combo2Label)
	set Value = *($(EditTextOut),2)
	set PCIVendorIdValue = $(Value)
	Debug-Output "OEMNAD3T.INF: PCIVendorIdValue ="$(PCIVendorIdValue)

	set Label = $(Combo3Label)
	set Value = *($(EditTextOut),3)
	set MemoryBaseAddrValue = $(Value)
	Debug-Output "OEMNAD3T.INF: MemoryBaseAddrValue ="$(MemoryBaseAddrValue)

	set Label = $(Combo4Label)
	set Value = *($(EditTextOut),4)
	set ConfiguredRingSpeedValue = $(Value)
	Debug-Output "OEMNAD3T.INF: ConfiguredRingSpeedValue ="$(ConfiguredRingSpeedValue)

	set Label = $(Combo7Label)
	set Value = *($(EditTextOut),5)
	set DriverStateValue = $(Value)
	Debug-Output "OEMNAD3T.INF: DriverStateValue ="$(DriverStateValue)

	set Label = $(Combo10Label)
	set Value = *($(EditTextOut),6)
	set InterruptValue = $(Value)
	Debug-Output "OEMNAD3T.INF: InterruptValue ="$(InterruptValue)

	set Label = $(Combo11Label)
	set Value = *($(EditTextOut),7)
	set ChipRevisionValue = $(Value)
	Debug-Output "OEMNAD3T.INF: ChipRevisionValue ="$(ChipRevisionValue)

	set Label = $(Combo12Label)
	set Value = *($(EditTextOut),8)
	set CurrentNodeAddressValue = $(Value)
	Debug-Output "OEMNAD3T.INF: CurrentNodeAddressValue ="$(CurrentNodeAddressValue)

	set Label = $(Combo13Label)
	set Value = *($(EditTextOut),9)
	set BusNumber = $(Value)
	Debug-Output "OEMNAD3T.INF: BusNumber ="$(BusNumber)

	set Label = $(Combo14Label)
	set Value = *($(EditTextOut),10)
	set SlotNumberValue = $(Value)
	Debug-Output "OEMNAD3T.INF: Slot Number ="$(SlotNumberValue)

	set Label = $(Combo5Label)
	set Value = *($(EditTextOut),11)
	set TxFragmentSizeValue = $(Value)
	Debug-Output "OEMNAD3T.INF: TxFragmentSizeValue ="$(TxFragmentSizeValue)

	set Label = $(Combo6Label)
	set Value = *($(EditTextOut),12)
	set TxFragmentNumberValue = $(Value)
	Debug-Output "OEMNAD3T.INF: TxFragmentNumberValue ="$(TxFragmentNumberValue)

	set Label = $(Combo8Label)
	set Value = *($(EditTextOut),13)
	set RxFragmentNumberValue = $(Value)
	Debug-Output "OEMNAD3T.INF: RxFragmentNumberValue ="$(RxFragmentNumberValue)

	set Label = $(Combo9Label)
	set Value = *($(EditTextOut),14)
	set RxFragmentSizeValue = $(Value)
	Debug-Output "OEMNAD3T.INF: RxFragmentSizeValue ="$(RxFragmentSizeValue)

    set Label = $(Combo15Label)
	set Value = *($(EditTextOut),15)
	set WakeOnMagicValue = $(Value)
	Debug-Output "OEMNAD3T.INF: WakeOnMagicValue ="$(WakeOnMagicValue)

	set Label = $(Combo16Label)
	set Value = *($(EditTextOut),16)
	set WakeOnLinkValue = $(Value)
	Debug-Output "OEMNAD3T.INF: WakeOnLinkValue ="$(WakeOnLinkValue)

	set Label = $(Combo17Label)
	set Value = *($(EditTextOut),17)
	set WakeOnPatternValue = $(Value)
	Debug-Output "OEMNAD3T.INF: WakeOnPatternValue ="$(WakeOnPatternValue)
	
	endif

	ui pop 1

    else-ifstr(i) $(DLGEVENT) == "BACK"
	Debug-Output "OEMNAD3T.INF: BACK"
	;set CommonStatus = STATUS_USERCANCEL
	;Debug-Output "Action: exit. Bye."
	;ui pop 1
	;goto end

	set Result = $(Null)

	Debug-Output "OEMNAD3T.INF: Priority Button Pressed!!"
	;RunProgram Exitcode "" "" $(!STF_WINDOWSSYSPATH)\control.exe "pacecfg.cpl"
	StartDetachedProcess Exitcode "" "" $(!STF_WINDOWSSYSPATH)\control.exe "pacecfg.cpl"
	set Result = $(SignalSet)
	SignalEvent $(Result) $(PriorityEvent)

	ifstr(i) $(Exitcode) == $(PriorityError)
	     Debug-Output "OEMNAD3T.INF: Exit Code = "$(Exitcode)
	     Debug-Output " Called SignalEvent"
	     Debug-Output "Action: Exit. Bye."
	     ui pop 1
	     goto end
	else
	     Debug-Output "OEMNAD3T.INF: Exit Code = "$(Exitcode)
	     Debug-Output " Called SignalEvent"
	     ui pop 1
	     Debug-Output "Action: Go Back To Adapter Setup."
	     goto adaptersetup
	     ;goto end
	endif
    else-ifstr(i) $(DLGEVENT) == "EXIT"
	set CommonStatus = STATUS_USERCANCEL
	Debug-Output "Action: exit. "
	ui pop 1
	goto end
    else
	ui pop 1
	Debug-Output "Action: unknown. Bye."
	goto end
    endif
adapterverify =+
    Debug-Output "OEMNAD3T.INF: Entering adapterverify"

skipoptions =+
    Debug-Output "OEMNAD3T.INF: Entering skipoptions"

    ifint $(OldVersionExisted) == $(TRUE)
	Debug-Output "OEMNAD3T: OlderVersionExisted - TRUE"
	ifstr(i) $(!NTN_InstallMode) == configure
	    Shell $(UtilityInf), GetBusTypeNum
	    set BusTypeNum = $($R1)
	    set BusNumberValue = 0 

	    Debug-Output " OEMNAD3T: Bus Type is "$(BusTypeNum)
	    Debug-Output " OEMNAD3T: Bus Number is "$(BusNumber)

	    Debug-Output " OEMNAD3T: Before write registry"
	    set AutoRingSpeedValue = *($(AutoRingSpeedValues), ~($(AutoRingSpeedList),$(AutoRingSpeedValue)))

	    set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeValue)},+
				{NETWORKADDRESS,$(NoTitle),$(!REG_VT_SZ),$(NodeAddressValue)},+
				{AutoRingSpeed, $(NoTitle),$(!REG_VT_DWORD),$(AutoRingSpeedValue)}}
	    Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)

	    CloseRegKey $(KeyParameters)
	    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		Debug-Output "ShellCode error."
		goto ShellCodeError
	    endif
	    set RegistryErrorIndex = $($R0)
	    Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
		Debug-Output "Registry error: Add value list"
		goto fatalregistry
	    endif
	    EndWait
	    goto successful
	endif
    endif
    StartWait
    ifint $(OldVersionExisted) == $(FALSE)
	Debug-Output "OEMNAD3T: OlderVersionExisted - FALSE"
	ifstr(i) $(!NTN_InstallMode) == "install"
	    Ifstr(i) $(DoCopy) == "YES"
		Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
		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
		Set SrcDir = $($R1)
	    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
	Debug-Output "OEMNAD3T: ProductSoftwareName: "$(ProductSoftwareName)
	Debug-Output "OEMNAD3T: ProductSoftwareTitle: "$(ProductSoftwareTitle)
	Debug-Output "OEMNAD3T: !STF_CONTEXTINFNAME is: "$(!STF_CONTEXTINFNAME)
	Debug-Output "OEMNAD3T: ProductSoftwareImagePath: "$(ProductSoftwareImagePath)
	Debug-Output "OEMNAD3T: NetEventDLL: "$(NetEventDLL)
	Debug-Output "OEMNAD3T: Manufacturer: "$(Manufacturer)

	Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
	    $(ProductSoftwareName), +
	    $(ProductSoftwareName), +
	    $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
	    $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
	    $(NetEventDLL)
	Set OEM_ABANDON_SOFTWARE = TRUE
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error"
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	set KeyProduct      = $($R1)
	Set SoftNetRulesKey = $($R2)
	CloseRegKey $($R3)
	CloseRegKey $($R4)
	CloseRegKey $($R5)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    EndWait
	    Debug-Output "Registry error: add software components"
	    CloseRegKey $(KeyProduct)
	    CloseRegKey $(SoftNetRulesKey)
	    goto fatalregistry
	endif
	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)},+
	       {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
	       {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
	Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error."
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    EndWait
	    Debug-Output "Registry error: add value list."
	    CloseRegKey $(KeyProduct)
	    CloseRegKey $(SoftNetRulesKey)
	    goto fatalregistry
	endif
	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, $(SoftNetRulesKey), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error."
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	CloseRegKey $(KeyProduct)
	CloseRegKey $(SoftNetRulesKey)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    EndWait
	    Debug-Output "Resgitry error: add value list."
	    goto fatalregistry
	endif
    endif
    Debug-Output "AdapterList "$(AdapterList)

    set IAutoRingSpeed = $(AutoRingSpeedValue)

    ForListDo $(AdapterList)
	Debug-Output "For Loop Count"
	set BusNumber = *($($),1)
	set DeviceNum = *($($),2)
	set FunctionNum = *($($),3)
	Debug-Output "OEMNAD3T: For Loop Count"
	Debug-Output "ProductHardwareName="$(ProductHardwareName)
	Debug-Output "ProductKeyName="$(ProductKeyName)
	Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
	Debug-Output "KeyAdapterRules="$($R2)
	Debug-Output "KeyParameters="$($R3)
	Debug-Output "Adapter Number="$($R4)
	ifint $($R4) != -1
	    Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
	endif
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "Cannot add hardware component"
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    EndWait
	    Debug-Output "Registry error: add hardware component"
	    CloseRegKey $($R1)
	    CloseRegKey $($R2)
	    CloseRegKey $($R3)
	    goto fatalregistry
	endif
	set KeyParameters = $($R3)
	set KeyAdapterRules = $($R2)
	set AdapterNumber = $($R4)

	set HardwareDescription = $(GenericAdapterName)
	set HardwareTitle = $(GenericAdapterName)
	set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
		   {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(HardwareTitle)},+
		   {Description,$(NoTitle),$(!REG_VT_SZ),$(HardwareDescription)},+
		   {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
		   {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
		   {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
	Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error"
	    goto ShellCodeError
	endif
	CloseRegKey $($R1)
	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)}}
	Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error."
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    EndWait
	    Debug-Output "Resgitry error: add value list."
	    CloseRegKey $(KeyParameters)
	    CloseRegKey $(KeyAdapterRules)
	    goto fatalregistry
	endif
	CloseRegKey $(KeyAdapterRules)
	goto writeparameters
writeparameters = +
	Debug-Output "OEMNAD3T: WriteParameters: IN"

	Shell $(UtilityInf), GetBusTypeNum
	set BusTypeNum = $($R1)
	set BusNumberValue = 0 

	Debug-Output " OEMNAD3T: Bus Type is "$(BusTypeValue)
	Debug-Output " OEMNAD3T: Bus Number Value is "$(BusNumberValue)

	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error."
	    goto ShellCodeError
	endif
	Debug-Output "OEMNAD3T: Before write registry"
	set AutoRingSpeedValue = *($(AutoRingSpeedValues), ~($(AutoRingSpeedList),$(IAutoRingSpeed)))
	Debug-Output " OEMNAD3T: AutoRingSpeed Value is "$(AutoRingSpeedValue)

	Debug-Output " OEMNAD3T: NodeAddress Value is "$(NodeAddressValue)

	set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),5},+
			    {NETWORKADDRESS,$(NoTitle),$(!REG_VT_SZ),$(NodeAddressValue)},+
				{WakeOnMagic,$(NoTitle),$(!REG_VT_SZ),$(WakeOnMagicValue)},+
				{WakeOnLink,$(NoTitle),$(!REG_VT_SZ),$(WakeOnLinkValue)},+
		{WakeOnPattern,$(NoTitle),$(!REG_VT_SZ),$(WakeOnPatternValue)},+
				{AutoRingSpeed,$(NoTitle),$(!REG_VT_DWORD),$(AutoRingSpeedValue)},+
			    {MediaType,$(NoTitle),$(!REG_VT_DWORD),2},+
			    {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),898633911},+
			    {SlotNumber, $(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
			    {BusNumber,  $(NoTitle),$(!REG_VT_DWORD),$(BusNumber)}}
	Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
	
	;**** For unattend installation
    ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
       Shell $(UtilityInf), AddDefaultNetcardParameters, $(KeyParameters)
    endif
	;**** Done

	CloseRegKey $(KeyParameters)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error."
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    Debug-Output "Registry error: Add value list"
	    goto fatalregistry
	endif

    EndForListDo
    EndWait

    Debug-Output "OEMNAD3T: WriteParameters: Out"

    goto paceentries
    ;goto successful

bindingadapter =+
    Debug-Output "OEMNAD3T: BindingAdapter: IN"
    set Error = "Binding: Sorry, not yet implemented."
    goto fatal
removeadapter = +
    Debug-Output "OEMNAD3T.INF: RemoveAdapter: IN"

    Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
	Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
	    $(ProductSoftwareName)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error"
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    goto fatalregistry
	endif
    else
	Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
	    $(ProductSoftwareName), $(!NTN_RegBase)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error"
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    goto fatalregistry
	endif
    endif
	Ifstr(i) $(!STF_PLATFORM) == $(INF_PROCESSOR)
	RunProgram ExitCode "Windows Directory" "" UNTLNKP.EXE "-inf"
	endif
    goto end

UpgradeSoftware = +
    Debug-Output "OEMNAD3T.INF: UpgradeSoftware: IN"

;   LoadLibrary "x" $(!STF_CWDDIR)\ncpa.cpl NCPA_HANDLE
;    OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\TLNKP" $(MAXIMUM_ALLOWED) KeyProduct
;    Ifstr $(KeyProduct) != $(KeyNull)
;       DeleteRegTree $(KeyProduct) ""
;       LibraryProcedure NCPA_RESULT $(NCPA_HANDLE), CPlSetup $(!STF_HWND), DELETESVC, "TLNKP"
;       set NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
;       OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(MAXIMUM_ALLOWED) IE_KeyNetcards
;       ifstr(i) $(IE_KeyNetcards) != ""    
;           EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
;           ForListDo $(IE_KeyNameList)
;               OpenRegKey $(IE_KeyNetcards) "" *($($),1) +
;                   $(MAXIMUM_ALLOWED) NetworkCardKey
;               Ifstr(i) $(NetworkCardKey) != $(KeyNull)
;                   GetRegValue $(NetworkCardKey),"ProductName", ProductNameInfo
;                   set ProductName = *($(ProductNameInfo), 4)
;                   Debug-Output "   ProductName = "$(ProductName)
;                   ifstr(i) $(ProductName) != "TLNKP"
;                       goto nextnetcard
;                   endif
;                   GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
;                   set ServiceName = *($(ServiceNameInfo), 4)
;                   Debug-Output "   ServiceName = "$(ServiceName)
;                   OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$(ServiceName) +
;                         $(MAXIMUM_ALLOWED) ServiceKey
;                   DeleteRegTree $(ServiceKey) ""
;                   DeleteRegTree $(NetworkCardKey) ""
;               endif
;nextnetcard = +
;           EndForListDo
;       endif   
;       OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\Tlnkp" $(MAXIMUM_ALLOWED) KeyProduct2
;       ifstr $(KeyProduct2) == $(KeyNull)
;           LibraryProcedure NCPA_RESULT $(NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, NetDetect
;           set !NTN_InstallMode = Install
;           Shell "" InstallOption $(!STF_LANGUAGE) "Tlnkp" $(SrcDir) "YES" "YES" "NO"
;           set !NTN_InstallMode = Update
;       else
;       endif
;    else
;    endif
;    FreeLibrary $(NCPA_HANDLE)
;    goto end

;**** June Chu, 03/16/99: rewrite the UpgradeSoftware code to fix the problem of updating the software
; Get inf file name
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_READ) KeyProduct                       
Ifstr $(KeyProduct) != $(KeyNull)                                                                         ;*
Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)                                
ifint $($ShellCode) != $(!SHELL_CODE_OK)                                                      
goto ShellCodeError                                                                       
endif                                                                                         
set !UG_Filename = $($R0)

install "Install-Update" 
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 

; Update Version for the new software
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_ALL_ACCESS) KeyProduct
Ifstr(i) $(KeyProduct) != $(KeyNull)
  SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)} 
  SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)} 
endif
CloseRegKey $(KeyProduct)

; Add the registry entry for WOL
Set DriverList = {1,2,3,4,5,6,7,8,9,10}  ; Max. 10 cards
ForListDo $(DriverList)
	set DriverNum = $($)
	OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\TLNKP"$(DriverNum)"\Parameters" +
	$(!REG_KEY_ALL_ACCESS) ServicesKey
	Ifstr(i) $(ServicesKey) != $(KeyNull)
		SetRegValue $(ServicesKey) {WakeOnMagic,$(NoTitle),$(!REG_VT_SZ), "Yes"}
	endif
	CloseRegKey $(ServicesKey)
EndForListDo     
;**** end of the UpgradeSoftware code

successful = +
    Debug-Output "OEMNAD3T.INF: Succesful: IN"
    goto end

abandon = +
    Debug-Output "OEMNAD3T.INF: Abandon: IN"

    ForListDo $(OEM_ABANDON_OPTIONS)
	Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
	    $(ProductSoftwareName), $($)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    Debug-Output "ShellCode error"
	    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)
	    Debug-Output "ShellCode error"
	    goto ShellCodeError
	endif
	set RegistryErrorIndex = $($R0)
	Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
	    goto fatalregistry
	endif
    endif
    goto end
warning = +
    Debug-Output "OEMNAD3T.INF: Warning: IN"

    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 "OEMNAD3T.INF: Nonfatalinfo: IN"

    Set Severity = STATUS
    Set CommonStatus = STATUS_USERCANCEL
    goto nonfatalmsg
nonfatal = +
    Debug-Output "OEMNAD3T.INF: Nonfatal: IN"

    Set Severity = NONFATAL
    goto nonfatalmsg
nonfatalmsg = +
    Debug-Output "OEMNAD3T.INF: nonfatalmsg: IN"

    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 "end"
    endif
fatalregistry = +
    Debug-Output "OEMNAD3T.INF: fataregistry: IN"

    Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
	goto ShellCodeError
    endif
    set Error = $($R0)
    goto fatal
fataldetect = +
    Debug-Output "OEMNAD3T.INF: fataldetect: IN"

    Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
	Debug-Output "ShellCode error: cannot get an error string."
	goto ShellCodeError
    endif
    set Error = $($R0)
    Goto fatal
fatal = +
    Debug-Output "OEMNAD3T.INF: fatal: IN"

    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 = +
    Debug-Output "OEMNAD3T.INF: ShellCodeError - In"
    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 "OEMNAD3T.INF: Setfailed - In"
    set CommonStatus = STATUS_FAILED
    ifstr(i) $(OEM_ABANDON_ON) == TRUE
	set OEM_ABANDON_ON = FALSE
	goto abandon
    endif
    goto end
end = +
    Debug-Output "OEMNAD3T.INF: end: IN"
    goto term
term = +
    Debug-Output "OEMNAD3T.INF: term - In"
    Return $(CommonStatus)

;[DebugConfiguration]
;    Set InfName = "OEMNAD3T.INF"
;    Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
;    return
;
paceentries = +
    Debug-Output "OEMNAD3T: Paceentries: IN"
;;
;; Pace Stuff included.
    ;  Put PACE information into registry ***START
    ;  This section contains all of the information for the PAce control panel
    ;  The adapter name goes in the registry key: LM\software\3Com\pacecards\TLNKP
    ;  The application specific stuff goes in LM\software\3Com\pacecards\applications

    ;*** this is the uninstaller part define 3CNUMBER to be the 3C product code for this product
    ;open software registry key to put uninstall info in registry.

    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\3Com\"$(ProductSoftwareName) $(!REG_KEY_ALL_ACCESS) KeyNt
    set TrayIconList = {3CUNINSTALL,$(NoTitle),$(!REG_VT_SZ),$(3CNUMBER)}
    SetRegValue $(KeyNt) $(TrayIconList)
    set TrayIconList = {PACENAME,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)}
    SetRegValue $(KeyNt) $(TrayIconList)
    CloseRegKey $(KeyNt)
    ;*** end uninstaller part

    ; open registry key SOFTPACEKEY = LM\Software
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE" $(!REG_KEY_WRITE) SOFTPACEKEY
    
    ; open registry key SOFTPACEKEY = LM\Software\3Com and create it if it is not there
    OpenRegKey $(SOFTPACEKEY) "" "3Com" $(!REG_KEY_WRITE) COMPACEKEY
    ifstr $(COMPACEKEY) == ""
	CreateRegKey $(SOFTPACEKEY) {"3Com", 0, GenericClass} "" $(!REG_KEY_WRITE) "" COMPACEKEY
    endif
    
    ; open registry key SOFTPACEKEY = LM\Software\3Com\PACECards and create it if it is not there
    OpenRegKey $(COMPACEKEY) "" "PACECards" $(!REG_KEY_WRITE) CARDPACEKEY
    ifstr $(CARDPACEKEY) == ""
	CreateRegKey $(COMPACEKEY) {"PACECards", 0, GenericClass} "" $(!REG_KEY_WRITE) "" CARDPACEKEY
    endif

    ; open registry key SOFTPACEKEY = LM\Software\3Com\PACECards\TLNKP and create it if it is not there
    OpenRegKey $(CARDPACEKEY) "" $(ProductSoftwareName) $(!REG_KEY_WRITE) TLNKPPACEKEY
    ifstr $(TLNKPPACEKEY) == ""
	CreateRegKey $(CARDPACEKEY) {$(ProductSoftwareName), 0, GenericClass} "" $(!REG_KEY_WRITE) "" TLNKPPACEKEY
    endif
    
    ; Set the adapter name in the registry
    SetRegValue $(TLNKPPACEKEY) {"Description", 0, $(!REG_VT_SZ), $(GROUP_NAME)}
	
    ; open registry key SOFTPACEKEY = LM\Software\3Com\PACECards\applications and create it if it is not there
    OpenRegKey $(CARDPACEKEY) "" "Applications" $(!REG_KEY_WRITE) APPPACEKEY
    ifstr $(APPPACEKEY) == ""
	CreateRegKey $(CARDPACEKEY) {"Applications", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPPACEKEY
    endif
; Each one of theses chunks adds an application and its values to the registry.
; This section adds this to the registry under the key:
;   HKEY_LOCAL_MACHINE\SOFTWARE\3Com\PACECards\Applications\APPLICATION_NAME
;                   Protocol=PROTOCOL_NAME
;                   Enabled=TRUE_OR_FALSE
;                   RangeStart=4_DIGIT_HEX#1
;                   RangeEnd=4_DIGIT_HEX#2
;
;        OpenRegKey $(APPPACEKEY) "" "APPLICATION_NAME" $(!REG_KEY_WRITE) APPSPECPACEKEY
;        ifstr $(APPSPECPACEKEY) == ""
;           CreateRegKey $(APPPACEKEY) {"APPLICATION_NAME", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
;        endif
;        set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"PROTOCOL_NAME"},+
;                {Enabled,$(NoTitle),$(!REG_VT_SZ),"TRUE_OR_FALSE"}, +
;                {RangeStart,$(NoTitle),$(!REG_VT_SZ),"4_DIGIT_HEX#1"}, +
;                {RangeEnd,$(NoTitle),$(!REG_VT_SZ),"4_DIGIT_HEX#2"}}
;        Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
;        ifint $($ShellCode) != $(!SHELL_CODE_OK)
;            goto ShellCodeError
;        endif
;        CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "Emotion CreativePartner (IPX)" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Emotion CreativePartner (IPX)", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"IPX"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"87C7"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"87C8"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)
   
	 
	OpenRegKey $(APPPACEKEY) "" "Emotion CreativePartner (TCP/IP)" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Emotion CreativePartner (TCP/IP)", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"0453"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"0455"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "InSoft Communique!" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"InSoft Communique!", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"1025, 1500"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"1050, 1525"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "Picturetel LiveLAN (over IPX)" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Picturetel LiveLAN (over IPX)", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"IPX"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"4050"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"4082"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "Picturetel LiveLAN (over TCP/IP)" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Picturetel LiveLAN (over TCP/IP)", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"06a4"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"06d6"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "Precept FlashWare" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Precept FlashWare", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"8000, C000"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"8000, C000"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "Progressive Networks RealAudio" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Progressive Networks RealAudio", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"6970"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"7170"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "Starlight Networks StarCast" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Starlight Networks StarCast", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"1911"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"1911"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "VCON Cruiser 100" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"VCON Cruiser 100", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"1500, 1600"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"1500, 1600"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "VXtreme Web Theater" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"VXtreme Web Theater", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"7000"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"7020"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif
	CloseRegKey $(APPSPECPACEKEY)

	OpenRegKey $(APPPACEKEY) "" "Xing Technology Streamworks" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Xing Technology Streamworks", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"1558"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"1558"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif

	OpenRegKey $(APPPACEKEY) "" "Vosaic Software Server" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Vosaic Software Server", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"TCP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"04D3"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"04D3"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif

	OpenRegKey $(APPPACEKEY) "" "Vosaic Software Client" $(!REG_KEY_WRITE) APPSPECPACEKEY
	ifstr $(APPSPECPACEKEY) == ""
	    CreateRegKey $(APPPACEKEY) {"Vosaic Software Client", 0, GenericClass} "" $(!REG_KEY_WRITE) "" APPSPECPACEKEY
	endif
	set NewValueList = {{Protocol,$(NoTitle),$(!REG_VT_SZ),"UDP"},+
		{Enabled,$(NoTitle),$(!REG_VT_SZ),"FALSE"}, +
		{RangeStart,$(NoTitle),$(!REG_VT_SZ),"F169"}, +
		{RangeEnd,$(NoTitle),$(!REG_VT_SZ),"F17D"}}
	Shell  $(UtilityInf), AddValueList, $(APPSPECPACEKEY), $(NewValueList)
	ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    goto ShellCodeError
	endif

    ; Close all opened registry keys.
	CloseRegKey $(APPSPECPACEKEY)
	CloseRegKey $(TLNKPPACEKEY)
	CloseRegKey $(APPPACEKEY)
	CloseRegKey $(CARDPACEKEY)
	CloseRegKey $(COMPACEKEY)
	CloseRegKey $(SOFTPACEKEY)

      Debug-Output "OEMNAD3T: Paceentries: OUT"

;;
;;

      Goto successful

[Install-Option]
    Debug-Output "OEMNAD3T.INF: Install-Option - In"
    set STF_VITAL = ""
    ifstr(i) $(AddCopy) == "YES"
	ifcontains(i) $(m_WinNTVersion) in {"3.50", "3.51"}
			; WinNT 3.5x
			AddSectionFilesToCopyList Files-$(Option) $(SrcDir)nt351 $(!STF_WINDOWSSYSPATH)\drivers
			AddSectionFilesToCopyList Files351-Dll $(SrcDir)nt351 $(!STF_WINDOWSSYSPATH)
			AddSectionFilesToCopyList Files-Bin $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
			AddSectionFilesToCopyList Files-Uninstall $(SrcDir)w95nt40 $(!STF_WINDOWSSYSPATH)
		else
			; WinNT 4.x
			AddSectionFilesToCopyList Files-$(Option) $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)\drivers
			AddSectionFilesToCopyList Files-Dll $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)
			AddSectionFilesToCopyList Files-Cpl $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)
			AddSectionFilesToCopyList Files-Bin $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
			AddSectionFilesToCopyList Files-Uninstall $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)
		endif
    endif
    ifstr(i) $(DoCopy) == "YES"
       set !STF_NCPA_FLUSH_COPYLIST = TRUE
       CopyFilesInCopyList
    endif
    Exit

[Install-Update]
   Debug-Output "OEMNAD3T.INF: Install-Update - In"
   set STF_VITAL        = ""
   set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
   ifcontains(i) $(m_WinNTVersion) in {"3.50", "3.51"}
		AddSectionFilesToCopyList Files-$(Option) $(SrcDir)nt351 $(!STF_WINDOWSSYSPATH)\drivers
		AddSectionFilesToCopyList Files351-Dll $(SrcDir)nt351 $(!STF_WINDOWSSYSPATH)	
		AddSectionFilesToCopyList Files-Uninstall $(SrcDir)w95nt40 $(!STF_WINDOWSSYSPATH)
   else
		AddSectionFilesToCopyList Files-$(Option) $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)\drivers
		AddSectionFilesToCopyList Files-Dll $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)
		AddSectionFilesToCopyList Files-Cpl $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)		
		AddSectionFilesToCopyList Files-Uninstall $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)
   endif
   AddSectionFilesToCopyList Files-Bin $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
   AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
   set !STF_NCPA_FLUSH_COPYLIST = TRUE
   CopyFilesInCopyList
   exit

[Install-Helpfile]
   Debug-Output "OEMNAD3T.INF: Install-Helpfile - In"
   set STF_VITAL        = ""
   set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
   ifstr(i) $(AddCopy) == "YES"
       ;AddSectionFilesToCopyList Files-hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
   endif
   ifstr(i) $(DoCopy) == "YES"
      set !STF_NCPA_FLUSH_COPYLIST = TRUE
      CopyFilesInCopyList
   endif
   exit
[Install-Dll]
   Debug-Output "OEMNAD3T.INF: Install-Dll - In"
   set STF_VITAL        = ""
   ifstr(i) $(AddCopy) == "YES"
       ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"} 
	   AddSectionFilesToCopyList Files-Dll $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)
	   AddSectionFilesToCopyList Files-Cpl $(SrcDir)\w95nt40 $(!STF_WINDOWSSYSPATH)
	   else ;;NT3.51
	   AddSectionFilesToCopyList Files351-Dll $(SrcDir)nt351 $(!STF_WINDOWSSYSPATH)
       endif
   endif
   ifstr(i) $(DoCopy) == "YES"
       set !STF_NCPA_FLUSH_COPYLIST = TRUE
       CopyFilesInCopyList
   endif
   exit
[Source Media Descriptions]
     1 = "3Com TokenLink Velocity XL PCI (3C359) Adapter"
[Signature]
    FileType = MICROSOFT_FILE
[GetSignature]
    read-syms Signature
    return $(FileType)
[ProductType]
    STF_PRODUCT  = Winnt
    STF_PLATFORM = I386
[Files-Inf]
    1,oemsetup.inf,  SIZE=1000, RENAME=$(!UG_Filename)
[Files-Tlnkp]
    1,TLNKP.SYS , SIZE=20000
[Files-Dll]
    1,Tlnkpdlg.DLL , SIZE=7000
[Files351-Dll]
    1,Tlnkp351.DLL , SIZE=7000
[Files-Cpl]
    1,Pacecfg.cpl, SIZE=10000
    1,Pacecfg.hlp, SIZE=6617
[Files-Uninstall]
	1,UNTLNKP.EXE, SIZE=6617
[Files-Bin]
    1,tlnkp.mac, SIZE=10000
;[Files-hlp]
;    1,TLNKP.HLP , SIZE=10000
[LanguagesSupported]
    ENG
[OptionsTextENG]
    Tlnkp     = "3Com TokenLink Velocity XL PCI Adapter (3C359/359B)"
[FileConstantsENG]
    ProCaption   = "Windows NT 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:"
    GenericAdapterName = "3Com TokenLink Velocity XL PCI Adapter(3C359/359B)"
    GenericDriverName  = "3Com TokenLink Velocity XL PCI Adapter(3C359/359B) Driver"
    ProductSoftwareDescription = $(GenericDriverName)
    ProductHardwareDescription = $(GenericAdapterName)
    ProductHardwareTLNKPDescription="3Com TokenLink Velocity XL PCI Adapter(3C359/359B) Driver"
    ProductSoftwareTitle =       $(GenericDriverName)
    ProductHardwareTLNKPTitle = $(GenericAdapterName)
    DialogDllName   = "tlnkpdlg.dll"

    AutoRingSpeedList = ^(AutoRingSpeedChoices, 1)
    AutoRingSpeedValues = ^(AutoRingSpeedChoices, 2)

[DialogConstantsENG]
    Help        = "&Help"
    Exit        = "C&ancel"
    OK          = "&OK"
    HelpContext = ""
    Continue    = "&Continue"
    Cancel      = "Ca&ncel"
    Priority    = "&Priority"

[MemoryMappedChoicesENG]
    Map_1 = 1, "ON"
    Map_2 = 0, "OFF"
[FileDependentDlgENG]
    NodeAddressLabel = "&Network Address"
	Combo17Label = "WakeOnPattern"
	Combo16Label = "WakeOnLink"
	Combo15Label = "WakeOnMagic"
    Combo14Label = "Slot Number"
    Combo13Label = "Bus Number"
    Combo12Label = "Current Network Address"
    Combo11Label = "Chip Revision"
    Combo10Label = "Interrupt Number"
    Combo9Label ="Rx Fra&gment Size"
    Combo8Label = "Rx &Fragment Number"
    Combo7Label = "Driver State"
    Combo6Label = "T&x Fragment Number"
    Combo5Label = "&Tx Fragment Size"
    Combo4Label = "Current Ring Speed"
    Combo3Label = "Memory Base Address"
    Combo2Label = "Vendor-Device Id"
    Combo1Label = "&Ring Speed Detection"

    DlgText = "Please select values for the following fields:"
    FunctionTitle   = $(GenericAdapterName)
    DlgType = "RadioCombination"
    DlgTemplate = "TLNKP"
    Caption = $(FunctionTitle)
    CBOptionsGreyed = {}
    OptionsGreyed = {}
    NotifyFields = {NO, NO}
    HelpContext = 1
    Combo1List = $(AutoRingSpeedList)
    Combo1Out  = $(AutoRingSpeedValue)

    Combo4List = $(ConfiguredRingSpeedValue)
    Combo4Out  = $(ConfiguredRingSpeedValue)

    Combo15List = $(YesNoValueList)
	Combo15Out =  $(WakeOnMagicValue)

    Combo16List = $(YesNoValueList)
	Combo16Out =  $(WakeOnLinkValue)

	Combo17List = $(YesNoValueList)
	Combo17Out =  $(WakeOnPatternValue)

    ComboListItemsIn = {Combo1List,Combo4List,Combo15List,Combo16List,Combo17List}

    ComboListItemsOut = {Combo1Out,Combo4Out,Combo15Out,Combo16Out,Combo17Out}
    
    EditField  = $(NodeAddressValue)
    EditLabel  = $(NodeAddressLabel)

    EditField2 = $(PCIVendorIdValue)
    EditField3 = $(MemoryBaseAddrValue)
    EditField4 = $(ConfiguredRingSpeedValue)
    EditField5 = $(DriverStateValue)
    EditField6 = $(InterruptValue)
    EditField7 = $(ChipRevisionValue)
    EditField8 = $(CurrentNodeAddressValue)
    EditField9 = $(BusNumber)
    EditField10= $(SlotNumberValue)
    EditField11= $(TxFragmentSizeValue)
    EditField12= $(TxFragmentNumberValue)
    EditField13= $(RxFragmentNumberValue)
    EditField14= $(RxFragmentSizeValue)
    EditField15= $(WakeOnMagicValue)
    EditField16= $(WakeOnLinkValue)
    EditField17= $(WakeOnPatternValue)
   
    EditTextIn  = {$(EditField),$(EditField2),$(EditField3),$(EditField4), +
		   $(EditField5),$(EditField6),$(EditField7),$(EditField8), +
		   $(EditField9),$(EditField10),$(EditField11),$(EditField12), +
		   $(EditField13),$(EditField14),$(EditField15),$(EditField16), +
		   $(EditField17)}
				  
    EditTextOut = {$(EditField),$(EditField2),$(EditField3),$(EditField4), +
		   $(EditField5),$(EditField6),$(EditField7),$(EditField8), +
		   $(EditField9),$(EditField10),$(EditField11),$(EditField12), +
		   $(EditField13),$(EditField14),$(EditField15),$(EditField16), +
		   $(EditField17)}

    EditTextLim = {12,4,4,2,4,2,2,12,2,2,4,4,4,4,3,3,3}

   
    ;RCCtlFocusOn = 403
    [AutoRingSpeedChoices]
    AutoRingSpeedList_1  = "Auto",1
    AutoRingSpeedList_2  = "4",4
    AutoRingSpeedList_3  = "16",16
	[YesNoChoices]
	YesNoValueList_1 = "YES","YES"
	YesNoValueList_2 = "NO","NO" 
[FileDependentDlgNTOLDENG]
    NodeAddressLabel = "&Network Address"
    Combo1Label = "&Ring Speed Detection"

    DlgText = "Please select values for the following fields:"
    FunctionTitle   = $(GenericAdapterName)
    DlgType = "RadioCombination"
    DlgTemplate = "TLNKP"
    Caption = $(FunctionTitle)
    CBOptionsGreyed = {}
    OptionsGreyed = {}
    NotifyFields = {NO, NO}
    HelpContext = 1

    Combo1List = $(AutoRingSpeedList)
    Combo1Out  = $(AutoRingSpeedValue)
    ComboListItemsIn = {Combo1List}
    ComboListItemsOut = {Combo1Out}

    EditField  = $(NodeAddressValue)
    EditLabel  = $(NodeAddressLabel)
    EditTextIn  = {$(EditField)}
    EditTextOut = {$(EditField)}
    EditTextLim = 12

    ;RCCtlFocusOn = 403
    [AutoRingSpeedChoices]
    AutoRingSpeedList_1  = "Auto",1
    AutoRingSpeedList_2  = "4",4
    AutoRingSpeedList_3  = "16",16

server: web1, load: 1.27