Oemsetup.inf Driver File Contents (YesTermIP.zip)

;***********************************************************************
;
; OEMSETUP.INF
;       CompuMaster 'TCP/IP over Twinax' Drivers SETUP INF file.
;       Supported Twinax Adapters:
;       - 5250 Enhanced IBM compatible Adapter.
;       - Attachmate IRMA Twinax ISA Adapter.
;       - BOS 5400 native Plus ISA Adapter.
;       - CGS TwinLinker ISA Adapter.
;       - Computer Lab 5250-I ISA Adapter.
;       - Decision Data ES/TEC 2 ISA Adapter.
;       - FARABI TwexJunior ISA Adapter.
;       - IDEA CAH-5251 ISA Adapter.
;       - I-O 8150 ISA Adapter.
;       - Maple M5250I ISA Adapter.
;       - Micro Integration 5250-EA ISA Adapter.
;       - Nlynx ES/TEC 2 ISA Adapter.
;       - Perle MicroPLUS 5250 ISA Adapter.
;       - PRAIM 3I50 ISA Adapter.
;       - PRAIM 3I52 ISA Adapter.
;       - PRAIM 3X52 ISA Adapter.
;       - PRAIM 3X54 PCI Adapter.
;
; History:
;       P.GalloRosso    30-Jul-1999     Creato
;       P.GalloRosso    15-Feb-2000     Aggiunta dll di EventLog (1.00.01)
;
; Current Version
;       1.00.01
;
;***********************************************************************

[Identification]
    OptionType = NetAdapter

[PlatformsSupported]
    ISA
    PCI

[LanguagesSupported]
    ENG
    ITA

[Options]
    Ibmc_00
    Ibmc_01
    Ibmc_02
    Ibmc_03
    Ibmc_04
    Ibmc_05
    Ibmc_06
    Ibmc_07
    Ibmc_08
    Ibmc_09
    Ibmc_10
    Ibmc_11
    Ibmc_12
    Ibmc_13
    Prm3I52
    Prm3X52
    Prm3X54

[OptionsTextENG]
    Ibmc_00 = "5250 Enhanced IBM compatible Adapter"
    Ibmc_01 = "Attachmate IRMA Twinax ISA Adapter"
    Ibmc_02 = "BOS 5400 native Plus ISA Adapter"
    Ibmc_03 = "CGS TwinLinker ISA Adapter"
    Ibmc_04 = "Computer Lab 5250-I ISA Adapter"
    Ibmc_05 = "Decision Data ES/TEC 2 ISA Adapter"
    Ibmc_06 = "FARABI TwexJunior ISA Adapter"
    Ibmc_07 = "IDEA CAH-5251 ISA Adapter"
    Ibmc_08 = "I-O 8150 ISA Adapter"
    Ibmc_09 = "Maple M5250I ISA Adapter"
    Ibmc_10 = "Micro Integration 5250-EA ISA Adapter"
    Ibmc_11 = "Nlynx ES/TEC 2 ISA Adapter"
    Ibmc_12 = "Perle MicroPLUS 5250 ISA Adapter"
    Ibmc_13 = "PRAIM 3I50 ISA Adapter"
    Prm3I52 = "PRAIM 3I52 ISA Adapter"
    Prm3X52 = "PRAIM 3X52 ISA Adapter"
    Prm3X54 = "PRAIM 3X54 PCI Adapter"

[OptionsTextITA]
    Ibmc_00 = "Adattatore compatibile IBM 5250 Enhanced"
    Ibmc_01 = "Adattatore ISA Attachmate IRMA Twinax"
    Ibmc_02 = "Adattatore ISA BOS 5400 native Plus"
    Ibmc_03 = "Adattatore ISA CGS TwinLinker"
    Ibmc_04 = "Adattatore ISA Computer Lab 5250-I"
    Ibmc_05 = "Adattatore ISA Decision Data ES/TEC 2"
    Ibmc_06 = "Adattatore ISA FARABI TwexJunior"
    Ibmc_07 = "Adattatore ISA IDEA CAH-5251"
    Ibmc_08 = "Adattatore ISA I-O 8150"
    Ibmc_09 = "Adattatore ISA Maple M5250I"
    Ibmc_10 = "Adattatore ISA Micro Integration 5250-EA"
    Ibmc_11 = "Adattatore ISA Nlynx ES/TEC 2"
    Ibmc_12 = "Adattatore ISA Perle MicroPLUS 5250"
    Ibmc_13 = "Adattatore ISA PRAIM 3I50"
    Prm3I52 = "Adattatore ISA PRAIM 3I52"
    Prm3X52 = "Adattatore ISA PRAIM 3X52"
    Prm3X54 = "Adattatore PCI PRAIM 3X54"

;#######################################################################

[GeneralConstants]

from      = ""
to        = ""
retaddr   = ""

KeyNull         = ""
StringNull      = ""
MAXIMUM_ALLOWED = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct      = ""
KeyParameters   = ""

TRUE            = 1
FALSE           = 0
NoTitle         = 0

ExitState   = "Active"
OldVersionExisted = $(FALSE)

DriverPath      = $(!STF_NTPATH)\drivers

;#######################################################################

[FileConstants]
;
;  File names, etc.
;
UtilityInf      = "UTILITY.INF"
ParamInf        = "NCPARAM.INF"
subroutineinf   = "SUBROUTN.INF"
SoftwareType    = "driver"
;
; EventLog Message File
;
NetEventDLL     = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\TcpEvent.dll"
IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"

; Product Info
;
Manufacturer        = "Microsoft"
ProductMajorVersion = "4"
ProductMinorVersion = "0"
ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)

