;------------------------------------------------------------------- ; ; OEMSETUP.INF ; Version: 1.6 (11/21/97 16:09:19) ; ; NIC Installation Script for Windows NT 3.51 and NT 4.0 ; ; Product: IBM PCI Token-Ring Adapter ; Copyright (C) 1996-1997 IBM Corporation. All rights reserved. ; ;------------------------------------------------------------------- [Identification] OptionType = NetAdapter [PlatformsSupported] PCI [LanguagesSupported] ENG [Options] TRP [OptionsTextENG] TRP = "IBM PCI Token-Ring Adapter" [GeneralConstants] from = "" to = "" KeyNull = "" AdapterList = {} MAXIMUM_ALLOWED = 33554432 RegistryErrorIndex = NO_ERROR KeyProduct = "" TRUE = 1 FALSE = 0 NoTitle = 0 OldVersionExisted = $(FALSE) [FileConstants] ; These should be left alone. UtilityInf = "UTILITY.INF" ParamInf = "NCPARAM.INF" SubroutineInf = "SUBROUTN.INF" SoftwareType = "driver" NetRuleSoftwareUse = $(SoftwareType) NetEventDLL = "%SystemRoot%\System32\netevent.dll" ; These constants vary depending on Software, Manufacturer, etc. Manufacturer = "IBM" ProductMajorVersion = "3" ProductMinorVersion = "0" ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion) ; Dialog box parameters InstallDLL = $(!STF_WINDOWSSYSPATH)"\TokSetup.Dll" ; PnP Information IBM_VENDOR_ID = 4116 ; 0x1014 in decimal PIT_DEVICE_ID = 62 ; 0x003E in decimal PIT_ADAPTER_ID = 269746238 ; 0x1014003E in decimal ; Hardware binding information. ProductHardwareName = "IBMTRP" NetRuleHardwareType = "IBMTRP IBMTRPAdapter" NetRuleHardwareBindForm = " yes yes container" NetRuleHardwareClass = {"IBMTRPAdapter basic"} ; Software binding information. ProductSoftwareName = "IBMTRP" NetRuleSoftwareType = "IBMTRPSys ndisDriver IBMTRPDriver" NetRuleSoftwareBindForm = """IBMTRPSys"" yes no container" NetRuleSoftwareClass = {"IBMTRP basic"} NetRuleSoftwareBindable = {"IBMTRPDriver IBMTRPAdapter non exclusive 100"} ProductSoftwareImagePath = "%SystemRoot%\system32\drivers\IBMTRP.SYS" ; Various places in the registry we use ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion" ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters" NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards" ; We used to keep our ProductKeyName in the Microsoft sub-tree... oops. ; This is used in both RemoveAdapter and UpgradeSoftware portion of the INF. OldProductKeyName = $(!NTN_SoftwareBase)"\Microsoft\"$(ProductSoftwareName)"\CurrentVersion" OldManufacturer = "Microsoft" ; NDIS Level Strings (default is NDIS4_Level; changed later if Windows NT 3.5x detected) NDIS4_Level = "NDIS 4.0" NDIS3_Level = "NDIS 3.1" NDIS_Level = $(NDIS4_Level) ; Uncomment the appropriate lines below if you want to install ; a certain NDIS level driver REGARDLESS of the INF's detection ; of the Operating System. This can be useful if you want to ; mandate use of the NDIS 3.1 miniport. ForceNDIS = "NO" ; the default, comment out if forcing ; ForceNDIS = $(NDIS3_Level) ; force use of NDIS 3.1 ; ForceNDIS = $(NDIS4_Level) ; force use of NDIS 4.0 ; No CSD applied string NO_CSD = "NO_CSD" ; Driver location after installation DriverFile = "IBMTRP.SYS" [FileConstantsENG] ; Contains localized strings for the appropriate version of the adapter. FunctionTitle = "IBM PCI Token-Ring Adapter Driver Setup" ProductSoftwareDescription = "IBM PCI Token-Ring Adapter Driver" ProductHardwareDescription = "IBM PCI Token-Ring Adapter" ProductSoftwareTitle = "IBM PCI Token-Ring Adapter Driver" ProductHardwareTitle = "IBM PCI Token-Ring Adapter " ; Leave in trailing space CANNOT_FIND_ANY_CARD = "The adapter you selected is not present in the system." ShellCodeErrorTitle = "Error: "$(FunctionTitle) ShellCodeErrorText = "OEMSETUP.INF Shell Code Error!" DiskName = "Disk 2: PCI Token-Ring Adapter NDIS Drivers (Diskette or CD-ROM)" TRP_TITLE = "IBM PCI Token-Ring Adapter" ; These lines are to fix a bug in gauge.c line 209 in WinNT 4.x checked build. 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:" [ProductType] STF_PRODUCT = Winnt STF_PLATFORM = I386 [date] Now = {} ? $(!LIBHANDLE) GetSystemDate ;------------------------------------------------------------------- ; SECTION NAME: Identify ; ; DESCRIPTION: This required section verifies that this ; script supports the option currently selected. ; ; INPUT: None. ; ; OUTPUT: $($R0) Status ; $($R1) Option Type ; $($R2) Diskette Description ;------------------------------------------------------------------- [Identify] read-syms Identification set Status = STATUS_SUCCESSFUL set Identifier = $(OptionType) set Media = #("Source Media Descriptions", 1, 1) return $(Status) $(OptionType) $(Media) ;------------------------------------------------------------------- ; SECTION NAME: ReturnOptions ; ; DESCRIPTION: This required section returns the list of ; options supported by this script and the ; text list representing the options. ; ; ; INPUT: $($0) Language code ; ; OUTPUT: $($R0) Status ; $($R1) Option List ; $($R2) Option Text List ;------------------------------------------------------------------- [ReturnOptions] set Status = STATUS_FAILED set OptionList = {} set OptionTextList = {} set LanguageList = ^(LanguagesSupported, 1) ifcontains(i) $($0) not-in $(LanguageList) set Status = STATUS_NOLANGUAGE goto End_ReturnOptions endif ifstr(i) $($1) == "" goto OK_ReturnOptions endif set PlatformList = ^(PlatformsSupported, 1) Ifcontains(i) $($1) in $(PlatformList) goto OK_ReturnOptions else set Status = STATUS_NOTSUPPORTED goto End_ReturnOptions endif OK_ReturnOptions = + set OptionList = ^(Options, 1) set OptionTextList = ^(OptionsText$($0), 1) ; ** Hack for upgrading older IBMTRP full MAC driver --sgp ifstr(i) $(!NTN_InstallMode) == Update Set OptionList = {"IBMTRP", "TRP" } endif set Status = STATUS_SUCCESSFUL End_ReturnOptions = + Return $(Status) $(OptionList) $(OptionTextList) ;----------------------------------------------------------------- ; ; SECTION NAME: Source Media Description ; ; DESCRIPTION: This is a required DETECT section ; ;------------------------------------------------------------------ [Source Media Descriptions] 1 = $(DiskName) ;------------------------------------------------------------------- ; SECTION NAME: InstallOption ; ; DESCRIPTION: Main entry point. Shelled to by main ; installation processing or by NCPASHEL.INF ; during reconfiguration, removal, update, ; etc. It performs three main functions: ; ; 1. Copies files representing options ; 2. Configures the installed option ; 3. Updates 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 ; ;------------------------------------------------------------------- [InstallOption] ; Uncomment the line below to enable debugging ; set !G:DebugOutputControl = 1 StartWait 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 read-syms GeneralConstants read-syms FileConstants read-syms FileConstants$(!STF_LANGUAGE) read-syms OptionsText$(!STF_LANGUAGE) detect date set-title $(FunctionTitle) ; Set hasMSS to YES if this driver supports the RouteSwitch Client Code set hasMSS = "YES" ; This code detects the Windows NT Version from the registry set CurrentVersionValue = "" set CurrentCSDVersionValue = {} Debug-Output "Getting version information from registry..." OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" $(!REG_KEY_READ) KeyWinNT ifstr(i) $(KeyWinNT) != "" GetRegValue $(KeyWinNT) "CurrentVersion" CurrentVersionValue set m_WinNTVersion = *($(CurrentVersionValue),4) Debug-Output "** Current Windows NT Version is "$(m_WinNTVersion) ifstr(i) $(m_WinNTVersion) == "4.0" GetRegValue $(KeyWinNT) "CSDVersion" CurrentCSDVersionValue ifstr(i) *($(CurrentCSDVersionValue),4) == "" ; Key doesn't exist, so no Service Pack applied! set m_CSDVersion = $(NO_CSD) Debug-Output "** Running NT 4.0: No service pack applied!" else set m_CSDVersion = *($(CurrentCSDVersionValue),4) Debug-Output "** Running NT 4.0: Current Service Pack Level is "$(m_CSDVersion) endif endif CloseRegKey $(KeyWinNT) else Debug-Output "No version information availiable." endif ; Set the version information up for the proper version (NDIS3/NDIS4) ; we are installing. The default is to use the NDIS4 version. set NDIS_Level = $(NDIS4_Level) ifstr(i) $(m_WinNTVersion) == "3.51" ; Using WinNT 3.51 and NDIS 3.1 miniport! set NDIS_Level = $(NDIS3_Level) else-ifstr(i) $(m_WinNTVersion) == "3.50" ; Uh-oh... NT 3.50... abort! set Error = "This driver release only supports Microsoft Windows NT versions 3.51 and 4.0." set to = fatal set from = fatal goto fatal endif Debug-Output "Current Product Version we're installing is "$(ProductVersion) ; If NDIS4: this code detects whether the machine has more than one processor. ; Default is to set hasSMP to NO. set hasSMP = "NO" ifstr(i) $(NDIS_Level) == $(NDIS4_Level) set Processor = "" OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DESCRIPTION\System\CentralProcessor\1" $(!REG_KEY_READ) KeyProc1 ifstr(i) $(KeyProc1) != "" ; Machine has at least two processors set hasSMP = "YES" CloseRegKey $(KeyProc1) Debug-Output "(NDIS 4) Detected SMP Machine; setting hasSMP to YES" endif endif ; On older INFs, we used "Microsoft" for the manufacturer. ; Newer installs such as this one uses "IBM" (correctly!). ; This code detects where our software is located in the ; HKEY_LOCAL_MACHINE\Software tree so that the upgrade ; and removal functions work properly. set KeyProduct = "" set CurrentManufacturer = "" set CurrentProductKeyName = "" OpenRegKey $(!REG_H_LOCAL) "" $(OldProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct Ifstr(i) $(KeyProduct) != $(KeyNull) Debug-Output "Fixing setup for wrong manufacturer." set CurrentManufacturer = $(OldManufacturer) set CurrentProductKeyName = $(OldProductKeyName) CloseRegKey $(KeyProduct) else set CurrentManufacturer = $(Manufacturer) set CurrentProductKeyName = $(ProductKeyName) endif ; The old Full MAC version of this driver used the option "IBMTRP". ; Correct it here so that, once we upgrade the component, it will still ; work. ifstr(i) $(Option) == "IBMTRP" set Option = "TRP" endif ; Code to correct some unattended installations that don't set ; SrcDir correctly... ifstr(i) $(!STF_GUI_UNATTENDED) == "YES" Debug-Output "Doing unattended installation..." ifstr(i) $(!OEMNetOption) == "YES" ifstr(i) $(!OEMNetDrive) != "" Debug-Output "Correcting SrcDir to point to !OEMNetDrive" set SrcDir = $(!OEMNetDrive) endif endif endif ; If ForceNDIS is set, check it fpr a NDIS version. Default to ; use the automatically detected version of NDIS 4.0. ifstr(i) $(ForceNDIS) == $(NDIS3_Level) set NDIS_Level = $(NDIS3_Level) Debug-Output "NDIS 3.1 forced" else-ifstr(i) $(ForceNDIS) == $(NDIS4_Level) Debug-Output "NDIS 4.0 forced" set NDIS_Level = $(NDIS4_Level) else Debug-Output "Using Automatically Detected NDIS Level" endif set to = Begin set from = Begin set CommonStatus = STATUS_SUCCESSFUL EndWait ; ----------------------------------------------------------------- ; Begin - Determine what option we are being called with ; ----------------------------------------------------------------- Begin = + ifstr(i) $(!NTN_InstallMode) == DeInstall set from = fatal set to = fatal goto RemoveAdapter else-ifstr(i) $(!NTN_InstallMode) == Update set from = fatal set to = fatal goto UpgradeSoftware else-ifstr(i) $(!NTN_InstallMode) == Bind set from = fatal set to = fatal goto BindingAdapter else-ifstr(i) $(!NTN_InstallMode) == Configure set CommonStatus = STATUS_REBOOT Debug-Output "$(ProductKeyName) = "$(CurrentProductKeyName) Debug-Output "$(!NTN_RegBase) = "$(!NTN_RegBase) ifstr(i) $(CurrentProductKeyName) == $(!NTN_RegBase) Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set Error = $($R0) set from = end set to = end Debug-Output "Going to NonFatalInfo" goto NonFatalInfo endif set from = fatal set to = fatal goto ConfigureAdapter else set OEM_ABANDON_OPTIONS = {} set OEM_ABANDON_SOFTWARE = FALSE set OEM_ABANDON_ON = TRUE set from = fatal set to = fatal goto InstallAdapter endif ; ----------------------------------------------------------------- ; InstallAdapter - ; ----------------------------------------------------------------- InstallAdapter = + Debug-Output "Inside InstallAdapter" Debug-Output "ProductKeyName = "$(CurrentProductKeyName) set KeyProduct = "" OpenRegKey $(!REG_H_LOCAL) "" $(CurrentProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct Debug-Output "Just after OpenRegKey" Debug-Output "KeyProduct = "$(KeyProduct) Debug-Output "KeyNull = "$(KeyNull) Ifstr $(KeyProduct) == $(KeyNull) set OldVersionExisted = $(FALSE) goto DetectAndInstall endif ; ----------------------------------------------------------------- ; OldInstall - ; ----------------------------------------------------------------- OldInstall = + CloseRegKey $(KeyProduct) ifstr(i) $(!NTN_RegBase) == $(CurrentProductKeyName) Debug-Output "(!NTN_RegBase)="$(!NTN_RegBase) Debug-Output "(ProductKeyName)="$(CurrentProductKeyName) Debug-Output "(ProductSoftwareTitle)="$(ProductSoftwareTitle) Debug-Output "(ProductVersion)="$(ProductVersion) 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" Set CommonStatus = STATUS_USERCANCEL goto end endif set OldVersionExisted = $(TRUE) endif ; ----------------------------------------------------------------- ; DetectAndInstall - Check to see if the adapter exists. If so, ; copy everything needed, and set default ; parameters regardless of whether the install ; is attended or unattended.. ; ----------------------------------------------------------------- DetectAndInstall = + Debug-Output "Detecting any PCI Token Ring adapters..." ; ------------------------------------------------------------ ; Start of PCI logic ; ------------------------------------------------------------ set Vendor_ID = $(IBM_VENDOR_ID) set Device_ID = $(PIT_DEVICE_ID) Shell $(UtilityInf), GetPCIInformation, $(Vendor_ID), $(Device_ID) ifint $($ShellCode) != $(!SHELL_CODE_OK) ifstr(i) $(AdapterList) == {} set PCI_List = {{0,-1,0}} endif goto ShellCodeError else set PCI_List = $($R0) endif ifstr(i) $(PCI_List) != {} Debug-Output "PCI_List = "$(PCI_List) ForListDo $(PCI_List) Set BusSlotPCI = $($) Set BusNumber = *($(BusSlotPCI),1) Set SlotNumber = *($(BusSlotPCI),2) Set NetcardId = $(PIT_ADAPTER_ID) Set BusSlotPCI = {$(BusNumber),$(SlotNumber),$(NetcardId)} Set AdapterList = >($(AdapterList),$(BusSlotPCI)) EndForListDo ; End of PCI_List endif Debug-Output "AdapterList ="$(AdapterList) ; ------------------------------------------------------------ ; End of PCI logic ; ------------------------------------------------------------ ifstr(i) $(AdapterList) == {} Debug-Output "Did not find any PCI Token-Ring Adapters" set Error = $(CANNOT_FIND_ANY_CARD) set CommonStatus = STATUS_USERCANCEL set from = "end" goto nonfatal endif ifint $(OldVersionExisted) == $(FALSE) goto NewDriverInstall else goto AfterNewDriverInstall endif NewDriverInstall = + ; ------------------------------------------------------------- ; If new install: Copy the driver, INF, DLL and Help files. ; ------------------------------------------------------------- Debug-Output "Preparing to copy installation files..." Debug-Output "STF_CWDDIR = "$(!STF_CWDDIR) Debug-Output "STF_SRCDIR = "$(!STF_SRCDIR) 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 Debug-Output "Manufacturer = "$(CurrentManufacturer) Debug-Output "ProductSoftwareName = "$(ProductSoftwareName) Debug-Output "ProductSoftwareTitle = "$(ProductSoftwareTitle) Debug-Output "STF_CONTEXTINFNAME = "$(STF_CONTEXTINFNAME) Debug-Output "ProductSoftwareImagePath = "$(ProductSoftwareImagePath) Debug-Output "NetEventDLL = "$(NetEventDLL) Debug-Output "Finished file copy." Shell $(UtilityInf), AddSoftwareComponent, $(CurrentManufacturer), + $(ProductSoftwareName), + $(ProductSoftwareName), + $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), + $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+ $(NetEventDLL) Set OEM_ABANDON_SOFTWARE = TRUE ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait CloseRegKey $($R1) CloseRegKey $($R2) CloseRegKey $($R3) CloseRegKey $($R4) CloseRegKey $($R5) goto FatalRegistry endif Set SoftProductKey = $($R1) Set SoftNetRuleKey = $($R2) Set SoftServiceKey = $($R3) Set SoftParameterKey = $($R4) Set SoftLinkageKey = $($R5) set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+ {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+ {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+ {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}} Debug-Output "NewValueList = "$(NewValueList) Debug-Output "SoftProductKey ="$(SoftProductKey) Debug-Output "SoftNetRuleKey ="$(SoftNetRuleKey) Debug-Output "SoftServiceKey ="$(SoftServiceKey) Debug-Output "SoftParameterKey ="$(SoftParameterKey) Debug-Output "SoftLinkageKey ="$(SoftLinkageKey) Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait CloseRegKey $(SoftProductKey) CloseRegKey $(SoftNetRuleKey) CloseRegKey $(SoftServiceKey) CloseRegKey $(SoftParameterKey) CloseRegKey $(SoftLinkageKey) goto FatalRegistry endif set 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 "NewValueList = "$(NewValueList) Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) CloseRegKey $(SoftProductKey) CloseRegKey $(SoftNetRuleKey) CloseRegKey $(SoftServiceKey) CloseRegKey $(SoftParameterKey) CloseRegKey $(SoftLinkageKey) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait goto FatalRegistry endif AfterNewDriverInstall = + ; ; Loop through the Adapter List and install as many instances of the Token ; Ring Adapter that we have. ; ForListDo $(AdapterList) Set BusSlotPci = $($) Set BusNumber = *($(BusSlotPci),1) Set SlotNumber = *($(BusSlotPci),2) Set NetcardId = *($(BusSlotPci),3) ; ------------------------------------------------- ; If netcard is already installed, skip this entry ; ------------------------------------------------- Debug-Output "BusSlotPci = "$(BusSlotPci) Debug-Output "BusNumber = "$(BusNumber) Debug-Output "SlotNumber = "$(SlotNumber) Debug-Output "NetcardId = "$(NetcardId) Set AlreadyInstalled = "NO" ; Make a list of all the installed netcards ; OpenRegKey gets a handle to a Key OpenRegKey + $(!REG_H_LOCAL),+ "",+ $(NetworkCardKeyName),+ $(MAXIMUM_ALLOWED),+ IE_KeyNetcards Ifstr $(IE_KeyNetcards) == $(KeyNull) set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION goto FatalRegistry endif EnumRegKey $(IE_KeyNetcards) IE_KeyNameList ; Compare all the NetworkCards entries to see whether ; they match the current bus number, slot number, title, ; and product name. Debug-Output "IE_KeyNameList ="$(IE_KeyNameList) ForListDo $(IE_KeyNameList) set IE_KeyName = *($($),1) OpenRegKey + $(IE_KeyNetcards),+ "",+ $(IE_KeyName),+ $(MAXIMUM_ALLOWED),+ IE_Card Debug-Output "IE_Card = "$(IE_Card) Ifstr $(IE_Card) == $(KeyNull) set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION goto FatalRegistry endif GetRegValue $(IE_Card),"Description", DescriptionInfo GetRegValue $(IE_Card),"ProductName", ProductNameInfo set CardDescription = *($(DescriptionInfo), 4) set CardProductName = *($(ProductNameInfo), 4) Debug-Output "CardDescription = "$(CardDescription) Debug-Output "ProductHardwareDescription = "$(ProductHardwareDescription) Debug-Output "CardProductName = "$(CardProductName) Debug-Output "ProductHardwareName = "$(ProductHardwareName) ifstr(i) $(CardProductName) == $(ProductHardwareName) ; The product type matches. Now check for a ; match on bus number and slot number. GetRegValue $(IE_Card), "ServiceName", ServiceNameInfo Set ServiceName = *($(ServiceNameInfo), 4) Debug-Output "ServiceName ="$(ServiceName) OpenRegKey + $(!REG_H_LOCAL),+ "",+ "SYSTEM\CurrentControlSet\Services\"$(ServiceName)"\Parameters",+ $(MAXIMUM_ALLOWED),+ IE_KeyService Ifstr $(IE_KeyService) == $(KeyNull) set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION goto FatalRegistry endif ; We are now in the parameters key for the adapter ; to which we are comparing the current adapter GetRegValue $(IE_KeyService), "BusNumber", BusInfo set CardBusNum = *($(BusInfo), 4) GetRegValue $(IE_KeyService), "SlotNumber", SlotInfo set CardSlotNum = *($(SlotInfo), 4) Debug-Output "CardBusNum ="$(CardBusNum) Debug-Output "BusNumber ="$(BusNumber) ifint $(CardBusNum) == $(BusNumber) ifint $(CardSlotNum) == $(SlotNumber) Set AlreadyInstalled = "YES" endif endif endif EndForListDo ifstr(i) $(AlreadyInstalled) == "YES" goto NextAdapter endif ; ------------------------------------------------- ; The netcard has not yet been installed. Add ; it now. ; ------------------------------------------------- ; Determine the CardId parameter first, as well as the ProductHardwareTitle. ; The latter parameter is only used in installation mode. ifint $(NetcardId) == $(PIT_ADAPTER_ID) set ProductHardwareTitle = $(TRP_TITLE) set CardId = $(PIT_ADAPTER_ID) endif SetINFDefaults =+ ; The following sections is used during a new installation and by ; the configure adapter section to determine the default values for ; parameters. ; ; Parameters needed: ; ; AdapterBusType REG_VT_DWORD 5 (1=ISA,3=MCA,5=PCI,8=PCMCIA) ; BusNumber REG_VT_DWORD ---> (set by PCI autodetect logic) ; BusType REG_VT_DWORD 5 (1=ISA,3=MCA,5=PCI,8=PCMCIA) ; CardId REG_VT_DWORD * ; DataRate REG_VT_SZ AUTO (AUTO,M16,M4) ; EnableTxEofInt REG_VT_SZ YES (YES,NO) ; FullDuplex REG_VT_SZ YES (YES,NO) ; LLCOnly REG_VT_SZ YES (YES,NO) ; LoopBack REG_VT_SZ NO (YES,NO) ; MaxTransmits REG_VT_DWORD 31 (1-128) ; MaxTxFrameSize REG_VT_DWORD 4096 (14-18000) ; MediaType REG_VT_DWORD 2 (1=Ethernet,2=Token Ring) ; MinRcvBuffs REG_VT_DWORD 2048 (1-200) ; NetAddress REG_VT_SZ ** (12 digit valid LAA MAC address) ; RcvBuffSize REG_VT_DWORD 2048 (256-18000) ; RTSWEnable REG_VT_SZ NO (YES,NO) ; RTSWTableSize REG_VT_DWORD 128 (16-1024, GUI limits to powers of 2) ; SlotNumber REG_VT_DWORD ---> (set by PCI autodetect logic) ; SMP_Mode REG_VT_SZ *** (YES,NO) ; TraceQuiet REG_VT_SZ **** (YES,NO) ; TxPriMax REG_VT_DWORD 5 (0-6) ; TxPriThresh REG_VT_DWORD 3 (1-6) ; ; * CardId is dependant on the actual card installed. Look in ; the file constant section for hints. ; ; ** NetAddress must be a valid LAA, that is, between 400000000000 and ; 7FFFFFFFFFFF hexidecimal. ; ; *** SMP_Mode is set to yes if the workstation has at least two ; processors. ; ; **** Needed only for NDIS 3.1 drivers, set in FillInValueList shell ; section. ; ; Set default values for first time install. This will set the default ; configuration for adapters that are being installed for the first time. ; The user can then bring up the properties for the adapter to configure the ; adapter after this has been done. ; If this driver can support SMP, do it. (Workstation must be running ; Windows NT 4.0 and have at least two processors). ifstr(i) $(hasSMP) == "YES" set SMP_Mode = "YES" else set SMP_Mode = "NO" endif ; Set the rest of the parameters set AdapterBusType = "5" ; PCI set BusType = "5" ; PCI set DataRate = "AUTO" set EnableTxEofInt = "YES" set FullDuplex = "YES" set LLCOnly = "YES" set LoopBack = "NO" set MaxTransmits = "31" set MaxTxFrameSize = "4096" set MediaType = "2" ; 802.5 Token Ring set MinRcvBuffs = "80" set NetAddress = "" set RcvBuffSize = "2048" set TxPriMax = "5" set TxPriThresh = "3" ; If Route Switch Client supported, add the parms ifstr(i) $(hasMSS) == "YES" set RTSWEnable = "NO" set RTSWTableSize = "128" endif ; The above section is called from Configure mode to reset common ; defaults for the driver. If called from configure, jump back to ; configuration section. ifstr(i) $(!NTN_InstallMode) == Configure goto AfterSetINFDefaults endif ; Create the Hardware Component Shell $(UtilityInf), AddHardwareComponent, + $(ProductHardwareName),+ $(STF_CONTEXTINFNAME),+ $(CurrentProductKeyName) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif Debug-Output "ProductKeyName ="$(CurrentProductKeyName) ifint $($R4) != -1 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4)) endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR" EndWait CloseRegKey $($R1) CloseRegKey $($R2) CloseRegKey $($R3) goto FatalRegistry endif Set HardNetCardKey = $($R1) Set HardNetRuleKey = $($R2) Set HardParameterKey = $($R3) Set AdapterNumber = $($R4) Debug-Output "HardNetCardkey = "$(HardNetCardKey) Debug-Output "HardNetRuleKey = "$(HardNetRuleKey) Debug-Output "HardParameterKey = "$(HardParameterKey) Debug-Output "AdapterNumber = "$(AdapterNumber) Debug-Output "NetcardId = "$(NetcardId) Debug-Output "SlotNumber = "$(SlotNumber) ; Here's where we set the pretty name of the driver. set MyTitle = "["$(AdapterNumber)"] "$(ProductHardwareTitle) Debug-Output "MyTitle = "$(MyTitle) Set MyService = $(ProductSoftwareName)$(AdapterNumber) Set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(CurrentManufacturer)},+ {Title,$(NoTitle),$(!REG_VT_SZ),$(MyTitle)},+ {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+ {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+ {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+ {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}} Debug-Output "NewValueList = "$(NewValueList) Debug-Output "HardNetCardKey = "$(HardNetCardKey) Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)"""" set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm) set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+ {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, + {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, + {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}} Debug-Output $(NewValueList) Debug-Output "TempProdName ="$(TempProdName) Debug-Output "HardNetRuleKey ="$(HardNetRuleKey) Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif Shell "",FillInNewValueList ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set NewValueList = $($R0) Debug-Output "NewValueList = "$(NewValueList) Debug-Output "HardParameterKey = "$(HardParameterKey) Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif ifstr(i) $(!STF_GUI_UNATTENDED) == "YES" Shell "" ,AddDefaultNetCardParameters,$(HardParameterKey) endif CloseRegKey $(HardNetCardKey) CloseRegKey $(HardNetRuleKey) CloseRegKey $(HardParameterKey) NextAdapter = + EndForListDo LastAdapter = + EndWait goto successful ; ----------------------------------------------------------------- ; ConfigureAdapter - Entry point for configuration mode ; ----------------------------------------------------------------- ConfigureAdapter = + OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetCardKey ifstr(i) $(NetCardKey) == "" set CommonStatus = STATUS_USERCANCEL goto successful endif GetRegValue $(NetCardKey) "ServiceName" ServiceInfo set ServiceName = *($(ServiceInfo),4) GetRegValue $(NetCardKey) "Title" TitleInfo set MyTitle = *($(TitleInfo),4) CloseRegKey $(NetCardKey) OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) ParamKey ifstr(i) $(ParamKey) == "" goto successful endif ; Set defaults for anything that can be changed in the GUI ; in case they aren't in the registry already. goto SetINFDefaults ;(in install section above) AfterSetINFDefaults = + ; Initialize ParmList set ParmList = "OptionID="$(Option)",MyTitle="$(MyTitle)",hasSMP="$(hasSMP)",MSS="$(hasMSS)",DriverFile="$(DriverFile)",InstanceName="$(ServiceName) ; Read from the registry and override defaults with values we find ; there. EnumRegValue $(ParamKey) ValueList ForListDo $(ValueList) set ValueItem = $($) set Key = *($(ValueItem),1) set Value = *($(ValueItem),4) ifstr(i) $(Key) == "AdapterBusType" set AdapterBusType = $(Value) else-ifstr(i) $(Key) == "BusNumber" set BusNumber = $(Value) else-ifstr(i) $(Key) == "BusType" set BusType = $(Value) else-ifstr(i) $(Key) == "CardId" set CardId = $(Value) else-ifstr(i) $(Key) == "DataRate" set DataRate = $(Value) else-ifstr(i) $(Key) == "EnableTxEofInt" set EnableTxEofInt = $(Value) else-ifstr(i) $(Key) == "FullDuplex" set FullDuplex = $(Value) else-ifstr(i) $(Key) == "LLCOnly" set LLCOnly = $(Value) else-ifstr(i) $(Key) == "LoopBack" set LoopBack = $(Value) else-ifstr(i) $(Key) == "MaxTransmits" set MaxTransmits = $(Value) else-ifstr(i) $(Key) == "MaxTxFrameSize" set MaxTxFrameSize = $(Value) else-ifstr(i) $(Key) == "MediaType" set MediaType = $(Value) else-ifstr(i) $(Key) == "MinRcvBuffs" set MinRcvBuffs = $(Value) else-ifstr(i) $(Key) == "NetAddress" set NetAddress = $(Value) else-ifstr(i) $(Key) == "RcvBuffSize" set RcvBuffSize = $(Value) else-ifstr(i) $(Key) == "RTSWEnable" set RTSWEnable = $(Value) else-ifstr(i) $(Key) == "RTSWTableSize" set RTSWTableSize = $(Value) else-ifstr(i) $(Key) == "SlotNumber" set SlotNumber = $(Value) else-ifstr(i) $(Key) == "SMP_Mode" set SMP_Mode = $(Value) else-ifstr(i) $(Key) == "TxPriMax" set TxPriMax = $(Value) else-ifstr(i) $(Key) == "TxPriThresh" set TxPriThresh = $(Value) endif EndForListDo ; Finish setting up the rest of the ParmList set ParmList = $(ParmList)",AdapterBusType="$(AdapterBusType) set ParmList = $(ParmList)",BusNumber="$(BusNumber) set ParmList = $(ParmList)",BusType="$(BusType) set ParmList = $(ParmList)",CardId="$(CardId) set ParmList = $(ParmList)",DataRate="$(DataRate) set ParmList = $(ParmList)",EnableTxEofInt="$(EnableTxEofInt) set ParmList = $(ParmList)",FullDuplex="$(FullDuplex) set ParmList = $(ParmList)",LLCOnly="$(LLCOnly) set ParmList = $(ParmList)",LoopBack="$(LoopBack) set ParmList = $(ParmList)",MaxTransmits="$(MaxTransmits) set ParmList = $(ParmList)",MaxTxFrameSize="$(MaxTxFrameSize) set ParmList = $(ParmList)",MediaType="$(MediaType) set ParmList = $(ParmList)",MinRcvBuffs="$(MinRcvBuffs) set ParmList = $(ParmList)",NetAddress="$(NetAddress) set ParmList = $(ParmList)",RcvBuffSize="$(RcvBuffSize) set ParmList = $(ParmList)",RTSWEnable="$(RTSWEnable) set ParmList = $(ParmList)",RTSWTableSize="$(RTSWTableSize) set ParmList = $(ParmList)",SlotNumber="$(SlotNumber) set ParmList = $(ParmList)",SMP_Mode="$(SMP_Mode) set ParmList = $(ParmList)",TxPriMax="$(TxPriMax) set ParmList = $(ParmList)",TxPriThresh="$(TxPriThresh) Debug-Output "ParmList ="$(ParmList) ; Load the TokSetup DLL and bring up the GUI LoadLibrary "X" $(InstallDLL) hDLL LibraryProcedure Result $(hDLL) InstallTokenRing $(ParmList) FreeLibrary $(hDLL) ; Extract parameters from result string. We are only interested in ; the parameters that are changable from TokSetup Split-String $(Result) "," ResultList ForListDo $(ResultList) Set Token = $($) ifstr $(Token) != "," Split-String $(Token) "=" KeyEqualsValue Set Key = *($(KeyEqualsValue), 1) Set Value = *($(KeyEqualsValue), 3) ifstr $(Key) == "STATUS" ifstr $(Value) != "OK" Set CommonStatus = STATUS_USERCANCEL Debug-Output "Cancel button pressed in InstallTokenRing()" goto end endif else-ifstr $(Key) == "AdapterBusType" set AdapterBusType = $(Value) else-ifstr $(Key) == "BusNumber" set BusNumber = $(Value) else-ifstr $(Key) == "BusType" set BusType = $(Value) else-ifstr $(Key) == "CardId" set CardId = $(Value) else-ifstr $(Key) == "DataRate" set DataRate = $(Value) else-ifstr $(Key) == "EnableTxEofInt" set EnableTxEofInt = $(Value) else-ifstr $(Key) == "FullDuplex" set FullDuplex = $(Value) else-ifstr $(Key) == "LLCOnly" set LLCOnly = $(Value) else-ifstr $(Key) == "LoopBack" set LoopBack = $(Value) else-ifstr $(Key) == "MaxTransmits" set MaxTransmits = $(Value) else-ifstr $(Key) == "MaxTxFrameSize" set MaxTxFrameSize = $(Value) else-ifstr $(Key) == "MediaType" set MediaType = $(Value) else-ifstr $(Key) == "MinRcvBuffs" set MinRcvBuffs = $(Value) else-ifstr $(Key) == "NetAddress" set NetAddress = $(Value) else-ifstr $(Key) == "RcvBuffSize" set RcvBuffSize = $(Value) else-ifstr $(Key) == "RTSWEnable" set RTSWEnable = $(Value) else-ifstr $(Key) == "RTSWTableSize" set RTSWTableSize = $(Value) else-ifstr $(Key) == "SlotNumber" set SlotNumber = $(Value) else-ifstr $(Key) == "SMP_Mode" set SMP_Mode = $(Value) else-ifstr $(Key) == "TxPriMax" set TxPriMax = $(Value) else-ifstr $(Key) == "TxPriThresh" set TxPriThresh = $(Value) endif endif EndForListDo ; Remove the parameters & rebuild the parameters based on user input EnumRegValue $(ParamKey) OldValueList ForListDo $(OldValueList) set ValueItem = $($) set ValueName = *($(ValueItem),1) DeleteRegValue $(ParamKey) $(ValueName) EndForListDo ; Build the new value list. Shell "",FillInNewValueList ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set NewValueList = $($R0) Debug-Output $(NewValueList) Shell $(UtilityInf), AddValueList, $(ParamKey), $(NewValueList) goto successful BindingAdapter =+ set Error = "Binding: Sorry, not yet implemented." goto fatal RemoveAdapter = + Debug-Output "Removing adapter components..." Ifstr(i) $(CurrentProductKeyName) == $(!NTN_RegBase) Shell $(UtilityInf), RemoveSoftwareComponent, + $(CurrentManufacturer), + $(ProductSoftwareName) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto FatalRegistry endif else Shell $(UtilityInf), RemoveHardwareComponent, + $(CurrentManufacturer), + $(ProductSoftwareName), + $(!NTN_RegBase) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto FatalRegistry endif endif goto end UpgradeSoftware = + Debug-Output "Entering Upgrade Software Section..." set KeyProduct = "" OpenRegKey $(!REG_H_LOCAL) "" $(CurrentProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct Ifstr(i) $(KeyProduct) != $(KeyNull) Debug-Output "Beginning upgrade of software component "$(KeyProduct) Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set !UG_Filename = $($R0) install "Install-Update" ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS goto fatal endif SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)} SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)} CloseRegKey $(KeyProduct) Debug-Output "Finished upgrade of software component "$(KeyProduct) else Debug-Output = "ACK! Can't find software component to upgrade...bailing out!" goto fatalregistry endif goto end successful = + goto end abandon = + ForListDo $(OEM_ABANDON_OPTIONS) Shell $(UtilityInf), RemoveHardwareComponent, $(CurrentManufacturer), + $(ProductSoftwareName), $($) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set RegistryErrorIndex = $($R0) Ifstr(i) $(RegistryErrorIndex) != NO_ERROR goto FatalRegistry endif EndForListDo Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE Shell $(UtilityInf), RemoveSoftwareComponent, $(CurrentManufacturer), + $(ProductSoftwareName), FALSE ifint $($ShellCode) != $(!SHELL_CODE_OK) 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 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 FatalRegistry = + Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex) 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 = $(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 ifstr(i) $(OEM_ABANDON_ON) == TRUE set OEM_ABANDON_ON = FALSE goto abandon endif goto end end = + goto term exit term = + Return $(CommonStatus) ;--------------------------------------------------------------------- ; Files sections [Files-NDIS4MP] 1, IBMTRP.N4_, SIZE=50000, RENAME=IBMTRP.SYS [Files-NDIS3MP] 1, IBMTRP.N3_, SIZE=50000, RENAME=IBMTRP.SYS [Files-Support] 1, TOKSETUP.DL_, SIZE=120000, RENAME=TOKSETUP.DLL 1, TOKSETUP.HL_, SIZE=20000, RENAME=TOKSETUP.HLP 1, TOKSETUP.CN_, SIZE=3000, RENAME=TOKSETUP.CNT [Files-INF] 1, OEMSETUP.INF, SIZE=50000, RENAME=$(!UG_Filename) ;--------------------------------------------------------------------- ; Installation Sections [Install-Option] set STF_VITAL = "" ifstr(i) $(NDIS_Level) == $(NDIS4_Level) ; WinNT 4.x AddSectionFilesToCopyList Files-NDIS4MP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers else ; assume WinNT 3.51 AddSectionFilesToCopyList Files-NDIS3MP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers endif AddSectionFilesToCopyList Files-Support $(SrcDir) $(!STF_WINDOWSSYSPATH) set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList Exit [Install-Update] set STF_VITAL = "" set STF_OVERWRITE = "VERIFYSOURCEOLDER" ifstr(i) $(NDIS_Level) == $(NDIS4_Level) ; WinNT 4.x AddSectionFilesToCopyList Files-NDIS4MP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers else ; assume WinNT 3.51 AddSectionFilesToCopyList Files-NDIS3MP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers endif AddSectionFilesToCopyList Files-Support $(SrcDir) $(!STF_WINDOWSSYSPATH) AddSectionFilesToCopyList Files-INF $(SrcDir) $(!STF_WINDOWSSYSPATH) set !STF_NCPA_FLUSH_COPYLIST = TRUE CopyFilesInCopyList exit ;--------------------------------------------------------------------- ; Shell sections used during installation [AddDefaultNetCardParameters] ; This section of code reads values out of the unattended install ; answer file, if any parameters exist. Answer file keywords ; are CASE SENSITIVE and will override any defaults which may ; have been already set in the INF, so be careful! set KeyParameter = $($0) ForListDo $(!NetCardParameterName) set Name = $($) set Value = *($(!NetCardParameterValue), $(#)) ifcontains(i) $(Name) in { + "NetworkAddress", + "LoopBack", + "FullDuplex", + "DataRate", + "EnableTxEofInt", + "LLCOnly", + "SMP_Mode", + "RTSW_Enable" + } set Type = $(!REG_VT_SZ) else set Type = $(!REG_VT_DWORD) endif Debug-Output "** Unattended Install: Answer File Parm Name = "$(Name)" with value = "$(Value) SetRegValue $(KeyParameter) {$(Name),0,$(Type),$(Value)} EndForListDo Return [FillInNewValueList] ; Build the new value list. Set NewValueList = {} Set List = {AdapterBusType,0,$(!REG_VT_DWORD),$(!P:AdapterBusType)} Set NewValueList = >($(NewValueList),$(List)) ifstr $(!P:BusNumber) != "" Set List = {BusNumber,0,$(!REG_VT_DWORD),$(!P:BusNumber)} Set NewValueList = >($(NewValueList),$(List)) endif Set List = {BusType,0,$(!REG_VT_DWORD),$(!P:BusType)} Set NewValueList = >($(NewValueList),$(List)) Set List = {CardId,0,$(!REG_VT_DWORD),$(!P:CardId)} Set NewValueList = >($(NewValueList),$(List)) ifstr $(!P:DataRate) != "" Set List = {DataRate,0,$(!REG_VT_SZ),$(!P:DataRate)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:EnableTxEofInt) != "" Set List = {EnableTxEofInt,0,$(!REG_VT_SZ),$(!P:EnableTxEofInt)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:FullDuplex) != "" Set List = {FullDuplex,0,$(!REG_VT_SZ),$(!P:FullDuplex)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:LLCOnly) != "" Set List = {LLCOnly,0,$(!REG_VT_SZ),$(!P:LLCOnly)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:LoopBack) != "" Set List = {LoopBack,0,$(!REG_VT_SZ),$(!P:LoopBack)} Set NewValueList = >($(NewValueList),$(List)) endif ifint $(!P:MaxTransmits) != "" Set List = {MaxTransmits,0,$(!REG_VT_DWORD),$(!P:MaxTransmits)} Set NewValueList = >($(NewValueList),$(List)) endif ifint $(!P:MaxTxFrameSize) != "" Set List = {MaxTxFrameSize,0,$(!REG_VT_DWORD),$(!P:MaxTxFrameSize)} Set NewValueList = >($(NewValueList),$(List)) endif Set List = {MediaType,0,$(!REG_VT_DWORD),$(!P:MediaType)} Set NewValueList = >($(NewValueList),$(List)) ifint $(!P:MinRcvBuffs) != "" Set List = {MinRcvBuffs,0,$(!REG_VT_DWORD),$(!P:MinRcvBuffs)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:NetAddress) != "" Set List = {NetAddress,0,$(!REG_VT_SZ),$(!P:NetAddress)} Set NewValueList = >($(NewValueList),$(List)) endif ifint $(!P:RcvBuffSize) != "" Set List = {RcvBuffSize,0,$(!REG_VT_DWORD),$(!P:RcvBuffSize)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:RTSWEnable) != "" set List = {RTSWEnable,0,$(!REG_VT_SZ),$(!P:RTSWEnable)} Set NewValueList = >($(NewValueList),$(List)) endif ifint $(!P:RTSWTableSize) != "" set List = {RTSWTableSize,0,$(!REG_VT_DWORD),$(!P:RTSWTableSize)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:SlotNumber) != "" Set List = {SlotNumber,0,$(!REG_VT_DWORD),$(!P:SlotNumber)} Set NewValueList = >($(NewValueList),$(List)) endif ifstr $(!P:SMP_Mode) != "" Set List = {SMP_Mode,0,$(!REG_VT_SZ),$(!P:SMP_Mode)} Set NewValueList = >($(NewValueList),$(List)) endif Set List = {TraceHead,0,$(!REG_VT_DWORD),$(!P:TraceHead)} Set NewValueList = >($(NewValueList),$(List)) ifint $(!P:TxPriMax) != "" Set List = {TxPriMax,0,$(!REG_VT_DWORD),$(!P:TxPriMax)} Set NewValueList = >($(NewValueList),$(List)) endif ifint $(!P:TxPriThresh) != "" Set List = {TxPriThresh,0,$(!REG_VT_DWORD),$(!P:TxPriThresh)} Set NewValueList = >($(NewValueList),$(List)) endif ; NDIS 3.1 Only Stuff Here ; ifstr(i) $(!P:NDIS_Level) == $(!P:NDIS3_Level) set List = {TraceQuiet,0,$(!REG_VT_SZ),"YES"} set NewValueList = >($(NewValueList),$(List)) endif Debug-Output "FillInNewValueList returning: "$(NewValueList) return $(NewValueList)Download 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.