home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
ntws1.exe
/
NTCLI
/
NTCLNT_1.350
/
I386
/
OEMNSVIP.IN_
/
OEMNSVIP.IN
Wrap
Text File
|
1995-05-19
|
32KB
|
1,123 lines
;***********************************************************************
;
; OEMNSVIP.INF
;
; Novell NetWare support for IP
;
;
;***********************************************************************
;-----------------------------------------------------------------------
; OPTION TYPE
; -----------
; This identifies the Option type we are dealing with. The different
; possible types are:
;
; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
;
; Types specific to networking:
;
; NetAdapter, a netcard / adapter combination or just a netcard
; NetDriver, just a netcard driver
; NetTransport, a complete NDIS-compliant TDI transport stack
; NetService, an NT networking service
; NetWork, a complete network ensemble.
; NetProvider a complete network which supports NT MPR protocol
;-----------------------------------------------------------------------
[Identification]
OptionType = NetService
;-----------------------------------------------------------------------
; OPTION LIST
; -----------
; This section lists the OEM Option key names. These keys are locale
; independent and used to represent the option in a locale independent
; manner.
;
;-----------------------------------------------------------------------
[Options]
NWIP
;-----------------------------------------------------------------------
; LANGUAGES SUPPORTED
; -------------------
;
; The languages supported by the OEM INF, For every language supported
; we need to have a separate text section for every displayable text
; section.
;
;-----------------------------------------------------------------------
[LanguagesSupported]
ENG, ENGLISH
;-----------------------------------------------------------------------
; OPTION TEXT SECTION
; -------------------
; These are text strings used to identify the option to the user. There
; are separate sections for each language supported. The format of the
; section name is "OptionsText" concatenated with the Language represented
; by the section.
;
;-----------------------------------------------------------------------
[OptionsTextENG]
NWIP = "Novell NetWare/IP Support"
;***********************************************************************
; Language-Dependent Dialog Constants
;***********************************************************************
[FileConstantsENG]
;
; Variables to support thermometer gauge and error dialogs
;
[InitBaseVars]
KeyNull = ""
MAXIMUM_ALLOWED = 33554432
KeyInfo = {}
RegistryErrorIndex = NO_ERROR
NoTitle = 0
CurrentControlSet = "SYSTEM\CurrentControlSet"
ServicesBaseName = $(CurrentControlSet)"\Services"
[FileConstants]
;
; File names, etc.
;
UtilityInf = "UTILITY.INF"
subroutineinf = "SUBROUTN.INF"
NwSubsInf = "NWSUBS.INF"
NwSetupDll = "nwsetup.dll"
SoftwareType = "service"
Exit_Code = 0
; Product Info
;
Manufacturer = "Novell"
ProductMajorVersion = "1"
ProductMinorVersion = "0"
ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
UserModeRoot = "%SystemRoot%"
System32Root = $(UserModeRoot)"\System32\"
SoftwareBinHome = $(System32Root)"NetWare\"
DriverBinHome = $(System32Root)"Drivers\"
NetWareEventFile= $(System32Root)"nwevents.dll"
;
; Services
;
; NWIP: NetWare IP Service
ProductNWIPControl = component
ProductNWIPHidden = 0
ProductNWIPReviewBindings = 1
ProductNWIPInstrumentation = FALSE
ProductNWIPName = "NWIP"
ProductNWIPDisplayName = "Novell NetWare/IP Support"
ProductNWIPTitle = "Novell NetWare/IP Support"
ProductNWIPImagePath = $(SoftwareBinHome)nwip.sys
ProductNWIPDescription = "Novell NetWare/IP Support"
ProductNWIPSvcType = "kernelautostart"
ProductNWIPSoftType = "service"
ProductNWIPGroup = ""
ProductNWIPDependList = {"TCPIP"}
ProductNWIPEventFile = $(NetWareEventFile)
ProductNWIPKeySoftware = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductNWIPName)"\CurrentVersion"
NetRuleNWIPSoftwareType = "nwip nwNwIPDriver"
NetRuleNWIPSoftwareUse = "service yes yes"
NetRuleNWIPSoftwareBindForm = """NwIP"" yes yes container"
NetRuleNWIPSoftwareClass = {"nwNwIPDriver basic"}
NetRuleNWIPSoftwareBindable = {"nwNwIPDriver tcpipTransport non non 100"}
[GeneralConstants]
;
; Program flow control variables.
;
from = ""
to = ""
;
; Return codes; Exit_Code is set to one of these
;
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)
[date]
; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
; Minute, Second }
Now = {} ? $(!LIBHANDLE) GetSystemDate
[DetectSystemMemory]
SystemMemory = "" ? $(!LIBHANDLE) GetMemorySize
[ProcessorDetect]
!STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
;---------------------------------------------------------------------------
; 1. Identify
;
; DESCRIPTION: To verify that this INF deals with the same type of options
; as we are choosing currently.
;
; INPUT: None
;
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
; $($R1): Option Type (COMPUTER ...)
; $($R2): Diskette description
;---------------------------------------------------------------------------
[Identify]
;
;
read-syms Identification
set Status = STATUS_SUCCESSFUL
set Identifier = $(OptionType)
set Media = #("Source Media Descriptions", 1, 1)
Return $(Status) $(Identifier) $(Media)
;------------------------------------------------------------------------
; 2. ReturnOptions:
;
; DESCRIPTION: To return the option list supported by this INF and the
; localised text list representing the options.
;
;
; INPUT: $($0): Language used. ( ENG | FRN | ... )
;
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
; STATUS_NOLANGUAGE
; STATUS_FAILED
;
; $($R1): Option List
; $($R2): Option Text List
;------------------------------------------------------------------------
[ReturnOptions]
;
;
set Status = STATUS_FAILED
set OptionList = {}
set OptionTextList = {}
;
; Check if the language requested is supported
;
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) in $(LanguageList)
goto returnoptions
else
set Status = STATUS_NOLANGUAGE
goto finish_ReturnOptions
endif
;
; form a list of all the options and another of the text representing
;
returnoptions = +
set OptionList = ^(Options, 1)
set OptionTextList = ^(OptionsText$($0), 1)
set Status = STATUS_SUCCESSFUL
finish_ReturnOptions = +
Return $(Status) $(OptionList) $(OptionTextList)
;----------InstallOption-------------------------------------------------
;
; InstallOption:
;
; This section is shelled to by main installation processing
; or by NCPASHEL.INF during reconfig, removal, update, etc.
;
;
; FUNCTION: To copy files representing Options
; To configure the installed option
; To update 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: STATUS_SUCCESSFUL |
; STATUS_NOLANGUAGE |
; STATUS_USERCANCEL |
; STATUS_FAILED
;
;------------------------------------------------------------------------
[InstallOption]
;
; extract parameters
;
set Option = $($1)
set SrcDir = $($2)
set AddCopy = $($3)
set DoCopy = $($4)
set DoConfig = $($5)
set OriginalAddCopy = $($3)
set OriginalDoCopy = $($4)
;
; For now,
;
;
; Check if the language requested is supported
;
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) NOT-IN $(LanguageList)
Return STATUS_NOLANGUAGE
endif
; set LANGUAGE = *( ^(LanguagesSupported, 2), ~(LanguageList, $(!STF_LANGUAGE))
Debug-Output "OEMNPRNW.INF: Language used: LANGUAGE = "$(LANGUAGE)
Debug-Output "1: STF_PLATFORM = "$(!STF_PLATFORM)
Debug-Output "1: STF_PROCESSOR = "$(!STF_PROCESSOR)
detect ProcessorDetect
;
; Here's the service name used in this file
;
Set SvcOpt = NWIP
Debug-Output "2: STF_PROCESSOR = "$(!STF_PROCESSOR)
ifstr(i) $(!STF_PROCESSOR) == "I386"
set !STF_PLATFORM = "I386"
else-ifstr(i) $(!STF_PROCESSOR) == "I486"
set !STF_PLATFORM = "I386"
else-ifstr(i) $(!STF_PROCESSOR) == "I586"
set !STF_PLATFORM = "I386"
else-ifstr(i) $(!STF_PROCESSOR) == "R4000"
set !STF_PLATFORM = "Mips"
else
set !STF_PLATFORM = "Alpha"
endif
Debug-Output "2: STF_PLATFORM = "$(!STF_PLATFORM)
StartWait
; define all the constants
set-subst LF = "\n"
set-subst CR = "\r"
set-subst CRLF = "\r\n"
read-syms GeneralConstants
read-syms FileConstants
ifstr(i) $(!NTN_Origination) == "NCPA"
set Continue = "OK"
endif
read-syms FileConstants$(!STF_LANGUAGE)
detect date
set-title $(FunctionTitle)
set to = Begin
set from = Begin
;
; Assume all is well.
;
set CommonStatus = STATUS_SUCCESSFUL
Begin = +
Set OEM_ABANDON_SERVICES = {}
Set OEM_ABANDON_COMPONENTS = {}
Set DoReboot = "NO"
Ifstr(i) $(!NTN_InstallMode) == deinstall
set StartLabel = removeNWIP
else-Ifstr(i) $(!NTN_InstallMode) == update
set StartLabel = upgradeNWIP
else-Ifstr(i) $(!NTN_InstallMode) == bind
set StartLabel = bindNWIP
else-Ifstr(i) $(!NTN_InstallMode) == configure
Set StartLabel = configureNWIP
else
set StartLabel = installNWIP
endif
set from = $(fatal)
set to = $(fatal)
goto $(StartLabel)
;-----------------------------------------------
; Installation Section
;-----------------------------------------------
installNWIP = +
;
; First, check whether the same version of the software exists
;
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWIP" $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
;
; Same version already existed in the local machine
; Popup the dialog and ask the user whether he wants to continue
;
CloseRegKey $(KeyProduct)
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", +
"The NetWare Support for IP is already installed. "
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set CommonStatus = STATUS_USERCANCEL
goto term
endif
;
; Next, check to see if Tcp/Ip is installed
;
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Tcpip" $(MAXIMUM_ALLOWED) KeyTcpIp
Ifstr $(KeyTcpIp) == $(KeyNull)
;
; Ask the user if they want to install Tcp/Ip
;
set MessageText = "Tcp/Ip Protocol is NOT installed, Install it now?"
set DlgType = "MessageBox"
set STF_MB_TITLE = "Install Tcp/Ip Protocol"
set STF_MB_TEXT = $(MessageText)
set STF_MB_TYPE = 3
set STF_MB_ICON = 4
set STF_MB_DEF = 1
ui start "InstallTcpIp"
Ifstr(i) $(DLGEVENT) == "NO"
Debug-Output "NWSUBS.INF: Don't install Tcp/Ip"
set CommonStatus = STATUS_USERCANCEL
goto term
Endif
Debug-Output "OEMNSVIP.INF: Install Tcp/Ip"
Set OldInstallMode = $(!NTN_InstallMode)
Set !NTN_InstallMode = install
Shell "oemnxptc.inf" InstallOption $(!STF_LANGUAGE) "TC" "" YES YES NO
Set !NTN_InstallMode = $(OldInstallMode)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
Endif
set CommonStatus = $($R0)
Ifstr(i) $(CommonStatus) != STATUS_SUCCESSFUL
Debug-Output "OEMNSVIP.INF: Install of Tcp/Ip returned "$(CommonStatus)
goto term
Endif
Else
CloseRegKey $(KeyTcpIp)
Endif
Ifstr(i) $(Product$(SvcOpt)Control) == component
Debug-Output "OEMNPRNW.INF: install component: "$(SvcOpt)
Shell $(UtilityInf), AddSoftwareComponent +
$(Manufacturer), +
$(Product$(SvcOpt)Name), +
$(Product$(SvcOpt)Name), +
$(Product$(SvcOpt)DisplayName), +
$(STF_CONTEXTINFNAME), +
$(Product$(SvcOpt)ImagePath), +
$(Product$(SvcOpt)SvcType), +
$(Product$(SvcOpt)Group), +
$(Product$(SvcOpt)DependList), "" +
$(Product$(SvcOpt)EventFile), "", "", 1
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMNPRNW.INF: AddSoftwareComponent ShellCode error "$($ShellCode)" installing "$(SvcOpt)
EndWait
goto ShellCodeError
Endif
StartWait
Set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
CloseRegKey $($R1)
CloseRegKey $($R2)
CloseRegKey $($R3)
Debug-Output "OEMNPRNW.INF: Registry error "$(RegistryErrorIndex)" installing "$(SvcOpt)
EndWait
goto fatalregistry
Endif
Set SvcVersion = $($R1)
Set SvcNetRules = $($R2)
Set SvcSvcKey = $($R3)
Set SvcParamKey = $($R4)
Set SvcLinkKey = $($R5)
ifint $(Product$(SvcOpt)ReviewBindings) == 1
Set ReviewBindingsValue = 1
else
Set ReviewBindingsValue = 0
endif
Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(Product$(SvcOpt)SoftType)},+
{Hidden,$(NoTitle),$(!REG_VT_DWORD),$(Product$(SvcOpt)Hidden)},+
{Review,$(NoTitle),$(!REG_VT_DWORD),$(ReviewBindingsValue)},+
{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
{MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
{Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(SvcOpt)Title)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(SvcOpt)Description)},+
{ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(SvcOpt)Name)},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
Shell $(UtilityInf), AddValueList, $(SvcVersion), $(NewValueList)
StartWait
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMNPRNW.INF: ShellCode error: AddValueList for version info for "$(SvcOpt)
EndWait
goto ShellCodeError
Endif
;
; Add the NetRules info
;
Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(SvcOpt)SoftwareType)},+
{class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(SvcOpt)SoftwareClass)}, +
{bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(SvcOpt)SoftwareBindable)}, +
{use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(SvcOpt)SoftwareUse)}, +
{bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(SvcOpt)SoftwareBindForm)}, +
{InfOption,$(NoTitle),$(!REG_VT_SZ),$(SvcOpt)}}
Shell $(UtilityInf), AddValueList, $(SvcNetRules), $(NewValueList)
StartWait
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMNPRNW.INF: AddValueList ShellCode error = "$($ShellCode)
EndWait
Goto ShellCodeError
Endif
Set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(SvcSvcKey)
CloseRegKey $(SvcParamKey)
CloseRegKey $(SvcLinkKey)
CloseRegKey $(SvcVersion)
CloseRegKey $(SvcNetRules)
Debug-Output "OEMNPRNW.INF: Registry error adding NetRules to "$(SvcOpt)
EndWait
goto fatalregistry
Endif
Else
Debug-Output "OEMNPRNW.INF: install service: "$(SvcOpt)
Shell $(UtilityInf), CreateService, +
$(Product$(SvcOpt)Name), +
$(Product$(SvcOpt)DisplayName), +
$(Product$(SvcOpt)ImagePath), +
$(Product$(SvcOpt)SvcType), +
$(Product$(SvcOpt)Group), +
$(Product$(SvcOpt)DependList), "" +
$(Product$(SvcOpt)EventFile), "", "", 1
StartWait
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMNPRNW.INF: ShellCode error installing "$(SvcOpt)
EndWait
goto ShellCodeError
Endif
Set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $($R1)
CloseRegKey $($R2)
CloseRegKey $($R3)
Debug-Output "OEMNPRNW.INF: Registry error installing "$(SvcOpt)
EndWait
goto fatalregistry
Endif
Set SvcVersion = ""
Set SvcNetRules = ""
Set SvcSvcKey = $($R1)
Set SvcParamKey = $($R2)
Set SvcLinkKey = $($R3)
Endif
set DoReboot = YES
;-----------------------------------------------
; Configure section
;-----------------------------------------------
configureNWIP = +
Set Error = ""
Debug-Output "OEMNSVIP.INF: Configure NWIP"
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWIP\Parameters" $(MAXIMUM_ALLOWED) KeyParameters
Ifstr $(KeyParameters) != $(KeyNull)
set KeyValueList = ""
GetRegValue $(KeyParameters) "NetWare/IP Domain" KeyValueList
set DomainNameString = *($(KeyValueList), 4)
set KeyValueList = ""
GetRegValue $(KeyParameters) "Preferred DSS" KeyValueList
set PreferredDSS = *($(KeyValueList), 4)
Debug-Output "OEMNSVIP.INF: PreferredDSS = "$(PreferredDSS)
ifstr $(PreferredDSS) != {}
QueryListSize ListSize $(PreferredDSS)
ifint $(ListSize) > 1
set NewName = ""
ForListDo $(PreferredDSS)
set NewName = $(NewName)$($)$(CRLF)
EndForListDo
set PreferredDSS = $(NewName)
else
set PreferredDSS = *($(PreferredDSS),1)
endif
endif
Ifstr $(PreferredDSS) == {}
set PreferredDSS = ""
Endif
Debug-Output "OEMNSVIP.INF: New PreferredDSS = "$(PreferredDSS)
set KeyValueList = ""
GetRegValue $(KeyParameters) "Nearest NetWare/IP Server" KeyValueList
set NearestServer = *($(KeyValueList), 4)
Debug-Output "OEMNSVIP.INF: NearestServer = "$(NearestServer)
ifstr $(NearestServer) != {}
QueryListSize ListSize $(NearestServer)
ifint $(ListSize) > 1
set NewName = ""
ForListDo $(NearestServer)
set NewName = $(NewName)$($)$(CRLF)
EndForListDo
set NearestServer = $(NewName)
else
set NearestServer = *($(NearestServer),1)
endif
endif
Ifstr $(NearestServer) == {}
set NearestServer = ""
Endif
Debug-Output "OEMNSVIP.INF: New NearestServer = "$(NearestServer)
set KeyValueList = ""
GetRegValue $(KeyParameters) "NSQ Broadcast" KeyValueList
Debug-Output "OEMNSVIP.INF: NSQBroadcasts list = "$(KeyValueList)
Ifstr $(KeyValueList) == ""
set NSQBroadcastsFlag = 1
Else
set NSQBroadcastsFlag = *($(KeyValueList), 4)
Endif
ifint $(NSQBroadcastsFlag) != 0
set NSQBroadcasts = "ON"
else
set NSQBroadcasts = "OFF"
endif
Debug-Output "OEMNSVIP.INF: NSQBroadcasts = "$(NSQBroadcasts)
set KeyValueList = ""
GetRegValue $(KeyParameters) "AutoRetries" KeyValueList
set AutoRetries = *($(KeyValueList), 4)
ifstr(i) $(AutoRetries) == ""
set AutoRetries = 1
Debug-Output "OEMNSVIP.INF: AutoRetries set to default"
endif
set KeyValueList = ""
GetRegValue $(KeyParameters) "AutoRetry Secs" KeyValueList
set AutoRetryTime = *($(KeyValueList), 4)
ifstr(i) $(AutoRetryTime) == ""
set AutoRetryTime = 4
Debug-Output "OEMNSVIP.INF: AutoRetryTime set to default"
endif
Ifstr(i) $(StartLabel) != installNWIP
LoadLibrary "NetWare for Windows NT" nwsetup.dll NwLibHandle
SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\english\nwnthelp.hlp" $(!MinimumID) $(!MaximumID)
DoTheDialog = +
read-syms "NWIPDlg"$(!STF_LANGUAGE)
Debug-Output "DlgType = "$(DlgType)
Debug-Output "DlgTemplate = "$(DlgTemplate)
Debug-Output "Caption = "$(Caption)
Debug-Output "OK = "$(OK)
Debug-Output "Cancel = "$(Cancel)
Debug-Output "Help = "$(Help)
Debug-Output "DomainName = "$(DomainName)
Debug-Output "GroupName = "$(GroupName)
Debug-Output "DSS = "$(DSS)
Debug-Output "NNS = "$(NNS)
Debug-Output "NSQ = "$(NSQ)
Debug-Output "Retries = "$(Retries)
Debug-Output "RetryTime = "$(RetryTime)
Debug-Output "CBOptionGreyed = "$(CBOptionGreyed)
Debug-Output "RadioOptionsGreyed = "$(RadioOptionsGreyed)
Debug-Output "IDH_NWIP = "$(IDH_NWIP)
Debug-Output "HelpContext = "$(HelpContext)
Debug-Output "NotifyFields = "$(NotifyFields)
Debug-Output "EditTextIn = "$(EditTextIn)
Debug-Output "EditTextLim = "$(EditTextLim)
Debug-Output "CheckItemsIn = "$(CheckItemsIn)
Debug-Output "ComboListItemsIn = "$(ComboListItemsIn)
ui start "NWIPDlg" $(NwLibHandle)
StartWait
Debug-Output "EditTextOut = "$(EditTextOut)
Debug-Output "CheckItemsOut = "$(CheckItemsOut)
Debug-Output "ComboListItemsOut = "$(ComboListItemsOut)
Ifstr(i) $(DLGEVENT) == "CONTINUE"
Debug-Output "OK hit"
set ReDisplayDialog = "NO"
set DomainNameString = *($(EditTextOut), 1)
set PreferredDSS = *($(EditTextOut), 2)
set NearestServer = *($(EditTextOut), 3)
set AutoRetries = *($(EditTextOut), 4)
set AutoRetryTime = *($(EditTextOut), 5)
set NSQBroadcasts = *($(CheckItemsOut), 1)
Ifint $(AutoRetries) < 0
set AutoRetries = 1
set ReDisplayDialog = "YES"
Endif
Ifint $(AutoRetries) > 50
set AutoRetries = 1
set ReDisplayDialog = "YES"
Endif
Ifstr(i) $(ReDisplayDialog) == "YES"
Set DlgType = "MessageBox"
Set STF_MB_TITLE = "Novell NetWare/IP Service Setup"
Set STF_MB_TEXT = "Invalid AutoRetries. AutoRetries must be in the range 0 - 50."
Set STF_MB_TYPE = 1
Set STF_MB_ICON = 2
Set STF_MB_DEF = 1
ui start "Error Message"
Endif
set InvalidAutoRetryTime = "NO"
Ifint $(AutoRetryTime) < 1
set AutoRetryTime = 4
set InvalidAutoRetryTime = "YES"
set ReDisplayDialog = "YES"
Endif
Ifint $(AutoRetryTime) > 100
set AutoRetryTime = 4
set InvalidAutoRetryTime = "YES"
set ReDisplayDialog = "YES"
Endif
Ifstr(i) $(InvalidAutoRetryTime) == "YES"
Set DlgType = "MessageBox"
Set STF_MB_TITLE = "Novell NetWare/IP Service Setup"
Set STF_MB_TEXT = "Invalid AutoRetryTime. AutoRetryTime must be in the range 1 - 100."
Set STF_MB_TYPE = 1
Set STF_MB_ICON = 2
Set STF_MB_DEF = 1
ui start "Error Message"
Endif
Ifstr(i) $(ReDisplayDialog) == "YES"
set ReInit = YES
goto DoTheDialog
Endif
Endif
ui pop 1
FreeLibrary $(NwLibHandle)
Else
set DLGEVENT = "CONTINUE"
Endif
; Configure NWIP.
; CONTINUE means the OK button was hit
;
ifstr(i) $(DLGEVENT) == "CONTINUE"
;
; The user gave us something. Turn back on NWIP
;
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWIP" $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),2}
SetRegValue $(KeyProduct) $(KeyValueList)
CloseRegKey $(KeyProduct)
Endif
;
; Save DomainString
;
Set KeyValueList = {"NetWare/IP Domain",$(NoTitle),$(!REG_VT_SZ),$(DomainNameString)}
SetRegValue $(KeyParameters) $(KeyValueList)
;
; Save PreferredDSS
;
Debug-Output "OEMNSVIP.INF: SetRegValue PreferredDSS = "$(PreferredDSS)
Ifstr(i) $(PreferredDSS) != ""
Split-String $(PreferredDSS) $(CRLF) BrokenupString
QueryListSize ListSize $(BrokenupString)
ifint $(ListSize) > 1
set NewList = {}
ForListDo $(BrokenupString)
ifstr $($) != $(CR)
ifstr $($) != $(LF)
set NewList = >($(NewList),$($))
endif
endif
EndForListDo
set PreferredDSS = $(NewList)
else
set PreferredDSS = { $(PreferredDSS) }
endif
Endif
Ifstr $(PreferredDSS) == ""
set PreferredDSS = {}
Endif
Debug-Output "OEMNSVIP.INF: SetRegValue New PreferredDSS = "$(PreferredDSS)
Set KeyValueList = {"Preferred DSS",$(NoTitle),$(!REG_VT_MULTI_SZ),$(PreferredDSS)}
SetRegValue $(KeyParameters) $(KeyValueList)
;
; Save NearestServer
;
Debug-Output "OEMNSVIP.INF: SetRegValue NearestServer = "$(NearestServer)
Ifstr(i) $(NearestServer) != ""
Split-String $(NearestServer) $(CRLF) BrokenupString
QueryListSize ListSize $(BrokenupString)
ifint $(ListSize) > 1
set NewList = {}
ForListDo $(BrokenupString)
ifstr $($) != $(CR)
ifstr $($) != $(LF)
set NewList = >($(NewList),$($))
endif
endif
EndForListDo
set NearestServer = $(NewList)
else
set NearestServer = { $(NearestServer) }
endif
Endif
Ifstr $(NearestServer) == ""
set NearestServer = {}
Endif
Debug-Output "OEMNSVIP.INF: SetRegValue New NearestServer = "$(NearestServer)
Set KeyValueList = {"Nearest NetWare/IP Server",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NearestServer)}
SetRegValue $(KeyParameters) $(KeyValueList)
;
; Save NSQBroadcasts
;
Ifstr(i) $(NSQBroadcasts) == "OFF"
set NSQBroadcastsFlag = 0
Else
set NSQBroadcastsFlag = 1
Endif
Set KeyValueList = {"NSQ Broadcast",$(NoTitle),$(!REG_VT_DWORD),$(NSQBroadcastsFlag)}
SetRegValue $(KeyParameters) $(KeyValueList)
;
; Save AutoRetries
;
Set KeyValueList = {"AutoRetries",$(NoTitle),$(!REG_VT_DWORD),$(AutoRetries)}
SetRegValue $(KeyParameters) $(KeyValueList)
;
; Save AutoRetryTime
;
Set KeyValueList = {"AutoRetry Secs",$(NoTitle),$(!REG_VT_DWORD),$(AutoRetryTime)}
SetRegValue $(KeyParameters) $(KeyValueList)
SetRegValue $(KeyParameters) {"1.1Compatibility",$(NoTitle),$(!REG_VT_DWORD),0}
set DoReboot = YES
;
; Cancel hit
;
Else
;
; If nothing was in the registry and the user hit cancel, do nothing.
;
Debug-Output "OEMNSVIP.INF: User hit cancel."
Endif
CloseRegKey $(KeyParameters)
Else
Set Error = "NWIP/Parameters was deleted somehow. NWIP disabled."
Endif
;
; Error! Disable NWIP
;
Ifstr $(Error) != ""
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWIP" $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),4}
SetRegValue $(KeyProduct) $(KeyValueList)
CloseRegKey $(KeyProduct)
Endif
; Message to print already in the Error variable
goto fatal
Endif
goto end
;-----------------------------------------------
; Binding section
;-----------------------------------------------
bindNWIP =+
;
; Fix up the keys in IPXSPX
;
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\IpxSpx\Parameters" $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
Set KeyValueList = {"Card Name",$(NoTitle),$(!REG_VT_SZ),"NWIP"}
SetRegValue $(KeyProduct) $(KeyValueList)
Set KeyValueList = {"Frame Type",$(NoTitle),$(!REG_VT_SZ),"ETHERNET_II"}
SetRegValue $(KeyProduct) $(KeyValueList)
CloseRegKey $(KeyProduct)
Else
Set Error = "NWIP: Failed setting values in IPXSPX"
goto fatal
Endif
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\IpxSpx" $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
Set KeyValueList = {"DependOnService",$(NoTitle),$(!REG_VT_MULTI_SZ),{"NWIP"}}
SetRegValue $(KeyProduct) $(KeyValueList)
Else
Set Error = "NWIP: Failed setting DependOnService values in IPXSPX"
goto fatal
Endif
Debug-Output "OEMNSVIP.INF: CommonStatus = "$(CommonStatus)
goto end
;-----------------------------------------------
; Remove section
;-----------------------------------------------
removeNWIP = +
Ifstr(i) $(Product$(SvcOpt)Control) == component
Debug-Output "RemoveSoftwareComponent: Manufacturer = "$(Manufacturer)" Product$(SvcOpt)Name = "$(Product$(SvcOpt)Name)
Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
$(Product$(SvcOpt)Name)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMNSVIP.INF: RemoveSoftwareComponent ShellCode error "$($ShellCode)
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
Endif
Else-Ifstr(i) $(Product$(SvcOpt)Control) == service
Shell $(UtilityInf), RemoveService, $(Product$(SvcOpt)Name), "YES"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMNSVIP.INF: RemoveService ShellCode error "$($ShellCode)
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
Endif
Endif
;
; Remove DependOnService in IPXSPX
;
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\IpxSpx" $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
Set KeyValueList = {"DependOnService",$(NoTitle),$(!REG_VT_MULTI_SZ),{}}
SetRegValue $(KeyProduct) $(KeyValueList)
Else
Set Error = "NWIP: Failed setting DependOnService values in IPXSPX"
goto fatal
Endif
Debug-Output "CommonStatus = "$(CommonStatus)
set CommonStatus = STATUS_SUCCESSFUL
goto end
;-----------------------------------------------
; Upgrade Software section
;-----------------------------------------------
upgradeNWIP = +
set Error = "Upgrade: Sorry, not yet implemented."
goto fatal
;
; Escape hatches
;
successful = +
goto end
;
; warning display
;
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
; Debug-Msg "Error Error Bad DLGEVENT"
goto end
endif
;
; non fatal error display
;
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
;
; Registry is broken
;
fatalregistry = +
Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
goto fatal
;
; fatal error display
;
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
;
; Shelling error
;
ShellCodeError = +
set DlgType = "MessageBox"
set STF_MB_TITLE = "Error: "$(FunctionTitle)
set STF_MB_TEXT = "Shell Code Error "$(TWM_ShellErrorTitle)
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
;
; If OEM_ABANDON_ON, we need to clean up the registry
;
ifstr(i) $(OEM_ABANDON_ON) == TRUE
set OEM_ABANDON_ON = FALSE
goto removeNWIP
endif
goto end
end = +
ifstr(i) $(DoReboot) == "YES"
shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" +
"The changes you have made will not take effect until the computer is restarted."
endif
EndWait
goto term
term = +
Return $(CommonStatus)
[NWIPDlgENG]
DlgType = "RadioCombination"
DlgTemplate = "NWIP_CONFIG"
Caption = "Novell NetWare/IP Support"
OK = "&OK"
Cancel = "&Cancel"
Help = "&Help"
DomainName = "NetWare/IP Domain"
GroupName = "Advanced Settings"
DSS = "Preferred DSS"
NNS = "Nearest NetWare/IP Server"
NSQ = "Enable NSQ Broadcasts"
Retries = "AutoRetries"
RetryTime = "RetryTime"
CBOptionsGreyed = {}
RadioOptionsGreyed = {}
IDH_NWIP = 909
HelpContext = $(IDH_NWIP)
ComboListItemsIn = {}
ComboListItemsOut = {}
NotifyFields = {}
EditTextIn = { $(DomainNameString) $(PreferredDSS) $(NearestServer) $(AutoRetries) $(AutoRetryTime) }
EditTextLim = {"","","","",""}
CheckItemsIn = {$(NSQBroadcasts)}
[Source Media Descriptions]
1 = "NetWare Client for Windows NT Disk 1" , TAGFILE = NTCLNT_1