; Software
;
ProductSoftwareName      = "Tcp5250"
ProductSoftwareTitle     = "'TCP/IP over Twinax' Driver"
ProductSoftwareImagePath = "\SystemRoot\System32\drivers\Tcp5250.sys"
NetRuleSoftwareType      = "tcp5250Sys ndisDriver tcp5250Driver"
NetRuleSoftwareUse       = $(SoftwareType)
NetRuleSoftwareBindForm  = """tcp5250Sys"" yes no container"
NetRuleSoftwareClass     = {"tcp5250Driver basic"}
;
; Hardware
;
ProductHardwareName = "Tcp5250"
ProductHardwareTitleIbmc_00 = "5250 Enhanced IBM compatible Adapter"
ProductHardwareTitleIbmc_01 = "Attachmate IRMA Twinax ISA Adapter"
ProductHardwareTitleIbmc_02 = "BOS 5400 native Plus ISA Adapter"
ProductHardwareTitleIbmc_03 = "CGS TwinLinker ISA Adapter"
ProductHardwareTitleIbmc_04 = "Computer Lab 5250-I ISA Adapter"
ProductHardwareTitleIbmc_05 = "Decision Data ES/TEC 2 ISA Adapter"
ProductHardwareTitleIbmc_06 = "FARABI TwexJunior ISA Adapter"
ProductHardwareTitleIbmc_07 = "IDEA CAH-5251 ISA Adapter"
ProductHardwareTitleIbmc_08 = "I-O 8150 ISA Adapter"
ProductHardwareTitleIbmc_09 = "Maple M5250I ISA Adapter"
ProductHardwareTitleIbmc_10 = "Micro Integration 5250-EA ISA Adapter"
ProductHardwareTitleIbmc_11 = "Nlynx ES/TEC 2 ISA Adapter"
ProductHardwareTitleIbmc_12 = "Perle MicroPLUS 5250 ISA Adapter"
ProductHardwareTitleIbmc_13 = "PRAIM 3I50 ISA Adapter"
ProductHardwareTitlePrm3I52 = "PRAIM 3I52 ISA Adapter"
ProductHardwareTitlePrm3X52 = "PRAIM 3X52 ISA Adapter"
ProductHardwareTitlePrm3X54 = "PRAIM 3X54 PCI Adapter"

NetRuleHardwareType        = "tcp5250 tcp5250Adapter"
NetRuleHardwareBindForm    = " yes yes container"
NetRuleHardwareClass       = {"tcp5250Adapter basic"}

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

;#######################################################################

[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:"

FunctionTitle   = "'TCP/IP over Twinax' Setup"
ProductSoftwareDescription = "'TCP/IP over Twinax' Ndis Driver"

ProductHardwareDescIbmc_00 = "5250 Enhanced IBM compatible Adapter"
ProductHardwareDescIbmc_01 = "Attachmate IRMA Twinax ISA Adapter"
ProductHardwareDescIbmc_02 = "BOS 5400 native Plus ISA Adapter"
ProductHardwareDescIbmc_03 = "CGS TwinLinker ISA Adapter"
ProductHardwareDescIbmc_04 = "Computer Lab 5250-I ISA Adapter"
ProductHardwareDescIbmc_05 = "Decision Data ES/TEC 2 ISA Adapter"
ProductHardwareDescIbmc_06 = "FARABI TwexJunior ISA Adapter"
ProductHardwareDescIbmc_07 = "IDEA CAH-5251 ISA Adapter"
ProductHardwareDescIbmc_08 = "I-O 8150 ISA Adapter"
ProductHardwareDescIbmc_09 = "Maple M5250I ISA Adapter"
ProductHardwareDescIbmc_10 = "Micro Integration 5250-EA ISA Adapter"
ProductHardwareDescIbmc_11 = "Nlynx ES/TEC 2 ISA Adapter"
ProductHardwareDescIbmc_12 = "Perle MicroPLUS 5250 ISA Adapter"
ProductHardwareDescIbmc_13 = "PRAIM 3I50 ISA Adapter"
ProductHardwareDescPrm3I52 = "PRAIM 3I52 ISA Adapter"
ProductHardwareDescPrm3X52 = "PRAIM 3X52 ISA Adapter"
ProductHardwareDescPrm3X54 = "PRAIM 3X54 PCI Adapter"

ShellCodeErrorTitle = "Error: "$(FunctionTitle)
ShellCodeErrorText  = "Shell Code Error."

;##########

[FileConstantsITA]

ProCaption   = "Installazione di Windows NT"
ProCancel    = "Annulla"
ProCancelMsg = "La rete di Windows NT non è stata installata correttamente.  "+
               "Siete sicuri di interrompere la copia dei file?"

ProCancelCap = "Installazione della rete"
ProText1     = "Copia da:"
ProText2     = "A:"

FunctionTitle   = "Installazione 'TCP/IP over Twinax'"
ProductSoftwareDescription = "Driver Ndis 'TCP/IP over Twinax'"

ProductHardwareDescIbmc_00 = "Adattatore compatibile IBM 5250 Enhanced"
ProductHardwareDescIbmc_01 = "Adattatore ISA Attachmate IRMA Twinax"
ProductHardwareDescIbmc_02 = "Adattatore ISA BOS 5400 native Plus"
ProductHardwareDescIbmc_03 = "Adattatore ISA CGS TwinLinker"
ProductHardwareDescIbmc_04 = "Adattatore ISA Computer Lab 5250-I"
ProductHardwareDescIbmc_05 = "Adattatore ISA Decision Data ES/TEC 2"
ProductHardwareDescIbmc_06 = "Adattatore ISA FARABI TwexJunior"
ProductHardwareDescIbmc_07 = "Adattatore ISA IDEA CAH-5251"
ProductHardwareDescIbmc_08 = "Adattatore ISA I-O 8150"
ProductHardwareDescIbmc_09 = "Adattatore ISA Maple M5250I"
ProductHardwareDescIbmc_10 = "Adattatore ISA Micro Integration 5250-EA"
ProductHardwareDescIbmc_11 = "Adattatore ISA Nlynx ES/TEC 2"
ProductHardwareDescIbmc_12 = "Adattatore ISA Perle MicroPLUS 5250"
ProductHardwareDescIbmc_13 = "Adattatore ISA PRAIM 3I50"
ProductHardwareDescPrm3I52 = "Adattatore PRAIM 3I52 ISA"
ProductHardwareDescPrm3X54 = "Adattatore PRAIM 3X54 PCI"
ProductHardwareDescPrm3X52 = "Adattatore PRAIM 3X52 ISA"

ShellCodeErrorTitle = "Errore: "$(FunctionTitle)
ShellCodeErrorText  = "Errore di Shell."

;#######################################################################

[date]
    ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
    ; Minute, Second }
    Now = {} ? $(!LIBHANDLE) GetSystemDate

;*****************************************************************************
;*****************************************************************************
;*****************************************************************************
;*****************************************************************************
;*****************************************************************************


;#######################################################################
; IDENTIFY
; To verify that this INF deals with the same type of options
; as we are choosing currently.
;#######################################################################

[Identify]
    ;
    ;
    read-syms Identification

    set Status     = STATUS_SUCCESSFUL
    set Identifier = $(OptionType)
    set Media      = #("Source Media Descriptions", 1, 1)


    Debug-Output "[Identify] section completed."

    Return $(Status) $(Identifier) $(Media)

;#######################################################################
; RETURN OPTIONS
; To return the option list supported by this INF and the
; localised text list representing the options.
;#######################################################################

[ReturnOptions]
    ;
    set Status        = STATUS_FAILED
    set OptionList     = {}
    set OptionTextList = {}

    ; Check if the language requested is supported
    ;
    set LanguageList = ^(LanguagesSupported, 1)
    Ifcontains(i) $($0) in $(LanguageList)
        ;
        ; Check if the platforms requested is supported
        ;
        ifstr(i) $($1) == ""
           goto returnoptions
        endif

        set PlatformList = ^(PlatformsSupported, 1)
        Ifcontains(i) $($1) in $(PlatformList)
           goto returnoptions
        else
           Debug-Output "OEMNADTW.INF: requested platforms:"$($1)
           set Status = STATUS_NOTSUPPORTED
           goto finish_ReturnOptions
        endif
    else
        set Status = STATUS_NOLANGUAGE
        goto finish_ReturnOptions
    endif

    ;
    ; form a list of all the options and another of the text representing
    ;

returnoptions = +
    set OptionList     = ^(Options, 1)
    set OptionTextList = ^(OptionsText$($0), 1)
    set Status         = STATUS_SUCCESSFUL

finish_ReturnOptions = +
    Debug-Output "OEMNADTW.INF: ReturnOptions Status:"$(Status)" Options:"$(OptionList)" Text: "$(OptionTextList)
    Return $(Status) $(OptionList) $(OptionTextList)


;#######################################################################
;                           INSTALL OPTION
; InstallOption:
;
;      This section is shelled to by main installation processing
;      or by NCPASHEL.INF during reconfig, removal, update, etc.
;
;
; FUNCTION:  To copy files representing Options
;            To configure the installed option
;            To update the registry for the installed option
;
; INPUT:     $($0):  Language to use
;            $($1):  OptionID to install
;            $($2):  SourceDirectory
;            $($3):  AddCopy  (YES | NO)
;            $($4):  DoCopy   (YES | NO)
;            $($5):  DoConfig (YES | NO)
;
; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
;                            STATUS_NOLANGUAGE |
;                            STATUS_USERCANCEL |
;                            STATUS_FAILED
;
;#######################################################################
[InstallOption]
    ;
    ; extract parameters
    ;
    set Option   = $($1)
    set SrcDir   = $($2)
    set AddCopy  = $($3)
    set DoCopy   = $($4)
    set DoConfig = $($5)

    Debug-Output "OEMNADTW.INF: InstalOption -"$(Option)
    ;
    ; Check if the language requested is supported
    ;
    set LanguageList = ^(LanguagesSupported, 1)
    Ifcontains(i) $($0) NOT-IN $(LanguageList)
        Return STATUS_NOLANGUAGE
    endif

    Debug-Output "OEMNADTW.INF: STF_CWDIR is: "$(!STF_CWDIR)

    ; define all the constants

    set-subst LF = "\n"

    read-syms GeneralConstants
    read-syms FileConstants

    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output "ShellCode error: cannot get an error string."
        goto ShellCodeError
    endif
    set TwxBindingInfo = {"tcp5250Driver tcp5250Adapter non exclusive 100"}

    set NetRuleSoftwareBindable = $(TwxBindingInfo)

    ifstr(i) $(!NTN_Origination) == "NCPA"
        set Continue = $(OK)
    endif
;    read-syms DialogConstants$(!STF_LANGUAGE)
    read-syms FileConstants$(!STF_LANGUAGE)

    detect date

    set-title  $(FunctionTitle)

    set to   = Begin
    set from = Begin
;
;  Assume all is well.
;
    set CommonStatus = STATUS_SUCCESSFUL

    EndWait

;
;   Set up the operation-mode-based variables and gaily welcome
;   the user.  If the "install mode" variable is improperly set,
;   assume this is a new installation.
;

Begin = +
    set ActivateDetection = FALSE

    Ifstr(i) $(!NTN_InstallMode) == deinstall
        set StartLabel = removeadapter
    else-Ifstr(i) $(!NTN_InstallMode) == bind
        set StartLabel = bindingadapter
    else-Ifstr(i) $(!NTN_InstallMode) == Update
        set StartLabel = UpgradeSoftware
    else-Ifstr(i) $(!NTN_InstallMode) == configure
        set CommonStatus = STATUS_REBOOT
        set StartLabel = configureadapter
        ;
        ;   You cannot config the software component
        ;
        Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
            Debug-Output "Cannot configure the 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

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

;****************************************************************************************
;**** Installation Section
;****

installadapter = +

; Set ReviewPrograms value in NCPA to review card bindings
;
;     This allows bindings to be reviewed for the card to
;     prevent Netbeui and Ipx from binding to the card.
;

    Debug-Output "AddInfToReviewPrograms: entry"
    set Status  = STATUS_FAILED
    set KeyNull = ""
    set newList = {"TCP5250.INF"}
    OpenRegKey $(!REG_H_LOCAL) "" +
               "Software\Microsoft\Ncpa\CurrentVersion" +
               $(MAXIMUM_ALLOWED) +
               KeyNcpa
    Ifstr(i) $(KeyNcpa) != $(KeyNull)
        GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "AddInf: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ifstr(i) $($) != "TCP5250.INF"
                    set newList = >($(newList), $($))
                endif
            EndForListDo
            Debug-Output "TCP5250.INF: AddInf: new List "$(newList)
            SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newList)}
            Set Status = STATUS_SUCCESSFUL
        endif
    else
        Debug-Output "AddInfToReviewPrograms: error opening ncpa key."
    endif
    CloseRegKey $(KeyNcpa)

;
;   First, check whether the same version of the software exists
;

    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct

    Ifstr $(KeyProduct) != $(KeyNull)
        ;
        ; Same version already existed in the local machine
        ; Popup the dialog and ask the user whether he wants to continue
        ;
        CloseRegKey $(KeyProduct)

        ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
           ;
           ; Cannot Install the same software again
           ;
           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
           ;
           ; Add a new adapter card?
           ;
           Shell $(UtilityInf), CardExistedDlg

           ifint $($ShellCode) != $(!SHELL_CODE_OK)
               Debug-Output "ShellCode error: cannot get an error string."
               goto ShellCodeError
           endif

           ifstr(i) $($R1) != "OK"
               set CommonStatus = STATUS_USERCANCEL
               goto end
           endif
           set OldVersionExisted = $(TRUE)
        endif
    endif



    StartWait

    ;
    ; Add Software Component
    ;
    ifint $(OldVersionExisted) == $(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)
                  ; CWP
                  ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "add s/w comp 550"
                  Goto fatal
              Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
                  Goto successful
              Endif

              Set SrcDir = $($R1)

           Endif

           ; The following line was added to fix an install problem when trying
           ; to install the driver diskette at the same time as NT Networking
           ; is initially installed.
           ;
           set DoCopy = "YES"
           ;
           ; Copy Files
           ;
           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)
              ; CWP
              ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "add s/w comp 569"
              goto fatal
           endif
        endif

        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)

        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output "Registry error: add software components"
            CloseRegKey $($R1)
            CloseRegKey $($R2)
            CloseRegKey $($R3)
            CloseRegKey $($R4)
            CloseRegKey $($R5)
            ; CWP
            ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "Registry Error - Run UnInstall, reboot, and reRun Setup"

            goto fatalregistry
        endif
        ;
        ;   At this point:
        ;     $R1 contains the product version key handle;
        ;     $R2 contains the NetRules subkey handle;
        ;     $R3 contains the new Services key handle; and
        ;     $R4 contains the Parameters key
        ;     $R5 contains the Linkage Key
        ;
        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)},+
                           {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
                           {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}

        Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(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 $(SoftProductKey)
            CloseRegKey $(SoftNetRuleKey)
            CloseRegKey $(SoftServiceKey)
            CloseRegKey $(SoftParameterKey)
            CloseRegKey $(SoftLinkageKey)
            ; CWP
            ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 645"
            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, $(SoftNetRuleKey), $(NewValueList)
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error."
            goto ShellCodeError
        endif

        set RegistryErrorIndex = $($R0)

        CloseRegKey $(SoftProductKey)
        CloseRegKey $(SoftNetRuleKey)
        CloseRegKey $(SoftServiceKey)
        CloseRegKey $(SoftParameterKey)
        CloseRegKey $(SoftLinkageKey)

        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output "Registry error: add value list."
            ; CWP
            ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 675"
            goto fatalregistry
        endif
    endif
;
;   Create the HARDWARE\Netcard region and its corresponding service
;
    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)
        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)
        ; CWP
        ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 708"
        goto fatalregistry
    endif

;
;   At this point:
;     $R1  Registry key variable for HARDWARE\Netcard\(n)
;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
;     $R3  Registry key handle for <service>\Parameters key
;     $R4  Adapter number assigned to adapter
;     $R5  Service name generated by combining svc name with adapter number
;
    set KeyParameters = $($R3)
    set KeyAdapterRules = $($R2)
    set AdapterNumber = $($R4)
    set RealServiceName = $($R5)

    set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
                       {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle$(Option))},+
                       {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDesc$(Option))},+
                       {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 "Registry error: add value list."
        CloseRegKey $(KeyParameters)
        CloseRegKey $(KeyAdapterRules)
        ; CWP
        ; Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 765"
        goto fatalregistry
    endif

    CloseRegKey $(KeyAdapterRules)

    Ifstr(i) $(Option) == Prm3X54
        ; ************************** PRAIM 3X54 *************************************
        set CfgType = "3"
        set CfgTypeValue = 3
        set BusTypeValue = 5
        set CardTypeValue = "PCI"
        ; ***************************************************************************
    else-Ifstr(i) $(Option) == Prm3X52
        ; ************************** PRAIM 3X52 *************************************
        set CfgType = "2"
        set CfgTypeValue = 2
        set BusTypeValue = 1
        set CardTypeValue = "ISAPnP"
        ;
        ; Now we create the EnbPrm key in order to enable the
        ; driver that configures the ISAPnP adapter
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EnbPrm" +
                  $(MAXIMUM_ALLOWED) KeyTwx
        ifstr $(KeyTwx) == $(NULL)
            OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase) +
                       $(MAXIMUM_ALLOWED) KeyServ
            CreateRegKey $(KeyServ) {"EnbPrm",0,GenericClass} "" +
                         $(!REG_KEY_ALL_ACCESS) "" KeyTwx
            CreateRegKey $(KeyTwx) {"Parameters",0,GenericClass} "" +
                         $(!REG_KEY_ALL_ACCESS) "" KeyParams
        else
            OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EnbPrm\Parameters" +
                       $(MAXIMUM_ALLOWED) KeyParams
        endif

        ifstr $(KeyTwx) != $(NULL)
            SetRegValue $(KeyTwx) {"DisplayName",0,$(!REG_VT_SZ),"PRAIM 3X52 ISAPnP Enabler"}
            SetRegValue $(KeyTwx) {"ErrorControl",0,$(!REG_VT_DWORD),1}
            SetRegValue $(KeyTwx) {"Start",0,$(!REG_VT_DWORD),1}
            SetRegValue $(KeyTwx) {"Type",0,$(!REG_VT_DWORD),1}
        endif
        ifstr $(KeyParams) != $(NULL)
            SetRegValue $(KeyParams) {"IoAddress",0,$(!REG_VT_DWORD),832}
            SetRegValue $(KeyParams) {"InterruptRequest",0,$(!REG_VT_DWORD),5}
            SetRegValue $(KeyParams) {"TwinaxType",0,$(!REG_VT_DWORD),2}
            CloseRegKey $(KeyParams)
        endif
        CloseRegKey $(KeyParams)
        CloseRegKey $(KeyTwx)
        ; ***************************************************************************
    else-Ifstr(i) $(Option) == Prm3I52
        ; ************************** PRAIM 3I52 *************************************
        set CfgType = "5"
        set CfgTypeValue = 5
        set BusTypeValue = 1
        set CardTypeValue = "ISAPnP"
        ;
        ; Now we create the EnbPrm key in order to enable the
        ; driver that configures the ISAPnP adapter
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EnbPrm" +
                  $(MAXIMUM_ALLOWED) KeyTwx
        ifstr $(KeyTwx) == $(NULL)
            OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase) +
                       $(MAXIMUM_ALLOWED) KeyServ
            CreateRegKey $(KeyServ) {"EnbPrm",0,GenericClass} "" +
                         $(!REG_KEY_ALL_ACCESS) "" KeyTwx
            CreateRegKey $(KeyTwx) {"Parameters",0,GenericClass} "" +
                         $(!REG_KEY_ALL_ACCESS) "" KeyParams
        else
            OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\EnbPrm\Parameters" +
                       $(MAXIMUM_ALLOWED) KeyParams
        endif

        ifstr $(KeyTwx) != $(NULL)
            SetRegValue $(KeyTwx) {"DisplayName",0,$(!REG_VT_SZ),"PRAIM 3I52 ISAPnP Enabler"}
            SetRegValue $(KeyTwx) {"ErrorControl",0,$(!REG_VT_DWORD),1}
            SetRegValue $(KeyTwx) {"Start",0,$(!REG_VT_DWORD),1}
            SetRegValue $(KeyTwx) {"Type",0,$(!REG_VT_DWORD),1}
        endif
        ifstr $(KeyParams) != $(NULL)
            SetRegValue $(KeyParams) {"IoAddress",0,$(!REG_VT_DWORD),10000}
            SetRegValue $(KeyParams) {"MemoryAddress",0,$(!REG_VT_DWORD),901120}
            SetRegValue $(KeyParams) {"InterruptRequest",0,$(!REG_VT_DWORD),5}
            SetRegValue $(KeyParams) {"TwinaxType",0,$(!REG_VT_DWORD),5}
            CloseRegKey $(KeyParams)
        endif
        CloseRegKey $(KeyParams)
        CloseRegKey $(KeyTwx)
        ; ***************************************************************************
    else
        ; ************************** IBM compatibile ********************************
        set CfgType = "4"
        set CfgTypeValue = 4
        set BusTypeValue = 1
        set CardTypeValue = "ISA"
        ; ***************************************************************************
    endif
;
; *** Add the parameters to the Services area
;

    set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),0},+
                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeValue)},+
                        {TwinaxType,$(NoTitle),$(!REG_VT_DWORD),$(CfgTypeValue)},+
                        {Adapter,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDesc$(Option))},+
                        {CardType,$(NoTitle),$(!REG_VT_SZ),$(CardTypeValue)}}

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

    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output "ShellCode error."
        goto ShellCodeError
    endif

    set RegistryErrorIndex = $($R0)

    CloseRegKey $(KeyParameters)

    Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
        Debug-Output "Registry error: Add value list"
        ; CWP
        ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 838"
        goto fatalregistry
    endif

    EndWait

    goto callcfgdllroutine


;****************************************************************************************
;**** Configuration section
;****

configureadapter = +

    ;
    ; get service name from registry
    ;
    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct

    GetRegValue $(KeyProduct) ServiceName ValueList
    set RealServiceName = *($(ValueList),4)

    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 = {}

    ;
    ; Get the old values
    ;
    EnumRegValue $(KeyParameters) ValueList

    ForListDo $(ValueList)
        set ValueItem = $($)
        set ValueName = *($(ValueItem),1)
        set ValueData = *($(ValueItem),4)
        Ifstr(i) $(ValueName) == "TwinaxType"
            set TTypeValue = $(ValueData)
        endif
    EndForListDo

    Ifint $(TTypeValue) == 1
        set CfgType = "1"
    else-Ifint $(TTypeValue) == 2
        set CfgType = "2"
    else-Ifint $(TTypeValue) == 3
        set CfgType = "3"
    else-Ifint $(TTypeValue) == 4
        set CfgType = "4"
    else-Ifint $(TTypeValue) == 5
        set CfgType = "5"
    endif

    CloseRegKey $(KeyParameters)

callcfgdllroutine = +

    set CFG_HANDLE = ""
    Debug-Output "OemSetup.Inf: Load "$(!STF_WINDOWSSYSPATH)"\Tcp5250.dll..."
    LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\Tcp5250.dll CFG_HANDLE
    set FLibraryErrCtl = 1
    LibraryProcedure ResultList, $(CFG_HANDLE), Tcp5250Cfg $(!STF_HWND) $(CfgType) $(RealServiceName)
    set FLibraryErrCtl = 0

    FreeLibrary $(CFG_HANDLE)

    goto successful

;****************************************************************************************
;**** Binding section
;****

bindingadapter =+

     set KeyNull = ""

;+++++++++++++++++++++++++++++++++++++++
;Begin Netbeui Disable
;+++++++++++++++++++++++++++++++++++++++
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\Nbf\Linkage" +
                        $(MAXIMUM_ALLOWED) +
                        NetBeuiLink
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\Nbf\Linkage\Disabled" +
                        $(MAXIMUM_ALLOWED) +
                        NetBeuiDisabled

     Ifstr(i) $(NetBeuiLink) != $(KeyNull)
      Ifstr(i) $(NetBeuiDisabled) != $(KeyNull)
        ;################ Link Bind #################
        set newListLinkBind = {}
        set newListDisableBind = {}
        GetRegValue    $(NetBeuiLink) "Bind" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "NetBeuiLink: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\Tcp52501"
                 ifstr(i) $($) != "\Device\Tcp52502"
                  ifstr(i) $($) != "\Device\Tcp52503"
                   ifstr(i) $($) != "\Device\Tcp52504"
                    ifstr(i) $($) != "\Device\Tcp52505"
                     ifstr(i) $($) != "\Device\Tcp52506"
                      ifstr(i) $($) != "\Device\Tcp52507"
                       ifstr(i) $($) != "\Device\Tcp52508"
                           set newListLinkBind = >($(newListLinkBind), $($))
                       else
                        set newListDisableBind = >($(newListDisableBind), $($))
                       endif
                      else
                       set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                     else
                      set newListDisableBind = >($(newListDisableBind), $($))
                     endif
                    else
                     set newListDisableBind = >($(newListDisableBind), $($))
                    endif
                   else
                    set newListDisableBind = >($(newListDisableBind), $($))
                   endif
                  else
                   set newListDisableBind = >($(newListDisableBind), $($))
                  endif
                 else
                  set newListDisableBind = >($(newListDisableBind), $($))
                 endif
                else
                 set newListDisableBind = >($(newListDisableBind), $($))
                endif
            EndForListDo
            Debug-Output "NetBeuiLink: new List Bind "$(newListLinkBind)
            SetRegValue $(NetBeuiLink) {Bind, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLinkBind)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisableBind),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Bind #################
            GetRegValue    $(NetBeuiDisabled) "Bind" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "NetBeuiDisabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "NetBeuiDisabled: new List Bind "$(newListDisableBind)
                SetRegValue $(NetBeuiDisabled) {Bind, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisableBind)}
            endif

        endif


        ;################ Link Export #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(NetBeuiLink) "Export" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "NetBeuiExport: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\Nbf_Tcp52501"
                 ifstr(i) $($) != "\Device\Nbf_Tcp52502"
                  ifstr(i) $($) != "\Device\Nbf_Tcp52503"
                   ifstr(i) $($) != "\Device\Nbf_Tcp52504"
                    ifstr(i) $($) != "\Device\Nbf_Tcp52505"
                     ifstr(i) $($) != "\Device\Nbf_Tcp52506"
                      ifstr(i) $($) != "\Device\Nbf_Tcp52507"
                       ifstr(i) $($) != "\Device\Nbf_Tcp52508"
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "NetBeuiLink: new List Export "$(newListLink)
            SetRegValue $(NetBeuiLink) {Export, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Export #################
            GetRegValue    $(NetBeuiDisabled) "Export" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "NetBeuiDisabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "NetBeuiDisabled: new List Bind "$(newListDisable)
                SetRegValue $(NetBeuiDisabled) {Export, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif



        ;################ Link Route #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(NetBeuiLink) "Route" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "NetBeuiRoute: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != """"Tcp5250""" """Tcp52501""""
                 ifstr(i) $($) != """"Tcp5250""" """Tcp52502""""
                  ifstr(i) $($) != """"Tcp5250""" """Tcp52503""""
                   ifstr(i) $($) != """"Tcp5250""" """Tcp52504""""
                    ifstr(i) $($) != """"Tcp5250""" """Tcp52505""""
                     ifstr(i) $($) != """"Tcp5250""" """Tcp52506""""
                      ifstr(i) $($) != """"Tcp5250""" """Tcp52507""""
                       ifstr(i) $($) != """"Tcp5250""" """Tcp52508""""
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "NetBeuiLink: new List Export "$(newListLink)
            SetRegValue $(NetBeuiLink) {Route, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Export #################
            GetRegValue    $(NetBeuiDisabled) "Route" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "NetBeuiDisabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "NetBeuiDisabled: new List Route "$(newListDisable)
                SetRegValue $(NetBeuiDisabled) {Route, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

      endif
     endif
     CloseRegKey $(NetBeuiLink)
     CloseRegKey $(NetBeuiDisabled)
;+++++++++++++++++++++++++++++++++++++++
; End Netbeui Disable
;+++++++++++++++++++++++++++++++++++++++



;+++++++++++++++++++++++++++++++++++++++
; Begin Ipx Disable
;+++++++++++++++++++++++++++++++++++++++
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\NwlnkIpx\Linkage" +
                        $(MAXIMUM_ALLOWED) +
                        KeyIpxLink
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\NwlnkIpx\Linkage\Disabled" +
                        $(MAXIMUM_ALLOWED) +
                        KeyIpxDisabled

     Ifstr(i) $(KeyIpxLink) != $(KeyNull)
      Ifstr(i) $(KeyIpxDisabled) != $(KeyNull)
        ;################ Link Bind #################
        set newListLinkBind = {}
        set newListDisableBind = {}
        GetRegValue    $(KeyIpxLink) "Bind" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "IpxLink: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\Tcp52501"
                 ifstr(i) $($) != "\Device\Tcp52502"
                  ifstr(i) $($) != "\Device\Tcp52503"
                   ifstr(i) $($) != "\Device\Tcp52504"
                    ifstr(i) $($) != "\Device\Tcp52505"
                     ifstr(i) $($) != "\Device\Tcp52506"
                      ifstr(i) $($) != "\Device\Tcp52507"
                       ifstr(i) $($) != "\Device\Tcp52508"
                           set newListLinkBind = >($(newListLinkBind), $($))
                       else
                        set newListDisableBind = >($(newListDisableBind), $($))
                       endif
                      else
                       set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                     else
                      set newListDisableBind = >($(newListDisableBind), $($))
                     endif
                    else
                     set newListDisableBind = >($(newListDisableBind), $($))
                    endif
                   else
                    set newListDisableBind = >($(newListDisableBind), $($))
                   endif
                  else
                   set newListDisableBind = >($(newListDisableBind), $($))
                  endif
                 else
                  set newListDisableBind = >($(newListDisableBind), $($))
                 endif
                else
                 set newListDisableBind = >($(newListDisableBind), $($))
                endif
            EndForListDo
            Debug-Output "IpxLink: new List Bind "$(newListLinkBind)
            SetRegValue $(KeyIpxLink) {Bind, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLinkBind)}

            set Card1 = ""
            set Card2 = ""
            set IpxExportValue = "\Device\NwlnkIpx"
            set IpxDisableExport = {}
            ForListDo *($(NewListDisableBind),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key. Also begins the Disable
               ;Export list.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
                  set IpxDisableExport = >($(IpxDisableExport), $(IpxExportValue))
               else
                  set Card2 = $($)
                  set IpxDisableExport = >($(IpxDisableExport), $(IpxExportValue))
               endif
            EndForListDo

            ;################ Disable Bind #################
            GetRegValue    $(KeyIpxDisabled) "Bind" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "IpxDisabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "IpxDisabled: new List Bind "$(newListDisableBind)
                SetRegValue $(KeyIpxDisabled) {Bind, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisableBind)}
            endif

        endif


        ;################ Disable Export #################
        ;For Ipx the Linkage Export value should remain unchanged.
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyIpxLink) "Export" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "IpxExport: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
               ;Add the old disabled devices to the new list of devices to
               ;be disabled.
               set IpxDisableExport = >($(IpxDisableExport), $($))
            EndForListDo
            SetRegValue $(KeyIpxDisabled) {Export, 0, +
                             $(!REG_VT_MULTI_SZ),$(IpxDisableExport)}
        endif



        ;################ Link Route #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyIpxLink) "Route" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "IpxRoute: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ifstr(i) $($) != """"Tcp5250""" """Tcp52501""""
                 ifstr(i) $($) != """"Tcp5250""" """Tcp52502""""
                  ifstr(i) $($) != """"Tcp5250""" """Tcp52503""""
                   ifstr(i) $($) != """"Tcp5250""" """Tcp52504""""
                    ifstr(i) $($) != """"Tcp5250""" """Tcp52505""""
                     ifstr(i) $($) != """"Tcp5250""" """Tcp52506""""
                      ifstr(i) $($) != """"Tcp5250""" """Tcp52507""""
                       ifstr(i) $($) != """"Tcp5250""" """Tcp52508""""
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "IpxLink: new List Export "$(newListLink)
            SetRegValue $(KeyIpxLink) {Route, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Route #################
            GetRegValue    $(KeyIpxDisabled) "Route" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "IpxDisabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "IpxDisabled: new List Route "$(newListDisable)
                SetRegValue $(KeyIpxDisabled) {Route, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

      endif
     endif
     CloseRegKey $(KeyIpxLink)
     CloseRegKey $(KeyIpxDisabled)
;+++++++++++++++++++++++++++++++++++++++++++
; End Ipx Disable
;+++++++++++++++++++++++++++++++++++++++++++


;  set KeyTransport = "AppleTalk"
;  Shell "" DeviceDisable "AppleTalk"


;+++++++++++++++++++++++++++++++++++++++++++
; Begin Disable AppleTalk
;+++++++++++++++++++++++++++++++++++++++++++
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\AppleTalk\Linkage" +
                        $(MAXIMUM_ALLOWED) +
                        KeyLinkage
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\AppleTalk\Linkage\Disabled" +
                        $(MAXIMUM_ALLOWED) +
                        KeyDisabled

     Ifstr(i) $(KeyLinkage) != $(KeyNull)
      Ifstr(i) $(KeyDisabled) != $(KeyNull)
        ;################ Link Bind #################
        set newListLinkBind = {}
        set newListDisableBind = {}
        GetRegValue    $(KeyLinkage) "Bind" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Link: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\Tcp52501"
                 ifstr(i) $($) != "\Device\Tcp52502"
                  ifstr(i) $($) != "\Device\Tcp52503"
                   ifstr(i) $($) != "\Device\Tcp52504"
                    ifstr(i) $($) != "\Device\Tcp52505"
                     ifstr(i) $($) != "\Device\Tcp52506"
                      ifstr(i) $($) != "\Device\Tcp52507"
                       ifstr(i) $($) != "\Device\Tcp52508"
                           set newListLinkBind = >($(newListLinkBind), $($))
                       else
                        set newListDisableBind = >($(newListDisableBind), $($))
                       endif
                      else
                       set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                     else
                      set newListDisableBind = >($(newListDisableBind), $($))
                     endif
                    else
                     set newListDisableBind = >($(newListDisableBind), $($))
                    endif
                   else
                    set newListDisableBind = >($(newListDisableBind), $($))
                   endif
                  else
                   set newListDisableBind = >($(newListDisableBind), $($))
                  endif
                 else
                  set newListDisableBind = >($(newListDisableBind), $($))
                 endif
                else
                 set newListDisableBind = >($(newListDisableBind), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Bind "$(newListLinkBind)
            SetRegValue $(KeyLinkage) {Bind, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLinkBind)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisableBind),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Bind #################
            GetRegValue    $(KeyDisabled) "Bind" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Bind "$(newListDisableBind)
                SetRegValue $(KeyDisabled) {Bind, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisableBind)}
            endif

        endif


        ;################ Link Export #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyLinkage) "Export" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Export: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\appletalk\Tcp52501"
                 ifstr(i) $($) != "\Device\appletalk\Tcp52502"
                  ifstr(i) $($) != "\Device\appletalk\Tcp52503"
                   ifstr(i) $($) != "\Device\appletalk\Tcp52504"
                    ifstr(i) $($) != "\Device\appletalk\Tcp52505"
                     ifstr(i) $($) != "\Device\appletalk\Tcp52506"
                      ifstr(i) $($) != "\Device\appletalk\Tcp52507"
                       ifstr(i) $($) != "\Device\appletalk\Tcp52508"
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Export "$(newListLink)
            SetRegValue $(KeyLinkage) {Export, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Export #################
            GetRegValue    $(KeyDisabled) "Export" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Bind "$(newListDisable)
                SetRegValue $(KeyDisabled) {Export, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

        ;################ Link Route #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyLinkage) "Route" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Route: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ifstr(i) $($) != """"Tcp5250""" """Tcp52501""""
                 ifstr(i) $($) != """"Tcp5250""" """Tcp52502""""
                  ifstr(i) $($) != """"Tcp5250""" """Tcp52503""""
                   ifstr(i) $($) != """"Tcp5250""" """Tcp52504""""
                    ifstr(i) $($) != """"Tcp5250""" """Tcp52505""""
                     ifstr(i) $($) != """"Tcp5250""" """Tcp52506""""
                      ifstr(i) $($) != """"Tcp5250""" """Tcp52507""""
                       ifstr(i) $($) != """"Tcp5250""" """Tcp52508""""
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Route "$(newListLink)
            SetRegValue $(KeyLinkage) {Route, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Route #################
            GetRegValue    $(KeyDisabled) "Route" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Route "$(newListDisable)
                SetRegValue $(KeyDisabled) {Route, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

      endif
     endif
     CloseRegKey $(KeyLinkage)
     CloseRegKey $(KeyDisabled)
;+++++++++++++++++++++++++++++++++++++++
; End Appletalk Disable
;+++++++++++++++++++++++++++++++++++++++




     set Transport = "DLC"
     set Export = "Dlc"
;+++++++++++++++++++++++++++++++++++++++++++
; Begin Disable DLC Protocol
;+++++++++++++++++++++++++++++++++++++++++++
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\"$(Transport)"\Linkage" +
                        $(MAXIMUM_ALLOWED) +
                        KeyLinkage
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\"$(Transport)"\Linkage\Disabled" +
                        $(MAXIMUM_ALLOWED) +
                        KeyDisabled

     Ifstr(i) $(KeyLinkage) != $(KeyNull)
      Ifstr(i) $(KeyDisabled) != $(KeyNull)
        ;################ Link Bind #################
        set newListLinkBind = {}
        set newListDisableBind = {}
        GetRegValue    $(KeyLinkage) "Bind" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Link: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\Tcp52501"
                 ifstr(i) $($) != "\Device\Tcp52502"
                  ifstr(i) $($) != "\Device\Tcp52503"
                   ifstr(i) $($) != "\Device\Tcp52504"
                    ifstr(i) $($) != "\Device\Tcp52505"
                     ifstr(i) $($) != "\Device\Tcp52506"
                      ifstr(i) $($) != "\Device\Tcp52507"
                       ifstr(i) $($) != "\Device\Tcp52508"
                           set newListLinkBind = >($(newListLinkBind), $($))
                       else
                        set newListDisableBind = >($(newListDisableBind), $($))
                       endif
                      else
                       set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                     else
                      set newListDisableBind = >($(newListDisableBind), $($))
                     endif
                    else
                     set newListDisableBind = >($(newListDisableBind), $($))
                    endif
                   else
                    set newListDisableBind = >($(newListDisableBind), $($))
                   endif
                  else
                   set newListDisableBind = >($(newListDisableBind), $($))
                  endif
                 else
                  set newListDisableBind = >($(newListDisableBind), $($))
                 endif
                else
                 set newListDisableBind = >($(newListDisableBind), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Bind "$(newListLinkBind)
            SetRegValue $(KeyLinkage) {Bind, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLinkBind)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisableBind),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Bind #################
            GetRegValue    $(KeyDisabled) "Bind" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Bind "$(newListDisableBind)
                SetRegValue $(KeyDisabled) {Bind, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisableBind)}
            endif

        endif


        ;################ Link Export #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyLinkage) "Export" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Export: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\"$(Export)"\Tcp52501"
                 ifstr(i) $($) != "\Device\"$(Export)"\Tcp52502"
                  ifstr(i) $($) != "\Device\"$(Export)"\Tcp52503"
                   ifstr(i) $($) != "\Device\"$(Export)"\Tcp52504"
                    ifstr(i) $($) != "\Device\"$(Export)"\Tcp52505"
                     ifstr(i) $($) != "\Device\"$(Export)"\Tcp52506"
                      ifstr(i) $($) != "\Device\"$(Export)"\Tcp52507"
                       ifstr(i) $($) != "\Device\"$(Export)"\Tcp52508"
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Export "$(newListLink)
            SetRegValue $(KeyLinkage) {Export, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo


            ;################ Disable Export #################
            GetRegValue    $(KeyDisabled) "Export" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Bind "$(newListDisable)
                SetRegValue $(KeyDisabled) {Export, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

        ;################ Link Route #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyLinkage) "Route" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Route: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ifstr(i) $($) != """"Tcp5250""" """Tcp52501""""
                 ifstr(i) $($) != """"Tcp5250""" """Tcp52502""""
                  ifstr(i) $($) != """"Tcp5250""" """Tcp52503""""
                   ifstr(i) $($) != """"Tcp5250""" """Tcp52504""""
                    ifstr(i) $($) != """"Tcp5250""" """Tcp52505""""
                     ifstr(i) $($) != """"Tcp5250""" """Tcp52506""""
                      ifstr(i) $($) != """"Tcp5250""" """Tcp52507""""
                       ifstr(i) $($) != """"Tcp5250""" """Tcp52508""""
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Route "$(newListLink)
            SetRegValue $(KeyLinkage) {Route, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Route #################
            GetRegValue    $(KeyDisabled) "Route" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Route "$(newListDisable)
                SetRegValue $(KeyDisabled) {Route, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

      endif
     endif
     CloseRegKey $(KeyLinkage)
     CloseRegKey $(KeyDisabled)
;+++++++++++++++++++++++++++++++++++++++
; End Disable DLC Protocol
;+++++++++++++++++++++++++++++++++++++++

     set Transport = "Streams"
     set Export = "Streams"
;+++++++++++++++++++++++++++++++++++++++++++
; Begin Disable Streams Protocol
;+++++++++++++++++++++++++++++++++++++++++++
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\"$(Transport)"\Linkage" +
                        $(MAXIMUM_ALLOWED) +
                        KeyLinkage
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\"$(Transport)"\Linkage\Disabled" +
                        $(MAXIMUM_ALLOWED) +
                        KeyDisabled

     Ifstr(i) $(KeyLinkage) != $(KeyNull)
      Ifstr(i) $(KeyDisabled) != $(KeyNull)
        ;################ Link Bind #################
        set newListLinkBind = {}
        set newListDisableBind = {}
        GetRegValue    $(KeyLinkage) "Bind" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Link: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\Tcp52501"
                 ifstr(i) $($) != "\Device\Tcp52502"
                  ifstr(i) $($) != "\Device\Tcp52503"
                   ifstr(i) $($) != "\Device\Tcp52504"
                    ifstr(i) $($) != "\Device\Tcp52505"
                     ifstr(i) $($) != "\Device\Tcp52506"
                      ifstr(i) $($) != "\Device\Tcp52507"
                       ifstr(i) $($) != "\Device\Tcp52508"
                           set newListLinkBind = >($(newListLinkBind), $($))
                       else
                        set newListDisableBind = >($(newListDisableBind), $($))
                       endif
                      else
                       set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                     else
                      set newListDisableBind = >($(newListDisableBind), $($))
                     endif
                    else
                     set newListDisableBind = >($(newListDisableBind), $($))
                    endif
                   else
                    set newListDisableBind = >($(newListDisableBind), $($))
                   endif
                  else
                   set newListDisableBind = >($(newListDisableBind), $($))
                  endif
                 else
                  set newListDisableBind = >($(newListDisableBind), $($))
                 endif
                else
                 set newListDisableBind = >($(newListDisableBind), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Bind "$(newListLinkBind)
            SetRegValue $(KeyLinkage) {Bind, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLinkBind)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisableBind),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Bind #################
            GetRegValue    $(KeyDisabled) "Bind" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Bind "$(newListDisableBind)
                SetRegValue $(KeyDisabled) {Bind, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisableBind)}
            endif

        endif


        ;################ Link Export #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyLinkage) "Export" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Export: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\"$(Export)"\Tcp52501"
                 ifstr(i) $($) != "\Device\"$(Export)"\Tcp52502"
                  ifstr(i) $($) != "\Device\"$(Export)"\Tcp52503"
                   ifstr(i) $($) != "\Device\"$(Export)"\Tcp52504"
                    ifstr(i) $($) != "\Device\"$(Export)"\Tcp52505"
                     ifstr(i) $($) != "\Device\"$(Export)"\Tcp52506"
                      ifstr(i) $($) != "\Device\"$(Export)"\Tcp52507"
                       ifstr(i) $($) != "\Device\"$(Export)"\Tcp52508"
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Export "$(newListLink)
            SetRegValue $(KeyLinkage) {Export, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Export #################
            GetRegValue    $(KeyDisabled) "Export" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Bind "$(newListDisable)
                SetRegValue $(KeyDisabled) {Export, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

        ;################ Link Route #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyLinkage) "Route" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Route: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ifstr(i) $($) != """"Tcp5250""" """Tcp52501""""
                 ifstr(i) $($) != """"Tcp5250""" """Tcp52502""""
                  ifstr(i) $($) != """"Tcp5250""" """Tcp52503""""
                   ifstr(i) $($) != """"Tcp5250""" """Tcp52504""""
                    ifstr(i) $($) != """"Tcp5250""" """Tcp52505""""
                     ifstr(i) $($) != """"Tcp5250""" """Tcp52506""""
                      ifstr(i) $($) != """"Tcp5250""" """Tcp52507""""
                       ifstr(i) $($) != """"Tcp5250""" """Tcp52508""""
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Route "$(newListLink)
            SetRegValue $(KeyLinkage) {Route, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Route #################
            GetRegValue    $(KeyDisabled) "Route" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Route "$(newListDisable)
                SetRegValue $(KeyDisabled) {Route, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

      endif
     endif
     CloseRegKey $(KeyLinkage)
     CloseRegKey $(KeyDisabled)
;+++++++++++++++++++++++++++++++++++++++
; End Disable Streams Protocol
;+++++++++++++++++++++++++++++++++++++++

     goto successful

;****************************************************************************************
;**** Remove Adapter section
;****

removeadapter = +

    Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
        ; Remove Software Component
        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
            ; CWP
            ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 946"
            goto fatalregistry
        endif
    else
        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
              $(ProductSoftwareName), $(!NTN_RegBase)

        ;The following removes TCP5250.INF from the bindings review.
        set KeyNull = ""
        OpenRegKey $(!REG_H_LOCAL) "" +
                            "Software\Microsoft\Tcp5250" +
                            $(MAXIMUM_ALLOWED) +
                            KeyTcp5250
        ifstr(i) $(KeyTcp5250) == $(KeyNull)
           set newList = {}
           OpenRegKey $(!REG_H_LOCAL) "" +
                               "Software\Microsoft\Ncpa\CurrentVersion" +
                               $(MAXIMUM_ALLOWED) +
                               KeyNcpa
           ;OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
           Ifstr(i) $(KeyNcpa) != $(KeyNull)
               GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
               ifint $(RegLastError) == 0
                   Debug-Output "RemoveInf: old List "*($(TmpList), 4)
                   ForListDo *($(TmpList),4)
                       ifstr(i) $($) != "TCP5250.INF"
                           set newList = >($(newList), $($))
                       endif
                   EndForListDo
                   Debug-Output "AddInf: new List "$(newList)
                   SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
                                           $(!REG_VT_MULTI_SZ),$(newList)}
                   ;CloseRegKey $(KeyNcpa)
                   Set Status = STATUS_SUCCESSFUL
               endif
           else
               Debug-Output "RemoveInfFromReviewPrograms: error opening ncpa key."
           endif
           CloseRegKey $(KeyNcpa)
        endif
        CloseRegKey $(KeyTcp5250)
        ;End of Removal of Review Bindings

        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error"
            goto ShellCodeError
        endif

        set RegistryErrorIndex = $($R0)

        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            ; CWP
            ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 963"
            goto fatalregistry
        endif
    endif

    goto end

;****************************************************************************************
;**** Upgrade Software section
;****

UpgradeSoftware = +
    ; Upgrade software component
    ;

    goto end

;****************************************************************************************
;**** Escape hatches
;****

successful = +
    goto end

abandon = +
    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
            ; CWP
            ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 1004"
            goto fatalregistry
        endif
    EndForListDo

    Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
        ; Remove Software Component
        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
            ; CWP
            ;Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fatalregistry 1024"
            goto fatalregistry
        endif
    endif

    goto end

;****************************************************************************************
;**** warning display
;****

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

;****************************************************************************************
;**** non fatal error display
;****

nonfatalinfo = +
    Set CommonStatus = STATUS_USERCANCEL
    Set Severity = STATUS
    goto nonfatalmsg
nonfatal = +
    Set Severity = NONFATAL
    goto nonfatalmsg
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 "end"
    endif

;****************************************************************************************
;**** Registry is broken
;****

fatalregistry = +

    Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        goto ShellCodeError
    endif
    set Error = $($R0)

    goto fatal


fataldetect = +
    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)
    ; CWP
    ; Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", "fataldetect"

    goto fatal

;****************************************************************************************
;**** fatal error display
;****

fatal = +
    ifstr(i) $(Error) == ""
        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            goto ShellCodeError
        endif
        set Error = $($R0)
    endif
; error is coming from here!
    Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)

    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        goto ShellCodeError
    endif

    goto setfailed

;****************************************************************************************
;**** Shelling error
;****

ShellCodeError = +

    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 = +
    set CommonStatus = STATUS_FAILED
    ;
    ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
    ;
    ifstr(i) $(OEM_ABANDON_ON) == TRUE
        set OEM_ABANDON_ON = FALSE
        goto abandon
    endif
    goto end

end = +
    goto term

term = +
    Return $(CommonStatus)


;****************************************************************************************
;**** Install Section
;****
;$(Option)

[Install-Option]
   set STF_VITAL = ""
   ifstr(i) $(AddCopy) == "YES"
       ; Add the files to the copy list
       ; This is a workaround for a bug in NT 4.0 release (Bug # 56529).
       AddSectionFilesToCopyList Files-DRV-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
       AddSectionFilesToCopyList Files-CONFIG $(SrcDir) $(!STF_WINDOWSSYSPATH)

   endif

   ifstr(i) $(DoCopy) == "YES"
      ; Copy files in the copy list
      set !STF_NCPA_FLUSH_COPYLIST = TRUE
      CopyFilesInCopyList
   endif

   ifstr(i) $(DoConfig) == "YES"
       ; Add product to registry
       ;
       ; Finish up
   endif
   exit

[Install-Update]
   set STF_VITAL        = ""
   set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
   AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
   exit

[Source Media Descriptions]
1 = "CompuMaster Net-2000 CD-ROM"

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

[Files-DRV-IBMC_00]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_01]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_02]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_03]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_04]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_05]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_06]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_07]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_08]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_09]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_10]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_11]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_12]
1, Tcp5250.sys, SIZE=999

