OBSOLETE/NT4ISA/OEMSETUP.INF Driver File Contents (HF000X_080.ZIP)

Driver Package File Name: HF000X_080.ZIP
File Size: 187.0 KB

; Filename    : OEMSETUP.INF
;
; Purpose     : Diamond HomeFree Wireless LAN driver setup information file
;
; Supported HW: Diamond Multimedia HomeFree WLAN ISA card
;
; Supported OS: Windows NT 3.51, 4.0
;
; Date        : 08/29/2006, V0.80
;
; Author      : Dipl.-Ing. (FH) Werner K.G. Muenchheimer, Aachen, Germany
;
; Mail        : 100.163332@germanynet.de
;
; Copyright   : Free for evaluation


[Identification]
    OptionType = NetAdapter

[Source Media Descriptions]
    1 = "HomeFree Installation Software" , TAGFILE = HF000X.DSK

[LanguagesSupported]
    ENG

[PlatformsSupported]
    ISA

[Options]
    HF0001

[OptionsTextENG]
    HF0001 = "Diamond Multimedia HomeFree ISA Card"

;----------------------------------------------------

[FileConstants]
 UtilityInf                       = "UTILITY.INF"
 ParamInf                         = "NCPARAM.INF"
 SubroutineInf                    = "SUBROUTN.INF"
 SoftwareType                     = "driver"
 Exit_Code                        = 0

 NetEventDLL                      = "%SystemRoot%\System32\netevent.dll"
 IoLogMsgDLL                      = "%SystemRoot%\System32\IoLogMsg.dll"

 Manufacturer                     = "Diamond Multimedia"
 ProductMajorVersion              = "0"
 ProductMinorVersion              = "80"
 ProductVersion                   = $(ProductMajorVersion)"."$(ProductMinorVersion)

 ProductSoftwareName              = "Skyline"
 ProductSoftwareImagePath         = "\SystemRoot\System32\drivers\skyline.sys"
 NetRuleSoftwareType              = "skyline ndisDriver skylineDriver"
 NetRuleSoftwareUse               = $(SoftwareType)
 NetRuleSoftwareBindForm          = """SkylineSys"" yes no container"
 NetRuleSoftwareClass             = {"skylineDriver basic"}
 NetRuleSoftwareBindable          = {"skylineDriver skylineAdapter non exclusive 100"}

 ProductHardwareName              = "Skyline"
 NetRuleHardwareType              = "skyline skylineAdapter"
 NetRuleHardwareBindForm          = " yes yes container"
 NetRuleHardwareClass             = {"skylineAdapter basic"}

 ProductKeyName                   = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
 ParamKeyName                     = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"

 ProductSoftwareDescription       = "HomeFree Network Driver"
 ProductSoftwareTitle             = "HomeFree Network Driver"
 FunctionTitle                    = "HomeFree Network Driver Setup"

 OptionHelpFile                   = "SKYLINE.HLP"
 HelpId                           = 100

 ProductHardwareHF0001Description = "Diamond Multimedia HomeFree ISA Card"
 ProductHardwareHF0001Title       = "Diamond Multimedia HomeFree ISA Card"
 ProductHardwareHF0001Ndis        = 1
 AdapterHF0001Type                = 1

;----------------------------------------------------

[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

;----------------------------------------------------

[Identify]
    Read-Syms Identification
    Set Status     = STATUS_SUCCESSFUL
    Set Identifier = $(OptionType)
    Set Media      = #("Source Media Descriptions", 1, 1)
    Return $(Status) $(Identifier) $(Media)

;----------------------------------------------------

[ReturnOptions]
    Set Status         = STATUS_FAILED
    Set OptionList     = {}
    Set OptionTextList = {}

    Set LanguageList   = ^(LanguagesSupported, 1)
    IfContains(i) $($0) in $(LanguageList)
        IfStr(i) $($1) == ""
           GoTo returnoptions
        EndIf
        Set PlatformList = ^(PlatformsSupported, 1)
        IfContains(i) $($1) in $(PlatformList)
           GoTo returnoptions
        Else
           Set Status = STATUS_NOTSUPPORTED
           GoTo finish_ReturnOptions
        EndIf
    Else
        Set Status = STATUS_NOLANGUAGE
        GoTo finish_ReturnOptions
    EndIf

returnoptions = +
    Set OptionList     = ^(Options, 1)
    Set OptionTextList = ^(OptionsText$($0), 1)
    Set Status         = STATUS_SUCCESSFUL

finish_ReturnOptions = +
    Return $(Status) $(OptionList) $(OptionTextList)

;----------------------------------------------------

[InstallOption]
    Set Option       = $($1)
    Set SrcDir       = $($2)
    Set AddCopy      = $($3)
    Set DoCopy       = $($4)
    Set DoConfig     = $($5)
    Set LanguageList = ^(LanguagesSupported, 1)
    IfContains(i) $($0) NOT-IN $(LanguageList)
        Return STATUS_NOLANGUAGE
    EndIf

    Set-Subst LF = "\n"

    Read-Syms GeneralConstants
    Read-Syms FileConstants
    Read-Syms DialogConstants$(!STF_LANGUAGE)

    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
    Set CommonStatus = STATUS_SUCCESSFUL
    EndWait

;----------------------------------------------------

Begin = +
    Set CurrentVersionValue = ""
    OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" $(!REG_KEY_READ) KeyNt
    IfStr $(KeyNt) != ""
        GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
        CloseRegKey $(KeyNt)
    EndIf

    Set TargetVersion = *($(CurrentVersionValue),4)
    IfStr $(TargetVersion)     != "3.51"
        IfStr $(TargetVersion) != "4.0"
            Set Error = "Unsupported Windows NT version "$(TargetVersion)" ."
            GoTo fatal
        EndIf
    EndIf

    Set ActivateDetection = FALSE
    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
        Set CommonStatus      = STATUS_REBOOT
        Set ActivateDetection = TRUE
        Set StartLabel        = configureadapter
 
        IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
            Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                 GoTo ShellCodeError
            EndIf
            Set Error = $($R0)
            Set from  = end
            Set to    = end
            GoTo nonfatalinfo
        EndIf
    Else
        Set StartLabel           = installadapter
        Set OEM_ABANDON_OPTIONS  = {}
        Set OEM_ABANDON_SOFTWARE = FALSE
        Set OEM_ABANDON_ON       = TRUE
        Set ActivateDetection    = TRUE
    EndIf

;----------------------------------------------------

    Set DetectedCard = FALSE
    IfStr(i) $(ActivateDetection) != TRUE
        GoTo skipdetection
    EndIf

    Set IRQList           = {3,4,5,7,10,11,12,15}
    Set IOBaseAddrDecList = {512,528,544,560,576,592,608,624,+
                             640,656,672,688,704,720,736,752,+
                             768,784,800,816,832,848,864,880,+
                             896,912,928,944,960,976,992,1008}
    Set IOBaseAddrHexList = {0x200,0x210,0x220,0x230,0x240,0x250,0x260,0x270,+
                             0x280,0x290,0x2A0,0x2B0,0x2C0,0x2D0,0x2E0,0x2F0,+
                             0x300,0x310,0x320,0x330,0x340,0x350,0x360,0x370,+
                             0x380,0x390,0x3A0,0x3B0,0x3C0,0x3D0,0x3E0,0x3F0}
    Set !STF_NC_PARAMS    = {{IRQ,1,60,{3,4,5,7,10,11,12,15}},+
                             {IOADDR,1,60,{512,528,544,560,576,592,608,624,+
                                           640,656,672,688,704,720,736,752,+
                                           768,784,800,816,832,848,864,880,+
                                           896,912,928,944,960,976,992,1008}}}
    Set !STF_NC_PNAMES    = {{IRQ,IRQValue,5},{IOADDR,IOBaseAddrValue,528}}
    Set TypeList          = {{IRQ, IRQList, IRQValue},+
                             {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
    Shell $(ParamInf) Param_SetDefaults {}
    IfStr(i) $(!STF_NCDETECT) == YES
        IfStr(i) $(!STF_NCOPTION) == $(Option)
           Set DetectedCard = TRUE
        EndIf
    EndIf

;----------------------------------------------------

skipdetection = +
    Set from  = $(fatal)
    Set to    = $(fatal)
    GoTo $(StartLabel)

;----------------------------------------------------

installadapter = +
    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    IfStr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
        IfStr(i) !(NTN_RegBase) == $(ProductKeyName)
           Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
               $(ProductVersion)
           IfInt $($ShellCode) != $(!SHELL_CODE_OK)
               GoTo ShellCodeError
           EndIf
           GoTo end
        Else
           Shell $(UtilityInf), CardExistedDlg
           IfInt $($ShellCode) != $(!SHELL_CODE_OK)
               GoTo ShellCodeError
           EndIf
           IfStr(i) $($R1) != "OK"
               Set CommonStatus = STATUS_USERCANCEL
               GoTo end
           EndIf
           Set OldVersionExisted = $(TRUE)
        EndIf
    EndIf

    IfStr(i) $(DetectedCard) != TRUE
        GoTo adaptersetup
    EndIf

    StartWait
    Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    EndWait
    IfStr(i) $($R0) != STATUS_SUCCESSFUL
        GoTo adaptersetup
    EndIf

    Set DetectedParams = $($R1)

    Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    GoTo adapteroptions

;----------------------------------------------------

configureadapter = +
    IfStr $(KeyProduct) == $(KeyNull)
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
        IfStr $(KeyProduct) == $(KeyNull)
            Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
            GoTo fatalregistry
        EndIf
    EndIf

    Shell $(UtilityInf) FindService, $(KeyProduct)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R0) != NO_ERROR
        GoTo fatalregistry
    EndIf

    Set KeyParameters = $($R2)
    CloseRegKey $($R1)

    IfStr $(KeyParameters) == $(KeyNull)
        Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
        GoTo fatalregistry
    EndIf

    Set OldVersionExisted = $(TRUE)
    Set ValueName         = ""
    Set ValueData         = ""
    Set ValueStr          = ""
    Set ValueList         = {}

    EnumRegValue $(KeyParameters) ValueList
    ForListDo $(ValueList)
        Set ValueItem = $($)
        Set ValueName = *($(ValueItem),1)
        Set ValueData = *($(ValueItem),4)
        IfStr(i) $(ValueName)      == "BusType"
            Set BusInterfaceType    = $(ValueData)
        Else-ifstr(i) $(ValueName) == "BusNumber"
            Set BusNumber           = $(ValueData)
        Else-ifstr(i) $(ValueName) == "InterruptNumber"
            Set IRQValue            = $(ValueData)
        Else-ifstr(i) $(ValueName) == "IoBaseAddress"
            Set IOBaseAddrValue     = $(ValueData)
        EndIf
    EndForListDo

    IfStr(i) $(IRQValue)        == ""
        Set IRQValue             = *($(IRQList), 3)
    EndIf

    IfStr(i) $(IOBaseAddrValue) == ""
        Set IOBaseAddrValue      = *($(IOBaseAddrDecList), 2)
    EndIf

;----------------------------------------------------

adaptersetup =+
    Shell $(ParamInf) Param_ParameterConfidence
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R0) != STATUS_SUCCESSFUL
        GoTo adapteroptions
    EndIf

    IfStr(i) $(DetectedCard) == TRUE
        IfStr(i) $(!STF_INSTALL_MODE) != CUSTOM
            GoTo adapterverify
        EndIf
    EndIf

    GoTo adapteroptions

;----------------------------------------------------

adapteroptions = +
    Set from = adapteroptions
    IfStr(i) $(!STF_GUI_UNATTENDED) == "YES"
        IfStr(i) $(!AutoNetInterfaceType) != ""
            Set BusInterfaceType = $(!AutoNetInterfaceType)
        Else
            Set BusInterfaceType = $(Adapter$(Option)Type)
        EndIf
        IfStr(i) $(!AutoNetBusNumber) != ""
            Set BusNumber = $(!AutoNetBusNumber)
        Else
            Set BusNumber = 0
        EndIf
        GoTo adapterverify
    EndIf

    Set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),$(IOBaseAddrValue)))

    Read-Syms FileDependentDlg$(!STF_LANGUAGE)
    SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId) $(HelpId)
    ui start "InputDlg"
    IfStr(i) $(DLGEVENT) == "CONTINUE"
                Set IRQValue      = $(Combo1Out)
                Set IOBaseAddress = $(Combo2Out)
                ui pop 1
    Else-ifstr(i) $(DLGEVENT) == "BACK"
                Set CommonStatus = STATUS_USERCANCEL
                ui pop 1
                GoTo end
    Else
                ui pop 1
                GoTo end
    EndIf

    Set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),$(IOBaseAddress)))

    IfStr(i) $(!STF_NCDETINFO) == {}
        Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set BusInterfaceType = $($R1)
        Set BusNumber        = $($R2)
    Else
        Set BusInterfaceType = *($(!STF_NCDETINFO),5)
        Set BusNumber        = *($(!STF_NCDETINFO),6)
    EndIf

;----------------------------------------------------

adapterverify =+
    IfStr(i) $(DetectedCard) != TRUE
        GoTo skipoptions
    EndIf
    Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R0) == STATUS_SUCCESSFUL
        GoTo skipoptions
    EndIf

    Set from = adapteroptions
    Set to   = skipoptions

    Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    Set Error = $($R0)

    GoTo Warning

;----------------------------------------------------

skipoptions =+
    IfInt $(OldVersionExisted) == $(TRUE)
        IfStr(i) $(!NTN_InstallMode) == configure
            GoTo writeparameters
        EndIf
    EndIf

    StartWait
    IfInt $(OldVersionExisted) == $(FALSE)
        IfStr(i) $(!NTN_InstallMode) == "install"
            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
                    Set Error = $($R0)
                    GoTo fatal
                Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
                    GoTo successful
                EndIf
                Set SrcDir = $($R1)
            EndIf

            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
        EndIf

        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
                          $(ProductSoftwareName), +
                          $(ProductSoftwareName), +
                          $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
                          $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "", +
                          $(NetEventDLL)
        Set OEM_ABANDON_SOFTWARE = TRUE
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf

        Set RegistryErrorIndex = $($R0)
        Set KeyProduct         = $($R1)
        Set SoftNetRulesKey    = $($R2)
        CloseRegKey $($R3)
        CloseRegKey $($R4)
        CloseRegKey $($R5)

        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            CloseRegKey $(KeyProduct)
            CloseRegKey $(SoftNetRulesKey)
            GoTo fatalregistry
        EndIf

        Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ)   ,$(SoftwareType)              }, +
                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)       }, +
                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)       }, +
                            {Title       ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductSoftwareTitle)      }, +
                            {Description ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductSoftwareDescription)}, +
                            {ServiceName ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductSoftwareName)       }, +
                            {InstallDate ,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)                  }}
        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf

        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            CloseRegKey $(KeyProduct)
            CloseRegKey $(SoftNetRulesKey)
            GoTo fatalregistry
        EndIf

        Set NewValueList = {{type     ,$(NoTitle),$(!REG_VT_SZ)      ,$(NetRuleSoftwareType)    }, +
                            {use      ,$(NoTitle),$(!REG_VT_SZ)      ,$(NetRuleSoftwareUse)     }, +
                            {bindform ,$(NoTitle),$(!REG_VT_SZ)      ,$(NetRuleSoftwareBindForm)}, +
                            {class    ,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)   }, +
                            {bindable ,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
                            {InfOption,$(NoTitle),$(!REG_VT_SZ)      ,$(Option)                 }}
        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf

        Set RegistryErrorIndex = $($R0)
        CloseRegKey $(KeyProduct)
        CloseRegKey $(SoftNetRulesKey)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            GoTo fatalregistry
        EndIf
    EndIf

    Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
    IfInt $($R4) != -1
        Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
    EndIf
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != NO_ERROR
        EndWait
        CloseRegKey $($R1)
        CloseRegKey $($R2)
        CloseRegKey $($R3)
        GoTo fatalregistry
    EndIf

    Set KeyParameters   = $($R3)
    Set KeyAdapterRules = $($R2)
    Set AdapterNumber   = $($R4)

    Set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ)   ,$(Manufacturer)                              }, +
                        {Title       ,$(NoTitle),$(!REG_VT_SZ)   ,"["$($R4)"] "$(ProductHardware$(Option)Title)}, +
                        {Description ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductHardware$(Option)Description)       }, +
                        {ProductName ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductHardwareName)                       }, +
                        {ServiceName ,$(NoTitle),$(!REG_VT_SZ)   ,$($R5)                                       }, +
                        {InstallDate ,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)                                  }}
    Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    CloseRegKey $($R1)

    Set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
    Set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
    Set NewValueList = {{type     ,$(NoTitle),$(!REG_VT_SZ)      ,$(NetRuleHardwareType) }, +
                        {bindform ,$(NoTitle),$(!REG_VT_SZ)      ,$(TempBindForm)        }, +
                        {class    ,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
                        {InfOption,$(NoTitle),$(!REG_VT_SZ)      ,$(Option)              }}
    Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules),$(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != NO_ERROR
        EndWait
        CloseRegKey $(KeyParameters)
        CloseRegKey $(KeyAdapterRules)
        GoTo fatalregistry
    EndIf
    CloseRegKey $(KeyAdapterRules)

    GoTo writeparameters

;----------------------------------------------------

writeparameters = +
    Set DefaultCoNetIdValue    = "MYNETWORK"
    Set DriverDescValue        = $(ProductHardware$(Option)Description)
    Set MaximumLinkSpeedValue  = 1000000
    Set MediaTypeValue         = 1
    Set NdisInterfaceValue     = $(ProductHardware$(Option)Ndis)
    Set NetworkAddressValue    = "000000000000"
    Set TxMinimumHoldoffValue  = 1000
    Set VendorDescriptionValue = "HOMEFREE"

    Set NewValueList = {{BusNumber        ,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)             }, +
                        {BusType          ,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)      }, +
                        {DefaultCoNetId   ,$(NoTitle),$(!REG_VT_SZ)   ,$(DefaultCoNetIdValue)   }, +
                        {DriverDesc       ,$(NoTitle),$(!REG_VT_SZ)   ,$(DriverDescValue)       }, +
                        {InterruptNumber  ,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)              }, +
                        {IoBaseAddress    ,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)       }, +
                        {MaximumLinkSpeed ,$(NoTitle),$(!REG_VT_DWORD),$(MaximumLinkSpeedValue) }, +
                        {MediaType        ,$(NoTitle),$(!REG_VT_DWORD),$(MediaTypeValue)        }, +
                        {NetworkAddress   ,$(NoTitle),$(!REG_VT_SZ)   ,$(NetworkAddressValue)   }, +
                        {NdisInterface    ,$(NoTitle),$(!REG_VT_DWORD),$(NdisInterfaceValue)    }, +
                        {TxMinimumHoldoff ,$(NoTitle),$(!REG_VT_DWORD),$(TxMinimumHoldoffValue) }, +
                        {VendorDescription,$(NoTitle),$(!REG_VT_SZ)   ,$(VendorDescriptionValue)}}
    Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    IfStr(i) $(!STF_GUI_UNATTENDED) == "YES"
        Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
    EndIf

    CloseRegKey $(KeyParameters)
    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != NO_ERROR
                GoTo fatalregistry
    EndIf
    EndWait

    GoTo successful

;----------------------------------------------------

bindingadapter = +
    Set Error = "Binding: Sorry, not yet implemented."
    GoTo fatal

;----------------------------------------------------

removeadapter = +
    IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(ProductSoftwareName)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo fatalregistry
        EndIf
    Else
        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), $(ProductSoftwareName), $(!NTN_RegBase)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo fatalregistry
        EndIf
    EndIf

    GoTo end

;----------------------------------------------------

UpgradeSoftware = +
    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    IfStr $(KeyProduct) != $(KeyNull)
        Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf

        Set !UG_Filename = $($R0)

        Install "Install-Update"

        IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
            GoTo fatal
        EndIf

        SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
        SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
        CloseRegKey $(KeyProduct)
    Else
        GoTo fatalregistry
    EndIf

    GoTo end

;----------------------------------------------------

successful = +
    GoTo end

;----------------------------------------------------

abandon = +
    ForListDo $(OEM_ABANDON_OPTIONS)
        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), $(ProductSoftwareName), $($)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo fatalregistry
        EndIf
    EndForListDo

    IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(ProductSoftwareName), FALSE
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo fatalregistry
        EndIf
    EndIf

    GoTo end

;----------------------------------------------------

warning = +
    Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R1) == "OK"
        GoTo $(to)
    Else-ifstr(i) $($R1) == "CANCEL"
        GoTo $(from)
    Else
        GoTo "end"
    EndIf

;----------------------------------------------------

nonfatalinfo = +
    Set CommonStatus = STATUS_USERCANCEL
    Set Severity     = STATUS
    GoTo nonfatalmsg

;----------------------------------------------------

nonfatal = +
    Set Severity = NONFATAL
    GoTo nonfatalmsg

;----------------------------------------------------

nonfatalmsg = +
    IfStr(i) $(Error) == ""
        Set Severity = NONFATAL
        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set Error = $($R0)
    EndIf

    Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    IfStr(i) $($R1) == "OK"
        GoTo $(from)
    Else
        GoTo "end"
    EndIf

;----------------------------------------------------

fatalregistry = +
    Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    Set Error = $($R0)

    GoTo fatal

;----------------------------------------------------

fataldetect = +
    Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    Set Error = $($R0)

    GoTo fatal

;----------------------------------------------------

fatal = +
    IfStr(i) $(Error) == ""
        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set Error = $($R0)
    EndIf
    Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    GoTo setfailed

;----------------------------------------------------

ShellCodeError = +
    Set DlgType      = "MessageBox"
    Set STF_MB_TITLE = $(ShellCodeErrorTitle)
    Set STF_MB_TEXT  = $(ShellCodeErrorText)
    Set STF_MB_TYPE  = 1
    Set STF_MB_ICON  = 3
    Set STF_MB_DEF   = 1
    ui start "Error Message"

    GoTo setfailed

;----------------------------------------------------

setfailed = +
    Set CommonStatus = STATUS_FAILED
    IfStr(i) $(OEM_ABANDON_ON) == TRUE
        Set OEM_ABANDON_ON = FALSE
        GoTo abandon
    EndIf

    GoTo end

;----------------------------------------------------

end = +
    GoTo term

;----------------------------------------------------

term = +
    Return $(CommonStatus)

;----------------------------------------------------

[Install-Option]
    Set STF_VITAL = ""
    IfStr(i) $(AddCopy) == "YES"
        AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
        AddSectionFilesToCopyList Files-Drv $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
    EndIf

    IfStr(i) $(DoCopy) == "YES"
       Set !STF_NCPA_FLUSH_COPYLIST = TRUE
       CopyFilesInCopyList
    EndIf

    Exit

;----------------------------------------------------

[Install-Update]
   Set STF_VITAL        = ""
   Set STF_OVERWRITE    = "VERIFYSOURCEOLDER"

   AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
   AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
   AddSectionFilesToCopyList Files-Drv $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers

   Set !STF_NCPA_FLUSH_COPYLIST = TRUE
   CopyFilesInCopyList

   Exit

;----------------------------------------------------

[ProductType]
 STF_PRODUCT                      = Winnt
 STF_PLATFORM                     = I386

[Files-Inf]
 1, OEMSETUP.INF

[Files-Hlp]
 1, SKYLINE.HLP

[Files-Drv]
 1, SKYLINE.SYS

[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:"

 ShellCodeErrorTitle              = "Error: "$(FunctionTitle)
 ShellCodeErrorText               = "Shell Code Error."

[DialogConstantsENG]
 Help                             = "&Help"
 Exit                             = "Cancel"
 OK                               = "OK"
 HelpContext                      = ""
 Continue                         = "Continue"
 Cancel                           = "Cancel"

[FileDependentDlgENG]
 Label1                           = "&IRQ Level:"
 Label2                           = "I/O &Port Address:"
 DlgType                          = "RadioCombination"
 DlgTemplate                      = "NE2000"
 Caption                          = $(FunctionTitle)
 Combo1List                       = $(IRQList)
 Combo1Out                        = $(IRQValue)
 Combo2List                       = $(IOBaseAddrHexList)
 Combo2Out                        = $(IOBaseAddress)
 ComboListItemsIn                 = {Combo1List, Combo2List}
 ComboListItemsOut                = {Combo1Out , Combo2Out }
 EditTextIn                       = ""
 EditTextLim                      = ""
 CBOptionsGreyed                  = {}
 NotifyFields                     = {NO, NO}

 MinHelpId                        = 100
 MaxHelpId                        = 1000
 HelpContext                      = $(HelpId) 
server: web4, load: 0.34