;****************************************************************************** ; Windows OEMSETUP.INF ; HP Ethernet, Fast Ethernet, Gigabit NICs. ; Version 7.0 ; ; Copyright 2002 Compaq Information Technologies Group, L.P. ;****************************************************************************** ; ; Several global parameters are set up before this inf file is executed. Some ; of them are: ; ; DebugOutputControl = 0 (Controls Debug-Output - set = 1 to output debug strings to kernel debugger) ; NTN_SoftwareBase = HKLM\SOFTWARE (SOFTWARE Registry Key) ; STF_NTPATH = %systemroot%\system32 (eg, c:\winnt\system32) ; LIBHANDLE = handle to the support library, setupdll.dll ; NTN_RegBase = Registry entry of selected adapter or protocol (selected with ncpa) or NULL if nothing selected (e.g. on 'Add') ; NTN_InstallMode = Install, Update, Bind, Configure, or deinstall ; NTN_InstallPhase = Primary (installing NT) or Secondary (ncpa, Smart Component, etc.) ; NTN_Origination = ncpa (if run by calling netcfg.dll, which is the case with ncpa and Smart Component ; STF_GUI_UNATTENDED = installing unattended (no user input required) ; STF_WINDOWSSYSPATH = path to windows system directory, ie, %systemroot%\system32 (eg, c:\winnt\system32) ; ; Other variables are set up for this inf file before it is called but they are local, not global, variables ; ; STF_CONTEXTINFNAME = path to inf file - may not be same as inf name stored in Registry with adapter info ; ;****************************************************************************** [Identification] OptionType = NetAdapter [PlatformsSupported] PCI [LanguagesSupported] ENG [Options] N100 N1000 Q57NT4 CPQANC CPQANCTransport CPQPCI [OptionsTextENG] N100 = "HP Ethernet/Fast Ethernet or Gigabit NICs" ;------------------------------------------------------------------------ ; Constant definitions ;------------------------------------------------------------------------ [GeneralConstants] UtilityInf = "UTILITY.INF" subroutineinf = "SUBROUTN.INF" ; ; Exit point for Update mode routine UpdateExit = end ; ; ; Product Info ; Manufacturer = "Compaq" TargetNTVersion = "4.0" ; ; ; Support Service Roots ; InstallSupportService = "N100" InstallSupportServiceGig = "N1000" InstallSupportServiceBC = "Q57NT4" ; ; ; Registry Keys ; (!NTN_SoftwareBase - Global value passed in = HKLM\SOFTWARE) ; ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(InstallSupportService)"\CurrentVersion" ProductKeyNameGig = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(InstallSupportServiceGig)"\CurrentVersion" ProductKeyNameBC = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(InstallSupportServiceBC)"\CurrentVersion" WindowsNTKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion" NetworkCardsKeyName = $(WindowsNTKeyName)"\NetworkCards" ; KeyNull = "" MAXIMUM_ALLOWED = 33554432 ;access rights bit map for Registry functions KeyProduct = "" NullNadName = "" ;------------------------------------------------------------------------ [date] ;this var is only used in this inf file to print the date in a debugging statement Now = {} ? $(!LIBHANDLE) GetSystemDate ; ; The FileConstantsENG section defines constants that are not used within this inf file but are used by ; the system when running this inf file. ; The constants beginning with "Pro" are used for the dialog box that is displayed when files are being ; copied. ; Not sure when, or if, the other constants in this section are ever used. ; [FileConstantsENG] ProCaption = "Windows NT Setup" ProCancel = "Cance&l" 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 = "HP Network Controller Setup" ProductSoftwareDescription = "HP NDIS Miniport Driver" CANNOT_FIND_ANY_CARD = "Network card is not present in the system." ProductSoftwareTitle = "HP Network Driver" ShellCodeErrorTitle = "Error: "$(FunctionTitle) ShellCodeErrorText = "Shell Code Error." [OSWarnings] Warning = "This HP NIC Driver is for Microsoft Windows NT "$(TargetNTVersion)" only. "+ "Please click OK to abort installation." [OSWarningDlg] STF_MB_TITLE = "HPNTAC" DlgType = "MessageBox" STF_MB_TEXT = $(Warning) STF_MB_TYPE = 1 STF_MB_ICON = 5 STF_MB_DEF = 1 [FileCopyWarning] FileWarning = "Copying Files was cancelled or failed. The software was only partially updated and will not function reliably. "+ "You must update the software successfully." [FileCopyWarningDlg] STF_MB_TITLE = "HPNTAC" DlgType = "MessageBox" STF_MB_TEXT = $(FileWarning) STF_MB_TYPE = 1 STF_MB_ICON = 3 STF_MB_DEF = 1 [Source Media Descriptions] 1 = "HPNTAC Installation Disk #1" , TAGFILE = s_ntac.dl_ 2 = "HPNTAC Installation Disk #2" , TAGFILE = s_ntac.sy_ ;--------------------------------------------------------------------------- ; 1. Identify ; ; DESCRIPTION: Returns information to Setup about the type of device that ; can be installed using this inf file ; ; INPUT: None ; ; OUTPUT: $($R0): STATUS (STATUS_SUCCESSFUL) ; $($R1): Option Type (NetAdapter) ; $($R2): Diskette description (ignored by Setup) ;--------------------------------------------------------------------------- [Identify] Debug-Output "In [Identify]" read-syms Identification set Status = STATUS_SUCCESSFUL set Identifier = $(OptionType) set Media = #("Source Media Descriptions", 1, 1) Return $(Status) $(Identifier) $(Media) ;------------------------------------------------------------------------ ; 2. ReturnOptions: ; ; DESCRIPTION: Returns list of Options (devices, protocols, etc) that are ; supported by this inf file and returns the text string to be ; used in the user interface to select these options. ; For Shumard, several Options are supported and they are all ; selected on the UI from a single choice (the string returned). ; ; INPUT: $($0): Language used. ( ENG | FRN | ... ) ; $($1): Second input parameter is not documented. From example code ; it appears that this input parameter is optional and, if ; present, contains the system platform type (eg, PCI) ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ; STATUS_NOLANGUAGE ; STATUS_FAILED ; STATUS_NOTSUPPORTED ; ; $($R1): Option List ; $($R2): Option Text List ;------------------------------------------------------------------------ [ReturnOptions] ; un-comment the following line to allow debugging output ; this doesn't work in the ReturnOptions section when InstallMode is 'Install' ; set !G:DebugOutputControl = 1 set Status = STATUS_FAILED set OptionList = {} set OptionTextList = {} set LanguageList = ^(LanguagesSupported, 1) Debug-Output "Running Return Options" Debug-Output "First input parameter = "$($0) Debug-Output "Second input parameter = "$($1) ifcontains(i) $($0) in $(LanguageList) ifstr(i) $($1) == "" goto returnoptions endif set PlatformList = ^(PlatformsSupported, 1) ifcontains(i) $($1) in $(PlatformList) goto returnoptions else set Status = STATUS_NOTSUPPORTED goto finish_ReturnOptions endif else set Status = STATUS_NOLANGUAGE goto finish_ReturnOptions endif returnoptions = + set OptionList = ^(Options, 1) set OptionTextList = ^(OptionsText$($0), 1) set Status = STATUS_SUCCESSFUL finish_ReturnOptions = + Debug-Output "Status: "$(Status) Debug-Output "OptionList: "$(OptionList) Debug-Output "OptionTextList: "$(OptionTextList) Return $(Status) $(OptionList) $(OptionTextList) ;------------------------------------------------------------------------ ; ; 3. InstallOption: ; ; This section is shelled to by NCPASHEL.INF during reconfig, ; removal, update, etc. ; ; ; FUNCTION: To copy files representing Options (using File Sections) ; To configure the installed option (by executing Shumard) ; To update the registry for the installed option (Registry ; changes to install drivers/protocol is done in Shumard.) ; ; INPUT: $($0): Language to use ; $($1): OptionID to install ; $($2): SourceDirectory ; $($3): AddCopy (YES | NO) - YES on Install and Update ; $($4): DoCopy (YES | NO) - YES on Install and Update ; $($5): DoConfig (YES | NO) - YES on Install but not Update ; ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ; STATUS_NOLANGUAGE | ; STATUS_USERCANCEL | ; STATUS_FAILED ; ;------------------------------------------------------------------------ [InstallOption] ; un-comment the following line to allow debugging output set !G:DebugOutputControl = 1 set Option = $($1) set SrcDir = $($2) set AddCopy = $($3) set DoCopy = $($4) set DoConfig = $($5) ;set up a local variable for install mode so it can be changed safely set Local_InstallMode = $(!NTN_InstallMode) ; verify that this inf supports the language being used set LanguageList = ^(LanguagesSupported, 1) ifcontains(i) $($0) NOT-IN $(LanguageList) set CommonStatus = STATUS_NOLANGUAGE goto end endif Debug-Output "Starting InstallOption..." ;zzz temp - shows that undefined global var has a value of "" (NULL) ifstr(i) $(!CPQ_SC_UPDATE) == "" Debug-Output "Undefined test passed == NULL" else Debug-Output "Undefined test failed - CPQ_SC_UPDATE = "$(!CPQ_SC_UPDATE) endif ;end temp ; establish constants used throughout this inf file read-syms GeneralConstants Debug-Output "Language = "$($0) Debug-Output "Option = "$(Option) Debug-Output "SrcDir = "$(SrcDir) Debug-Output "AddCopy = "$(AddCopy) Debug-Output "DoCopy = "$(DoCopy) Debug-Output "DoConfig = "$(DoConfig) Debug-Output "NTN_RegBase = "$(!NTN_RegBase) Debug-Output "NTN_InstallMode = "$(!NTN_InstallMode) Debug-Output "NTN_InstallPhase = "$(!NTN_InstallPhase) Debug-Output "NTN_Origination = "$(!NTN_Origination) Debug-Output "STF_INSTALL_MODE = "$(!STF_INSTALL_MODE) Debug-Output "STF_GUI_UNATTENDED = "$(!STF_GUI_UNATTENDED) Debug-Output "STF_UNATTENDED = "$(!STF_UNATTENDED) Debug-Output "STF_CONTEXTINFNAME is: "$(STF_CONTEXTINFNAME) read-syms FileConstants$(!STF_LANGUAGE) detect date set-title $(FunctionTitle) set CommonStatus = STATUS_SUCCESSFUL ;------------------------------------------------------------------------ Debug-Output "Finished initializing variables - ready to begin at: "$(Now) Begin = + ; Lets see if we can get the INF name from registry. Otherwise we ; will use the STF_CONTEXTINFNAME value.... Debug-Output "Try to get the INF name from Registry" ;init inf names to null set UG_InfName = $(NullNadName) ;inf name already stored or to be stored in the Registry set NNadName = $(NullNadName) ;inf name stored in Registry for N100 and N1000 Nics set QNadName = $(NullNadName) ;inf name stored in Registry for Q57NT4 Nics ;try to open the 'N100' key OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) + $(MAXIMUM_ALLOWED) + KeyProduct ifstr $(KeyProduct) != $(KeyNull) ;N100 Registry key found - so get INF name from this key in Registry Debug-Output "N100 Registry key found" Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) CloseRegKey $(KeyProduct) ifint $($ShellCode) != $(!SHELL_CODE_OK) set ShellErrorSection = UtilityInf:GetFileNameFromRegistry Debug-Output "ShellErrorSection = "$(ShellErrorSection) goto ShellCodeError endif set NNadName = $($R0) set UG_InfName = $(NNadName) set KeyProduct = "" Debug-Output "NNadName = "$(NNadName) Debug-Output "UG_InfName = "$(UG_InfName) else ;N100 doesn't exist - try to open the 'N1000' key Debug-Output "N100 doesn't exist - try to open the 'N1000' key" OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameGig) + $(MAXIMUM_ALLOWED) + KeyProduct ifstr $(KeyProduct) != $(KeyNull) ;N1000 Registry key found - so get INF name from this key in Registry Debug-Output "N1000 Registry key found" Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) CloseRegKey $(KeyProduct) ifint $($ShellCode) != $(!SHELL_CODE_OK) set ShellErrorSection = UtilityInf:GetFileNameFromRegistry Debug-Output "ShellErrorSection = "$(ShellErrorSection) goto ShellCodeError endif set NNadName = $($R0) set UG_InfName = $(NNadName) set KeyProduct = "" Debug-Output "NNadName = "$(NNadName) Debug-Output "UG_InfName = "$(UG_InfName) endif endif ;Try to open the 'Q57NT4' key Debug-Output "Try to open the 'Q57NT4' key" OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameBC) + $(MAXIMUM_ALLOWED) + KeyProduct ifstr $(KeyProduct) != $(KeyNull) ;Q57NT4 Registry key found - so get INF name from this key in Registry Debug-Output "Q57NT4 Registry key found" Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) CloseRegKey $(KeyProduct) ifint $($ShellCode) != $(!SHELL_CODE_OK) set ShellErrorSection = UtilityInf:GetFileNameFromRegistry Debug-Output "ShellErrorSection = "$(ShellErrorSection) goto ShellCodeError endif set QNadName = $($R0) ;Only use QNadName for inf name if there are no N100 or N1000 Nics in the Registry ifstr $(NNadName) == $(NullNadName) set UG_InfName = $(QNadName) endif Debug-Output "QNadName = "$(QNadName) Debug-Output "UG_InfName = "$(UG_InfName) endif ifstr $(UG_InfName) == $(NullNadName) Debug-Output "No Nic Registry keys exist so this is initial install - Inf Name does not exist in the registry " ; Reg keys don't yet exist so use the value passed in for inf file, STF_CONTEXTINFNAME set UG_FileName = $(STF_CONTEXTINFNAME) set UG_InfName = $(UG_FileName) ; chop off the path part and save the name of the file in UG_InfName Split-String $(UG_InfName) "\" TempList ForListDo $(TempList) set UG_InfName = $($) EndForListDo goto InfOk endif Debug-Output "Inf Name from registry is:"$(UG_InfName) set UG_FileName = $(!STF_WINDOWSSYSPATH)\$(UG_InfName) ;since Registry entry found, then software is already installed, therefore ;if install mode was specified, change it to update mode ifstr(i) $(Local_InstallMode) == install Debug-Output "Software already installed - change install mode to update mode" set Local_InstallMode = Update ;change exit point of Update routine so temp inf file will get deleted set UpdateExit = deleteinf endif InfOk = + ; the name of the inf file with no path Debug-Output "UG_InfName = "$(UG_InfName) ; the complete path and name of the inf file Debug-Output "UG_FileName = "$(UG_FileName) ; ; Determine the install mode and dispatch to appropriate routine ; ; shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS "Install mode:"$(Local_InstallMode) ; shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS "CopyFiles - DoCopy:"$(DoCopy) Debug-Output "Install mode:"$(Local_InstallMode) Ifstr(i) $(Local_InstallMode) == deinstall set StartLabel = removeadapter else-Ifstr(i) $(Local_InstallMode) == Update set StartLabel = UpgradeSoftware else-Ifstr(i) $(Local_InstallMode) == Bind set StartLabel = bindingadapter else-Ifstr(i) $(Local_InstallMode) == Configure set CommonStatus = STATUS_REBOOT set StartLabel = ConfigureAdapter else set StartLabel = InstallAdapter endif goto $(StartLabel) ;----------------------------------------------- ; Binding section ;----------------------------------------------- bindingadapter =+ Debug-Output "Binding Protocols" Debug-Output "Configure mode, Spawning CPQNTAC.EXE /BIND" RunProgram ExitCode "HP NT Support Software Diskette" "" cpqntac.exe /BIND ifstr(i) $(ExitCode) == "0" debug-output "no reboot or rebind needed" set CommonStatus = STATUS_NO_EFFECT else-ifstr(i) $(ExitCode) == "2" debug-output "need to reboot only" set CommonStatus = STATUS_REBOOT else debug-output "need to rebind and reboot" set CommonStatus = STATUS_SUCCESSFUL endif goto end ;----------------------------------------------- ; Removeadapter section ;----------------------------------------------- removeadapter = + Debug-Output "Removing Adapter" Debug-Output "Configure mode, Spawning CPQNTAC.EXE /REMOVE $(!NTN_RegBase)" RunProgram ExitCode "HP NT Support Software Diskette" "" cpqntac.exe /REMOVE$(!NTN_RegBase) ifstr(i) $(ExitCode) == "0" debug-output "no reboot or rebind needed" set CommonStatus = STATUS_NO_EFFECT else-ifstr(i) $(ExitCode) == "2" debug-output "need to reboot only" set CommonStatus = STATUS_REBOOT else debug-output "need to rebind and reboot" set CommonStatus = STATUS_SUCCESSFUL endif goto end ;----------------------------------------------- ; Installation Section ;----------------------------------------------- InstallAdapter = + Debug-Output "Installing Adapter" ;get version of NT from Registry and check to make sure it's NT Version 4.0 OpenRegKey $(!REG_H_LOCAL) "" $(WindowsNTKeyName) $(MAXIMUM_ALLOWED) KeyNT Ifstr $(KeyNT) != $(KeyNull) GetRegValue $(KeyNT) CurrentVersion CurrentVersionVal set CurrentVersionString = *($(CurrentVersionVal), 4) Debug-Output "NT CurrentVersionVal: "$(CurrentVersionVal) Debug-Output "NT VERSION: "$(CurrentVersionString) CloseRegKey $(KeyNT) Ifstr $(CurrentVersionString) != $(TargetNTVersion) read-syms OSWarnings read-syms OSWarningDlg ui start "Warning" set CommonStatus = STATUS_USERCANCEL goto deleteinf endif endif install "CopyFiles-Option" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS debug-output "InstallAdapter: CopyFiles-Option failed." ;set UG_FileName to null to force oemnad file to be deleted since install cancelled set UG_FileName = "" set CommonStatus = STATUS_USERCANCEL goto deleteinf endif ;Add registry value so the Tray Icon App will start at logon debug-output "InstallAdapter: Opening Registry KEY, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" $(!REG_KEY_ALL_ACCESS) RunHandle ifstr(i) $(RegLastError) == "0" set RunValueList = {NTACMON, 0, $(!REG_VT_SZ), "ntacmon.exe"} debug-output "InstallAdapter: Writing Registry Value, NTACMON = ntacmon.exe" SetRegValue $(RunHandle) $(RunValueList) CloseRegKey $(RunHandle) else debug-output "OpenRegKey failed" endif ;check whether install mode is Silent (if global variable not defined it is == "") ifstr(i) $(!CPQ_SC_SILENT) == "True" Debug-Output "Silent Install Mode, launching CPQNTAC.EXE /I /S /N$(UG_FileName)" RunProgram ExitCode "HP NT Support Software Diskette" "" cpqntac.exe /I /S /N$(UG_FileName) goto installexit endif ;check whether install mode is Unattended ifstr(i) $(!STF_GUI_UNATTENDED) == YES Debug-Output "UNATTENDED Install Mode, launching CPQNTAC.EXE /I /O /N$(UG_FileName)" RunProgram ExitCode "HP NT Support Software Diskette" "" cpqntac.exe /I /O /N$(UG_FileName) goto installexit endif Debug-Output "Secondary Install Mode, launching CPQNTAC.EXE /I /N$(UG_FileName)" RunProgram ExitCode "HP NT Support Software Diskette" "" cpqntac.exe /I /N$(UG_FileName) installexit = + set CommonStatus = STATUS_REBOOT ifstr(i) $(ExitCode) == "1" debug-output "need to rebind and reboot" set CommonStatus = STATUS_SUCCESSFUL endif goto deleteinf ;----------------------------------------------- ; Configuration Section ;----------------------------------------------- ConfigureAdapter = + Debug-Output "Configure Adapter" Debug-Output "Configure mode, Spawning CPQNTAC.EXE /C" RunProgram ExitCode "HP NT Support Software Diskette" "" cpqntac.exe /C$(!NTN_RegBase) ifstr(i) $(ExitCode) == "0" debug-output "no reboot or rebind needed" set CommonStatus = STATUS_NO_EFFECT else-ifstr(i) $(ExitCode) == "2" debug-output "need to reboot only" set CommonStatus = STATUS_REBOOT else debug-output "need to rebind and reboot" set CommonStatus = STATUS_SUCCESSFUL endif goto end ;----------------------------------------------- ; Upgrade Software section ;----------------------------------------------- UpgradeSoftware = + Debug-Output "Upgrading Shumard Software" ;get version of NT from Registry and check to make sure it's NT Version 4.0 OpenRegKey $(!REG_H_LOCAL) "" $(WindowsNTKeyName) $(MAXIMUM_ALLOWED) KeyNT Ifstr $(KeyNT) != $(KeyNull) GetRegValue $(KeyNT) CurrentVersion CurrentVersionVal set CurrentVersionString = *($(CurrentVersionVal), 4) Debug-Output "NT VERSION: "$(CurrentVersionString) CloseRegKey $(KeyNT) Ifstr $(CurrentVersionString) != $(TargetNTVersion) read-syms OSWarnings read-syms OSWarningDlg ui start "Warning" set CommonStatus = STATUS_USERCANCEL goto end endif endif ;Copy files install "CopyFiles-Option" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS debug-output "UpgradeSoftware: CopyFiles-Option failed." read-syms FileCopyWarning read-syms FileCopyWarningDlg ui start "FileWarning" set CommonStatus = STATUS_USERCANCEL goto $(UpdateExit) endif ;8/5/02 ;beginning with the next release of NT4 NTU (SmartStart 6.0?) the utility was re-branded ;to HP. In order to make the upgrade work correctly for the Control Panel icon, the ;Control Panel applet name was changed to hpntac.cpl. Therefore, after the files are ;copied successfully, the old cpl file (cpqntac.cpl) must be deleted from the system. set CplFileName = $(!STF_WINDOWSSYSPATH)"\CPQNTAC.CPL" debug-output "Adding file to delete list: "$(CplFileName) AddFileToDeleteList $(CplFileName) ;if there is an N100 or N1000 Nic installed AND a Q57NT4 Nic installed and their oemnad ;file names are different then this is an upgrade from Phase I software to Phase II, ;therefore, the Q57NT4 oemnadxx.inf file name must be changed to the same as the N100/N1000 ; ifstr $(NNadName) != $(NullNadName) ifstr $(QNadName) != $(NullNadName) ifstr $(NNadName) != $(QNadName) Debug-Output "Intel and Broadcom oemnad names different - must change Broadcom oenmad name" ;init registry keys to NULL set NetRulesKey = $(KeyNull) set NetCardsKey = $(KeyNull) ;change the inf name in the service name entry (ProductKeyNameBC key) ;Open the 'Q57NT4' NetRulesKey Debug-Output "Update: Open the 'Q57NT4' NetRulesKey" OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameBC)"\NetRules" + $(MAXIMUM_ALLOWED) + NetRulesKey ifstr $(NetRulesKey) != $(KeyNull) ;Q57NT4 NetRules Registry key opened successfully - write InfName value Debug-Output "Q57NT4 NetRules Registry key opened" set NadNameValueList = {InfName, 0, $(!REG_VT_SZ), $(NNadName)} Debug-Output "NadNameValueList = "$(NadNameValueList) SetRegValue $(NetRulesKey) $(NadNameValueList) CloseRegKey $(NetRulesKey) endif ;must find all Q57NT4 Nics under the NetworkCards Registry key and change their oemnad file name ; Debug-Output "Find all Q57NT4 Nics" OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKeyName) + $(MAXIMUM_ALLOWED) + NetCardsKey ifstr $(NetCardsKey) != $(KeyNull) ;enumerage all the installed network cards EnumRegKey $(NetCardsKey) NetCardsList Debug-Output "NetCardsList = "$(NetCardsList) ;for each installed Nic, check the Nic type - if it is a Q57NT4 Nic, then change its ;oemnad file name to be the same as N100/N1000 Nics ForListDo $(NetCardsList) set InstanceKey = $(KeyNull) ;init registry key variables set NetRulesKey = $(KeyNull) set NetCardItem = *($($), 1) ;set NetCardItem to key name for current Nic in list Debug-Output "NetCardItem = "$(NetCardItem) ;open registry key for current Nic OpenRegKey $(NetCardsKey) "" $(NetCardItem) + $(MAXIMUM_ALLOWED) + InstanceKey ifstr $(InstanceKey) != $(KeyNull) ;get product name of this Nic (ie, N100 or N1000 or Q57NT4 GetRegValue $(InstanceKey) ProductName ProductNameValueList set ProductNameValue = *($(ProductNameValueList), 4) Debug-Output "ProductNameValueList = "$(ProductNameValueList) Debug-Output "ProductNameValue = "$(ProductNameValue) ;test to see if this Nic is a Q57NT4 - if so then update the oemnad name ifstr $(ProductNameValue) == $(InstallSupportServiceBC) Debug-Output "Need to update InfName under this key" ;open the NetRules key for this Nic OpenRegKey $(InstanceKey) "" NetRules + $(MAXIMUM_ALLOWED) + NetRulesKey ifstr $(NetRulesKey) != $(KeyNull) set NadNameValueList = {InfName, 0, $(!REG_VT_SZ), $(NNadName)} Debug-Output "NadNameValueList = "$(NadNameValueList) ;change the oemnad name to be same as N100/N1000 (ie, NNadName) SetRegValue $(NetRulesKey) $(NadNameValueList) CloseRegKey $(NetRulesKey) endif endif CloseRegKey $(InstanceKey) endif EndForListDo CloseRegKey $(NetCardsKey) endif set QNadNamePath = $(!STF_WINDOWSSYSPATH)"\"$(QNadName) Debug-Output "Deleting Q57NT4 oemnadxx.inf file: "$(QNadNamePath) ;delete the Q57NT4 oemnadxx.inf file AddFileToDeleteList $(QNadNamePath) endif endif endif ;if only Q57NT4 Nics in system then may be updating Phase 1 software - in which case Chaser not already installed so ; put Tray Icon App in Registry in case it's not already there. ifstr $(NNadName) == $(NullNadName) ;Add registry value so the Tray Icon App will start at logon - it is probably already there but may not be if ; updating a system with only Broadcom Nics and Phase 1 software debug-output "UpdateAdapter: Opening Registry KEY, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" $(!REG_KEY_ALL_ACCESS) RunHandle ifstr(i) $(RegLastError) == "0" set RunValueList = {NTACMON, 0, $(!REG_VT_SZ), "ntacmon.exe"} debug-output "InstallAdapter: Writing Registry Value, NTACMON = ntacmon.exe" SetRegValue $(RunHandle) $(RunValueList) CloseRegKey $(RunHandle) else debug-output "OpenRegKey failed" endif endif ;delete the Phase 1 Broadcom Help file - won't hurt if it doesn't exist set Phase1BCHelp = $(!STF_WINDOWSSYSPATH)"\q57nt4.hlp" debug-output "Adding file to delete list: "$(Phase1BCHelp) AddFileToDeleteList $(Phase1BCHelp) ;delete the flag file set FlagFileName = $(!STF_WINDOWSSYSPATH)"\CPQNTAC.FLG" debug-output "Adding file to delete list: "$(FlagFileName) AddFileToDeleteList $(FlagFileName) ;always reboot after Update set CommonStatus = STATUS_REBOOT goto $(UpdateExit) ;----------------------------------------------- ; End processing to delete inf file if necessary ;----------------------------------------------- deleteinf = + ; ; If the STF_CONTEXTINFNAME is not equal to the UG_InfName variable that was pulled out of the registry then ; delete the STF_CONTEXINFTNAME because it is just a second copy of UG_InfName that we don't need afterwards. ; It is not possible to stop NCPA from copying the oemsetup.inf to STF_CONTEXINFTNAME when we hit the install section ; so we just erase it. (unless there was no inf name in the registry, then we keep the file) ifstr(i) $(STF_CONTEXTINFNAME) != $(UG_FileName) Debug-Output "Adding file to delete list: "$(STF_CONTEXTINFNAME) AddFileToDeleteList $(STF_CONTEXTINFNAME) endif goto end ;----------------------------------------------- ; ShellCode Error Handling ;----------------------------------------------- ShellCodeError = + Debug-Output $(STF_CONTEXTINFNAME)": Shell error, $(ShellErrorSection)" 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" set CommonStatus = STATUS_FAILED ;----------------------------------------------- ; Exit from INF file ;----------------------------------------------- end = + Debug-Output "Returning Status: "$(CommonStatus) Return $(CommonStatus) ;----------------------------------------------- ; Copy Files Section ;----------------------------------------------- [CopyFiles-Option] Debug-Output "In [CopyFiles-Option]" set STF_VITAL = "" ; set STF_OVERWRITE = "VERIFYSOURCEOLDER" ifstr(i) $(AddCopy) == "YES" AddSectionFilesToCopyList Files-Driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers AddSectionFilesToCopyList Files-KMDiags $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH) AddSectionFilesToCopyList Files-INF $(SrcDir) $(!STF_WINDOWSSYSPATH) AddSectionFilesToCopyList Files-APP $(SrcDir) $(!STF_WINDOWSSYSPATH) ;if this is an Update then copy the flag file so UI can't start until reboot is done ifstr $(Local_InstallMode) == Update Debug-Output "This is an Update so add flag file to copy list" AddSectionFilesToCopyList Files-Flag $(SrcDir) $(!STF_WINDOWSSYSPATH) endif endif ifstr(i) $(DoCopy) == "YES" set !STF_NCPA_FLUSH_COPYLIST = 1 CopyFilesInCopyList ; during an NT install the files must be copied right away else-ifstr(i) $(Local_InstallMode) == "install" set !STF_NCPA_FLUSH_COPYLIST = 1 CopyFilesInCopyList endif Exit ;------------------------------------------------------------------------ ; The sections below define the files to be copied, their approx. size, ; and their name after the copy is complete. ;------------------------------------------------------------------------ [Files-Inf] 1, oemsetup.inf, SIZE=1000, RENAME=$(UG_InfName), OVERWRITE=ALWAYS [Files-DLL] 1, S_NTAC.DL_, SIZE=50000, RENAME=CPQNTAC.DLL 1, S_100DG.DL_, SIZE=50000, RENAME=CP100DG.DLL 1, cqnicif.dl_, SIZE=50000, RENAME=CQNICIF.DLL 1, cqniccfg.dl_, SIZE=50000, RENAME=CQNICCFG.DLL 1, cqnicui.dl_, SIZE=50000, RENAME=CQNICUI.DLL 1, cqnicxml.dl_, SIZE=50000, RENAME=CQNICXML.DLL 1, cqnicidg.dl_, SIZE=50000, RENAME=CQNICIDG.DLL 1, bmapi.dl_, SIZE=50000, RENAME=BMAPI.DLL 1, cqcbdiag.dl_, SIZE=50000, RENAME=CQCBDIAG.DLL 1, cabw32.dl_,SIZE=50000, RENAME=CABW32.DLL 1, q57dtect.dl_,SIZE=50000, RENAME=Q57DTECT.DLL [Files-Driver] 2, S_N100NT.SY_, SIZE=50000, RENAME=N100NT.SYS 2, S_N1KNT4.SY_, SIZE=50000, RENAME=N1000NT4.SYS 2, S_NTAC.SY_, SIZE=50000, RENAME=CPQNTAC.SYS 2, Q57NT4.SY_, SIZE=50000, RENAME=Q57NT4.SYS 2, fad.sy_, SIZE=50000, RENAME=FAD.SYS [Files-KMDiags] 2, S_DGD.SY_, SIZE=50000, RENAME=CPQDGD.SYS 2, S_GBDD.SY_, SIZE=50000, RENAME=CPQGBDD.SYS 2, S_KDDP.SY_, SIZE=50000, RENAME=CPQKDDP.SYS [Files-APP] 2, mfc42u.dl_, SIZE=50000, RENAME=MFC42U.DLL, OVERWRITE=OLDER, VERSION="4,21,7022,0" 2, S_NTAC.EX_, SIZE=50000, RENAME=CPQNTAC.EXE 2, S_MON.EX_, SIZE=50000, RENAME=NTACMON.EXE, OVERWRITE=ALWAYS 2, S_NTAC.CP_, SIZE=50000, RENAME=HPNTAC.CPL 2, S_NTAC.HL_, SIZE=50000, RENAME=CPQNTAC.HLP 2, S_NTAC.CN_, SIZE=50000, RENAME=CPQNTAC.CNT 2, cpqnic.xm_, SIZE=50000, RENAME=CPQNIC.XML 2, cqniccmd.ex_, SIZE=50000, RENAME=CQNICCMD.EXE 2, cqniccfg.cm_, SIZE=50000, RENAME=CQNICCFG.CMD 2, patterns.da_, SIZE=50000, RENAME=PATTERNS.DAT [Files-Flag] 2, S_NTAC.CN_, SIZE=50000, RENAME=CPQNTAC.FLGDownload Driver Pack
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.