1132 lines
42 KiB
INI
1132 lines
42 KiB
INI
[Identification]
|
|
OptionType = NetTransport
|
|
|
|
[LanguagesSupported]
|
|
ENG
|
|
|
|
[Options]
|
|
atmarpc
|
|
|
|
[OptionsTextENG]
|
|
atmarpc = "IP over ATM (RFC 1577) Client"
|
|
|
|
[FileConstants]
|
|
UtilityInf = "UTILITY.INF"
|
|
subroutineinf = "SUBROUTN.INF"
|
|
SoftwareType = "transport"
|
|
TSoftwareType = "driver"
|
|
Exit_Code = 0
|
|
NetEventDLL = "%SystemRoot%\System32\netevent.dll"
|
|
|
|
Manufacturer = "Microsoft"
|
|
ProductMajorVersion = "1"
|
|
ProductMinorVersion = "0"
|
|
ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
|
|
TProductMajorVersion = "1"
|
|
TProductMinorVersion = "0"
|
|
TProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
|
|
|
|
ProductSoftwareName = "atmarpc"
|
|
ProductSoftwareImagePath = "\SystemRoot\System32\drivers\atmarpc.sys"
|
|
TProductSoftwareName = "ipatmarp"
|
|
TProductSoftwareImagePath = "\SystemRoot\System32\drivers\ipatmarp.sys"
|
|
|
|
ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
|
|
TProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(TProductSoftwareName)"\CurrentVersion"
|
|
ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductSoftwareName)"\Parameters"
|
|
ServiceKeyName = $(!NTN_ServiceBase)"\"$(ProductSoftwareName)
|
|
TServiceKeyName = $(!NTN_ServiceBase)"\"$(TProductSoftwareName)
|
|
|
|
LinkageKeyName = $(!NTN_ServiceBase)"\"$(ProductSoftwareName)"\Linkage"
|
|
TLinkageKeyName = $(!NTN_ServiceBase)"\"$(TProductSoftwareName)"\Linkage"
|
|
|
|
ProductRegBase = "SOFTWARE\Microsoft\atmarpc\CurrentVersion"
|
|
TProductRegBase = "SOFTWARE\Microsoft\ipatmarp\CurrentVersion"
|
|
|
|
; type = Name,Class
|
|
NetRuleSoftwareType = "atmarpc ipatmclient"
|
|
TNetRuleSoftwareType = "ipatmarpsys atmvirtualdriver ipatmarpdriver"
|
|
|
|
; Class = new class name {existing class name | basic no|yes }
|
|
NetRuleSoftwareClass = {"ipatmclient basic"}
|
|
TNetRuleSoftwareClass = {"ipatmarpdriver basic", "atmvirtualdriver basic"}
|
|
|
|
; Use = Service | Transport | driver | adapter, yes|no, yes|no
|
|
NetRuleSoftwareUse = $(SoftwareType)" no yes"
|
|
TNetRuleSoftwareUse = $(TSoftwareType)
|
|
|
|
; BindForm = ObjectName yes|no yes|no container|simple|stream
|
|
|
|
NetRuleSoftwareBindForm = """atmarpc"" yes no container"
|
|
TNetRuleSoftwareBindForm = """ipatmarpsys"" yes no container"
|
|
|
|
TNetRuleSoftwareBindable = {"ipatmarpdriver AtmArpVirtualAdapter non exclusive 100",+
|
|
"tcpipTransport atmvirtualdriver non non 100",+
|
|
"netbtTransport atmvirtualdriver non non 100"}
|
|
|
|
TcpipLLInterface = "AtmArpC"
|
|
TpcipUseZeroBroadcast = 0
|
|
|
|
[HardwareConstants]
|
|
ProductHardwareName = "ipatmarp"
|
|
ProductHardwareTitle = "Virtual ATMARP Interface Adapter"
|
|
ProductHardwareDescription = "ATMARP Interface Adapter"
|
|
NetRuleHardwareType = "ipatmarp AtmArpVirtualAdapter"
|
|
NetRuleHardwareBindForm = " yes yes container"
|
|
NetRuleHardwareClass = {"AtmArpVirtualAdapter basic"}
|
|
|
|
|
|
[GeneralConstants]
|
|
from = ""
|
|
to = ""
|
|
ExitCodeOk = 0
|
|
ExitCodeCancel = 1
|
|
ExitCodeFatal = 2
|
|
KeyNull = ""
|
|
MAXIMUM_ALLOWED = 33554432
|
|
RegistryErrorIndex = NO_ERROR
|
|
KeyProduct = ""
|
|
KeyParameters = ""
|
|
TRUE = 1
|
|
FALSE = 0
|
|
NoTitle = 0
|
|
ExitState = "Active"
|
|
OldVersionExisted = $(FALSE)
|
|
DriverPath = $(!STF_NTPATH)\drivers
|
|
|
|
[date]
|
|
Now = {} ? $(!LIBHANDLE) GetSystemDate
|
|
|
|
[platform]
|
|
STF_PLATFORM = "" ? $(!LIBHANDLE) GetPlatform
|
|
|
|
[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)
|
|
goto returnoptions
|
|
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)
|
|
|
|
[InstallOption]
|
|
set !DebugOutputControl = 1
|
|
set Option = $($1)
|
|
set SrcDir = $($2)
|
|
set AddCopy = $($3)
|
|
set DoCopy = $($4)
|
|
set DoConfig = $($5)
|
|
Debug-Output "ATMARPC: NTN_REGBASE is "$(!NTN_RegBase)
|
|
Debug-Output "ATMARPC: Arg 1"$($1)
|
|
Debug-Output "ATMARPC: Arg 2"$($2)
|
|
Debug-Output "ATMARPC: Arg 3"$($3)
|
|
Debug-Output "ATMARPC: Arg 4"$($4)
|
|
Debug-Output "ATMARPC: Arg 5"$($5)
|
|
Debug-Output "ATMARPC: Arg 6"$($6)
|
|
set LanguageList = ^(LanguagesSupported, 1)
|
|
Ifcontains(i) $($0) NOT-IN $(LanguageList)
|
|
Return STATUS_NOLANGUAGE
|
|
endif
|
|
Debug-Output "ATMARPC: STF_CWDDIR is: "$(!STF_CWDDIR)
|
|
Debug-Output "ATMARPC: STF_LANGUAGE is: "$(!STF_LANGUAGE)
|
|
set-subst LF = "\n"
|
|
read-syms GeneralConstants
|
|
read-syms FileConstants
|
|
read-syms HardwareConstants
|
|
read-syms DialogConstants$(!STF_LANGUAGE)
|
|
ifstr(i) $(!NTN_Origination) == "NCPA"
|
|
set Continue = $(OK)
|
|
endif
|
|
read-syms FileConstants$(!STF_LANGUAGE)
|
|
detect date
|
|
detect platform
|
|
set-title $(FunctionTitle)
|
|
set to = Begin
|
|
set from = Begin
|
|
set CommonStatus = STATUS_SUCCESSFUL
|
|
EndWait
|
|
Begin = +
|
|
Debug-Output "ATMARPC: Install mode "$(!NTN_InstallMode)
|
|
Debug-Output "ATMARPC: Registry base "$(!NTN_RegBase)
|
|
|
|
Ifstr(i) $(!NTN_InstallMode) == deinstall
|
|
set StartLabel = removeadapter
|
|
else-Ifstr(i) $(!NTN_InstallMode) == Update
|
|
set StartLabel = UpgradeSoftware
|
|
else-Ifstr(i) $(!NTN_InstallMode) == bind
|
|
set StartLabel = bindingadapter
|
|
else-Ifstr(i) $(!NTN_InstallMode) == configure
|
|
; Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
|
|
; ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
; Debug-Output "ATMARPC: ShellCode error: cannot get an error string."
|
|
; goto ShellCodeError
|
|
; endif
|
|
; set Error = $($R0)
|
|
; set from = end
|
|
; set to = end
|
|
; goto nonfatalinfo
|
|
Goto successful
|
|
else
|
|
set StartLabel = installadapter
|
|
endif
|
|
set RadioDefault = 2
|
|
set RadioIn = {$(RadioDefault)}
|
|
set from = $(fatal)
|
|
set to = $(fatal)
|
|
goto $(StartLabel)
|
|
|
|
installadapter = +
|
|
Debug-Output "ATMARPC: Installadapter"
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
|
|
Ifstr $(KeyProduct) != $(KeyNull)
|
|
CloseRegKey $(KeyProduct)
|
|
Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
|
|
$(ProductVersion)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "ATMARPC: ShellCode error: cannot get an error string."
|
|
goto ShellCodeError
|
|
endif
|
|
goto end
|
|
endif
|
|
CloseRegKey $(KeyProduct)
|
|
goto installproduct
|
|
|
|
|
|
installproduct = +
|
|
StartWait
|
|
ifint $(OldVersionExisted) == $(FALSE)
|
|
Ifstr(i) $(DoCopy) == "YES"
|
|
Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
|
|
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Goto ShellCodeError
|
|
Else-Ifstr(i) $($R0) == STATUS_FAILED
|
|
Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto ShellCodeError
|
|
endif
|
|
Goto fatal
|
|
Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
|
|
Goto successful
|
|
Endif
|
|
Set SrcDir = $($R1)
|
|
Endif
|
|
Shell "" StripTrailSlash $(SrcDir)
|
|
set PlatformDir = $($R0)"\"$(STF_PLATFORM)
|
|
set InfDir = $($R0)"\"
|
|
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
|
|
set OEM_ABANDON_ON = TRUE
|
|
Debug-Output "ATMARPC: AddSoftwareing "$(ProductSoftwareName)" now"
|
|
Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
|
|
$(ProductSoftwareName), +
|
|
$(ProductSoftwareName), +
|
|
$(ProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +
|
|
$(ProductSoftwareImagePath), "kernel", "PNP_TDI", {}, "",+
|
|
$(NetEventDLL)
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
|
|
EndWait
|
|
CloseRegKey $($R1)
|
|
CloseRegKey $($R2)
|
|
CloseRegKey $($R3)
|
|
CloseRegKey $($R4)
|
|
CloseRegKey $($R5)
|
|
Debug-Output "ATMARPC: ** Failed to Add myself -- 1"
|
|
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)},+
|
|
{Review,$(NoTitle),$(!REG_VT_DWORD),1},+
|
|
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
|
|
Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr $(RegistryErrorIndex) != NO_ERROR
|
|
CloseRegKey $(SoftProductKey)
|
|
CloseRegKey $(SoftNetRuleKey)
|
|
CloseRegKey $(SoftServiceKey)
|
|
CloseRegKey $(SoftParameterKey)
|
|
CloseRegKey $(SoftLinkageKey)
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
; Setup the bindings net rules
|
|
|
|
set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)}, +
|
|
{use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
|
|
{class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
|
|
{bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
|
|
{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
|
|
Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
|
|
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr $(RegistryErrorIndex) != NO_ERROR
|
|
CloseRegKey $(SoftProductKey)
|
|
CloseRegKey $(SoftNetRuleKey)
|
|
CloseRegKey $(SoftServiceKey)
|
|
CloseRegKey $(SoftParameterKey)
|
|
CloseRegKey $(SoftLinkageKey)
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
CloseRegKey $(SoftProductKey)
|
|
CloseRegKey $(SoftNetRuleKey)
|
|
CloseRegKey $(SoftServiceKey)
|
|
CloseRegKey $(SoftParameterKey)
|
|
CloseRegKey $(SoftLinkageKey)
|
|
|
|
; Dummy driver now
|
|
set OEM_ABANDON_ON = TRUE
|
|
Debug-Output "ATMARPC: AddSoftwareing "$(TProductSoftwareName)" now"
|
|
Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
|
|
$(TProductSoftwareName), +
|
|
$(TProductSoftwareName), +
|
|
$(TProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +
|
|
$(TProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
|
|
$(NetEventDLL)
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
|
|
EndWait
|
|
Debug-Output "ATMARPC: ** Failed to Add myself -- 2"
|
|
goto fatalRegistry
|
|
endif
|
|
Set SoftProductKey = $($R1)
|
|
Set SoftNetRuleKey = $($R2)
|
|
Set SoftServiceKey = $($R3)
|
|
set SoftParameterKey = $($R4)
|
|
Set SoftLinkageKey = $($R5)
|
|
Debug-Output "ATMARPC: Bind: SoftProductKey is "$(SoftProductKey)
|
|
Debug-Output "ATMARPC: Bind: SoftNetRuleKey is "$(SoftNetRuleKey)
|
|
Debug-Output "ATMARPC: Bind: SoftServiceKey is "$(SoftServiceKey)
|
|
Debug-Output "ATMARPC: Bind: SoftParameterKey is "$(SoftParameterKey)
|
|
Debug-Output "ATMARPC: Bind: SoftLinkageKey is "$(SoftLinkageKey)
|
|
set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(TSoftwareType)},+
|
|
{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(TProductMajorVersion)},+
|
|
{MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(TProductMinorVersion)},+
|
|
{Title,$(NoTitle),$(!REG_VT_SZ),$(TProductSoftwareTitle)},+
|
|
{Description,$(NoTitle),$(!REG_VT_SZ),$(TProductSoftwareDescription)},+
|
|
{ServiceName,$(NoTitle),$(!REG_VT_SZ),$(TProductSoftwareName)},+
|
|
{Review,$(NoTitle),$(!REG_VT_DWORD),1},+
|
|
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
|
|
Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr $(RegistryErrorIndex) != NO_ERROR
|
|
CloseRegKey $(SoftProductKey)
|
|
CloseRegKey $(SoftNetRuleKey)
|
|
CloseRegKey $(SoftServiceKey)
|
|
CloseRegKey $(SoftParameterKey)
|
|
CloseRegKey $(SoftLinkageKey)
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
; Setup the bindings net rules
|
|
|
|
set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(TNetRuleSoftwareType)}, +
|
|
{use,$(NoTitle),$(!REG_VT_SZ),$(TNetRuleSoftwareUse)}, +
|
|
{class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TNetRuleSoftwareClass)}, +
|
|
{bindform,$(NoTitle),$(!REG_VT_SZ),$(TNetRuleSoftwareBindForm)}, +
|
|
{bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TNetRuleSoftwareBindable)}, +
|
|
{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
|
|
Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
|
|
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr $(RegistryErrorIndex) != NO_ERROR
|
|
Debug-Output "ATMARPC: failed to add netrules for dummy driver"
|
|
CloseRegKey $(SoftProductKey)
|
|
CloseRegKey $(SoftNetRuleKey)
|
|
CloseRegKey $(SoftServiceKey)
|
|
CloseRegKey $(SoftParameterKey)
|
|
CloseRegKey $(SoftLinkageKey)
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
|
|
CloseRegKey $(SoftProductKey)
|
|
CloseRegKey $(SoftNetRuleKey)
|
|
CloseRegKey $(SoftServiceKey)
|
|
CloseRegKey $(SoftParameterKey)
|
|
CloseRegKey $(SoftLinkageKey)
|
|
|
|
endif
|
|
goto successful
|
|
|
|
bindingadapter =+
|
|
|
|
; Trying to avoid "cannot start service" for dummy driver by setting its
|
|
; Start type to "Manual" rather than "Automatic"
|
|
;
|
|
Debug-Output "ATMARPC: Updating Start value to 3 for "$(TServiceKeyName)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(TServiceKeyName) $(MAXIMUM_ALLOWED) TServiceKey
|
|
ifstr(i) $(TServiceKey) != ""
|
|
set ModuleStartValue = 3
|
|
set NewValueList = {{Start,$(NoTitle),$(!REG_VT_DWORD),$(ModuleStartValue)}}
|
|
Shell $(UtilityInf), AddValueList, $(TServiceKey), $(NewValueList)
|
|
Debug-Output "Set start value to 3 under "$(TServiceKeyName)
|
|
CloseRegKey $(TServiceKey)
|
|
endif
|
|
|
|
|
|
ifstr(i) $(!NTN_RegBase) == $(ProductRegBase)
|
|
Debug-Output "ATMARPC: Binding Adapter, LinkageKeyName "$(LinkageKeyName)
|
|
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
|
|
ifstr(i) $(LinkageKey) != ""
|
|
GetRegValue $(LinkageKey) "Bind" BindList
|
|
Debug-Output "BindList: "$(BindList)
|
|
Set Binding = *($(BindList),4)
|
|
Debug-Output "Binding: "$(Binding)
|
|
CloseRegKey $(LinkageKey)
|
|
else
|
|
Debug-Output "failed to open linkage for adapter"
|
|
goto fatalregistry
|
|
endif
|
|
|
|
set CardList = {}
|
|
set CreateCardList = {}
|
|
ForListDo $(Binding)
|
|
Split-String $($), "\", BindInfo
|
|
QueryListSize BindListSize $(BindInfo)
|
|
set CardName = *($(BindInfo),$(BindListSize))
|
|
Debug-Output "Cardname: "$(CardName)
|
|
ifstr(i) $(CardList) == {}
|
|
set CardList = {$(CardName)}
|
|
else
|
|
set CardList = >($(CardList),$(CardName))
|
|
endif
|
|
EndForListDo
|
|
|
|
|
|
Set AddedNewVirtualAdapter = "No"
|
|
Debug-Output "Cardlist: "$(CardList)
|
|
ForListDo $(CardList)
|
|
;
|
|
; For each real adapter we are bound to, we create a Logical IP Subnet (LIS).
|
|
; As of now, we create exactly ONE LIS, LIS0. For each LIS created, we
|
|
; AddHardwareComponent a dummy adapter, which is bindable to TCP/IP etc.
|
|
;
|
|
Debug-Output "Will create LIS0 for "$($)
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\AtmArpC"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ArpParamsKey
|
|
ifstr(i) $(ArpParamsKey) == ""
|
|
Debug-Output "creating ArpParamsKey key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ArpParamsKey
|
|
else
|
|
Debug-Output "ATMARPC: Have processed "$($)" already"
|
|
CloseRegKey $(ArpParamsKey)
|
|
goto continueCardList
|
|
endif
|
|
ifstr(i) $(ArpParamsKey) == ""
|
|
Debug-Output "Failed to open/create the ArpParamsKey key under the adapter"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) LISKey
|
|
ifstr(i) $(LISKey) == ""
|
|
Debug-Output "creating LIS0 key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" LISKey
|
|
endif
|
|
|
|
set DefaultSapSelector = 1
|
|
set DefaultPVCOnly = 0
|
|
;
|
|
; All timeouts and intervals are in terms of seconds.
|
|
;
|
|
set DefaultServerConnectInterval = 5
|
|
set DefaultServerRegistrationTimeout = 3
|
|
set DefaultAddressResolutionTimeout = 3
|
|
set DefaultARPEntryAgingTimeout = 900
|
|
set DefaultInARPWaitTimeout = 5
|
|
set DefaultServerRefreshTimeout = 900
|
|
set DefaultMinWaitAfterNak = 10
|
|
set DefaultMaxRegistrationAttempts = 5
|
|
set DefaultMaxResolutionAttempts = 4
|
|
;
|
|
; Bandwidth is in bytes/sec
|
|
;
|
|
set DefaultSendBandwidth = 50000
|
|
set DefaultRecvBandwidth = 50000
|
|
set DefaultSendMaxSize = 65535
|
|
set DefaultRecvMaxSize = 65535
|
|
|
|
; Default MTU size, in bytes. This is what is reported to the IP layer.
|
|
; If this value isn't present, the ATMARP Client will use the value of
|
|
; Max AAL5 packet size supported by the miniport as the MTU.
|
|
set DefaultMTUSize = 9180
|
|
|
|
;
|
|
; FlowInfoEnabled is set to 1 if we want the ATMARP Client to look below the
|
|
; FlowInfo subkey for information about configured flows. If FlowInfoEnabled
|
|
; is set to 0, the client will ignore all configured flow info.
|
|
;
|
|
set DefaultFlowInfoEnabled = 0
|
|
|
|
set NewValueList = {{SapSelector,$(NoTitle),$(!REG_VT_DWORD),$(DefaultSapSelector)},+
|
|
{ServerConnectInterval,$(NoTitle),$(!REG_VT_DWORD),$(DefaultServerConnectInterval)},+
|
|
{ServerRegistrationTimeout,$(NoTitle),$(!REG_VT_DWORD),$(DefaultServerRegistrationTimeout)},+
|
|
{AddressResolutionTimeout,$(NoTitle),$(!REG_VT_DWORD),$(DefaultAddressResolutionTimeout)},+
|
|
{ARPEntryAgingTimeout,$(NoTitle),$(!REG_VT_DWORD),$(DefaultARPEntryAgingTimeout)},+
|
|
{InARPWaitTimeout,$(NoTitle),$(!REG_VT_DWORD),$(DefaultInARPWaitTimeout)},+
|
|
{ServerRefreshTimeout,$(NoTitle),$(!REG_VT_DWORD),$(DefaultServerRefreshTimeout)},+
|
|
{MinWaitAfterNak,$(NoTitle),$(!REG_VT_DWORD),$(DefaultMinWaitAfterNak)},+
|
|
{MaxRegistrationAttempts,$(NoTitle),$(!REG_VT_DWORD),$(DefaultMaxRegistrationAttempts)},+
|
|
{MaxResolutionAttempts,$(NoTitle),$(!REG_VT_DWORD),$(DefaultMaxResolutionAttempts)},+
|
|
{MTU,$(NoTitle),$(!REG_VT_DWORD),$(DefaultMTUSize)},+
|
|
{FlowInfoEnabled,$(NoTitle),$(!REG_VT_DWORD),$(DefaultFlowInfoEnabled)}}
|
|
Shell $(UtilityInf), AddValueList, $(LISKey), $(NewValueList)
|
|
|
|
;
|
|
; Now create the FlowInfo key. NOTE: To enable all the following, set
|
|
; FlowInfoEnabled, above, to 1.
|
|
;
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\FlowInfo"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) FlowInfoKey
|
|
ifstr(i) $(FlowInfoKey) == ""
|
|
Debug-Output "creating LIS0\FlowInfo key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" FlowInfoKey
|
|
endif
|
|
ifstr(i) $(FlowInfoKey) == ""
|
|
Debug-Output "Failed to create FlowInfo subkey"
|
|
goto fatalRegistry
|
|
endif
|
|
;
|
|
; Create High Bandwidth FlowInfo subkey
|
|
;
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\FlowInfo\HighBw"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) HighBwKey
|
|
ifstr(i) $(HighBwKey) == ""
|
|
Debug-Output "creating LIS0\FlowInfo\HighBw key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" HighBwKey
|
|
endif
|
|
ifstr(i) $(HighBwKey) == ""
|
|
Debug-Output "Failed to create HighBw subkey"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
;
|
|
; Fill in flow info values for High Bandwidth flows
|
|
;
|
|
|
|
Set DefaultHighBwPacketSizeLimit = 65536
|
|
Set DefaultHighBwSendBandwidth = 249984
|
|
Set DefaultHighBwRecvBandwidth = 249984
|
|
Set DefaultHighBwGuarantee = 3
|
|
Set DefaultHighBwVcAgingTime = 10
|
|
set NewValueList = {{PacketSizeLimit,$(NoTitle),$(!REG_VT_DWORD),$(DefaultHighBwPacketSizeLimit)},+
|
|
{SendBandwidth,$(NoTitle),$(!REG_VT_DWORD),$(DefaultHighBwSendBandwidth)},+
|
|
{ReceiveBandwidth,$(NoTitle),$(!REG_VT_DWORD),$(DefaultHighBwRecvBandwidth)},+
|
|
{Guarantee,$(NoTitle),$(!REG_VT_DWORD),$(DefaultHighBwGuarantee)},+
|
|
{AgingTime,$(NoTitle),$(!REG_VT_DWORD),$(DefaultHighBwVcAgingTime)}}
|
|
Shell $(UtilityInf), AddValueList, $(HighBwKey), $(NewValueList)
|
|
|
|
CloseRegKey $(HighBwKey)
|
|
;
|
|
; Create Low Bandwidth FlowInfo subkey
|
|
;
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\FlowInfo\LowBw"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) LowBwKey
|
|
ifstr(i) $(LowBwKey) == ""
|
|
Debug-Output "creating LIS0\FlowInfo\LowBw key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" LowBwKey
|
|
endif
|
|
ifstr(i) $(LowBwKey) == ""
|
|
Debug-Output "Failed to create LowBw subkey"
|
|
goto fatalRegistry
|
|
endif
|
|
;
|
|
; Fill in flow info values for Low Bandwidth flows
|
|
;
|
|
Set DefaultLowBwPacketSizeLimit = 256
|
|
Set DefaultLowBwSendBandwidth = 6240
|
|
Set DefaultLowBwRecvBandwidth = 6240
|
|
Set DefaultLowBwGuarantee = 0
|
|
Set DefaultLowBwVcAgingTime = 30
|
|
set NewValueList = {{PacketSizeLimit,$(NoTitle),$(!REG_VT_DWORD),$(DefaultLowBwPacketSizeLimit)},+
|
|
{SendBandwidth,$(NoTitle),$(!REG_VT_DWORD),$(DefaultLowBwSendBandwidth)},+
|
|
{ReceiveBandwidth,$(NoTitle),$(!REG_VT_DWORD),$(DefaultLowBwRecvBandwidth)},+
|
|
{Guarantee,$(NoTitle),$(!REG_VT_DWORD),$(DefaultLowBwGuarantee)},+
|
|
{AgingTime,$(NoTitle),$(!REG_VT_DWORD),$(DefaultLowBwVcAgingTime)}}
|
|
Shell $(UtilityInf), AddValueList, $(LowBwKey), $(NewValueList)
|
|
|
|
CloseRegKey $(LowBwKey)
|
|
|
|
;
|
|
; Now create the ARP Server List subkey
|
|
;
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\ARPServerList"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ServerListKey
|
|
ifstr(i) $(ServerListKey) == ""
|
|
Debug-Output "creating LIS0\ARPServerList key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ServerListKey
|
|
endif
|
|
ifstr(i) $(ServerListKey) == ""
|
|
Debug-Output "Failed to create ARP Server list key"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\ARPServerList\Server1"
|
|
Debug-Output "atmarpc: will open/create "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) Server1Key
|
|
ifstr(i) $(Server1Key) == ""
|
|
Debug-Output "creating LIS0\ARPServerList\Server1 key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Server1Key
|
|
endif
|
|
ifstr(i) $(Server1Key) == ""
|
|
Debug-Output "Failed to create ARP Server 1 key"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
set ServerAddress1 = "4700918100000000613e5bfe010000d10f9f5e00"
|
|
set NewValueList = {{AtmAddress,$(NoTitle),$(!REG_VT_SZ),$(ServerAddress1)}}
|
|
Shell $(UtilityInf), AddValueList, $(Server1Key), $(NewValueList)
|
|
CloseRegKey $(Server1Key)
|
|
|
|
; set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\ARPServerList\Server2"
|
|
; Debug-Output "atmarpc: will open/create "$(RegKey)
|
|
; OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) Server2Key
|
|
; ifstr(i) $(Server2Key) == ""
|
|
; Debug-Output "creating LIS0\ARPServerList\Server2 key under the adapter"
|
|
; CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Server2Key
|
|
; endif
|
|
; ifstr(i) $(Server2Key) == ""
|
|
; Debug-Output "Failed to create ARP Server 2 key"
|
|
; goto fatalRegistry
|
|
; endif
|
|
|
|
; set ServerAddress2 = "4700000000003c0000a000000000000000000800"
|
|
; set NewValueList = {{AtmAddress,$(NoTitle),$(!REG_VT_SZ),$(ServerAddress1)}}
|
|
; Shell $(UtilityInf), AddValueList, $(Server2Key), $(NewValueList)
|
|
; CloseRegKey $(Server2Key)
|
|
|
|
CloseRegKey $(ServerListKey)
|
|
|
|
;
|
|
; Now create the MARS Server List subkey
|
|
;
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\MARSList"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ServerListKey
|
|
ifstr(i) $(ServerListKey) == ""
|
|
Debug-Output "creating LIS0\MARSList key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ServerListKey
|
|
endif
|
|
ifstr(i) $(ServerListKey) == ""
|
|
Debug-Output "Failed to create MARS Server list key"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc\LIS0\MARSList\Server1"
|
|
Debug-Output "atmarpc: will open/create "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) Server1Key
|
|
ifstr(i) $(Server1Key) == ""
|
|
Debug-Output "creating LIS0\MARSList\Server1 key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Server1Key
|
|
endif
|
|
ifstr(i) $(Server1Key) == ""
|
|
Debug-Output "Failed to create MARS Server 1 key"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
set ServerAddress1 = "4700918100000000613e5bfe010000d10f9f5e00"
|
|
set NewValueList = {{AtmAddress,$(NoTitle),$(!REG_VT_SZ),$(ServerAddress1)}}
|
|
Shell $(UtilityInf), AddValueList, $(Server1Key), $(NewValueList)
|
|
CloseRegKey $(Server1Key)
|
|
|
|
CloseRegKey $(ServerListKey)
|
|
|
|
;
|
|
; Create the virtual adapter now.
|
|
;
|
|
Debug-Output "ATMARPC: AddHardwareing ipatmarp now"
|
|
Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(TProductKeyName)
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
|
|
EndWait
|
|
Debug-Output "ATMARPC: ** Failed to AddHardware myself"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
set HardNetCardKey = $($R1)
|
|
set HardNetRuleKey = $($R2)
|
|
set HardParameterKey = $($R3)
|
|
set AdapterNumber = $($R4)
|
|
set LogicalAdapterName = $($R5)
|
|
Debug-Output "ATMARPC: After AddHw, ServiceName "$($R5)
|
|
Debug-Output "ATMARPC: HardParameterKey "$(HardParameterKey)
|
|
set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
|
|
{Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
|
|
{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)}}
|
|
Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "ATMARPC: AddValueList failed for HardNetCardKey"
|
|
goto ShellCodeError
|
|
endif
|
|
|
|
set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
|
|
set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
|
|
Debug-Output "ATMARPC: ProductHardwareName "$(ProductHardwareName)
|
|
Debug-Output "ATMARPC: AdapterNumber "$(AdapterNumber)
|
|
Debug-Output "ATMARPC: TempProdName "$(TempProdName)
|
|
Debug-Output "ATMARPC: TempBindForm "$(TempBindForm)
|
|
Debug-Output "ATMARPC: NetRuleHardwareType "$(NetRuleHardwareType)
|
|
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)}}
|
|
Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
|
|
CloseRegKey $(HardNetCardKey)
|
|
CloseRegKey $(HardNetRuleKey)
|
|
CloseRegKey $(HardParameterKey)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto ShellCodeError
|
|
endif
|
|
|
|
Set AddedNewVirtualAdapter = "Yes"
|
|
|
|
;
|
|
; Use the Logical Adapter name we got above to create the IP Config
|
|
; string to be used in the IPAddInterface() call. We store this within
|
|
; the LIS configuration.
|
|
;
|
|
ifstr(i) $(LISKey) != ""
|
|
set IPConfigString = $(LogicalAdapterName)"\Parameters\Tcpip"
|
|
set NewValueList = {{IPConfig,$(NoTitle),$(!REG_VT_SZ),$(IPConfigString)}}
|
|
Shell $(UtilityInf), AddValueList, $(LISKey), $(NewValueList)
|
|
;
|
|
; Save Adapter Number in LIS0 for use in RemoveAdapter
|
|
;
|
|
set NewValueList = {{AdapterNumber,$(NoTitle),$(!REG_VT_SZ),$(AdapterNumber)}}
|
|
Shell $(UtilityInf), AddValueList, $(LISKey), $(NewValueList)
|
|
CloseRegKey $(LISKey)
|
|
endif
|
|
|
|
ifstr(i) $(ArpParamsKey) != ""
|
|
CloseRegKey $(ArpParamsKey)
|
|
endif
|
|
|
|
; TCP/IP parameters: first open/create TCP/IP's subkey
|
|
Set TcpKeyName = $(!NTN_ServiceBase)"\"$(LogicalAdapterName)"\Parameters\Tcpip"
|
|
Debug-Output "about to open "$(TcpKeyName)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(TcpKeyName) $(MAXIMUM_ALLOWED) TcpKey
|
|
ifstr(i) $(TcpKey) == ""
|
|
CreateRegKey $(!REG_H_LOCAL) {$(TcpKeyName),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" TcpKey
|
|
endif
|
|
ifstr(i) $(TcpKey) == ""
|
|
Debug-Output "Failed to open/create the TCP key under the virtual adapter"
|
|
goto fatalRegistry
|
|
endif
|
|
set NewValueList = {{LLInterface,$(NoTitle),$(!REG_VT_SZ),$(TcpipLLInterface)},+
|
|
{UseZeroBroadcast,$(NoTitle),$(!REG_VT_DWORD),$(UseZeroBroadcast)}}
|
|
Shell $(UtilityInf), AddValueList, $(TcpKey), $(NewValueList)
|
|
|
|
continueCardList = +
|
|
|
|
EndForListDo
|
|
|
|
|
|
;
|
|
; If we added atleast one virtual adapter, tell NCPA to review bindings
|
|
; after this completes.
|
|
;
|
|
ifstr(i) $(AddedNewVirtualAdapter) == "Yes"
|
|
Set RegKey = $(!NTN_SoftwareBase)"\Microsoft\NCPA\CurrentVersion"
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) NcpaKey
|
|
ifstr(i) $(NcpaKey) != ""
|
|
SetRegValue $(NcpaKey) {"BindRestart",$(NoTitle),$(!REG_VT_DWORD),1}
|
|
Debug-Output "ATMARPC: set BindRestart to 1 in "$(RegKey)
|
|
CloseRegKey $(NcpaKey)
|
|
else
|
|
Debug-Output "ATMARPC: failed to open "$(RegKey)
|
|
endif
|
|
endif
|
|
|
|
Set RegKey = $(!NTN_ServiceBase)"\atmarpc"
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ArpCKey
|
|
ifstr(i) $(ArpCKey) != ""
|
|
SetRegValue $(ArpCKey) {"DependOnService",$(NoTitle),$(!REG_VT_MULTI_SZ),{"Tcpip","ATMCallManager"}}
|
|
CloseRegKey $(ArpCKey)
|
|
else
|
|
Debug-Output "failed to open ArpCKey key "$(RegKey)
|
|
goto fatalRegistry
|
|
endif
|
|
endif
|
|
|
|
ifstr(i) $(!NTN_RegBase) == $(TProductRegBase)
|
|
Debug-Output "ATMARPC/Virtual: Binding Adapter, LinkageKeyName "$(TLinkageKeyName)
|
|
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(TLinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
|
|
ifstr(i) $(LinkageKey) != ""
|
|
GetRegValue $(LinkageKey) "Bind" BindList
|
|
Debug-Output "BindList: "$(BindList)
|
|
Set Binding = *($(BindList),4)
|
|
Debug-Output "Binding: "$(Binding)
|
|
CloseRegKey $(LinkageKey)
|
|
else
|
|
Debug-Output "failed to open linkage for adapter"
|
|
goto fatalregistry
|
|
endif
|
|
|
|
set CardList = {}
|
|
set CreateCardList = {}
|
|
ForListDo $(Binding)
|
|
Split-String $($), "\", BindInfo
|
|
QueryListSize BindListSize $(BindInfo)
|
|
set CardName = *($(BindInfo),$(BindListSize))
|
|
Debug-Output "Cardname: "$(CardName)
|
|
ifstr(i) $(CardList) == {}
|
|
set CardList = {$(CardName)}
|
|
else
|
|
set CardList = >($(CardList),$(CardName))
|
|
endif
|
|
EndForListDo
|
|
|
|
Debug-Output "Cardlist: "$(CardList)
|
|
ForListDo $(CardList)
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\atmarpc"
|
|
Debug-Output "about to open "$(RegKey)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) AdapterParamKey
|
|
ifstr(i) $(AdapterParamKey) == ""
|
|
Debug-Output "creating atmarpc key under the adapter"
|
|
CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" AdapterParamKey
|
|
endif
|
|
|
|
ifstr(i) $(AdapterParamKey) != ""
|
|
CloseRegKey $(AdapterParamKey)
|
|
else
|
|
Debug-Output "Failed to open/create the atmarpc key under the adapter"
|
|
goto fatalRegistry
|
|
endif
|
|
|
|
|
|
EndForListDo
|
|
|
|
|
|
Set RegKey = $(!NTN_ServiceBase)"\ipatmarp"
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) IpAtmArpKey
|
|
ifstr(i) $(IpAtmArpKey) != ""
|
|
SetRegValue $(IpAtmArpKey) {"DependOnService",$(NoTitle),$(!REG_VT_MULTI_SZ),{"Tcpip","ATMCallManager"}}
|
|
CloseRegKey $(IpAtmArpKey)
|
|
else
|
|
Debug-Output "failed to open IPATMARP key "$(RegKey)
|
|
goto fatalRegistry
|
|
endif
|
|
endif
|
|
|
|
goto successful
|
|
|
|
removeadapter = +
|
|
Debug-Output "ATMARPC: removeadapter: NTN_REGBASE is "$(!NTN_RegBase)
|
|
Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
|
|
Debug-Output "ATMARPC: removing software "$(ProductSoftwareName)
|
|
|
|
; Go thru all our bindings and remove the ATMARPC subkey there so
|
|
; that we will redo parameter keys if we are installed again.
|
|
;
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
|
|
ifstr(i) $(LinkageKey) != ""
|
|
GetRegValue $(LinkageKey) "Bind" BindList
|
|
Debug-Output "Remove: BindList: "$(BindList)
|
|
Set Binding = *($(BindList),4)
|
|
Debug-Output "Remove: Binding: "$(Binding)
|
|
CloseRegKey $(LinkageKey)
|
|
else
|
|
Debug-Output "failed to open linkage for adapter"
|
|
goto skipRemoveBindings
|
|
endif
|
|
|
|
set CardList = {}
|
|
set CreateCardList = {}
|
|
ForListDo $(Binding)
|
|
Split-String $($), "\", BindInfo
|
|
QueryListSize BindListSize $(BindInfo)
|
|
set CardName = *($(BindInfo),$(BindListSize))
|
|
Debug-Output "Remove: Cardname: "$(CardName)
|
|
ifstr(i) $(CardList) == {}
|
|
set CardList = {$(CardName)}
|
|
else
|
|
set CardList = >($(CardList),$(CardName))
|
|
endif
|
|
EndForListDo
|
|
|
|
Debug-Output "Cardlist: "$(CardList)
|
|
ForListDo $(CardList)
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters"
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ParamsKey
|
|
ifstr(i) $(ParamsKey) != ""
|
|
;
|
|
;
|
|
; Go into the LIS0 subkey, get the Virtual Adapter number, and delete the
|
|
; virtual adapter for LIS0. NOTE: this has to be repeated for each LISi.
|
|
;
|
|
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\AtmArpC\LIS0"
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) LISKey
|
|
ifstr(i) $(LISKey) != ""
|
|
GetRegValue $(LISKey) "AdapterNumber" AdapterNoValue
|
|
CloseRegKey $(LISKey)
|
|
endif
|
|
|
|
Set AdapterNo = *($(AdapterNoValue),4)
|
|
Set AdapterRegBase = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(AdapterNo)
|
|
Debug-Output "ATMARPC: removing adapter "$(AdapterNo)
|
|
Debug-Output "ATMARPC: remove: AdapterRegBase "$(AdapterRegBase)
|
|
|
|
Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
|
|
$(ProductHardwareName), $(AdapterRegBase)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "ShellCode error"
|
|
goto ShellCodeError
|
|
endif
|
|
Debug-Output "Remove: deleting AtmArpC under "$(RegKey)
|
|
DeleteRegTree $(ParamsKey) "AtmArpC"
|
|
CloseRegKey $(ParamsKey)
|
|
endif
|
|
EndForListDo
|
|
|
|
skipRemoveBindings =+
|
|
Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
|
|
$(ProductSoftwareName)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "ShellCode error"
|
|
goto ShellCodeError
|
|
endif
|
|
else
|
|
Ifstr(i) $(TProductKeyName) == $(!NTN_RegBase)
|
|
Debug-Output "ATMARPC: removing software "$(TProductSoftwareName)
|
|
Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
|
|
$(TProductSoftwareName)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "ShellCode error"
|
|
goto ShellCodeError
|
|
endif
|
|
else
|
|
Debug-Output "ATMARPC: removing hardware "$(ProductHardwareName)
|
|
Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
|
|
$(ProductHardwareName), $(!NTN_RegBase)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "ShellCode error"
|
|
goto ShellCodeError
|
|
endif
|
|
endif
|
|
endif
|
|
set RegistryErrorIndex = $($R0)
|
|
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
|
|
goto fatalregistry
|
|
endif
|
|
goto end
|
|
UpgradeSoftware = +
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
|
|
Ifstr $(KeyProduct) != $(KeyNull)
|
|
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)}
|
|
SetRegValue $(KeyProduct) {"Description",$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)}
|
|
SetRegValue $(KeyProduct) {"Title",$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)}
|
|
CloseRegKey $(KeyProduct)
|
|
OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(MAXIMUM_ALLOWED) ServiceKey
|
|
ifstr(i) $(ServiceKey) != ""
|
|
SetRegValue $(ServiceKey) {"DisplayName",$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDisplayName)}
|
|
CloseRegKey $(ServiceKey)
|
|
endif
|
|
else
|
|
goto fatalregistry
|
|
endif
|
|
goto end
|
|
successful = +
|
|
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) == ""
|
|
Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto ShellCodeError
|
|
endif
|
|
set Error = $($R0)
|
|
endif
|
|
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto ShellCodeError
|
|
endif
|
|
ifstr(i) $($R1) == "OK"
|
|
goto $(from)
|
|
else
|
|
goto "end"
|
|
endif
|
|
fatalregistry = +
|
|
Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto ShellCodeError
|
|
endif
|
|
set Error = $($R0)
|
|
goto fatal
|
|
fatal = +
|
|
ifstr(i) $(Error) == ""
|
|
Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto ShellCodeError
|
|
endif
|
|
set Error = $($R0)
|
|
endif
|
|
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto ShellCodeError
|
|
endif
|
|
goto setfailed
|
|
ShellCodeError = +
|
|
set DlgType = "MessageBox"
|
|
set STF_MB_TITLE = $(ShellCodeErrorTitle)
|
|
set STF_MB_TEXT = $(ShellCodeErrorText)
|
|
set STF_MB_TYPE = 1
|
|
set STF_MB_ICON = 3
|
|
set STF_MB_DEF = 1
|
|
ui start "Error Message"
|
|
goto setfailed
|
|
setfailed = +
|
|
set CommonStatus = STATUS_FAILED
|
|
ifstr(i) $(OEM_ABANDON_ON) == TRUE
|
|
set OEM_ABANDON_ON = FALSE
|
|
goto removeadapter
|
|
endif
|
|
goto end
|
|
end = +
|
|
goto term
|
|
term = +
|
|
Return $(CommonStatus)
|
|
|
|
[StripTrailSlash]
|
|
Split-String $($0) "\" InList
|
|
QueryListSize InListSize, $(InList)
|
|
Ifint $(InListSize) <= 1
|
|
Return $($0)
|
|
Endif
|
|
Set NewString = ""
|
|
ForListDo $(InList)
|
|
ifint $(#) < $(InListSize)
|
|
Set NewString = $(NewString)$($)
|
|
else-ifstr $($) != "\"
|
|
Set NewString = $(NewString)$($)
|
|
endif
|
|
EndForListDo
|
|
Return $(NewString)
|
|
|
|
[Install-Option]
|
|
set STF_VITAL = ""
|
|
ifstr(i) $(AddCopy) == "YES"
|
|
AddSectionFilesToCopyList Files-Platform-Drivers $(PlatformDir) $(!STF_WINDOWSSYSPATH)\drivers
|
|
AddSectionFilesToCopyList Files-Platform-Utils $(PlatformDir) $(!STF_WINDOWSSYSPATH)
|
|
endif
|
|
ifstr(i) $(DoCopy) == "YES"
|
|
set !STF_NCPA_FLUSH_COPYLIST = TRUE
|
|
CopyFilesInCopyList
|
|
endif
|
|
ifstr(i) $(DoConfig) == "YES"
|
|
endif
|
|
Exit
|
|
|
|
[Install-Update]
|
|
set STF_VITAL = ""
|
|
set STF_OVERWRITE = "VERIFYSOURCEOLDER"
|
|
AddSectionFilesToCopyList Files-Platform-Drivers $(PlatformDir) $(!STF_WINDOWSSYSPATH)\drivers
|
|
AddSectionFilesToCopyList Files-Platform-Utils $(PlatformDir) $(!STF_WINDOWSSYSPATH)
|
|
AddSectionFilesToCopyList Files-Inf $(InfDir) $(!STF_WINDOWSSYSPATH)
|
|
exit
|
|
|
|
[Source Media Descriptions]
|
|
1 = "Microsoft ATMARP Client Installation Disk"
|
|
|
|
[ProductType]
|
|
STF_PRODUCT = Winnt
|
|
|
|
[Files-Inf]
|
|
1, OEMSETUP.INF, SIZE=999, RENAME=$(!UG_Filename)
|
|
|
|
[Files-Platform-Drivers]
|
|
1, ATMARPC.SYS , SIZE=999
|
|
|
|
[Files-Platform-Utils]
|
|
|
|
[FileConstantsENG]
|
|
ProCaption = "Windows NT Setup"
|
|
ProCancel = "Cancel"
|
|
ProCancelMsg = "Windows NT Networking is not correctly installed. "+
|
|
"Are you sure you want to cancel copying files?"
|
|
ProCancelCap = "Network Setup Message"
|
|
ProText1 = "Copying:"
|
|
ProText2 = "To:"
|
|
FunctionTitle = "IP Over ATM Client"
|
|
ProductSoftwareDescription = "IP Over ATM (RFC 1577) Client Software"
|
|
ProductSoftwareDisplayName = "IP Over ATM Client (ATM ARP Module)"
|
|
ProductSoftwareTitle = "IP over ATM Client"
|
|
TProductSoftwareDescription = "Virtual ATMARP Interface"
|
|
TProductSoftwareDisplayName = "Virtual ATMARP Adapter"
|
|
TProductSoftwareTitle = "Virtual ATMARP Interface"
|
|
ShellCodeErrorTitle = "Error: "$(FunctionTitle)
|
|
ShellCodeErrorText = "Shell Code Error."
|
|
[DialogConstantsENG]
|
|
Help = "&Help"
|
|
Exit = "Cancel"
|
|
OK = "OK"
|
|
HelpContext = ""
|
|
Continue = "Continue"
|
|
Cancel = "Cancel"
|