[Files-DRV-IBMC_13]
1, Tcp5250.sys, SIZE=999

[Files-DRV-PRM3I52]
1, Tcp5250.sys, SIZE=999
1, EnbPrm.sys, SIZE=999

[Files-DRV-PRM3X52]
1, Tcp5250x.sys, SIZE=999, RENAME=Tcp5250.sys
1, EnbPrm.sys, SIZE=999

[Files-DRV-PRM3X54]
1, Tcp5250x.sys, SIZE=999, RENAME=Tcp5250.sys

[Files-CONFIG]
1, OEMSETUP.INF, SIZE=999, RENAME=TCP5250.INF
1, Tcp5250.dll, SIZE=999
1, TcpEvent.dll,SIZE=999
1, Tcp52en.hlp, SIZE=999
1, Tcp52en.cnt, SIZE=999
1, Tcp52it.hlp, SIZE=999
1, Tcp52it.cnt, SIZE=999

;****************************************************************************************
;**** Bindings Review Section
;****

[BindingsReview]
    set Option   = $($1)
    set SrcDir   = $($2)
    set AddCopy  = $($3)
    set DoCopy   = $($4)
    set DoConfig = $($5)
    set Language = $(!STF_LANGUAGE)
    set SaveInstallMode = $(!NTN_InstallMode)
    set !NTN_InstallMode = bind
    Shell "" InstallOption $(Language) $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
    set !NTN_InstallMode = $(SaveInstallMode)
    set Status = $($R0)
    Return $(Status)

