OEMSETUP.INF Driver File Contents (HPDeskDirectJ2573AJ2577AJ2585AJ2585BJ2970AJ2973ALANAdapters.zip)

;
;--------------------------------------------------------------------------
; OEMSETUP File for HP PCI 10/100 Adapters
;--------------------------------------------------------------------------
;
[Identify]

    set !G:DebugOutputControl = 1
    Debug-Output "HPVGPCI: Identify."
    read-syms Identification
    set Status     = STATUS_SUCCESSFUL
    set Identifier = $(OptionType)
    set Media      = #("Source Media Descriptions", 1, 1)
    Return $(Status) $(Identifier) $(Media)

[Identification]
    OptionType = NetAdapter
[PlatformsSupported]
    PCI
[Options]
J2585ASLOT
J2585BSLOT
J2973ASLOT
J2970ASLOT
[FileConstants]
UtilityInf      = "UTILITY.INF"
ParamInf        = "NCPARAM.INF"
subroutineinf   = "SUBROUTN.INF"
SoftwareType    = "driver"
Exit_Code       = 0
DialogDllName   = "hpvg1dlg.dll"
NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
Manufacturer    = "Hewlett-Packard"
ProductMajorVersion     = "3"
ProductMinorVersion     = "0"
ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
ProductSoftwareName     = "Hpddnd3"
ProductSoftwareTitle    = "HP DeskDirect 10/100 LAN Adapter Driver"
ProductSoftwareImagePath = "\SystemRoot\System32\drivers\hpddnd3.sys"
NetRuleSoftwareType     = "Hpddnd3Sys ndisDriver Hpddnd3Driver"
NetRuleSoftwareUse      = $(SoftwareType)
NetRuleSoftwareBindForm = """Hpddnd3Sys"" yes no container"
NetRuleSoftwareClass    = {"Hpddnd3Driver basic"}
NetRuleSoftwareBindable = {"Hpddnd3Driver Hpddnd3Adapter non exclusive 100"}
ProductHardwareName     = "Hpddnd3"

ProductHardwareJ2585AIOTitle   = "HP J2585A"
ProductHardwareJ2585ASLOTTitle = "HP J2585A"
J2585ASLOTCFID = 4144

ProductHardwareJ2585BIOTitle   = "HP J2585B"
ProductHardwareJ2585BSLOTTitle = "HP J2585B"
J2585BSLOTCFID = 4145

ProductHardwareJ2973AIOTitle   = "HP J2973A"
ProductHardwareJ2973ASLOTTitle = "HP J2973A"
J2973ASLOTCFID = 4145

ProductHardwareJ2970AIOTitle   = "HP J2970A"
ProductHardwareJ2970ASLOTTitle = "HP J2970A"
J2970ASLOTCFID = 4145

NetRuleHardwareType     = "Hpddnd3 Hpddnd3Adapter"
NetRuleHardwareBindForm = " yes yes container"
NetRuleHardwareClass    = {"Hpddnd3Adapter basic"}
ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"

[SlaveFileConstants]
ProductMajorVersion      = "3"
ProductMinorVersion      = "0"
ProductVersion           = $(ProductMajorVersion)"."$(ProductMinorVersion)
ProductSoftwareName      = "Hpddnd3"
ProductSoftwareTitle     = "HP DeskDirect 10/100 LAN Adapter Driver"
ProductSoftwareImagePath = "\SystemRoot\System32\drivers\Hpddnd3.sys"
NetRuleSoftwareType      = "Hpddnd3Sys ndisDriver Hpddnd3Driver"
NetRuleSoftwareUse       = $(SoftwareType)
NetRuleSoftwareBindForm  = """Hpddnd3Sys"" yes no container"
NetRuleSoftwareClass     = {"Hpddnd3Driver basic"}
NetRuleSoftwareBindable  = {"Hpddnd3Driver Hpddnd3Adapter non exclusive 100"}
ProductHardwareName      = "Hpddnd3"
NetRuleHardwareType      = "Hpddnd3 Hpddnd3Adapter"
NetRuleHardwareBindForm  = " yes yes container"
NetRuleHardwareClass     = {"Hpddnd3Adapter basic"}
ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
ParamKeyName   = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"

