;-------------------------------------------------------------------
;
; OEMSETUP.INF
; Version: 3.2
;
; NIC Installation Script for Windows NT 3.51 and NT 4.0
;
; Product: IBM Shared RAM Token Ring Adapters
; Copyright (C) 1996-1999 IBM Corporation. All rights reserved.
;
; Change log:
;
; 3.2 sgp - NetworkAddress obsoletes NetAddress as the LAA parameter
; - Support for OEM version of PC Card 2 added
; - Message file support (IBMSGNET.DLL)
;
; 3.1 sgp - Support for LoopBack parameter on SRAM cards added
;
; 3.0 sgp - Support for IBM Turbo 16/4 Token-Ring PC Card 2 added
; - Support for new DLL interface (ITR_W32) added
;
;-------------------------------------------------------------------
[Identification]
OptionType = NetAdapter
[PlatformsSupported]
ISA
EISA
PCMCIA
MCA
"Jazz-Internal Bus"
[LanguagesSupported]
ENG
[Options]
;nishi TRSRMC01
;nishi TRSRMC00
;nishi TRSR8327
;nishi TRSR80CC
;nishi TRSR1080
;nishi TRSR1070
;nishi TRSR0001
;nishi TRSRPCM1
;nishi TRSRPCM3
TRSRPCM4
TRSRPCM5
;nishi TRSRPCM6
[OptionsTextENG]
;nishi TRSRMC01 = "IBM 16/4 Token-Ring Adapter (/A and Auto MC)"
;nishi TRSRMC00 = "IBM Token-Ring Adapter/A (4 Mbps)"
;nishi TRSR8327 = "IBM Token-Ring Network PC Adapter"
;nishi TRSR80CC = "IBM 16/4 Token-Ring ISA-16 Adapter"
;nishi TRSR1080 = "IBM Turbo 16/4 Token-Ring ISA Adapter"
;nishi TRSR1070 = "IBM Auto Wake Token-Ring ISA Adapter"
;nishi TRSR0001 = "IBM Auto 16/4 Token-Ring ISA Adapter"
;nishi TRSRPCM1 = "IBM 16/4 Token-Ring Credit Card Adapter"
;nishi TRSRPCM3 = "IBM Auto 16/4 Token-Ring Credit Card Adapter"
TRSRPCM4 = "IBM Turbo 16/4 Token-Ring PC Card"
TRSRPCM5 = "IBM Turbo 16/4 Token-Ring PC Card 2"
;nishi TRSRPCM6 = "Turbo 16/4 Token-Ring PC Card 2"
[GeneralConstants]
from = ""
to = ""
retaddr = ""
KeyNull = ""
StringNull = ""
MAXIMUM_ALLOWED = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct = ""
KeyParameters = ""
TRUE = 1
FALSE = 0
NoTitle = 0
ExitState = "Active"
OldVersionExisted = $(FALSE)
[FileConstants]
; This variable should be changed to "YES" by a system administrator
; who is attempting a remote unattended installation of a microchannel
; (MCA) adapter from a RUI source which has a fix for MCA slot detection
; such as a hotfix or Service Pack 2 or greater. Otherwise, don't touch.
MCAForceDetectFix = "NO"
; These should be left alone.
UtilityInf = "UTILITY.INF"
ParamInf = "NCPARAM.INF"
SubroutineInf = "SUBROUTN.INF"
SoftwareType = "driver"
NetRuleSoftwareUse = $(SoftwareType)
NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\IBMSGNET.DLL"
IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
; These constants vary depending on Software, Manufacturer, etc.
Manufacturer = "IBM"
ProductMajorVersion = "12"
ProductMinorVersion = "0"
ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
; Dialog box parameters
InstallDLL = $(!STF_WINDOWSSYSPATH)"\ITR_W32.DLL"
; Card IDs -- DO NOT CHANGE!
ADAPTER_ID_OLDISA = 256
ADAPTER_ID_RA3 = 259
ADAPTER_ID_RA4 = 260
ADAPTER_ID_RA42 = 517
ADAPTER_ID_P4 = 609026049
ADAPTER_ID_PFP = 609030256
ADAPTER_ID_P6 = 609030272
ADAPTER_ID_OLDMCA = 57344
ADAPTER_ID_N4 = 57345
GenericSharedRamAdapter = "1"
; Hardware binding information.
ProductHardwareName = "IBMTOK"
NetRuleHardwareType = "IBMTOK IBMTOKAdapter"
NetRuleHardwareBindForm = " yes yes container"
NetRuleHardwareClass = {"IBMTOKAdapter basic"}
; Software binding information.
ProductSoftwareName = "IBMTOK"
NetRuleSoftwareType = "IBMTOKSys ndisDriver IBMTOKDriver"
NetRuleSoftwareBindForm = """IBMTOKSys"" yes no container"
NetRuleSoftwareClass = {"IBMTOKDriver basic"}
NetRuleSoftwareBindable = {"IBMTOKDriver IBMTOKAdapter non exclusive 100"}
ProductSoftwareImagePath = "System32\drivers\IBMTOK.SYS"
DriverFile = "IBMTOK.SYS"
PCMCIADriver = "IBMTOK"
; 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"
[FileConstantsENG]
FunctionTitle = "IBM Shared RAM Token-Ring Adapter Driver Setup"
ProductSoftwareDescription = "IBM Shared RAM Token-Ring Adapter Miniport"
ProductHardwareDescription = "IBM Shared RAM Token-Ring Adapter "
ProductSoftwareTitle = "IBM Shared RAM Token-Ring Adapter Miniport"
ProductHardwareTitle = "IBM Shared RAM Token-Ring Adapter " ; leave in trailing spaces
ShellCodeErrorTitle = "Error: "$(FunctionTitle)
ShellCodeErrorText = "OEMSETUP.INF Shell Code Error!"
CANNOT_FIND_ANY_CARD = "The adapter you selected is not present in the system."
DiskName = "IBM Shared RAM Token-Ring Adapter NDIS 3/4/5 Device Drivers"
; 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
[Identify]
read-syms Identification
set Status = STATUS_SUCCESSFUL
set Identifier = $(OptionType)
set Media = #("Source Media Descriptions", 1, 1)
Return $(Status) $(Identifier) $(Media)
[ReturnOptions]
set Status = STATUS_FAILED
set OptionList = {}
set OptionTextList = {}
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) in $(LanguageList)
ifstr(i) $($1) == ""
goto ReturnOptions
endif
set PlatformList = ^(PlatformsSupported, 1)
Ifcontains(i) $($1) in $(PlatformList)
goto ReturnOptions
else
set Status = STATUS_NOTSUPPORTED
goto Finish_ReturnOptions
endif
else
set Status = STATUS_NOLANGUAGE
goto Finish_ReturnOptions
endif
ReturnOptions = +
set OptionList = ^(Options, 1)
set OptionTextList = ^(OptionsText$($0), 1)
set Status = STATUS_SUCCESSFUL
Finish_ReturnOptions = +
Return $(Status) $(OptionList) $(OptionTextList)
[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
; Binding information for PCMCIA
Shell $(UtilityInf), GetBindingInfo, "IBM"
ifint $($ShellCode) != $(!Shell_CODE_OK)
goto ShellCodeError
endif
ifstr(i) $(!NTN_Origination) == "NCPA"
set Continue = $(OK)
endif
read-syms FileConstants$(!STF_LANGUAGE)
read-syms OptionsText$(!STF_LANGUAGE)
detect date
set-title $(FunctionTitle)
; 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.
;
; Possible problem: is "Service Pack" text localized?
set NDIS_Level = $(NDIS4_Level)
ifstr(i) $(m_WinNTVersion) == "4.0"
ifcontains(i) $(m_CSDVersion) in { $(NO_CSD), "Service Pack 1", "Service Pack 2" }
; Using WinNT 4.0 pre SP3 -- must use NDIS 3.1 driver!
set NDIS_Level = $(NDIS3_Level)
else
; Using WinNT 4.0 SP3 or later
set NDIS_Level = $(NDIS4_Level)
endif
else-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
set ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
Debug-Output "Current Product Version we're installing is "$(ProductVersion)
; Special detection: if we detect Windows NT version 4.0 AND
; the CSD level is less than Service Pack 2, then MCA cards might not
; work. The variable MCADetectFix will be set to NO if running
; GA or SP1 versions of NT 4.0, YES otherwise.
set MCADetectFix = "YES"
ifstr(i) $(m_WinNTVersion) == "4.0"
ifcontains(i) $(m_CSDVersion) in { $(NO_CSD), "Service Pack 1" }
; Using WinNT 4.0 pre SP2
set MCADetectFix = "NO"
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
; 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 for 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
; Fixes NetAddress to be NetworkAddress, if it doesn't exist
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetCardKey
ifstr(i) $(NetCardKey) == ""
goto NotInstalledYet
endif
GetRegValue $(NetCardKey) "ServiceName" ServiceInfo
set ServiceName = *($(ServiceInfo),4)
CloseRegKey $(NetCardKey)
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyParams
ifstr(i) $(KeyParams) != $(KeyNull)
GetRegValue $(KeyParams) "NetworkAddress" CurrLAA
ifint $(RegLastError) != "0"
Debug-Output "We don't have a NetworkAddress parameter."
GetRegValue $(KeyParams) "NetAddress" CurrLAA
ifint $(RegLastValue) == "0"
Debug-Output "We do have a NetAddress parameter."
set temp = *($(CurrLAA),4)
set NewValueList = {NetworkAddress,0,$(!REG_VT_SZ),$(temp)}
Debug-Output $(NewValueList)
SetRegValue $(KeyParams) $(NewValueList)
Debug-Output "Converted existing NetAddress to NetworkAddress"
endif
endif
CloseRegKey $(KeyParams)
endif
NotInstalledYet = +
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 StartLabel = RemoveAdapter
Debug-Output "RemoveAdapter"
else-Ifstr(i) $(!NTN_InstallMode) == BIND
set StartLabel = BindingAdapter
Debug-Output "BindingAdapter."
else-Ifstr(i) $(!NTN_InstallMode) == UPDATE
set StartLabel = UpgradeSoftware
Debug-Output "UpgradeSoftware"
else-Ifstr(i) $(!NTN_InstallMode) == CONFIGURE
set StartLabel = ConfigureAdapter
Debug-Output "ConfigureAdapter"
set CommonStatus = STATUS_REBOOT
set ActivateDetection = TRUE
Ifstr(i) $(ProductKeyName) == $(!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
goto NonFatalInfo
endif
else ; == INSTALL
set StartLabel = InstallAdapter
set OEM_ABANDON_OPTIONS = {}
set OEM_ABANDON_SOFTWARE = FALSE
set OEM_ABANDON_ON = TRUE
Debug-Output "It's Install."
endif
Set CardType = 1
set Pcmcia = FALSE
Debug-Output "Value of Option = "$(Option)
set from = $(fatal)
set to = $(fatal)
goto $(StartLabel)
; -----------------------------------------------------------------
; InstallAdapter - Entry point for new adapter installation
; -----------------------------------------------------------------
InstallAdapter = +
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
Debug-Output "Inside InstallAdapter..."
Ifstr $(KeyProduct) == $(KeyNull)
set OldVersionExisted = $(FALSE)
goto DetectAndInstall
endif
OldInstall =+
CloseRegKey $(KeyProduct)
ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
Debug-Output "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"
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 = +
; Assume that no MCA adapters were detected
set MCADetected = "NO"
; Do detection stuff ONLY IF IT'S AN MCA ADAPTER.
ifcontains(i) $(Option) in { "TRSRMC00", "TRSRMC01"}
; It's a MCA adapter, or so the user claims it is.
; Detect all of the MCA adapters in this system.
set MCA_2BYTE = 224
set MCA_1BYTE_LIST = { 0, 1 }
set AdapterList = {}
Debug-Output "** Attempting to find any MCA adapters..."
ForListDo $(MCA_1BYTE_LIST)
set MCA_1BYTE = $($)
Shell $(UtilityInf), MCAFindBus, $(MCA_1BYTE), $(MCA_2BYTE)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != "NO_ERROR"
set Error $($R0)
goto fatal
endif
ifstr(i) $($R1) != {}
set MCA_List = $($R1)
ForListDo $(MCA_List)
set BusSlotMCA = $($)
set BusNumber = *($(BusSlotMCA),1)
set SlotNumber = *($(BusSlotMCA),2)
set NetcardId = *($(BusSlotMCA),3)
set DualPort = "0"
Debug-Output ">> MCA Device "$(NetcardId)" found at Slot "$(SlotNumber)
set AdapterList = >($(AdapterList),$(BusSlotMCA))
set MCADetected = "YES"
EndForListDo
Endif
EndForListDo
ifstr(i) $(AdapterList) == {}
Debug-Output ">> Did not find any MCA SRAM cards... the user lied!"
set Error = $(CANNOT_FIND_ANY_CARD)
set CommonStatus = STATUS_USERCANCEL
set from = "end"
goto nonfatal
endif
else
; We're not setting up a MCA adapter, we are setting up something
; that takes one adapter at a time. Yeeha! Fill in the AdapterList
; with a dummy so the install loop will work at least one time.
set AdapterList = { "DUMMY" }
Endif ; MCA detection
; At this point, if an MCA adapter was detected, and we found a situation
; where there might be a problem with the slot numbers detected (e.g.
; Windows NT 4.0 pre-SP2), then warn the user. Note: this will happen
; all the time, regardless of !STF_GUI_UNATTENDED. If you need to
; get around this for RUI (and the detection is incorrectly detecting
; 4.0pre-SP2), then set MCAForceDetectFix to YES in the [FileConstants]
; section.
; Skip this if MCAForceDetectFix is YES
ifstr(i) $(MCAForceDetectFix) != "YES"
ifstr(i) $(MCADetected) == "YES"
ifstr(i) $(MCADetectFix) == "NO"
; Looks like trouble... display a pop-up message box that
; warns the user that the adapter might not work in this config.
Debug-Output ">> Looks like a MCA slot problem could occur... warn the user!"
ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
; Warning for RUI users
set Error = "Setup has detected a version of Windows NT 4.0 previous to Service Pack 2. Windows NT Networking may not work with this adapter until Service Pack 2 is installed. Click OK to continue, or cancel to abort installation of this adapter. If you are attempting a remote unattended install (RUI), and your Windows NT RUI source has a hotfix or service pack 2 in place, then you may be getting this message in error. See README.TXT for a workaround."
set to = ContinueOperation
set from = end
else
; Warning message for Non-RUI
set Error = "Setup has detected a version of Windows NT 4.0 previous to Service Pack 2. Windows NT Networking may not work with this adapter until Service Pack 2 is installed. Click OK to continue, or cancel to abort installation of this adapter."
set to = ContinueOperation
set from = end
endif
goto Warning
endif
endif
endif
ContinueOperation = +
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."
; ---------------------------------------------------------
; Add the driver component to the registry
; ---------------------------------------------------------
Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
$(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)}}
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)}}
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 =+
; This begins the big loop for installing each detected adapter.
; We can only detect MCA adapters in this release of the INF.
; Someday, maybe we'll get around to detecting ISA adapters more
; efficiently...
ForListDo $(AdapterList)
; Only do this mess if were messing with MCA.
ifstr(i) $(MCADetected) == "YES"
Set BusSlotMCA = $($)
Set BusNumber = *($(BusSlotMCA),1)
Set SlotNumber = *($(BusSlotMCA),2)
Set NetcardId = *($(BusSlotMCA),3)
Set DualPort = *($(BusSlotMCA),4)
; The following logic is used to prevent a duplicate installation
; of an adapter that is already installed (i.e. an installation
; where an adapter is added to a system with an existing card).
Set AlreadyInstalled = "NO"
; Make a list of all the installed netcards
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,
; and product type.
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)
GetRegValue $(IE_KeyService), "DualPort", DualInfo
Ifint $(RegLastError) == 0
set CardDualPort = *($(DualInfo), 4)
else
set CardDualPort = "0"
endif
ifint $(CardBusNum) == $(BusNumber)
ifint $(CardSlotNum) == $(SlotNumber)
ifint $(CardDualPort) == $(DualPort)
Set AlreadyInstalled = "YES"
endif
endif
endif
endif
EndForListDo
endif
ifstr $(AlreadyInstalled) == "YES"
goto NextAdapter
endif
; -------------------------------------------------
; The netcard has not yet been installed. Add
; it now.
; -------------------------------------------------
; Install the instance of this driver.
; Determine the CardId parameter first, as well as the ProductHardwareTitle.
; The latter parameter is only used in installation mode.
ifstr $(Option) == "TRSR8327"
set ProductHardwareTitle = $(TRSR8327)
set CardId = $(ADAPTER_ID_OLDISA)
else-ifstr $(Option) == "TRSR80CC"
set ProductHardwareTitle = $(TRSR80CC)
set CardId = $(ADAPTER_ID_OLDISA)
else-ifstr $(Option) == "TRSR0001"
set ProductHardwareTitle = $(TRSR0001)
set CardId = $(ADAPTER_ID_P4)
else-ifstr $(Option) == "TRSR1070"
set ProductHardwareTitle = $(TRSR1070)
set CardId = $(ADAPTER_ID_PFP)
else-ifstr $(Option) == "TRSR1080"
set ProductHardwareTitle = $(TRSR1080)
set CardId = $(ADAPTER_ID_P6)
else-ifstr $(Option) == "TRSRPCM1"
set ProductHardwareTitle = $(TRSRPCM1)
set CardId = $(ADAPTER_ID_OLDISA)
else-ifstr $(Option) == "TRSRPCM3"
set ProductHardwareTitle = $(TRSRPCM3)
set CardId = $(ADAPTER_ID_RA3)
else-ifstr $(Option) == "TRSRPCM4"
set ProductHardwareTitle = $(TRSRPCM4)
set CardId = $(ADAPTER_ID_RA4)
else-ifstr $(Option) == "TRSRPCM5"
set ProductHardwareTitle = $(TRSRPCM5)
set CardId = $(ADAPTER_ID_RA42)
else-ifstr $(Option) == "TRSRPCM6"
set ProductHardwareTitle = $(TRSRPCM6)
set CardId = $(ADAPTER_ID_RA42)
else-ifcontains(i) $(Option) in { "TRSRMC00", "TRSRMC01" }
; We're doing MCA. This means we'll have to inspect the current
; adapters NetcardId to see what we're really dealing with!
ifstr(i) $(NetcardId) == $(ADAPTER_ID_OLDMCA)
set ProductHardwareTitle = $(TRSRMC00)
set CardId = $(ADAPTER_ID_OLDMCA)
else-ifstr $(NetcardId) == $(ADAPTER_ID_N4)
set ProductHardwareTitle = $(TRSRMC01)
set CardId = $(ADAPTER_ID_N4)
endif
endif
SetINFDefaults =+
; The following sections are used during a new installation and by
; the configure adapter section to determine the default values for
; parameters.
;
;
; Parameters needed:
;
; AdapterBusType REG_VT_DWORD ---> (1=ISA,3=MCA,5=PCI,8=PCMCIA)
; Address_16 REG_VT_DWORD ---> (1=PCMCIA, otherwise not used)
; Address1_16 REG_VT_DWORD ---> (1=PCMCIA, otherwise not used)
; AttributeMemory_16 REG_VT_DWORD ---> (1=PCMCIA, otherwise not used)
; AttributeMemory1_16 REG_VT_DWORD ---> (1=PCMCIA, otherwise not used)
; BusNumber REG_VT_DWORD 0 (assumed zero)
; BusType REG_VT_DWORD ---> (1=ISA,3=MCA,5=PCI,8=PCMCIA)
; CardId REG_VT_DWORD *
; DataRate REG_VT_SZ AUTO (AUTO,M16,M4)
; EnhancedMode REG_VT_SZ ---> (YES=default for Turbo PC Card, NO=all other PC Cards)
; FastPath REG_VT_SZ YES (YES,NO)
; FullDuplex REG_VT_SZ YES (YES,NO)
; InterruptNumber REG_VT_DWORD 9 (PCMCIA)
; IoBaseAddress REG_VT_DWORD ---> (0x300=default for Turbo PC Cards, 0xA20= all other PC Cards)
; IoLength REG_VT_DWORD 3
; MaxTransmits REG_VT_DWORD 31 (1-96)
; MaxTxFrameSize REG_VT_DWORD 4096 (14-18000)
; MediaType REG_VT_DWORD 2 (1=Ethernet,2=Token Ring)
; MemoryMappedBaseAddress REG_VT_DWORD ---> (0xC8000-0xDE000, must fall on 8K boundary, default=0xD6000)
; MemoryMappedBaseAddress_1 REG_VT_DWORD ---> (0xC8000-0xDC000, must fall on 16K boundary, default=0xD8000)
; MemoryMappedSize REG_VT_DWORD ---> 8192 (bytes)
; MemoryMappedSize_1 REG_VT_DWORD ---> 16384 (bytes)
; MinRcvBuffs REG_VT_DWORD 40 (1-200)
; NetworkAddress REG_VT_SZ ** (12 digit valid LAA MAC address)
; PCCardMemoryWindowOffset REG_VT_DWORD (0xD000=Turbo PC Card, 0xC2000=all other PC Cards)
; PCCardMemoryWindowOffset_1 REG_VT_DWORD (0xD000=all PC cards prior to Turbo PC Card, unused on Turbo PC Card)
; RcvBuffSize REG_VT_DWORD 4096 (256-18000)
; RTSWMode REG_VT_SZ DISABLE (DISABLE,PEER,CLIENT,AUTO)
; RTSWTableSize REG_VT_DWORD 128 (16-1024)
; RTSWHoldingTime REG_VT_DWORD 20 (2-20)
; ShallowMode REG_VT_SZ ---> (YES=Turbo PC Card, NO=All other PC Cards)
; TraceQuiet REG_VT_SZ *** (YES,NO)
;
; * CardId is dependant on the actual card installed. Look in
; the file constant section for hints.
;
; ** NetworkAddress must be a valid LAA, that is, between 400000000000 and
; 7FFFFFFFFFFF hexidecimal.
;
; *** 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.
set AdapterBusType = "1" ; ISA (exceptions, see below...)
set BusNumber = "0"
set BusType = "1" ; ISA (exceptions, see below...)
set FastPath = "YES"
set FullDuplex = "YES"
set MediaType = "2" ; 802.5 Token Ring
set MaxTransmits = "31"
set MaxTxFrameSize = "4096"
set MinRcvBuffs = "40"
set RcvBuffSize = "4096"
set ShallowMode = "YES"
set LoopBack = "NO"
set WebLink1_BT = "IBM Networking Home"
set WebLink1_URL = "http://www.networking.ibm.com/"
set WebLink2_BT = "IBM Networking Support"
set WebLink2_URL = "http://www.networking.ibm.com/support/"
set RTSWMode = "DISABLE"
set RTSWTableSize = "128"
set RTSWHoldingTime = "20"
set RTSWSubnetMask = "0.0.0.0"
; Older SRAM adapters cannot do ShallowMode or FullDuplex
ifcontains $(Option) in {"TRSR8327", "TRSR80CC", "TRSR0001", "TRSRMC00", "TRSRMC01", "TRSRPCM1", "TRSRPCM3" }
set FullDuplex = "NO"
set ShallowMode = "NO"
endif
; Bustype-specific things (MCA, PCMCIA...)
ifcontains $(Option) in {"TRSRMC00", "TRSRMC01"}
set AdapterBusType = 3 ; MCA
set BusType = 3 ; MCA
else-ifcontains $(Option) in {"TRSRPCM1", "TRSRPCM3", "TRSRPCM4", "TRSRPCM5", "TRSRPCM6" }
set AdapterBusType = "8" ; PCMCIA
set Address_16 = "1"
set Address1_16 = "1"
set AttributeMemory_16 = "1"
set AttributeMemory1_16 = "1"
set BusType = "1" ; ISA works better here, though
set InterruptNumber = "0" ; because it's typically free
set IoLength = "3" ; why even parameterize this?!?
ifcontains $(Option) in {"TRSRPCM1", "TRSRPCM3"}
; It's an old PC Card -- requires two Memory Windows,
; EnhancedMode = NO, and can only use 0xA20 or 0xA24 as I/O ports.
set EnhancedMode = "NO"
set IoBaseAddress = "2592" ; 0xA20
set MemoryMappedBaseAddress = "901120" ; 0xDC000 (CIS Default)
set MemoryMappedSize = "8192" ; 8K Memory Window
set MemoryMappedBaseAddress_1 = "884736" ; 0xD8000 (CIS Default)
set MemoryMappedSize_1 = "16384" ; 16K Memory Window
set PCCARDMemoryWindowOffset = "794624" ; 0xC2000 offset
set PCCARDMemoryWindowOffset_1 = "851968" ; 0xD0000 offset
set PCMCIA = "1" ; duh. ;)
ifstr(i) $(Option) == "TRSRPCM1"
set DataRate = "M16" ; No AutoSensing!
else
set DataRate = "AUTO" ; AutoSensing RingSpeed
endif
else
; It's a new PC Card... much less resources needed,
; and can use more than the old standard I/O ports.
set EnhancedMode = "YES"
; nishi set IoBaseAddress = "768" ; 0x300
set IoBaseAddress = "0" ; 0
; nishi set MemoryMappedBaseAddress = "860160" ; 0xD2000 (CIS Default)
set MemoryMappedBaseAddress = "0" ; 0
set MemoryMappedSize = "8192" ; 8K Memory Window
set MemoryMappedBaseAddress_1 = "" ; (not needed)
set MemoryMappedSize_1 = "" ; (not needed)
set PCCARDMemoryWindowOffset = "860160" ; 0xD2000 offset (CIS Default)
set PCCARDMemoryWindowOffset_1 = "" ; (not needed)
set DataRate = "AUTO" ; AutoSensing RingSpeed
; nishi
set SoftexPcmcia = "1" ;
endif
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
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
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
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)
ifcontains $(Option) in {"TRSRPCM4", "TRSRPCM5", "TRSRPCM6"}
set AdapterName = $(ProductHardwareName)$(AdapterNumber) ;
endif
; Add new item to the PCMCIA service database
set PCMCIADatabaseKeyName = $(!NTN_ServiceBase)"\Pcmcia\DataBase"
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName) $(MAXIMUM_ALLOWED) KeyPCMCIA
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM" $(MAXIMUM_ALLOWED) KeyIBM
ifstr $(KeyIBM) == $(NULL)
CreateRegKey $(KeyPCMCIA) {"IBM",0,GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyIBM
CreateRegKey $(KeyIBM) {"TOKEN RING",0,GenericClass} "" $(!REG_KEY_SET_VALUE) "" KeyTOK
else
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM\TOKEN RING" $(MAXIMUM_ALLOWED) KeyTOK
endif
; Add the card/driver. --------------------------------------------------------------------------------------
SetRegValue $(KeyTOK) {"Driver",0,$(!REG_VT_SZ),$(PCMCIADriver)}
SetRegValue $(KeyTOK) {"InfFileName",0,$(!REG_VT_SZ),$(STF_CONTEXTINFNAME)}
SetRegValue $(KeyTOK) {"Option",0,$(!REG_VT_SZ),$(Option)}
CloseRegKey $(KeyTOK)
CloseRegKey $(KeyIBM)
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM OEM" $(MAXIMUM_ALLOWED) KeyIBMOEM
ifstr $(KeyIBMOEM) == $(NULL)
CreateRegKey $(KeyPCMCIA) {"IBM OEM",0,GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyIBMOEM
CreateRegKey $(KeyIBMOEM) {"TOKEN RING",0,GenericClass} "" $(!REG_KEY_SET_VALUE) "" KeyTOKOEM
else
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM OEM\TOKEN RING" $(MAXIMUM_ALLOWED) KeyTOKOEM
endif
SetRegValue $(KeyTOKOEM) {"Driver",0,$(!REG_VT_SZ),$(PCMCIADriver)}
SetRegValue $(KeyTOKOEM) {"InfFileName",0,$(!REG_VT_SZ),$($R0)}
SetRegValue $(KeyTOKOEM) {"Option",0,$(!REG_VT_SZ),$(Option)}
CloseRegKey $(KeyTOKOEM)
CloseRegKey $(KeyIBMOEM)
CloseRegKey $(KeyPCMCIA)
; Here's where we set the pretty name of the driver.
ifcontains $(Option) in { "TRSRMC00", "TRSRMC01" }
; It's MCA. Set the title based on slot number, not adapter number.
set MyTitle = "Slot "$(SlotNumber)": "$(ProductHardwareTitle)
else
set MyTitle = "["$(AdapterNumber)"] "$(ProductHardwareTitle)
endif
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)
; Commit hardware information to registry.
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)
; Commit Hardware bindings to registry.
Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
; Commit default parameters to registry (see above)
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 ; End of AdapterList
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)
Debug-Output "ServiceName = "$(ServiceName)
GetRegValue $(NetCardKey) "Title" TitleInfo
set MyTitle = *($(TitleInfo),4)
Debug-Output "Title = "$(MyTitle)
CloseRegKey $(NetCardKey)
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
ifstr(i) $(ParamKey) == ""
goto successful
endif
set ValueName = ""
set ValueData = ""
set ValueStr = ""
set ValueList = {}
; Set the FeatureMask for the adapter when configuring
ifcontains $(Option) in { "TRSR1070", "TRSR1080" }
set FeatureMask = "3633"
else-ifcontains $(Option) in { "TRSRPCM4", "TRSRPCM5", "TRSRPCM6" }
set FeatureMask = "3635"
else-ifcontains $(Option) in { "TRSR0001" }
set FeatureMask = "3121"
else-ifcontains $(Option) in { "TRSRPCM3" }
set FeatureMask = "3123"
else-ifcontains $(Option) in { "TRSRPCM1" }
set FeatureMask = "2053"
else
set FeatureMask = "1"
endif
; If we are called from the PCMCIA control panel, we'll be called with the
; option "IBMTOK". Determine which instance of IBMTOK is calling us, and then
; kludge in the proper option to the ConfigureAdapter section! We'll do this
; by reading in the CardId parameter and determining from there.
ifstr $(Option) == "IBMTOK"
Debug-Output ">> We were called from the PC Card Control Panel. Urg."
Debug-Output ">> Kludging Option parameter."
GetRegValue $(ParamKey) "CardId" ValueList
set IAm = *($(ValueList),4)
ifstr $(IAm) == $(ADAPTER_ID_RA3)
set Option = "TRSRPCM3"
Debug-Output ">> It's an Auto TR CCA"
else-ifstr $(IAm) == $(ADAPTER_ID_RA4)
set Option = "TRSRPCM4"
Debug-Output ">> It's a Turbo TR PC Card"
else-ifstr $(IAm) == $(ADAPTER_ID_RA42)
set Option = "TRSRPCM5"
Debug-Output ">> It's a Turbo TR PC Card 2"
else-ifstr $(IAm) == $(ADAPTER_ID_OLDISA)
set Option = "TRSRPCM1"
Debug-Output ">> It's an older than dirt IBM compatible TR PC Card"
else
Debug-Output ">> THIS SHOULD NOT HAPPEN-- Missing or improper Card Id. ABORT!"
set Error = "" ; use default screw-up message
set to = fatal
set from = fatal
goto fatal
endif
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)",DriverFile="$(DriverFile)",InstanceName="$(ServiceName)",FeatureMask="$(FeatureMask)
Debug-Output "Setup ParmList"
; Read from the registry and override defaults with values we find
; there.
EnumRegValue $(ParamKey) ValueList
ForListDo $(ValueList)
set ValueItem = $($)
set ValueName = *($(ValueItem),1)
set ValueData = *($(ValueItem),4)
ifstr(i) $(ValueName) == "AdapterBusType"
set AdapterBusType = $(ValueData)
set ParmList = $(ParmList)",AdapterBusType="$(ValueData)
else-ifstr(i) $(ValueName) == "Address1_16"
set Address1_16 = $(ValueData)
set ParmList = $(ParmList)",Address1_16="$(ValueData)
else-ifstr(i) $(ValueName) == "Address_16"
set Address_16 = $(ValueData)
set ParmList = $(ParmList)",Address_16="$(ValueData)
else-ifstr(i) $(ValueName) == "AttributeMemory1_16"
set AttributeMemory1_16 = $(ValueData)
set ParmList = $(ParmList)",AttributeMemory1_16="$(ValueData)
else-ifstr(i) $(ValueName) == "AttributeMemory_16"
set AttributeMemory_16 = $(ValueData)
set ParmList = $(ParmList)",AttributeMemory_16="$(ValueData)
else-ifstr(i) $(ValueName) == "BusNumber"
set BusNumber = $(ValueData)
set ParmList = $(ParmList)",BusNumber="$(ValueData)
else-ifstr(i) $(ValueName) == "BusType"
set BusType = $(ValueData)
set ParmList = $(ParmList)",BusType="$(ValueData)
else-ifstr(i) $(ValueName) == "CardId"
set CardId = $(ValueData)
set ParmList = $(ParmList)",CardId="$(ValueData)
else-ifstr(i) $(ValueName) == "DataRate"
set DataRate = $(ValueData)
set ParmList = $(ParmList)",DataRate="$(ValueData)
else-ifstr(i) $(ValueName) == "EnhancedMode"
set EnhancedMode = $(ValueData)
set ParmList = $(ParmList)",EnhancedMode="$(ValueData)
else-ifstr(i) $(ValueName) == "FastPath"
set FastPath = $(ValueData)
set ParmList = $(ParmList)",FastPath="$(ValueData)
else-ifstr(i) $(ValueName) == "FullDuplex"
set FullDuplex = $(ValueData)
set ParmList = $(ParmList)",FullDuplex="$(ValueData)
else-ifstr(i) $(ValueName) == "InterruptNumber"
set InterruptNumber = $(ValueData)
set ParmList = $(ParmList)",InterruptNumber="$(ValueData)
else-ifstr(i) $(ValueName) == "IoBaseAddress"
set IoBaseAddress = $(ValueData)
set ParmList = $(ParmList)",IoBaseAddress="$(ValueData)
else-ifstr(i) $(ValueName) == "IoLength"
set IoLength = $(ValueData)
set ParmList = $(ParmList)",IoLength="$(ValueData)
else-ifstr(i) $(ValueName) == "LoopBack"
set LoopBack = $(ValueData)
set ParmList = $(ParmList)",LoopBack="$(ValueData)
else-ifstr(i) $(ValueName) == "MaxTransmits"
set MaxTransmits = $(ValueData)
set ParmList = $(ParmList)",MaxTransmits="$(ValueData)
else-ifstr(i) $(ValueName) == "MaxTxFrameSize"
set MaxTxFrameSize = $(ValueData)
set ParmList = $(ParmList)",MaxTxFrameSize="$(ValueData)
else-ifstr(i) $(ValueName) == "MediaType"
set MediaType = $(ValueData)
set ParmList = $(ParmList)",MediaType="$(ValueData)
else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
set MemoryMappedBaseAddress = $(ValueData)
set ParmList = $(ParmList)",MemoryMappedBaseAddress="$(ValueData)
else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress_1"
set MemoryMappedBaseAddress_1 = $(ValueData)
set ParmList = $(ParmList)",MemoryMappedBaseAddress_1="$(ValueData)
else-ifstr(i) $(ValueName) == "MemoryMappedSize"
set MemoryMappedSize = $(ValueData)
set ParmList = $(ParmList)",MemoryMappedSize="$(ValueData)
else-ifstr(i) $(ValueName) == "MemoryMappedSize_1"
set MemoryMappedSize_1 = $(ValueData)
set ParmList = $(ParmList)",MemoryMappedSize_1="$(ValueData)
else-ifstr(i) $(ValueName) == "MinRcvBuffs"
set MinRcvBuffs = $(ValueData)
set ParmList = $(ParmList)",MinRcvBuffs="$(ValueData)
else-ifstr(i) $(ValueName) == "NetworkAddress"
set NetworkAddress = $(ValueData)
set ParmList = $(ParmList)",NetAddress="$(ValueData)
else-ifstr(i) $(ValueName) == "PCCardMemoryWindowOffset"
set PCCardMemoryWindowOffset = $(ValueData)
set ParmList = $(ParmList)",PCCardMemoryWindowOffset="$(ValueData)
else-ifstr(i) $(ValueName) == "PCCardMemoryWindowOffset_1"
set PCCardMemoryWindowOffset_1 = $(ValueData)
set ParmList = $(ParmList)",PCCardMemoryWindowOffset_1="$(ValueData)
else-ifstr(i) $(ValueName) == "PCMCIA"
set PCMCIA = $(ValueData)
set ParmList = $(ParmList)",PCMCIA="$(ValueData)
else-ifstr(i) $(ValueName) == "RcvBuffSize"
set RcvBuffSize = $(ValueData)
set ParmList = $(ParmList)",RcvBuffSize="$(ValueData)
else-ifstr(i) $(ValueName) == "RTSWMode"
set RTSWMode = $(ValueData)
set ParmList = $(ParmList)",RTSWMode="$(ValueData)
else-ifstr(i) $(ValueName) == "RTSWSubnetMask"
set RTSWSubnetMask = $(ValueData)
set ParmList = $(ParmList)",RTSWSubnetMask="$(ValueData)
else-ifstr(i) $(ValueName) == "RTSWHoldingTime"
set RTSWHoldingTime = $(ValueData)
set ParmList = $(ParmList)",RTSWHoldingTime="$(ValueData)
else-ifstr(i) $(ValueName) == "RTSWTableSize"
set RTSWTableSize = $(ValueData)
set ParmList = $(ParmList)",RTSWTableSize="$(ValueData)
else-ifstr(i) $(ValueName) == "TCPPortRange1"
set TCPPortRange1 = $(ValueData)
set ParmList = $(ParmList)",TCPPortRange1="$(ValueData)
else-ifstr(i) $(ValueName) == "TCPPortRange2"
set TCPPortRange2 = $(ValueData)
set ParmList = $(ParmList)",TCPPortRange2="$(ValueData)
else-ifstr(i) $(ValueName) == "TCPPortRange3"
set TCPPortRange3 = $(ValueData)
set ParmList = $(ParmList)",TCPPortRange3="$(ValueData)
else-ifstr(i) $(ValueName) == "TCPPortRange4"
set TCPPortRange4 = $(ValueData)
set ParmList = $(ParmList)",TCPPortRange4="$(ValueData)
else-ifstr(i) $(ValueName) == "TCPPortRange5"
set TCPPortRange5 = $(ValueData)
set ParmList = $(ParmList)",TCPPortRange5="$(ValueData)
else-ifstr(i) $(ValueName) == "UDPPortRange1"
set UDPPortRange1 = $(ValueData)
set ParmList = $(ParmList)",UDPPortRange1="$(ValueData)
else-ifstr(i) $(ValueName) == "UDPPortRange2"
set UDPPortRange2 = $(ValueData)
set ParmList = $(ParmList)",UDPPortRange2="$(ValueData)
else-ifstr(i) $(ValueName) == "UDPPortRange3"
set UDPPortRange3 = $(ValueData)
set ParmList = $(ParmList)",UDPPortRange3="$(ValueData)
else-ifstr(i) $(ValueName) == "UDPPortRange4"
set UDPPortRange4 = $(ValueData)
set ParmList = $(ParmList)",UDPPortRange4="$(ValueData)
else-ifstr(i) $(ValueName) == "UDPPortRange5"
set UDPPortRange5 = $(ValueData)
set ParmList = $(ParmList)",UDPPortRange5="$(ValueData)
else-ifstr(i) $(ValueName) == "ShallowMode"
set ShallowMode = $(ValueData)
set ParmList = $(ParmList)",ShallowMode="$(ValueData)
else-ifstr(i) $(ValueName) == "SlotNumber"
set SlotNumber = $(ValueData)
set ParmList = $(ParmList)",SlotNumber="$(ValueData)
else-ifstr(i) $(ValueName) == "SoftexPcmcia"
set SoftexPcmcia = $(ValueData)
set ParmList = $(ParmList)",SoftexPcmcia="$(ValueData)
else-ifstr(i) $(ValueName) == "AdapterName"
set AdapterName = $(ValueData)
set ParmList = $(ParmList)",AdapterName="$(ValueData)
endif
EndForListDo
set ParmList = $(ParmList)",WebLink1_BT="$(WebLink1_BT)
set ParmList = $(ParmList)",WebLink1_URL="$(WebLink1_URL)
set ParmList = $(ParmList)",WebLink2_BT="$(WebLink2_BT)
set ParmList = $(ParmList)",WebLink2_URL="$(WebLink2_URL)
Debug-Output "ParmList= "$(ParmList)
; Load the TokSetup DLL and bring up the GUI
LoadLibrary "X" $(InstallDLL) hDLL
LibraryProcedure Result $(hDLL) InstallTokenRing $(ParmList)
FreeLibrary $(hDLL)
Debug-Output "After= "$(Result)
set TCPPortRange1 = ""
set TCPPortRange2 = ""
set TCPPortRange3 = ""
set TCPPortRange4 = ""
set TCPPortRange5 = ""
set UDPPortRange1 = ""
set UDPPortRange2 = ""
set UDPPortRange3 = ""
set UDPPortRange4 = ""
set UDPPortRange5 = ""
; 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) == "CANCEL"
set CommonStatus = STATUS_USERCANCEL
Debug-Output "Cancel button pressed in InstallTokenRing()"
goto end
endif
else-ifstr(i) $(Key) == "AdapterBusType"
Set AdapterBusType = $(Value)
else-ifstr(i) $(Key) == "Address1_16"
Set Address1_16 = $(Value)
else-ifstr(i) $(Key) == "Address_16"
Set Address_16 = $(Value)
else-ifstr(i) $(Key) == "AttributeMemory1_16"
Set AttributeMemory_16 = $(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 $(Key) == "EnhancedMode"
Set EnhancedMode = $(Value)
else-ifstr $(Key) == "FastPath"
Set FastPath = $(Value)
else-ifstr $(Key) == "FullDuplex"
Set FullDuplex = $(Value)
else-ifstr(i) $(Key) == "InterruptNumber"
Set InterruptNumber = $(Value)
else-ifstr(i) $(Key) == "IoBaseAddress"
Set IoBaseAddress = $(Value)
else-ifstr(i) $(Key) == "IoLength"
Set IoLength = $(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) == "MemoryMappedBaseAddress"
Set MemoryMappedBaseAddress = $(Value)
else-ifstr(i) $(Key) == "MemoryMappedBaseAddress_1"
Set MemoryMappedBaseAddress_1 = $(Value)
else-ifstr(i) $(Key) == "MemoryMappedSize"
Set MemoryMappedSize = $(Value)
else-ifstr(i) $(Key) == "MemoryMappedSize_1"
Set MemoryMappedSize_1 = $(Value)
else-ifstr(i) $(Key) == "MinRcvBuffs"
Set MinRcvBuffs = $(Value)
else-ifstr(i) $(Key) == "NetAddress"
Set NetworkAddress = $(Value)
else-ifstr(i) $(Key) == "PCCardMemoryWindowOffset"
Set PCCardMemoryWindowOffset = $(Value)
else-ifstr(i) $(Key) == "PCCardMemoryWindowOffset_1"
Set PCCardMemoryWindowOffset_1 = $(Value)
else-ifstr(i) $(Key) == "PCMCIA"
Set PCMCIA = $(Value)
else-ifstr(i) $(Key) == "RcvBuffSize"
Set RcvBuffSize = $(Value)
else-ifstr(i) $(Key) == "RTSWMode"
set RTSWMode = $(Value)
else-ifstr(i) $(Key) == "RTSWHoldingTime"
set RTSWHoldingTime = $(Value)
else-ifstr(i) $(Key) == "RTSWTableSize"
set RTSWTableSize = $(Value)
else-ifstr(i) $(Key) == "RTSWSubnetMask"
set RTSWSubnetMask = $(Value)
else-ifstr(i) $(Key) == "TCPPortRange1"
set TCPPortRange1 = $(Value)
else-ifstr(i) $(Key) == "TCPPortRange2"
set TCPPortRange2 = $(Value)
else-ifstr(i) $(Key) == "TCPPortRange3"
set TCPPortRange3 = $(Value)
else-ifstr(i) $(Key) == "TCPPortRange4"
set TCPPortRange4 = $(Value)
else-ifstr(i) $(Key) == "TCPPortRange5"
set TCPPortRange5 = $(Value)
else-ifstr(i) $(Key) == "UDPPortRange1"
set UDPPortRange1 = $(Value)
else-ifstr(i) $(Key) == "UDPPortRange2"
set UDPPortRange2 = $(Value)
else-ifstr(i) $(Key) == "UDPPortRange3"
set UDPPortRange3 = $(Value)
else-ifstr(i) $(Key) == "UDPPortRange4"
set UDPPortRange4 = $(Value)
else-ifstr(i) $(Key) == "UDPPortRange5"
set UDPPortRange5 = $(Value)
else-ifstr(i) $(Key) == "ShallowMode"
Set ShallowMode = $(Value)
else-ifstr(i) $(Key) == "SlotNumber"
Set SlotNumber = $(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 = +
Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
$(ProductSoftwareName)
ifint $($ShellCode) != $(!Shell_CODE_OK)
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)
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)
OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\EventLog\System\"$(ProductHardwareName) $(MAXIMUM_ALLOWED) KeyEventLog
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
SetRegValue $(KeyEventLog) {EventMessageFile,$(NoTitle),$(!REG_VT_SZ),$(NetEventDLL)}
CloseRegKey $(KeyEventLog)
OpenRegKey $(!REG_H_LOCAL) "" $(NetworkDriverKeyName) $(MAXIMUM_ALLOWED) TempKey
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
SetRegValue $(TempKey) {ImagePath,0,$(!REG_VT_SZ),$(ProductSoftwareImagePath)}
CloseRegKey $(TempKey)
ifcontains(i) $(Option) in { "TRSRPCM1", "TRSRPCM3", "TRSRPCM4", "TRSRPCM5", "TRSRPCM6" }
; Add new item to the PCMCIA service database
set PCMCIADatabaseKeyName = $(!NTN_ServiceBase)"\Pcmcia\DataBase"
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName) $(MAXIMUM_ALLOWED) KeyPCMCIA
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM" $(MAXIMUM_ALLOWED) KeyIBM
ifstr $(KeyIBM) == $(NULL)
CreateRegKey $(KeyPCMCIA) {"IBM",0,GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyIBM
CreateRegKey $(KeyIBM) {"TOKEN RING",0,GenericClass} "" $(!REG_KEY_SET_VALUE) "" KeyTOK
else
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM\TOKEN RING" $(MAXIMUM_ALLOWED) KeyTOK
endif
SetRegValue $(KeyTOK) {"Driver",0,$(!REG_VT_SZ),$(PCMCIADriver)}
SetRegValue $(KeyTOK) {"InfFileName",0,$(!REG_VT_SZ),$($R0)}
SetRegValue $(KeyTOK) {"Option",0,$(!REG_VT_SZ),$(Option)}
CloseRegKey $(KeyTOK)
CloseRegKey $(KeyIBM)
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM OEM" $(MAXIMUM_ALLOWED) KeyIBMOEM
ifstr $(KeyIBMOEM) == $(NULL)
CreateRegKey $(KeyPCMCIA) {"IBM OEM",0,GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyIBMOEM
CreateRegKey $(KeyIBMOEM) {"TOKEN RING",0,GenericClass} "" $(!REG_KEY_SET_VALUE) "" KeyTOKOEM
else
OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADatabaseKeyName)"\IBM OEM\TOKEN RING" $(MAXIMUM_ALLOWED) KeyTOKOEM
endif
SetRegValue $(KeyTOKOEM) {"Driver",0,$(!REG_VT_SZ),$(PCMCIADriver)}
SetRegValue $(KeyTOKOEM) {"InfFileName",0,$(!REG_VT_SZ),$($R0)}
SetRegValue $(KeyTOKOEM) {"Option",0,$(!REG_VT_SZ),$(Option)}
CloseRegKey $(KeyTOKOEM)
CloseRegKey $(KeyIBMOEM)
CloseRegKey $(KeyPCMCIA)
endif
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
goto end
successful = +
goto end
abandon = +
ForListDo $(OEM_ABANDON_OPTIONS)
Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
$(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, $(Manufacturer), +
$(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
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 = $(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
term = +
Return $(CommonStatus)
;---------------------------------------------------------------------
; Files sections
[Files-NDIS3MP]
1, IBMTOKN3.SY_, SIZE=45000, RENAME=IBMTOK.SYS
[Files-NDIS4MP]
1, IBMTOK.SYS, SIZE=45000, RENAME=IBMTOK.SYS
[Files-Support]
1, ITR_W32.DL_, SIZE=120000, RENAME=ITR_W32.DLL, OVERWRITE=VERIFYSOURCEOLDER
1, ITR.HL_, SIZE=20000, RENAME=ITR.HLP, OVERWRITE=VERIFYSOURCEOLDER
1, ITR.CN_, SIZE=20000, RENAME=ITR.CNT, OVERWRITE=VERIFYSOURCEOLDER
1, IBMSGNET.DL_ SIZE=3000, RENAME=IBMSGNET.DLL, OVERWRITE=VERIFYSOURCEOLDER
[Files-INF]
1, OEMSETUP.INF, SIZE=60000, RENAME=$(!UG_Filename)
; -----------------------------------------------------------------
; Install sections
; -----------------------------------------------------------------
[Install-Option]
set STF_VITAL = ""
ifstr(i) $(NDIS_Level) == $(NDIS4_Level)
; WinNT 4.x SP3
AddSectionFilesToCopyList Files-NDIS4MP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
else
; assume WinNT 3.51 / 4.0 pre-SP3
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",+
"EnhancedMode",+
"FullDuplex",+
"FastPath",+
"ShallowMode",+
"LoopBack",+
"DataRate",+
"RTSWMode", +
"RTSWEnable", +
"RTSWSubnetMask", +
"TCPPortRange1", +
"TCPPortRange2", +
"TCPPortRange3", +
"TCPPortRange4", +
"TCPPortRange5", +
"UDPPortRange1", +
"UDPPortRange2", +
"UDPPortRange3", +
"UDPPortRange4", +
"UDPPortRange5" +
}
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.
; Add common parameters first.
Set NewValueList = {}
Set List = {AdapterBusType,0,$(!REG_VT_DWORD),$(!P:AdapterBusType)}
Set NewValueList = >($(NewValueList),$(List))
ifint $(!P:Address_16) != ""
set List = {Address_16,0,$(!REG_VT_DWORD),$(!P:Address_16)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:Address1_16) != ""
set List = {Address1_16,0,$(!REG_VT_DWORD),$(!P:Address1_16)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:AttributeMemory_16) != ""
set List = {AttributeMemory_16,0,$(!REG_VT_DWORD),$(!P:AttributeMemory_16)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:AttributeMemory1_16) != ""
set List = {AttributeMemory1_16,0,$(!REG_VT_DWORD),$(!P:AttributeMemory1_16)}
Set NewValueList = >($(NewValueList),$(List))
endif
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:EnhancedMode) != ""
set List = {EnhancedMode,0,$(!REG_VT_SZ),$(!P:EnhancedMode)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:FastPath) != ""
Set List = {FastPath,0,$(!REG_VT_SZ),$(!P:FastPath)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:FullDuplex) != ""
Set List = {FullDuplex,0,$(!REG_VT_SZ),$(!P:FullDuplex)}
Set NewValueList = >($(NewValueList),$(List))
endif
; nishi ifint $(!P:InterruptNumber) != ""
set List = {InterruptNumber,0,$(!REG_VT_DWORD),$(!P:InterruptNumber)}
Set NewValueList = >($(NewValueList),$(List))
; nishi endif
; nishi ifint $(!P:IoBaseAddress) != ""
set List = {IoBaseAddress,0,$(!REG_VT_DWORD),$(!P:IoBaseAddress)}
Set NewValueList = >($(NewValueList),$(List))
; nishi endif
ifint $(!P:IoLength) != ""
set List = {IoLength,0,$(!REG_VT_DWORD),$(!P:IoLength)}
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))
; nishi ifint $(!P:MemoryMappedBaseAddress) != ""
set List = {MemoryMappedBaseAddress,0,$(!REG_VT_DWORD),$(!P:MemoryMappedBaseAddress)}
Set NewValueList = >($(NewValueList),$(List))
; nishi endif
ifint $(!P:MemoryMappedBaseAddress_1) != ""
set List = {MemoryMappedBaseAddress_1,0,$(!REG_VT_DWORD),$(!P:MemoryMappedBaseAddress_1)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:MemoryMappedSize) != ""
set List = {MemoryMappedSize,0,$(!REG_VT_DWORD),$(!P:MemoryMappedSize)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:MemoryMappedSize_1) != ""
set List = {MemoryMappedSize_1,0,$(!REG_VT_DWORD),$(!P:MemoryMappedSize_1)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:MinRcvBuffs) != ""
Set List = {MinRcvBuffs,0,$(!REG_VT_DWORD),$(!P:MinRcvBuffs)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:NetworkAddress) != ""
Set List = {NetworkAddress,0,$(!REG_VT_SZ),$(!P:NetworkAddress)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:PCCARDMemoryWindowOffset) != ""
set List = {PCCARDMemoryWindowOffset,0,$(!REG_VT_DWORD),$(!P:PCCARDMemoryWindowOffset)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:PCCARDMemoryWindowOffset_1) != ""
set List = {PCCARDMemoryWindowOffset_1,0,$(!REG_VT_DWORD),$(!P:PCCARDMemoryWindowOffset_1)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:PCMCIA) != ""
set List = {PCMCIA,0,$(!REG_VT_DWORD),$(!P:PCMCIA)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:RcvBuffSize) != ""
Set List = {RcvBuffSize,0,$(!REG_VT_DWORD),$(!P:RcvBuffSize)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:RTSWMode) != ""
Set List = {RTSWMode,0,$(!REG_VT_SZ),$(!P:RTSWMode)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:RTSWHoldingTime) != ""
Set List = {RTSWHoldingTime,0,$(!REG_VT_DWORD),$(!P:RTSWHoldingTime)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:RTSWTableSize) != ""
Set List = {RTSWTableSize,0,$(!REG_VT_DWORD),$(!P:RTSWTableSize)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:RTSWSubnetMask) != ""
Set List = {RTSWSubnetMask,0,$(!REG_VT_SZ),$(!P:RTSWSubnetMask)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:TCPPortRange1) != ""
Set List = {TCPPortRange1,0,$(!REG_VT_SZ),$(!P:TCPPortRange1)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:TCPPortRange2) != ""
Set List = {TCPPortRange2,0,$(!REG_VT_SZ),$(!P:TCPPortRange2)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:TCPPortRange3) != ""
Set List = {TCPPortRange3,0,$(!REG_VT_SZ),$(!P:TCPPortRange3)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:TCPPortRange4) != ""
Set List = {TCPPortRange4,0,$(!REG_VT_SZ),$(!P:TCPPortRange4)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:TCPPortRange5) != ""
Set List = {TCPPortRange5,0,$(!REG_VT_SZ),$(!P:TCPPortRange5)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:UDPPortRange1) != ""
Set List = {UDPPortRange1,0,$(!REG_VT_SZ),$(!P:UDPPortRange1)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:UDPPortRange2) != ""
Set List = {UDPPortRange2,0,$(!REG_VT_SZ),$(!P:UDPPortRange2)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:UDPPortRange3) != ""
Set List = {UDPPortRange3,0,$(!REG_VT_SZ),$(!P:UDPPortRange3)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:UDPPortRange4) != ""
Set List = {UDPPortRange4,0,$(!REG_VT_SZ),$(!P:UDPPortRange4)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:UDPPortRange5) != ""
Set List = {UDPPortRange5,0,$(!REG_VT_SZ),$(!P:UDPPortRange5)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:ShallowMode) != ""
Set List = {ShallowMode,0,$(!REG_VT_SZ),$(!P:ShallowMode)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:SlotNumber) != ""
Set List = {SlotNumber,0,$(!REG_VT_DWORD),$(!P:SlotNumber)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifint $(!P:SoftexPcmcia) != ""
Set List = {SoftexPcmcia,0,$(!REG_VT_DWORD),$(!P:SoftexPcmcia)}
Set NewValueList = >($(NewValueList),$(List))
endif
ifstr $(!P:AdapterName) != ""
Set List = {AdapterName,0,$(!REG_VT_SZ),$(!P:AdapterName)}
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.