;****************************************************************************************
;**** Device Disable Section
;****

[DeviceDisable]

     set KeyNull = ""
     set Status = STATUS_SUCCESSFUL
     set TransportKey = $($0)
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\AppleTalk\Linkage" +
                        $(MAXIMUM_ALLOWED) +
                        KeyLinkage
     OpenRegKey $(!REG_H_LOCAL) "" +
                        "System\CurrentControlSet\Services\AppleTalk\Linkage\Disabled" +
                        $(MAXIMUM_ALLOWED) +
                        KeyDisabled

     Ifstr(i) $(KeyLinkage) != $(KeyNull)
      Ifstr(i) $(KeyDisabled) != $(KeyNull)
        ;################ Link Bind #################
        set newListLinkBind = {}
        set newListDisableBind = {}
        GetRegValue    $(KeyLinkage) "Bind" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Link: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ;Remove Tcp5250 devices from the Linkage key and add them to
                ;the Disable key.
                ifstr(i) $($) != "\Device\Tcp52501"
                 ifstr(i) $($) != "\Device\Tcp52502"
                  ifstr(i) $($) != "\Device\Tcp52503"
                   ifstr(i) $($) != "\Device\Tcp52504"
                    ifstr(i) $($) != "\Device\Tcp52505"
                     ifstr(i) $($) != "\Device\Tcp52506"
                      ifstr(i) $($) != "\Device\Tcp52507"
                       ifstr(i) $($) != "\Device\Tcp52508"
                           set newListLinkBind = >($(newListLinkBind), $($))
                       else
                        set newListDisableBind = >($(newListDisableBind), $($))
                       endif
                      else
                       set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                     else
                      set newListDisableBind = >($(newListDisableBind), $($))
                     endif
                    else
                     set newListDisableBind = >($(newListDisableBind), $($))
                    endif
                   else
                    set newListDisableBind = >($(newListDisableBind), $($))
                   endif
                  else
                   set newListDisableBind = >($(newListDisableBind), $($))
                  endif
                 else
                  set newListDisableBind = >($(newListDisableBind), $($))
                 endif
                else
                 set newListDisableBind = >($(newListDisableBind), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Bind "$(newListLinkBind)
            SetRegValue $(KeyLinkage) {Bind, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLinkBind)}

            set Card1 = ""
            set Card2 = ""
     ;       set IpxExportValue = "\Device\NwlnkIpx"
     ;       set IpxDisableExport = {}
            ForListDo *($(NewListDisableBind),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
     ;             set IpxDisableExport = >($(IpxDisableExport), $(IpxExportValue))
               else
                  set Card2 = $($)
     ;             set IpxDisableExport = >($(IpxDisableExport), $(IpxExportValue))
               endif
            EndForListDo

            ;################ Disable Bind #################
            GetRegValue    $(KeyDisabled) "Bind" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisableBind = >($(newListDisableBind), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Bind "$(newListDisableBind)
                SetRegValue $(KeyDisabled) {Bind, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisableBind)}
            endif

        endif

        ;################ Link Route #################
        set newListLink = {}
        set newListDisable = {}
        GetRegValue    $(KeyLinkage) "Route" TmpList
        ifint $(RegLastError) == 0
            Debug-Output "Route: old List "*($(TmpList), 4)
            ForListDo *($(TmpList),4)
                ifstr(i) $($) != """"Tcp5250""" """Tcp52501""""
                 ifstr(i) $($) != """"Tcp5250""" """Tcp52502""""
                  ifstr(i) $($) != """"Tcp5250""" """Tcp52503""""
                   ifstr(i) $($) != """"Tcp5250""" """Tcp52504""""
                    ifstr(i) $($) != """"Tcp5250""" """Tcp52505""""
                     ifstr(i) $($) != """"Tcp5250""" """Tcp52506""""
                      ifstr(i) $($) != """"Tcp5250""" """Tcp52507""""
                       ifstr(i) $($) != """"Tcp5250""" """Tcp52508""""
                           set newListLink = >($(newListLink), $($))
                       else
                        set newListDisable = >($(newListDisable), $($))
                       endif
                      else
                       set newListDisable = >($(newListDisable), $($))
                      endif
                     else
                      set newListDisable = >($(newListDisable), $($))
                     endif
                    else
                     set newListDisable = >($(newListDisable), $($))
                    endif
                   else
                    set newListDisable = >($(newListDisable), $($))
                   endif
                  else
                   set newListDisable = >($(newListDisable), $($))
                  endif
                 else
                  set newListDisable = >($(newListDisable), $($))
                 endif
                else
                 set newListDisable = >($(newListDisable), $($))
                endif
            EndForListDo
            Debug-Output "Link: new List Route "$(newListLink)
            SetRegValue $(KeyLinkage) {Route, 0, +
                                    $(!REG_VT_MULTI_SZ),$(newListLink)}

            set Card1 = ""
            set Card2 = ""
            ForListDo *($(NewListDisable),4)
               ;Makes copy of card's device (up to two 5250 cards) that needs
               ;to be moved under the Disable key.
               ifstr(i) $(Card1) == ""
                  set Card1 = $($)
               else
                  set Card2 = $($)
               endif
            EndForListDo

            ;################ Disable Route #################
            GetRegValue    $(KeyDisabled) "Route" TmpList
            ifint $(RegLastError) == 0
                Debug-Output "Disabled: old List "*($(TmpList), 4)
                ForListDo *($(TmpList),4)
                    ;If cards' device do not already exist then place them
                    ;under the disable key.
                    ifstr(i) $($) != $(Card1)
                      ifstr(i) $($) != $(Card2)
                          set newListDisable = >($(newListDisable), $($))
                      endif
                    endif
                EndForListDo
                Debug-Output "Disabled: new List Route "$(newListDisable)
                SetRegValue $(KeyDisabled) {Route, 0, +
                                        $(!REG_VT_MULTI_SZ),$(newListDisable)}
            endif

        endif

      endif
     endif
     CloseRegKey $(KeyLinkage)
     CloseRegKey $(KeyDisabled)

     return
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: web5, load: 1.12