;// Copyright 1996-2000, AdvanceNet Systems, Inc.
[Options]
ATM_NIC_1
LANE ; don't change this option name!
PPP ; don't change this option name!
[OptionsTextENG]
ATM_NIC_1 = "<WipDeviceDesc>"
LANE = "RFC1483 LAN Services"
PPP = "Remote PPP over ATM Services"
[VendorSpecs]
;===========================================================================
;
; NOTE TO NIC VENDORS:
; The definitions immediately following MUST be customized by each vendor!!!
;
; 1. "NicManufacturer" is the name of your company. Short names or
; acronyms are the best choice for the various dialog boxes from
; which your name will be displayed.
; 2. "NicProductFullName" is the name by which your ATM NIC product
; will be shown to customers on the network control panel.
; 3. "NicProductName" is a one-word name by which your ATM NIC product
; will be known. Please use only alpha-numeric characters; this
; name CANNOT include spaces, underscores, or any other special
; characters. This name must be unique within the family of hardware
; supported by WinATM drivers.
; 4. "AtmDriver" is the filename of the ATM driver (.SYS file) that
; supports your NIC.
;
;===========================================================================
NicManufacturer = "<WipProviderName>"
NicProductFullName = "<WipDeviceDesc>"
NicProductName = "ADSLModem"
AtmDriver = "amemodem.sys"
AtmDriverMajorVersion = "1"
AtmDriverMinorVersion = "20"
VendorNicParmList = {{Inf_EsiRequired, $(NoTitle), $(!REG_VT_SZ), "0"},+
{Inf_atmUniVersion, $(NoTitle), $(!REG_VT_SZ), "20"},+
{Inf_numEndpoints, $(NoTitle), $(!REG_VT_SZ), "64"}}
VendorLaneParmList = {{524323, $(NoTitle), $(!REG_VT_SZ), "vpi=8/vci=35/aal=5/encap=ethllcnfs/scat=ubr/pr=max"},+
{PVCList, $(NoTitle), $(!REG_VT_SZ), "524323"}}
VendorWaneParmList = {{dummy, $(NoTitle), $(!REG_VT_SZ), ""}}
;OEM_DEBUG = ON
[CopyFilesList_root]
1, "firmware.bin", DESTINATION=$(!STF_WINDOWSPATH)
1, "init.bin", DESTINATION=$(!STF_WINDOWSPATH)
; 1, "Amecsa.hlp", DESTINATION=$(!STF_WINDOWSSYSPATH)
; 1, "AmeCSA1.cpl", DESTINATION=$(!STF_WINDOWSSYSPATH)
1, "AmeCSARemove.exe", DESTINATION=$(!STF_WINDOWSSYSPATH)
1, "AmeLaunchUninst.exe", DESTINATION=$(!STF_WINDOWSSYSPATH)
[CopyFilesList_winnt]
1, $(DriverSysFile), DESTINATION=$(!STF_WINDOWSSYSPATH)"\drivers"
;==============================================================================
;
; NOTE TO NIC VENDORS:
; Do not modify this file below this point! It is not only hazardous to
; correct operation of WinATM Lite, but it could be a violation of our
; copyright. Please contact AdvanceNet Systems for more information,
;
;==============================================================================
[CopyFilesList_LANE]
1, "ame1483n.sys", DESTINATION=$(!STF_WINDOWSSYSPATH)"\drivers"
[CopyFilesList_WANE]
1, "amepppn.sys", DESTINATION=$(!STF_WINDOWSSYSPATH)"\drivers"
;// return codes used herein
; STATUS_SUCCESSFUL
; STATUS_FAILED
; STATUS_NOLANGUAGE
; STATUS_USERCANCEL
; STATUS_NOT_FOUND
; STATUS_REBOOT
[Identify]
set Status = STATUS_SUCCESSFUL
set identifier = NetAdapter
set media = #("Source Media Descriptions", 1, 1)
return $(Status) $(identifier) $(media)
[LanguagesSupported]
ENG
[ReturnOptions]
set LanguageList = ^(LanguagesSupported, 1)
ifcontains(i) $($0) in $(LanguageList)
set Status = STATUS_SUCCESSFUL
set OptionList = ^(Options, 1)
set OptionTextList = ^(OptionsText$($0), 1)
else
set Status = STATUS_NOLANGUAGE
set OptionList = {}
set OptionTextList = {}
endif
return $(Status) $(OptionList) $(OptionTextList)
[date]
Now = {} ? $(!LIBHANDLE) GetSystemDate
[CopyFiles_NIC]
set !STF_OVERWRITE = "OLDER"
CreateDir $(!STF_WINDOWSPATH)"\DSLMODEM"
;// dummy destination directory - superceeded by [CopyFilesList_xxx]
AddSectionFilesToCopyList CopyFilesList_root $(SourceDir) "."
AddSectionFilesToCopyList CopyFilesList_winnt $(SourceDir) "."
CopyFilesInCopyList
Exit
[CopyFiles_LANE]
set !STF_OVERWRITE = "OLDER"
;// dummy destination directory - superceeded by [CopyFilesList_xxx]
AddSectionFilesToCopyList CopyFilesList_LANE $(SourceDir) "."
CopyFilesInCopyList
Exit
[CopyFiles_WANE]
set !STF_OVERWRITE = "OLDER"
;// dummy destination directory - superceeded by [CopyFilesList_xxx]
AddSectionFilesToCopyList CopyFilesList_WANE $(SourceDir) "."
CopyFilesInCopyList
Exit
[Source Media Descriptions]
1 = "<WipDeviceDesc> Setup Disk #1", TAGFILE = winatm.001
[AtmNicSymbols]
Manufacturer = $(NicManufacturer)
ProductName = "WinATM_"$(NicProductName)
DriverSysFile = $(AtmDriver)
MajorVer = $(AtmDriverMajorVersion)
MinorVer = $(AtmDriverMinorVersion)
AdapterTitle = $(NicProductFullName)" ATM/ADSL Adapter"
AdapterDesc = $(Manufacturer)" "$(AdapterTitle)
DriverTitle = $(NicProductFullName)" ATM/ADSL Transport/Driver"
DriverDesc = "Driver and transport protocol for "$(AdapterDesc)
AdapterServiceBase = "WinATM_dev"
UpperClass = "WinATM_Transport"
AdapterBindformSuffix = " yes yes simple"
DriverBindformSuffix = " yes yes simple"
DriverSoftwareTypeDef = "transport"
DriverUseDef = ""
VendorParmList = $(VendorNicParmList)
AdvanceNetParmList = {{Inf_InstallState, $(NoTitle), $(!REG_VT_SZ), "0"},+
{Inf_atmUniVersion, $(NoTitle), $(!REG_VT_SZ), "20"},+
{Inf_numEndpoints, $(NoTitle), $(!REG_VT_SZ), "64"}}
[LaneSymbols]
Manufacturer = $(AdvanceNet)
ProductName = "WinATM_LANE"
DriverSysFile = "ame1483n.sys"
MajorVer = "1"
MinorVer = "20"
AdapterTitle = "RFC1483 LAN Services"
AdapterDesc = $(AdvanceNet)" "$(AdapterTitle)
DriverTitle = $(AdapterTitle)" Driver"
DriverDesc = "Driver for "$(AdapterDesc)
AdapterServiceBase = "WinATM_dev"
UpperClass = "ndisDriver"
AdapterBindformSuffix = " yes yes container"
DriverBindformSuffix = " yes no container"
DriverSoftwareTypeDef = "driver"
DriverUseDef = "driver"
VendorParmList = $(VendorLaneParmList)
AdvanceNetParmList = {{dummy,$(NoTitle),$(!REG_VT_SZ),""}}
[WaneSymbols]
Manufacturer = $(AdvanceNet)
ProductName = "WATM_PPP"
DriverSysFile = "amepppn.sys"
MajorVer = "1"
MinorVer = "20"
AdapterTitle = "Remote PPP over ATM Services"
AdapterDesc = $(Manufacturer)" "$(AdapterTitle)
DriverTitle = $(AdapterTitle)" Driver"
DriverDesc = "Driver for "$(AdapterDesc)
AdapterServiceBase = $(ProductName) ;; required because of bug in ndiswan.sys bind parameters
UpperClass = ""
AdapterBindformSuffix = " yes yes container"
DriverBindformSuffix = " yes no container"
DriverSoftwareTypeDef = "driver"
DriverUseDef = "driver"
VendorParmList = $(VendorWaneParmList)
AdvanceNetParmList = {{dummy,$(NoTitle),$(!REG_VT_SZ),""}}
[CommonSymbols]
InterfaceProductName = "WinATM"
DriverImage = "\SystemRoot\System32\drivers\"$(DriverSysFile)
NicDriverService = "WinATM_"$(NicProductName)
LaneDriverService = "WinATM_LANE"
WaneDriverService = "WATM_PPP"
DriverService = $(ProductName)
DriverService2 = """"$(DriverService)""""
InterfaceService = "WinATM_Interface"
InterfaceService2 = """"$(InterfaceService)""""
AdapterClass = $(ProductName)"_Adapter"
DriverClass = $(ProductName)"_Driver"
AdapterTypeDef = $(ProductName)" "$(AdapterClass)
AdapterClassDef = {$(AdapterClass)" basic"}
DriverTypeDef = $(ProductName)"_Sys "$(UpperClass)" "$(DriverClass)
DriverClassDef = {$(DriverClass)" basic"}
DriverBindableDef = {$(DriverClass)" "$(AdapterClass)" non exclusive 100"}
InterfaceTypeDef = "WinATM WinATM_Interface"
InterfaceClassDef = {"WinATM_Interface basic", "WinATM_Transport basic"}
InterfaceBindableDef = {"WinATM_Interface WinATM_Transport non exclusive 100"}
InterfaceBindformSuffix = " yes yes simple"
ProductKeyName = "SOFTWARE\"$(Manufacturer)"\"$(ProductName)"\CurrentVersion"
InterfaceKeyName = "SOFTWARE\"$(AdvanceNet)"\"$(InterfaceProductName)"\CurrentVersion"
ServicesRoot = "SYSTEM\CurrentControlSet\Services\"
KeyNull = ""
KeyWinATMService = $(KeyNull)
KeyWinATMLinkage = $(KeyNull)
KeyProduct = $(KeyNull)
KeyDependentService = $(KeyNull)
KeyLaneService = $(KeyNull)
KeyWaneService = $(KeyNull)
SoftProductKey = $(KeyNull)
SoftNetRuleKey = $(KeyNull)
SoftServiceKey = $(KeyNull)
SoftParameterKey = $(KeyNull)
SoftLinkageKey = $(KeyNull)
KeyNetcard = $(KeyNull)
KeyAdapterRules = $(KeyNull)
KeyParameters = $(KeyNull)
KeyTapiDevice = $(KeyNull)
KeySoftwareWindows = $(KeyNull)
; 20011029 used to tweak the TCP/IP window size in the registry
KeyTcpIpParameters = $(KeyNull)
FlagAbandonAdapter = FALSE
FlagAbandonDriver = FALSE
FlagAbandonInterface = FALSE
AbandonedOption = ""
ProCaption = $(AdapterTitle)" Setup"
ProText1 = "Copying:"
ProText2 = "To:"
ProCancel = "Cancel"
ProCancelCap = $(AdapterTitle)" Setup Message"
ProCancelMsg = $(AdapterTitle)" is not completely installed. Are you sure you want "+
"to cancel copying files?"
[StringsENG]
StringInstallAtmFirst = "An ATM/ADSL adapter must first be installed on your system."
StringDoBind = "No ATM/ADSL adapter device is bound in the Windows NT network model. If you recently installed an ATM adapter, then select the 'Bindings' button or tab of the control panel networking applet to correct this problem. After doing that, please retry adding RFC1483 LAN or Remote PPP Services."
StringInstallNext = "TIP: After the ATM/ADSL adapter is bound, install RFC1483 LAN or Remote PPP Services (using 'Add Adapter') to use your existing networking protocols with ATM."
StringConfirmAtmRemoval = "You are attempting to remove an ATM/ADSL adapter while at least one instance of RFC1483 LAN or Remote PPP Services exists on your system. Any instance of RFC1483 LAN or Remote PPP Services that depends on the ATM/ADSL adapter being removed will become inoperable. Do you wish to continue with this removal?"
StringReboot1 = "Please reboot your system - Windows NT networking control panel has become confused because you just deleted the adapter that you are now attempting to add."
StringInstallRAS = "If you have not already done so, install Microsoft's Remote Access Services (using 'Add Software' or 'Add Services') before rebooting your system."
StringConfigRAS = "Also, you must configure Remote Access Services to add 'WATM_PPP' as a port device before rebooting your system."
;==============================================================================
;
; This is the main entry point for Install, Remove, and Config operations.
;
;==============================================================================
[InstallOption]
set OEM_DEBUG = OFF ; set to either ON or OFF
;
;// this section is called with the following input parameters:
; $0 = Language to use (such as "ENG")
; $1 = OptionID to install
; $2 = SourceDirectory
; $3 = AddCopy (YES | NO)
; $4 = DoCopy (YES | NO)
; $5 = DoConfig (YES | NO)
;
;// this section is called with the following globals already initialized:
; !STF_WINDOWSPATH = Windows Nt Directory
; !STF_WINDOWSSYSPATH = Windows NT System32 Directory
; STF_CONTEXTINFNAME = path and filename of this INF file
; !NTN_InstallMode = user action: "install", "deinstall", "configure", or "update"
; !NTN_RegBase = the registry key name for this product
set Option = $($1)
set SourceDir = $($2)
set DoCopy = $($4)
Split-String $(STF_CONTEXTINFNAME) "\" inftoks
QueryListSize numtoks $(inftoks)
set thisInf = *($(inftoks),$(numtoks))
; build local symbol table
set Status = STATUS_FAILED
set AdvanceNet = "AdvanceNet"
Read-Syms VendorSpecs
ifstr $(Option) == "LANE"
Read-Syms LaneSymbols
else
ifstr $(Option) == "PPP"
Read-Syms WaneSymbols
else
Read-Syms AtmNicSymbols
endif
endif
Read-Syms CommonSymbols
Read-Syms StringsENG
; we will need access to the WinATM_Interface key
OpenRegKey $(!REG_H_LOCAL) "" $(ServicesRoot)"WinATM_Interface" $(!REG_KEY_ALL_ACCESS) KeyWinATMService
ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" +
"Option="$(Option)" SourceDir="$(SourceDir)" DoCopy="$(DoCopy)$(!LF)+
"thisInf="$(thisInf)" NTN_InstallMode="$(!NTN_InstallMode)$(!LF)+
"NTN_RegBase="$(!NTN_RegBase)
endif
ifstr $(!NTN_InstallMode) == "install"
;=======================================================================
;
; Perform Install operation
;
;=======================================================================
detect date
; copy files
; removed for NT4.0 bug - ifstr(i) $(DoCopy) == "YES"
ifstr $(Option) == "LANE"
install "CopyFiles_LANE"
else
ifstr $(Option) == "PPP"
install "CopyFiles_WANE"
else
install "CopyFiles_NIC"
endif
endif
ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
Shell "utility.inf" RegistryErrorString "UNABLE_COPY_FILE"
Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "FATAL", $($R0)
set Status = STATUS_FAILED
goto end
endif
; removed for NT4.0 bug - endif
; NOTE: if NIC is being installed, then we jump from here to install_interface
ifstr $(Option) != "LANE"
ifstr $(Option) != "PPP"
goto install_interface
endif
endif
; if lane or wane is being installed, make sure there is a bound ATM adapter already installed.
ifstr $(KeyWinATMService) == $(KeyNull)
shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "FATAL", $(StringInstallAtmFirst)
set Status = STATUS_FAILED
goto end
endif
OpenRegKey $(KeyWinATMService) "" "Linkage" $(!REG_KEY_ALL_ACCESS) KeyWinATMLinkage
GetRegValue $(KeyWinATMLinkage) "Bind" BindListInfo
set BindList = *($(BindListInfo), 4)
set DefaultAtmDevice = *($(BindList), 1)
ifstr $(DefaultAtmDevice) == ""
shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "FATAL", $(StringDoBind)
set Status = STATUS_FAILED
goto end
endif
set AtmDeviceParm = {{devName,$(NoTitle),$(!REG_VT_SZ),$(DefaultAtmDevice)}}
goto install_driver
install_interface = +
; check if WinATM interface is already installed on system
Ifstr $(KeyWinATMService) != $(KeyNull)
goto install_driver
endif
; add software registry keys
set FlagAbandonInterface = TRUE
Shell "utility.inf", AddSoftwareComponent, +
$(AdvanceNet), $(InterfaceProductName), $(InterfaceService), +
$(InterfaceProductName), $(thisInf), +
"NULL", "kernel", "", {}, ""
set SoftProductKey = $($R1)
set SoftNetRuleKey = $($R2)
set SoftServiceKey = $($R3)
set SoftParameterKey = $($R4)
set SoftLinkageKey = $($R5)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add required registry values to the current version key
set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),"service"},+
{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),"0"},+
{MinorVersion,$(NoTitle),$(!REG_VT_DWORD),"0"},+
{Title,$(NoTitle),$(!REG_VT_SZ),"WinATM Interface"},+
{Description,$(NoTitle),$(!REG_VT_SZ),"Interface for WinATM"},+
{hidden,$(NoTitle),$(!REG_VT_DWORD),1},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
Shell "utility.inf", AddValueList, $(SoftProductKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add required registry values to the NetRules key
set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(InterfaceTypeDef)},+
{class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(InterfaceClassDef)}, +
{bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(InterfaceBindableDef)}, +
{bindform,$(NoTitle),$(!REG_VT_SZ),$(InterfaceService2)$(InterfaceBindformSuffix)}, +
{use,$(NoTitle),$(!REG_VT_SZ),"service"}}
Shell "utility.inf", AddValueList, $(SoftNetRuleKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
CloseRegKey $(SoftProductKey)
CloseRegKey $(SoftNetRuleKey)
CloseRegKey $(SoftServiceKey)
CloseRegKey $(SoftParameterKey)
CloseRegKey $(SoftLinkageKey)
set SoftProductKey = $(KeyNull)
set SoftNetRuleKey = $(KeyNull)
set SoftServiceKey = $(KeyNull)
set SoftParameterKey = $(KeyNull)
set SoftLinkageKey = $(KeyNull)
install_driver = +
; check if this driver already installed on system
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_ALL_ACCESS) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
goto install_adapter
endif
; add software registry keys
set FlagAbandonDriver = TRUE
Shell "utility.inf", AddSoftwareComponent, +
$(Manufacturer), $(ProductName), $(DriverService), +
$(ProductName), $(thisInf), +
$(DriverImage), "kernelautostart"
set SoftProductKey = $($R1)
set SoftNetRuleKey = $($R2)
set SoftServiceKey = $($R3)
set SoftParameterKey = $($R4)
set SoftLinkageKey = $($R5)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) == SERVICE_ALREADY_EXISTS
shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "FATAL", $(StringReboot1)
set Status = STATUS_FAILED
goto abandon_installed_components
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add required registry values to the current version key
set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(DriverSoftwareTypeDef)},+
{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(MajorVer)},+
{MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(MinorVer)},+
{Title,$(NoTitle),$(!REG_VT_SZ),$(DriverTitle)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(DriverDesc)},+
{hidden,$(NoTitle),$(!REG_VT_DWORD),1},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
Shell "utility.inf", AddValueList, $(SoftProductKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add required registry values to the NetRules key
set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(DriverTypeDef)},+
{class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(DriverClassDef)}, +
{bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(DriverBindableDef)}, +
{bindform,$(NoTitle),$(!REG_VT_SZ),$(DriverService2)$(DriverBindformSuffix)}, +
{use,$(NoTitle),$(!REG_VT_SZ),$(DriverUseDef)}, +
{InfName,$(NoTitle),$(!REG_VT_SZ),$(thisInf)}, +
{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
Shell "utility.inf", AddValueList, $(SoftNetRuleKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; if lane or wane is being installed, additional registry entries must be set here.
; NOTE: if NIC is being installed, we jump from here to install_adapter
ifstr $(Option) != "LANE"
ifstr $(Option) != "PPP"
goto install_adapter
endif
endif
; for lane or wane, set additional registry entries
; add the group to the service key
set NewValueList = {{Group,$(NoTitle),$(!REG_VT_SZ),"NDIS"}}
shell "utility.inf", AddValueList, $(SoftServiceKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add the OtherDependencies values to the linkage key
set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(NicDriverService)}}}
shell "utility.inf", AddValueList, $(SoftLinkageKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; 20011029 tweak the TCP/IP window size in the registry
OpenRegKey $(!REG_H_LOCAL) "" $(ServicesRoot)"Tcpip\Parameters" $(!REG_KEY_ALL_ACCESS) KeyTcpIpParameters
Ifstr $(KeyTcpIpParameters) == $(KeyNull)
goto fatal_registry_error
endif
set NewValueList = {{TcpWindowSize,$(NoTitle),$(!REG_VT_DWORD),65535}}
Shell "utility.inf", AddValueList, $(KeyTcpIpParameters), $(NewValueList)
CloseRegKey $(KeyTcpIpParameters)
install_adapter = +
; call utility to install hardware device.
set FlagAbandonAdapter = TRUE
Shell "utility.inf", AddHardwareComponent, $(AdapterServiceBase), $(thisInf), $(ProductKeyName)
set KeyNetcard = $($R1)
set KeyAdapterRules = $($R2)
set KeyParameters = $($R3)
set AdapterNumber = $($R4)
set NicService = $($R5)
ifint $(AdapterNumber) != -1
set AbandonedOption = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(AdapterNumber)
endif
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add required registry values to the adapter key
set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
{Title,$(NoTitle),$(!REG_VT_SZ),"["$(AdapterNumber)"] "$(AdapterTitle)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(AdapterDesc)},+
{ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductName)},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
Shell "utility.inf", AddValueList, $(KeyNetcard), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add required registry values to the adapter NetRules key
set NicService2 = """"$(NicService)""""
set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(AdapterTypeDef)},+
{class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(AdapterClassDef)}, +
{bindform,$(NoTitle),$(!REG_VT_SZ),$(NicService2)$(AdapterBindformSuffix)}, +
{InfName,$(NoTitle),$(!REG_VT_SZ),$(thisInf)}, +
{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
Shell "utility.inf", AddValueList, $(KeyAdapterRules), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add AdvanceNet's parameters to the adapter parameters key
Shell "utility.inf", AddValueList, $(KeyParameters), $(AdvanceNetParmList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add vendor's parameters to the adapter parameters key
Shell "utility.inf", AddValueList, $(KeyParameters), $(VendorParmList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; add needed registry values to the Windows "RUN" and "RUNONCE" keys for the user GUI
OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" $(!REG_KEY_ALL_ACCESS) KeySoftwareWindows
SetRegValue $(KeySoftwareWindows) {AMEADMON,$(NoTitle),$(!REG_VT_SZ),"regsvr32 -s admon32.dll"}
CloseRegKey $(KeySoftwareWindows)
ifint $(RegLastError) != 0
goto ShellCodeError
endif
OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" $(!REG_KEY_ALL_ACCESS) KeySoftwareWindows
SetRegValue $(KeySoftwareWindows) {AME_CSA,$(NoTitle),$(!REG_VT_SZ),"rundll32 amecsa.cpl,RUN_DLL"}
CloseRegKey $(KeySoftwareWindows)
ifint $(RegLastError) != 0
goto ShellCodeError
endif
; if NIC is being installed, put up msgs for user
; NOTE: if NIC is being installed, then we jump from here to install_cleanup
ifstr $(Option) != "LANE"
ifstr $(Option) != "PPP"
;shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "STATUS", $(StringInstallNext)
goto install_cleanup
endif
endif
; if lane or wane is being installed, set devName in adapter parameters key.
Shell "utility.inf", AddValueList, $(KeyParameters), $(AtmDeviceParm)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; if wane is being installed, take care of TAPI stuff.
ifstr $(Option) == "PPP"
; add required registry values to the adapter's parameter key
set NewValueList = {{NtAdapterNumber,$(NoTitle),$(!REG_VT_SZ),$(AdapterNumber)}}
Shell "utility.inf", AddValueList, $(KeyParameters), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
; create the HARDWARE\DEVICEMAP\TAPI DEVICES\WATM_PPP key
Shell "" OpenTapiKeyHW $(ProductName)
set KeyTapiDevice = $($R0)
ifstr $(KeyTapiDevice) == $(KeyNull)
set RegistryErrorIndex = UNABLE_OPEN_HARDWARE_SECTION
goto fatal_registry_error
endif
set TapiAddress = {$(AdapterNumber)" 1 0", $(AdapterNumber)" 2 0", $(AdapterNumber)" 3 0",+
$(AdapterNumber)" 4 0", $(AdapterNumber)" 5 0", $(AdapterNumber)" 6 0",+
$(AdapterNumber)" 7 0", $(AdapterNumber)" 8 0", $(AdapterNumber)" 9 0"}
set NewValueList = {{Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddress)},+
{"Media Type",$(NoTitle),$(!REG_VT_SZ),"ISDN"}}
Shell "utility.inf", AddValueList, $(KeyTapiDevice), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr $($R0) != NO_ERROR
set RegistryErrorIndex = $($R0)
goto fatal_registry_error
endif
;Shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "STATUS", $(StringInstallRAS)
;Shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "STATUS", $(StringConfigRAS)
endif
install_cleanup = +
set Status = STATUS_SUCCESSFUL
goto end ; successful exit from install operation
endif ; end of install operation
ifstr $(!NTN_InstallMode) == "deinstall"
;=======================================================================
;
; Perform Removal operation
;
;=======================================================================
; warn user if NIC is being removed while lane or wane instances exist
ifstr $(Option) != "LANE"
ifstr $(Option) != "PPP"
OpenRegKey $(!REG_H_LOCAL) "" $(ServicesRoot)$(LaneDriverService) $(!REG_KEY_ALL_ACCESS) KeyLaneService
OpenRegKey $(!REG_H_LOCAL) "" $(ServicesRoot)$(WaneDriverService) $(!REG_KEY_ALL_ACCESS) KeyWaneService
ifstr $(KeyLaneService) != $(KeyNull)
shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "WARNING", $(StringConfirmAtmRemoval)
ifstr(i) $($R1) == "OK"
goto remove_adapter
endif
set Status = STATUS_USERCANCEL
goto end
endif
ifstr $(KeyWaneService) != $(KeyNull)
shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "WARNING", $(StringConfirmAtmRemoval)
ifstr(i) $($R1) == "OK"
goto remove_adapter
endif
set Status = STATUS_USERCANCEL
goto end
endif
endif
endif
remove_adapter = +
ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" "ProductName = "$(ProductName)
endif
; ------------------------------added by Syed - Start------------------------------------------
; This code section is added to get the proper netcard name; it is to be noted that
; the uninstallation starts with the network card name found under
; HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards key and is given as a number
; This key looks like:
; HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\n where n= 1,2,..k is the
; network card name. We don't know of any upper limits for k. See below in netcard enumeration
; the potential pitfall in having an arbitrary number for k
;----------------------------------------------------------------------------------------------
ifstr $(!NTN_RegBase) == $(KeyNull)
; $(!NTN_RegBase) variable is properly initialized while uninstalling manually from the
; control panel (using the Network Control Panel Applet - NCPA) with the network card key
; name that was described earlier. However, the $(!NTN_RegBase) is not initialized during
; invocation from the command line by using setup.exe. In this case the script will fail to
; uninstall the network driver. To avoid this kludge, we open the NetworkCards key and
; enumerate the network cards one by one and if the product name inside the network card key
; matches one of our product names viz., WinATM_LANE or WATM_PPP we use the network card
; name to initialize $(!NTN_RegBase) variable
ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" "NTN_RegBase is Null"
endif
; Note that the first adapter number is 1 and not 0
set AA_AdapterNumber = 1
; Initialize the NetworkCard base key which we know of
set NetworkCardKeyName = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards"
; Some other variables we need along the way
set AA_KeyNetCards = ""
set AA_KeyTemp = ""
set AA_Zero_KeyTemp = ""
set AA_ProductName = ""
set Tmp_Zero_AdapterNumber = 0
; Open the registry key we need to open
OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(!REG_KEY_ALL_ACCESS) AA_KeyNetCards
Ifstr $(AA_KeyNetCards) == $(KeyNull)
shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "FATAL", "Unable to open Registry Key"
set Status = STATUS_FAILED
goto end
endif
AA_NextIter = +
; We have assumed here that there can be about 20 network cards in the system and here is
; a potential pitfall. It would be better to find out how many cards there are configured
; in the system and iterate through them
ifint $(AA_AdapterNumber) < 20
set Tmp_Zero_AdapterNumber = $(AA_AdapterNumber)
OpenRegKey $(AA_KeyNetCards) "" $(Tmp_Zero_AdapterNumber) $(!REG_KEY_ALL_ACCESS) AA_Zero_KeyTemp
ifstr(i) $(AA_Zero_KeyTemp) != ""
Ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf",SetupMessage, $(!STF_LANGUAGE), "STATUS","AA_Zero_KeyTemp is not null for"$(Tmp_Zero_AdapterNumber)
endif
CloseRegKey $(AA_Zero_KeyTemp)
set Tmp_AA_AdapterNumber = $(AA_AdapterNumber)
OpenRegKey $(AA_KeyNetCards) "" $(Tmp_AA_AdapterNumber) $(!REG_KEY_ALL_ACCESS) AA_KeyTemp
Ifstr $(AA_KeyTemp) != $(KeyNull)
Ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf",SetupMessage, $(!STF_LANGUAGE), "STATUS","AA_KeyTemp is not null"
endif
; Get the value in the ProductName key
GetRegValue $(AA_KeyTemp) "ProductName" NetworkCardInfoList
set AA_ProductName = *($(NetworkCardInfoList),4)
Ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf",SetupMessage, $(!STF_LANGUAGE), "STATUS","AA_ProductName is :"$(AA_ProductName)
endif
; Compare the ProductName we obtained by enumerating the registry with the ProductName
; obtained from the user's choice given by the command line
Ifstr $(AA_ProductName) == $(ProductName)
; The ProductNames are the same, set $(!NTN_RegBase) to the proper network card name
; with the full path
set !NTN_RegBase = $(NetworkCardKeyName)"\"$(Tmp_AA_AdapterNumber)
Ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf",SetupMessage, $(!STF_LANGUAGE), "STATUS","NTN_RegBase = "$(!NTN_RegBase)
endif
CloseRegKey $(AA_KeyTemp)
; Now we have $(!NTN_RegBase) properly initialized we can safely remove the
; network card
goto AA_RemoveHardwareComponent
endif
; reset AA_KeyTemp
Set AA_KeyTemp = $(KeyNull)
; Increment the adapter number count by 1
Set-add AA_AdapterNumber = $(AA_AdapterNumber),1
; do the whole thing for the next network card
goto AA_NextIter
endif
endif
Ifstr $(OEM_DEBUG) == ON
ifstr $(!NTN_RegBase) != $(KeyNull)
shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS", "NTN_RegBase is not Null"
endif
endif
AA_RemoveHardwareComponent = +
;-------------------------------- Added by Syed - Finish----------------------------------------------------------
Ifstr $(OEM_DEBUG) == ON
Shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" "NTN_RegBase after enum = "$(!NTN_RegBase)
endif
Shell "utility.inf", RemoveHardwareComponent, $(Manufacturer), $(ProductName), $(!NTN_RegBase)
; if adapter's driver was removed, then remove the driver's service key
set DriverRemoved = "NO"
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!REG_KEY_ALL_ACCESS) KeyProduct
ifstr $(KeyProduct) == $(KeyNull)
set DriverRemoved = "YES"
DeleteRegTree $(!REG_H_LOCAL) $(ServicesRoot)$(DriverService)
endif
ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" "DriverRemoved = "$(DriverRemoved)
endif
ifstr $(Option) == "LANE"
goto remove_cleanup
endif
ifstr $(Option) == "PPP"
goto remove_cleanup
endif
; determine if this was the last ATM adapter in system and branch appropriately
ifstr $(DriverRemoved) == "YES"
GetRegValue $(KeyWinATMService) "DependOnService" ServiceListInfo
set ServiceList = *($(ServiceListInfo), 4)
set DependencyExists = "NO"
ForListDo ServiceList
set DependentService = $($)
OpenRegKey $(!REG_H_LOCAL) "" $(ServicesRoot)$(DependentService) $(!REG_KEY_ALL_ACCESS) KeyDependentService
ifstr $(KeyDependentService) != $(KeyNull)
set DependencyExists = "YES"
endif
CloseRegKey $(KeyDependentService)
set KeyDependentService = $(KeyNull)
EndForListDo
ifstr $(DependencyExists) == "YES"
goto remove_cleanup
endif
endif
; remove needed registry values from the Windows "RUN" key for the user GUI
OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" $(!REG_KEY_ALL_ACCESS) KeySoftwareWindows
DeleteRegValue $(KeySoftwareWindows) "AME_CSA"
CloseRegKey $(KeySoftwareWindows)
remove_interface = +
shell "utility.inf", RemoveService, $(InterfaceService), "YES"
shell "utility.inf", RemoveSoftwareComponent, $(AdvanceNet), $(InterfaceProductName), FALSE
remove_cleanup = +
set Status = STATUS_SUCCESSFUL
goto end ; successful exit from deinstall operation
endif ; end of removal operation
;==========================================================================
;
; Punt on Configure and Update operations
;
;==========================================================================
ifstr $(!NTN_InstallMode) == "configure"
; shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "STATUS", $(StringUseAtmControl)
set Status = STATUS_USERCANCEL
goto end
endif
ifstr $(!NTN_InstallMode) == "update"
; shell "subroutn.inf", SetupMessage, $(!STF_LANGUAGE), "STATUS", $(StringUseAtmControl)
set Status = STATUS_USERCANCEL
goto end
endif
; if we get to here, then we were passed an invalid operation code
set Status = STATUS_FAILED
end = +
FlushRegKey $(!REG_H_LOCAL)
ifstr $(KeyWinATMService) != $(KeyNull)
CloseRegKey $(KeyWinATMService)
endif
ifstr $(KeyWinATMLinkage) != $(KeyNull)
CloseRegKey $(KeyWinATMLinkage)
endif
ifstr $(KeyProduct) != $(KeyNull)
CloseRegKey $(KeyProduct)
endif
ifstr $(KeyDependentService) != $(KeyNull)
CloseRegKey $(KeyDependentService)
endif
ifstr $(KeyLaneService) != $(KeyNull)
CloseRegKey $(KeyLaneService)
endif
ifstr $(KeyWaneService) != $(KeyNull)
CloseRegKey $(KeyWaneService)
endif
ifstr $(SoftProductKey) != $(KeyNull)
CloseRegKey $(SoftProductKey)
endif
ifstr $(SoftNetRuleKey) != $(KeyNull)
CloseRegKey $(SoftNetRuleKey)
endif
ifstr $(SoftServiceKey) != $(KeyNull)
CloseRegKey $(SoftServiceKey)
endif
ifstr $(SoftParameterKey) != $(KeyNull)
CloseRegKey $(SoftParameterKey)
endif
ifstr $(SoftLinkageKey) != $(KeyNull)
CloseRegKey $(SoftLinkageKey)
endif
ifstr $(KeyNetcard) != $(KeyNull)
CloseRegKey $(KeyNetcard)
endif
ifstr $(KeyAdapterRules) != $(KeyNull)
CloseRegKey $(KeyAdapterRules)
endif
ifstr $(KeyParameters) != $(KeyNull)
CloseRegKey $(KeyParameters)
endif
ifstr $(KeyTapiDevice) != $(KeyNull)
CloseRegKey $(KeyTapiDevice)
endif
;* the following KLUDGE prevents an NCPA applet runtime error. *
;
; When an unsuccessful return code is passed back to NCPA after
; a deinstall, NCPA dies. -- 7/96
;
ifstr $(!NTN_InstallMode) == "deinstall"
set Status = STATUS_SUCCESSFUL
endif ; end of kludge
ifstr $(OEM_DEBUG) == ON
shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" "Returning: "$(Status)
endif
return $(Status)
exit
;==========================================================================
;
; miscellaneous support routines
;
;==========================================================================
ShellCodeError = +
set DlgType = "MessageBox"
ifstr(i) $(ShellCodeErrorTitle) == ""
set ShellCodeErrorTitle = "Setup Shell Error"
endif
ifstr(i) $(ShellCodeErrorText) == ""
set ShellCodeErrorText = "Error while processing INF file"
endif
set STF_MB_TITLE = $(ShellCodeErrorTitle)
set STF_MB_TEXT = $(ShellCodeErrorText)
set STF_MB_TYPE = 1
set STF_MB_ICON = 3
set STF_MB_DEF = 1
ui start "Error Message"
set Status = STATUS_FAILED
goto abandon_installed_components
;********************
fatal_registry_error = +
Shell "utility.inf" RegistryErrorString $(RegistryErrorIndex)
Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "FATAL", $($R0)
set Status = STATUS_FAILED
goto abandon_installed_components
;********************
abandon_installed_components = +
Ifstr(i) $(FlagAbandonAdapter) == TRUE
Shell "utility.inf", RemoveHardwareComponent, $(Manufacturer), $(ProductName), $(AbandonedOption)
endif
Ifstr(i) $(FlagAbandonDriver) == TRUE
shell "utility.inf", RemoveSoftwareComponent, $(Manufacturer), $(ProductName), FALSE
shell "utility.inf", RemoveService, $(DriverService), "YES"
endif
Ifstr(i) $(FlagAbandonInterface) == TRUE
shell "utility.inf", RemoveSoftwareComponent, $(AdvanceNet), $(InterfaceProductName), FALSE
shell "utility.inf", RemoveService, $(InterfaceService), "YES"
endif
goto end
;********************
[OpenTapiKeyHW]
set TapiDeviceName = $($0)
set KeyNull = ""
set KeyDeviceMap = $(KeyNull)
set KeyTapiDevices = $(KeyNull)
set KeyResults = $(KeyNull)
OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(!REG_KEY_ALL_ACCESS) KeyDeviceMap
ifStr $(KeyDeviceMap) == $(KeyNull)
Goto OpenTapiKey_cleanup
endif
OpenRegKey $(KeyDeviceMap) "" "TAPI DEVICES" $(!REG_KEY_ALL_ACCESS) KeyTapiDevices
ifStr $(KeyTapiDevices) == $(KeyNull)
CreateRegKey $(KeyDeviceMap) {"TAPI DEVICES", 0, GenericClass} "" $(!REG_KEY_SET_VALUE) "" KeyTapiDevices
ifStr $(KeyTapiDevices) == $(KeyNull)
Goto OpenTapiKey_cleanup
endif
endif
OpenRegKey $(KeyTapiDevices) "" $(TapiDeviceName) $(!REG_KEY_ALL_ACCESS) KeyResults
ifStr $(KeyResults) == $(KeyNull)
CreateRegKey $(KeyTapiDevices) {$(TapiDeviceName), 0, GenericClass} "" $(!REG_KEY_ALL_ACCESS) "" KeyResults
endif
OpenTapiKey_cleanup = +
ifstr $(KeyDeviceMap) != $(KeyNull)
CloseRegKey $(KeyDeviceMap)
endif
ifstr $(KeyTapiDevices) != $(KeyNull)
CloseRegKey $(KeyTapiDevices)
endif
Return $(KeyResults)
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.