[BusMFileConstants]
ProductMajorVersion      = "3"
ProductMinorVersion      = "0"
ProductVersion           = $(ProductMajorVersion)"."$(ProductMinorVersion)
ProductSoftwareName      = "Hpddnd3"
ProductSoftwareTitle     = "HP DeskDirect 10/100 LAN Adapter Driver"
ProductSoftwareImagePath = "\SystemRoot\System32\drivers\Hpddnd3.sys"
NetRuleSoftwareType      = "Hpddnd3Sys ndisDriver Hpddnd3Driver"
NetRuleSoftwareUse       = $(SoftwareType)
NetRuleSoftwareBindForm  = """Hpddnd3Sys"" yes no container"
NetRuleSoftwareClass     = {"Hpddnd3Driver basic"}
NetRuleSoftwareBindable  = {"Hpddnd3Driver Hpddnd3Adapter non exclusive 100"}
ProductHardwareName      = "Hpddnd3"
NetRuleHardwareType      = "Hpddnd3 Hpddnd3Adapter"
NetRuleHardwareBindForm  = " yes yes container"
NetRuleHardwareClass     = {"Hpddnd3Adapter basic"}
ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
ParamKeyName   = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"

[GeneralConstants]
from      = ""
to        = ""
ExitCodeOk     = 0
ExitCodeCancel = 1
ExitCodeFatal  = 2
KeyNull         = ""
MAXIMUM_ALLOWED   = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct      = ""
KeyParameters   = ""
TRUE            = 1
FALSE           = 0
NoTitle            = 0
ExitState   = "Active"
OldVersionExisted = $(FALSE)
DriverPath      = $(!STF_NTPATH)\drivers
[date]
    Now = {} ? $(!LIBHANDLE) GetSystemDate

[ReturnOptions]
    set !G:DebugOutputControl = 1
    Debug-Output "HPVGPCI: ReturnOptions."
    set Status        = STATUS_FAILED
    set OptionList     = {}
    set OptionTextList = {}
    set LanguageList = ^(LanguagesSupported, 1)
    Ifcontains(i) $($0) in $(LanguageList)
        ifstr(i) $($1) == ""
                        goto returnoptions
        endif
        set PlatformList = ^(PlatformsSupported, 1)
        Ifcontains(i) $($1) in $(PlatformList)
                        goto returnoptions
        else
                        set Status = STATUS_NOTSUPPORTED
                        goto finish_ReturnOptions
        endif
    else
                set Status = STATUS_NOLANGUAGE
                goto finish_ReturnOptions
    endif
returnoptions = +
    set OptionList     = ^(Options, 1)
    set OptionTextList = ^(OptionsText$($0), 1)
    set Status         = STATUS_SUCCESSFUL
    Debug-Output "HPVGPCI: ReturnOptions successful."
finish_ReturnOptions = +
    Return $(Status) $(OptionList) $(OptionTextList)

[InstallOption]
    set Status   = STATUS_FAILED
    set Option   = $($1)
    set SrcDir   = $($2)
    set AddCopy  = $($3)
    set DoCopy   = $($4)
    set DoConfig = $($5)
    set LanguageList = ^(LanguagesSupported, 1)
    Ifcontains(i) $($0) NOT-IN $(LanguageList)
        Return STATUS_NOLANGUAGE
    endif
    set-subst LF = "\n"
    read-syms GeneralConstants
    read-syms FileConstants
;NEW
    ifcontains(i) $(Option) in {J2585BSLOT,J2973ASLOT,J2970ASLOT}
        read-syms BusMFileConstants
    else
        read-syms SlaveFileConstants
    endif
;END NEW
    read-syms DialogConstants$(!STF_LANGUAGE)
    ifstr(i) $(!NTN_Origination) == "NCPA"
        set Continue = "OK"
    endif
    read-syms FileConstants$(!STF_LANGUAGE)
;NEW
    ifcontains(i) $(Option) in {J2585BSLOT,J2973ASLOT,J2970ASLOT}
        read-syms BusMFileConstants$(!STF_LANGUAGE)
    else
        read-syms SlaveFileConstants$(!STF_LANGUAGE)
    endif
;END NEW
    detect date
    set-title  $(FunctionTitle)
    set to   = Begin
    set from = Begin
    set CommonStatus = STATUS_SUCCESSFUL
    EndWait
Begin = +

;
; Get the Version of Windows NT we are installing on.  This will allow us to 
; use the various capabilities of different NT versions (e.g. PCI Support that 
; is included in NT 3.51)
;
    set CurrentVersionValue = ""
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
    Ifstr(i) $(KeyNt) != ""
        GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
        Debug-Output "$(InfFile) $(Option): WinNT CurrentVersion ="$(CurrentVersionValue)
        CloseRegKey $(KeyNt)
    Endif

    ifstr(i) (*($(CurrentVersionValue),4)) == 3.10    ; Fail install if NT 3.1
            Debug-Output "$(InfFile) $(Option): Configureadapter"
        set Error = "Windows NT 3.1 is not supported by this product"
        goto fatal
    endif

    Set ActivateDetection = FALSE
    Ifstr(i) $(!NTN_InstallMode) == deinstall
        set StartLabel = removeadapter
    else-Ifstr(i) $(!NTN_InstallMode) == Update
        set StartLabel = UpgradeSoftware
    else-Ifstr(i) $(!NTN_InstallMode) == bind
        set StartLabel = bindingadapter
    else-Ifstr(i) $(!NTN_InstallMode) == configure
        set StartLabel = configureadapter
        Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
            Debug-Output "Cannot configure the Hpddnd3 driver software."
            Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                goto ShellCodeError
            endif
            set Error = $($R0)
            set from = end
            set to = end
            goto nonfatalinfo
        endif
    else
        set StartLabel = installadapter
        set OEM_ABANDON_OPTIONS = {}
        set OEM_ABANDON_SOFTWARE = FALSE
        set OEM_ABANDON_ON = TRUE
    endif
    Debug-Output "HPVGPCI.INF $(Option): =================================================="
    Debug-Output "HPVGPCI.INF $(Option): STF_CWDIR is: $(!STF_CWDIR)"
    Debug-Output "HPVGPCI.INF $(Option): STF_SRCDIR is: $(!STF_SRCDIR)"
    Debug-Output "HPVGPCI.INF $(Option): STF_LANGUAGE is: $(!STF_LANGUAGE)"
    Debug-Output "HPVGPCI.INF $(Option): Option is: $(Option)"
    Debug-Output "HPVGPCI.INF $(Option): !STF_NCDETECT  is: $(!STF_NCDETECT)"
    Debug-Output "HPVGPCI.INF $(Option): !STF_NCOPTION  is: $(!STF_NCOPTION)"
    Debug-Output "HPVGPCI.INF $(Option): !STF_NCDETCARD is: $(!STF_NCDETCARD)"
    Debug-Output "HPVGPCI.INF $(Option): !STF_NCDETINFO is: $(!STF_NCDETINFO)"
; Primary Bus
    Debug-Output "HPVGPCI.INF $(Option): !STF_BusType is $(!STF_BUSTYPE)"
; All Buses
    Debug-Output "HPVGPCI.INF $(Option): !STF_BusTypeList is $(!STF_BUSTYPELIST)"
    Debug-Output "HPVGPCI.INF $(Option): =================================================="

    Set DetectedCard = FALSE
    Goto $(StartLabel)
installadapter = +

    Debug-Output "HPVGPCI.INF $(Option): Installadapter"
;
; Check for prior SW install
;
    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
        ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
;           Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
;               $(ProductVersion)
;           ifint $($ShellCode) != $(!SHELL_CODE_OK)
;               goto ShellCodeError
;           endif
           goto end
        else
;           Shell $(UtilityInf), CardExistedDlg
;           ifint $($ShellCode) != $(!SHELL_CODE_OK)
;               goto ShellCodeError
;           endif
;           ifstr(i) $($R1) != "OK"
;               goto end
;           endif
           set OldVersionExisted = $(TRUE)
        endif
    endif


;
; Install the DLL
;
    Set CurrParamSettings = {}
    set   OldSource =  $(!STF_SRCDIR)
    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR)
    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
          Goto fatal
    Else-Ifstr(i) $($R0) == STATUS_FAILED
          Goto fatal
    Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
          Goto installstep1
    Endif
    Set !STF_SRCDIR = $($R1)
;    install "Install-Dll"
    Set !STF_SRCDIR = $(OldSource)


;
;Set Defaults
;
    set IOBaseAddrValue = *($(IOBaseAddrList), $($(Option)IOBaseAddrDefault))
    Goto adaptersetup

configureadapter = +
    Debug-Output "HPVGPCI.INF $(Option): Configureadapter"

    Ifstr $(KeyProduct) == $(KeyNull)
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
        Ifstr $(KeyProduct) == $(KeyNull)
            set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
            Debug-Output "Cannot find component product key"
            goto fatalregistry
        Endif
    Endif
    Debug-Output "HPVGPCI.INF $(Option): Shelling to FindService"
    Shell $(UtilityInf) FindService, $(KeyProduct)
    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output "HPVGPCI.INF: FindService shell failure"
        Goto ShellCodeError
    Endif
    Ifstr(i) $($R0) != NO_ERROR
        Debug-Output "HPVGPCI.INF: FindService Shell error: $($R0)"
        Goto fatalregistry
    endif
    Set KeyParameters = $($R2)
    CloseRegKey $($R1)
    Ifstr $(KeyParameters) == $(KeyNull)
        set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
        Debug-Output "HPVGPCI.INF: Cannot find component service"
        goto fatalregistry
    endif
    set OldVersionExisted = $(TRUE)
    set ValueName = ""
    set ValueData = ""
    set ValueStr  = ""
    set ValueList = {}
    EnumRegValue $(KeyParameters) ValueList

    ForListDo $(ValueList)
	set ValueItem = $($)
	set ValueName = *($(ValueItem),1)
	set ValueData = *($(ValueItem),4)
	ifstr(i) $(ValueName) == "InterruptNumber"
	    set IRQValueIndex = $(ValueData)
	else-ifstr(i) $(ValueName) == "IoBaseAddress"
	    set IOBaseAddrIndex = $(ValueData)
	else-ifstr(i) $(ValueName) == "SlotNumber"
	    set IOBaseAddrIndex = $(ValueData)
	else-ifstr(i) $(ValueName) == "AdapterType"
	    set AdapterTypeIndex = $(ValueData)
;        else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
;	    set MemoryMapIndex = $(ValueData)
	endif

    EndForListDo

;
; HW can be configured only if AdapterType is 3
;
    Debug-Output "HPVGPCI.INF: AdapterType is $(AdapterTypeIndex)"
    ifint $(AdapterTypeIndex) != 3
        Debug-Output "Cannot configure the HP PCI adapter card."
        Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            goto ShellCodeError
        endif
        set Error = $($R0)
        set from = end
        set to = end
        goto nonfatalinfo
    endif

    set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))

    ifstr(i) $(IOBaseAddrValue) == ""
	set IOBaseAddrValue = *($(IOBaseAddrList), 1)
    endif

adaptersetup = +
    Shell "" DebugConfiguration "before displaying dialog"
    Set from = adapteroptions
    goto adapteroptions
adapteroptions = +

    read-syms FileDependentDlg$(!STF_LANGUAGE)
    Debug-Output "HPVGPCI: Assign AdapterType."
;AdapterType: 0=ISA, 1=EISA, 2=MCA, 3=PCI/IO, 4=PCI/Slot
    set AdapterTypeValue = $($(Option)AdapterType)
    Debug-Output "HPVGPCI: AdapterType is $(AdapterType)."

    ifint $(AdapterTypeValue) == 3
;
;       Manual installation
;
        set NTDetected = $(FALSE)
        Debug-Output "HPVGPCI $(Option): Manual Install."
        Debug-Output "HPVGPCI: Start the dialog box."
        LoadLibrary "Disk 1" $(DialogDllName) !hLib
        SetHelpFile "hpvgp.hlp" $(MinID) $(MaxID)
        ui start "InputDlg"  $(!hLib)
        FreeLibrary $(!hLib)
        ifstr(i) $(DLGEVENT) == "CONTINUE"
;                set IRQValueIndex = $(Combo1Out)
;                set IOBaseAddrIndex = $(Combo2Out)
                set IOBaseAddrIndex = $(Combo1Out)
;                set MemoryMapIndex = $(Combo3Out)
                set AdapterList = $(Option)   ;; 1 Item to install
                ui pop 1
                goto nextstep
        else-ifstr(i) $(DLGEVENT) == "BACK"
                set CommonStatus = STATUS_USERCANCEL
                Debug-Output "Action: exit. Bye."
                ui pop 1
                goto end
        else
                ui pop 1
                Debug-Output "Action: unknown. Bye."
                goto end
        endif
        set BusTypeNum = 5
        Debug-Output "HPVGPCI $(Option): Assign BusType = $(BusTypeNum)"
        set BusNumber = 0
    else
;
; Plug 'n Play installation
;
        Debug-Output "HPVGPCI $(Option): 3.50 Plug and Play Install."
        set NTDetected = $(FALSE)
        ifstr(i) *($(CurrentVersionValue),4) == 3.50  ;; We need to ask on v3.50
            Debug-Output "HPVGPCI.INF $(Option): Running 3.50 Bus Dialog"
            set BusInterfaceType = 5
            set BusTypeNum = 5
            Debug-Output "HPVGPCI $(Option): Assign BusType = $(BusTypeNum)"
            set BusNumber = 0
            set NTDetected = $(FALSE)
            Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "ShellCode error."
                goto ShellCodeError
            endif
;            set BusInterfaceType = $($R1)
; Leave BusType hardcoded at 5.
;            set BusTypeNum = $($R1)
            set BusNumber = $($R2)
            set BusTypeNum = 5
            Debug-Output "HPVGPCI $(Option): Assign BusType = $(BusTypeNum)"
            set AdapterList = $(Option)   ;; 1 Item to install
            Debug-Output "HPVGPCI.INF $(Option): BusInterfaceType = $(BusInterfaceType)"
            Debug-Output "HPVGPCI.INF $(Option): BusNumber = $(BusNumber)"
        else
            Debug-Output "HPVGPCI $(Option): 3.50 Plug and Play Install."
            Debug-Output "HPVGPCI.INF $(Option): Running 3.51 PCI Dectection"
            ;;
            ;; v3.51 has PCI detection code built in.
            ;;
            set NTDetected = $(TRUE)
            set Vendor = 4156       ;; 0x103c is HP's Vendor ID!
            set-div CFID = $($(Option)CFID) 1
            Debug-Output "HPVGPCI.INF $(Option): VendorID = $(Vendor)"
            Debug-Output "HPVGPCI.INF $(Option): CFID = $(CFID)"
            Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CFID)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                 goto ShellCodeError
            endif
            ifstr(i) $($R0) == {}
                 set Error = $(CANNOT_FIND_ANY_CARD)
                 set CommonStatus = USER_CANCEL
                 set from = end
                 goto nonfatal
            endif
            set BusTypeNum = 5
            Debug-Output "HPVGPCI $(Option): Assign BusType = $(BusTypeNum)"
            set AdapterList = $($R0)
        endif
    endif

nextstep = +
    Shell "" DebugConfiguration "after running dialog"
    Set from = adapteroptions
    Set to = skipoptions
    goto skipoptions
skipoptions =+
;    ifint $(OldVersionExisted) == $(TRUE)
;        ifstr(i) $(!NTN_InstallMode) == configure
;            goto writeparameters
;        endif
;    endif
    StartWait
;
;   If this is a new install then copy the driver files.
;
    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)
                  Goto fatal
              Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
                  Goto successful
              Endif
              Set SrcDir = $($R1)
           Endif
           install "Install-Option"
           ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
              Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
              ifint $($ShellCode) != $(!SHELL_CODE_OK)
                  goto ShellCodeError
              endif
              set Error = $($R0)
              goto fatal
           endif
        endif
;
; Add Software Component
;
        Debug-Output "HPVGPCI $(Option): Add Software Component."
        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), +
            $(ProductSoftwareName), +
            $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
            $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
            $(NetEventDLL)
        Set OEM_ABANDON_SOFTWARE = TRUE
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error"
            goto ShellCodeError
        endif
        set RegistryErrorIndex = $($R0)
        set KeyProduct      = $($R1)
        Set SoftNetRulesKey = $($R2)
        CloseRegKey $($R3)           ; SoftServiceKey
        CloseRegKey $($R4)           ; SoftParameterKey
        CloseRegKey $($R5)           ; SoftLinkageKey
        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output "Registry error: add software components"
            CloseRegKey $(KeyProduct)
            CloseRegKey $(SoftNetRulesKey)
            goto fatalregistry
        endif
        Debug-Output "HPVGPCI $(Option): Add Product Software Values."
        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
                           {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
                           {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
                           {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
                           {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
                           {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
                           {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error."
            goto ShellCodeError
        endif
        set RegistryErrorIndex = $($R0)
        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output "Registry error: add value list."
            CloseRegKey $(KeyProduct)
            CloseRegKey $(SoftNetRulesKey)
            goto fatalregistry
        endif
;
; Add Net Rule Values
;
        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)}}
        Debug-Output "HPVGPCI: Add Net Rule Values."
        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error."
            goto ShellCodeError
        endif
        set RegistryErrorIndex = $($R0)
        CloseRegKey $(KeyProduct)
        CloseRegKey $(SoftNetRulesKey)
        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output "Registry error: add value list."
            goto fatalregistry
        endif
    endif

;
; Process the Adapter List
;
    Debug-Output "HPVGPCI.INF $(Option): Adapterlist = $(AdapterList)"
    ForListDo $(AdapterList)
        ifint $(OldVersionExisted) == $(TRUE)
            ifstr(i) $(!NTN_InstallMode) == configure
                goto writeparameters
            endif
        endif

        Set InstallCard = "YES"
        ifint $(NTDetected) == $(TRUE)
            set DetectedBusNum = *($($),1)
            set DetectedSlotNum = *($($),2)
            Debug-Output "HPVGPCI.INF $(Option): DetectedBusNumber = $(DetectedBusNum)"
            Debug-Output "HPVGPCI.INF $(Option): DetectedSlotNum = $(DetectedSlotNum)"

; This check will cover the J2585A
            Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
                $(DetectedSlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)

            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                goto ShellCodeError
            endif
            ifstr $($R0) != "NO_ERROR"
                set Error = $($R0)
                goto fatal
            endif
            ifstr(i) $($R1) == "YES"
                set InstallCard = "NO"  ;; Don't want to re-install, it's there already
            endif

;
; NEW - Don't over-install onto any Lassen based adapter
;

; Check for J2585B
            Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
                $(DetectedSlotNum), $(ProductHardwareJ2585BSLOTDescription), $(ProductHardwareName)

            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                goto ShellCodeError
            endif
            ifstr $($R0) != "NO_ERROR"
                set Error = $($R0)
                goto fatal
            endif
            ifstr(i) $($R1) == "YES"
                set InstallCard = "NO"  ;; Don't re-install, it's there already
            endif

; Check for J2973A
            Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
                $(DetectedSlotNum), $(ProductHardwareJ2973ASLOTDescription), $(ProductHardwareName)

            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                goto ShellCodeError
            endif
            ifstr $($R0) != "NO_ERROR"
                set Error = $($R0)
                goto fatal
            endif
            ifstr(i) $($R1) == "YES"
                set InstallCard = "NO"  ;; Don't re-install, it's there already
            endif

; Check for J2970A
            Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
                $(DetectedSlotNum), $(ProductHardwareJ2970ASLOTDescription), $(ProductHardwareName)

            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                goto ShellCodeError
            endif
            ifstr $($R0) != "NO_ERROR"
                set Error = $($R0)
                goto fatal
            endif
            ifstr(i) $($R1) == "YES"
                set InstallCard = "NO"  ;; Don't re-install, it's there already
            endif

;
; END NEW
;
        endif

        ifstr(i) $(InstallCard) == "NO"
            Debug-Output "HPVGPCI.INF $(Option): Card Already at $(DetectedBusNum):$(DetectedSlotNum) already installed!"
;            set Error = "An adapter at $(DetectedBusNum):$(DetectedSlotNum) is already installed!"
            set Error = "An adapter at Bus $(DetectedBusNum), Slot $(DetectedSlotNum) is already installed!"
            Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                goto ShellCodeError
            endif
            goto nextadapter
;        else
        endif
;
;       AddHardwareComponent
;
;; NEW NEW
        Debug-Output "HPVGPCI: Add Hardware Component."
        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)
            goto fatalregistry
        endif
        set KeyParameters = $($R3)
        set KeyAdapterRules = $($R2)
        set AdapterNumber = $($R4)
        set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
                   {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
                   {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
                   {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)}}
        Debug-Output "HPVGPCI: Add Product Hardware Values."
        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)
            goto fatalregistry
        endif
        CloseRegKey $(KeyAdapterRules)
        goto writeparameters
writeparameters = +
;
;       Add HW Configuration Parameters
;
        Debug-Output "HPVGPCI $(Option): Assign AdapterType."
;AdapterType: 0=ISA, 1=EISA, 2=MCA, 3=PCI/IO, 4=PCI/Slot
        set AdapterTypeValue = $($(Option)AdapterType)

        ifint $(AdapterTypeValue) == 3
            Ifstr(i) $(CurrentVersionValue) == ""
                Debug-Output "HPVGPCI.INF $(Option): Set BusNumber = 0 "
                Set BusNumber = 0
            Else
                Ifstr(i) $(CurVer) == "3.1"
                    Debug-Output "HPVGPCI.INF $(Option): 3.10 Set BusNumber = 0 "
                    Set BusNumber = 0
                    Shell $(UtilityInf), GetBusTypeNum
                    set TempBusTypeNum = $($R1)
                    set BusTypeNum = $(TempBusTypeNum)
                else
                    ifstr(i) $(!NTN_InstallMode) != configure
                        Debug-Output "HPVGPCI.INF: Shell out for BusNumber"
                        Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusTypeNum) $(BusNumber)
                        Set BusNumber = $($R2)
;                        Set BusTypeNum = $($R1)
                        Set BusTypeNum = 5
                        Debug-Output "HPVGPCI $(Option): Assign BusType = $(BusTypeNum)"
                    else
                        Debug-Output "HPVGPCI.INF $(Option): Configuring, don't shell out for BusNumber"
                    endif
                endif
            Endif
            
            Debug-Output "HPVGPCI $(Option): Assign IOBaseAddress."
            set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))

            Debug-Output "HPVGPCI $(Option): Form the Adapter Parameter List."
            Debug-Output "HPVGPCI $(Option): IOBaseAddress string is: $($(Option)BaseAddress)"
            Debug-Output "HPVGPCI $(Option): IOBaseAddress = $(IOBaseAddressValue)"
            Debug-Output "HPVGPCI $(Option): BusNumber     = $(BusNumber)"
            Set NewValueList = { +
                   {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
                   {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
            Debug-Output "HPVGPCI: Add Adapter IoBaseAddress Parameter."
            Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
;            CloseRegKey $(KeyParameters)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "ShellCode error."
                goto ShellCodeError
            endif
            set RegistryErrorIndex = $($R0)
            Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
                Debug-Output "Registry error: Add value list"
                goto fatalregistry
            endif

        else
            ifint $(NTDetected) == $(TRUE)
                set BusNumber = $(DetectedBusNum)
                set SlotNum = $(DetectedSlotNum)
;                set BusInterfaceType = $(BusTypeNum)
                
                Set NewValueList = {+
                      {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
                      {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}+
                                       }
                Debug-Output "HPVGPCI.INF $(Option): Set HardwareParameterKey = $(NewValueList)"
                Debug-Output "HPVGPCI $(Option): SlotNumber    = $(SlotNumber)"
                Debug-Output "HPVGPCI $(Option): BusNumber     = $(BusNumber)"
                Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
                ifint $($ShellCode) != $(!SHELL_CODE_OK)
                    goto ShellCodeError
                endif

            else
                Set NewValueList = {+
                    {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
                                       }
                Debug-Output "HPVGPCI.INF $(Option): Set HardwareParameterKey = $(NewValueList)"
                Debug-Output "HPVGPCI $(Option): BusNumber     = $(BusNumber)"
                Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
                ifint $($ShellCode) != $(!SHELL_CODE_OK)
                    goto ShellCodeError
                endif
            endif
        endif
        set BusTypeNum = 5
        Debug-Output "HPVGPCI $(Option): Assign BusType = $(BusTypeNum)"
        Set NewValueList = { +
                 {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
                 {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(AdapterTypeValue)},+
                 {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
                           }
        Debug-Output "HPVGPCI $(Option): BusType       = $(BusType)"
        Debug-Output "HPVGPCI $(Option): AdapterType   = $(AdapterType)"
        Debug-Output "HPVGPCI $(Option): MediaType     = $(MediaType)"
        Debug-Output "HPVGPCI $(Option): Add Adapter Configuration Parameters."
        Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
        CloseRegKey $(KeyParameters)
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error."
            goto ShellCodeError
        endif
        set RegistryErrorIndex = $($R0)
        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            Debug-Output "Registry error: Add value list"
            goto fatalregistry
        endif
;        endif

nextadapter = +
    EndForListDo
    EndWait
    goto successful
;; END NEW
;; OLD

    Debug-Output "HPVGPCI: Add Hardware Component."
    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)
        goto fatalregistry
    endif
    set KeyParameters = $($R3)
    set KeyAdapterRules = $($R2)
    set AdapterNumber = $($R4)
    set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
                       {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
                       {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
                       {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)}}
    Debug-Output "HPVGPCI: Add Product Hardware Values."
    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)
        goto fatalregistry
    endif
    CloseRegKey $(KeyAdapterRules)
    goto writeparameters
writeparameters = +
    Shell $(UtilityInf), GetBusTypeNum
    set TempBusTypeNum = $($R1)
; PCI Bus Type
    set BusTypeNum = 5
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output "ShellCode error."
        goto ShellCodeError
    endif

    Debug-Output "HPVGPCI: Assign AdapterType."
;AdapterType: 0=ISA, 1=EISA, 2=MCA, 3=PCI/IO, 4=PCI/Slot
    set AdapterTypeValue = $($(Option)AdapterType)

;Get BusNumber
    set BusNumber = 0

    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\Windows Nt\CurrentVersion" $(MAXIMUM_ALLOWED) KeyNt
    Ifstr(i) $(KeyNt) != ""
        GetRegValue $(KeyNt) "CurrentVersion" CurVerValue
        Set CurVer = *($(CurVerValue),4)
        Debug-Output "HPVGPCI.INF: NT Version is "$(CurVer)
        CloseRegKey $(KeyNt)
    Endif

    Ifstr(i) $(CurVer) == ""
      Debug-Output "HPVGPCI.INF: Set BusNumber = 0 "
      Set BusNumber = 0
    Else
      Ifstr(i) $(CurVer) == "3.1"
        Debug-Output "HPVGPCI.INF: Set BusNumber = 0 "
        Set BusNumber = 0
        set BusTypeNum = $(TempBusTypeNum)
;        set AdapterTypeValue = 0
      else
;        Debug-Output "HPVGPCI.INF: Shell out for BusNumber"
        Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusTypeNum) $(BusNumber)
	Set BusNumber = $($R2)
      endif
    Endif

    Debug-Output "HPVGPCI: Assign IOBaseAddress."
    set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))

    Debug-Output "HPVGPCI: Form the Adapter Parameter List."
    Debug-Output "HPVGPCI: IOBaseAddress string is: "$($(Option)BaseAddress)

;    Set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
    Set NewValueList = { +
                       {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
                       {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
                       {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(AdapterTypeValue)},+
                       {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
;                       {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemoryMapValue)},+
                       {$($(Option)BaseAddress),$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
;                       {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
    Debug-Output "HPVGPCI: Add Adapter Configuration Parameters."
    Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
    CloseRegKey $(KeyParameters)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output "ShellCode error."
        goto ShellCodeError
    endif
    set RegistryErrorIndex = $($R0)
    Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
        Debug-Output "Registry error: Add value list"
        goto fatalregistry
    endif
    EndWait
    goto successful
;; END OLD
bindingadapter =+
    set Error = "Binding: Sorry, not yet implemented."
    goto fatal
removeadapter = +
    Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
            $(ProductSoftwareName)
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error"
            goto ShellCodeError
        endif
        set RegistryErrorIndex = $($R0)
        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            goto fatalregistry
        endif
    else
        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), $(!NTN_RegBase)
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error"
            goto ShellCodeError
        endif
        set RegistryErrorIndex = $($R0)
        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            goto fatalregistry
        endif
    endif
    goto end
UpgradeSoftware = +
;; NEW
    Debug-Output "HPVGPCI.INF $(Option): UpdateSoftware"
    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
        Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "ShellCode error"
                goto ShellCodeError
            endif
            set !UG_Filename = $($R0)
            install "Install-Update"
            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
                goto fatal
            endif
            SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
            SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
            CloseRegKey $(KeyProduct)
    else
        goto fatalregistry
    endif
    goto end
;; END NEW
;; OLD
    ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
        OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
        Ifstr $(KeyProduct) != $(KeyNull)
            GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
            set Version = *($(VersionInfo), 4)
            Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "ShellCode error"
                goto ShellCodeError
            endif
            set !UG_Filename = $($R0)
            ifstr(i) $(!UG_Filename) != ""
                install "Install-Update"
                ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
                    goto fatal
                endif
            endif
            SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
            SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
            ifint $(Version) != $(ProductVersion)
            endif
            CloseRegKey $(KeyProduct)
        else
            goto fatalregistry
        endif
    else
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
              $(MAXIMUM_ALLOWED) NetworkCardKey
        Ifstr(i) $(NetworkCardKey) != $(KeyNull)
            GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
            set ServiceName = *($(ServiceNameInfo), 4)
            OpenRegKey $(NetworkCardKey) "" "NetRules" +
                $(MAXIMUM_ALLOWED) NetRuleKey
            Ifstr(i) $(NetRuleKey) != $(KeyNull)
            else
                goto fatalregistry
            endif
            CloseRegKey $(NetRules)
            CloseRegKey $(NetworkCardKey)
        else
            goto fatalregistry
        endif
        OpenRegKey $(!REG_H_LOCAL) "" +
              $(!NTN_ServiceBase)"\"$(ServiceName) +
              $(MAXIMUM_ALLOWED) ServiceKey
        Ifstr(i) $(ServiceKey) != $(KeyNull)
            CloseRegKey $(ServiceKey)
        else
            goto fatalregistry
        endif
    endif
    goto end
;; END OLD
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
            goto fatalregistry
        endif
    EndForListDo
    Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), FALSE
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output "ShellCode error"
            goto ShellCodeError
        endif
        set RegistryErrorIndex = $($R0)
        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
            goto fatalregistry
        endif
    endif
    goto end
warning = +
    Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        goto ShellCodeError
    endif
    ifstr(i) $($R1) == "OK"
        goto $(to)
    else-ifstr(i) $($R1) == "CANCEL"
        goto $(from)
    else
        goto "end"
    endif
nonfatalinfo = +
    Set Severity = STATUS
    Set CommonStatus = STATUS_USERCANCEL
    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
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)
        goto ShellCodeError
    endif
    set Error = $($R0)
    Goto fatal
fatal = +
    ifstr(i) $(Error) == ""
        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            goto ShellCodeError
        endif
        set Error = $($R0)
    endif
    Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        goto ShellCodeError
    endif
    goto setfailed
ShellCodeError = +
    set DlgType      = "MessageBox"
    set STF_MB_TITLE = "Error: "$(FunctionTitle)
    set STF_MB_TEXT  = "Shell Code Error"
    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
    ifstr(i) $(OEM_ABANDON_ON) == TRUE
        set OEM_ABANDON_ON = FALSE
        goto abandon
    endif
    goto end
end = +
    goto term
term = +
    Return $(CommonStatus)
[DebugConfiguration]
    Set InfName = "HPVGPCI.INF"
    Debug-Output $(InfName)" **CONFIGURATION STATE: $($0)"
;    Debug-Output $(InfName)" IRQLevel is $(!p:IRQValue)"
    Debug-Output $(InfName)" IOBaseAddrValue is $(!p:IOBaseAddrValue)"
    Debug-Output $(InfName)" IOBaseAddrValue is $(IOBaseAddrValue)"
;    Debug-Output $(InfName)" MemoryMappedBaseAddr is $(!p:MemoryMapValue)"
    Debug-Output $(InfName)" AdapterType is $(AdapterType)"
    Debug-Output $(InfName)" BusType is $(BusType)"
    return
[Install-Option]
    set STF_VITAL = ""
    ifstr(i) $(AddCopy) == "YES"
        AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
    endif
    ifstr(i) $(DoCopy) == "YES"
       set !STF_NCPA_FLUSH_COPYLIST = TRUE
       CopyFilesInCopyList
    endif
    Exit
[Install-Update]
   set STF_VITAL        = ""
   set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
   AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
   AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
;   AddSectionFilesToCopyList Files-Dll $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)
   set !STF_NCPA_FLUSH_COPYLIST = TRUE
   CopyFilesInCopyList
   exit

[Install-Dll]
   set STF_VITAL        = ""
   AddSectionFilesToCopyList Files-Dll $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)
   CopyFilesInCopyList
   exit

[Source Media Descriptions]
    1  = "HP Driver Support Disk"  , TAGFILE = disk1
[ProductType]
STF_PRODUCT  = Winnt
STF_PLATFORM = I386
[Files-Inf]
1,	oemsetup.inf,	 SIZE=30722,	RENAME=$(!UG_Filename)
[Files-J2585A]
1, Hpddnd3.sys , SIZE=52736
[Files-J2585ASLOT]
1, Hpddnd3.sys , SIZE=52736
[Files-J2585BSLOT]
1, Hpddnd3.sys , SIZE=52736
[Files-J2973ASLOT]
1, Hpddnd3.sys , SIZE=52736
[Files-J2970ASLOT]
1, Hpddnd3.sys , SIZE=52736
[Files-Dll]
1, Hpvg1dlg.dll,  SIZE=16896
1, Hpvgp.hlp,     SIZE=4536
[LanguagesSupported]
    ENG
[OptionsTextENG]
    J2585ASLOT = "HP DeskDirect (J2585A) 10/100 PCI LAN Adapter"
    J2585BSLOT = "HP DeskDirect (J2585B) 10/100 PCI LAN Adapter"
    J2973ASLOT = "HP DeskDirect (J2973A) 10BaseT PCI LAN Adapter"
    J2970ASLOT = "HP DeskDirect (J2970A) 10BaseT/2 PCI LAN Adapter"
[BusMFileConstantsENG]
ProductSoftwareDescription = "HP DeskDirect 10/100 LAN Adapter Driver"
[SlaveFileConstantsENG]
ProductSoftwareDescription = "HP DeskDirect 10/100 LAN Adapter Driver"
[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:"

J2585AIOFunctionTitle    = "HP DeskDirect (J2585A) PCI LAN Adapter Setup"
J2585BIOFunctionTitle    = "HP DeskDirect (J2585B) PCI LAN Adapter Setup"
J2973AIOFunctionTitle    = "HP DeskDirect (J2973A) PCI LAN Adapter Setup"
J2970AIOFunctionTitle    = "HP DeskDirect (J2970A) PCI LAN Adapter Setup"
ProductSoftwareDescription = "HP DeskDirect 10/100 LAN Adapter Driver"
ProductHardwareJ2585AIODescription = "HP DeskDirect (J2585A) 10/100 PCI LAN Adapter"
ProductHardwareJ2585ASLOTDescription = "HP DeskDirect (J2585A) 10/100 PCI LAN Adapter"
ProductHardwareJ2585BIODescription = "HP DeskDirect (J2585B) 10/100 PCI LAN Adapter"
ProductHardwareJ2585BSLOTDescription = "HP DeskDirect (J2585B) 10/100 PCI LAN Adapter"
ProductHardwareJ2973AIODescription = "HP DeskDirect (J2973A) 10BaseT PCI LAN Adapter"
ProductHardwareJ2973ASLOTDescription = "HP DeskDirect (J2973A) 10BaseT PCI LAN Adapter"
ProductHardwareJ2970AIODescription = "HP DeskDirect (J2970A) 10BaseT/2 PCI LAN Adapter"
ProductHardwareJ2970ASLOTDescription = "HP DeskDirect (J2970A) 10BaseT/2 PCI LAN Adapter"
FunctionTitle   = $($(Option)FunctionTitle)
IOBaseAddrList = ^(IOBaseAddrChoices, 1)
IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
J2585ASLOTAdapterType = 4
J2585AIOAdapterType = 3
J2585BSLOTAdapterType = 4
J2585BIOAdapterType = 3
J2973ASLOTAdapterType = 4
J2973AIOAdapterType = 3
J2970ASLOTAdapterType = 4
J2970AIOAdapterType = 3
J2585AIOCombo1Label = "Base I/&O Address:"
AdapterTypeValue = $($(Option)AdapterType)
J2585AIOBaseAddress = "IoBaseAddress"
J2585AIOIOBaseAddrDefault = 9
[DialogConstantsENG]
Help        = "Help"
Exit        = "Cancel"
OK          = "OK"
HelpContext = ""
Continue    = "Continue"
Cancel      = "Cancel"
[FileDependentDlgENG]
DlgType = "RadioCombination"
DlgTemplate = "HPVG"
Caption = $(FunctionTitle)
DlgText = "Please select values for the following fields:"
Combo1Label = $($(Option)Combo1Label)
Combo1List = $(IOBaseAddrList)
Combo1Out  = $(IOBaseAddrValue)
ComboListItemsIn  = {Combo1List}
ComboListItemsOut = {Combo1Out}
EditTextIn = ""
EditTextLim = ""
CBOptionsGreyed = {}
NotifyFields = {NO, NO}
;Help Stuff
MinID = 1
MaxID = 6000
HelpContext = 5100
Download Driver Pack

How To Update Drivers Manually

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

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

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

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

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

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

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

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

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

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

server: web2, load: 2.50