OBSOLETE/NT4PCMCIA/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 PC 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]
    PCMCIA

[Options]
    HF0000

[OptionsTextENG]
    HF0000 = "Diamond Multimedia HomeFree PC 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               = "skylineSys 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

 ProductHardwareHF0000Description  = "Diamond Multimedia HomeFree PC Card"
 ProductHardwareHF0000Title        = "Diamond Multimedia HomeFree PC Card"
 ProductHardwareHF0000Ndis         = 8
 AdapterHF0000Type                 = 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 Status       = STATUS_FAILED
    Set Option       = $($1)
    Set SrcDir       = $($2)
    Set AddCopy      = $($3)
    Set DoCopy       = $($4)
    Set DoConfig     = $($5)
    Set LanguageList = ^(LanguagesSupported, 1)
    IfContains(i) $($0) NOT-IN $(LanguageList)
        Return STATUS_NOLANGUAGE
    EndIf

    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 ActivateDetection    = TRUE
        Set StartLabel           = installadapter
        Set OEM_ABANDON_OPTIONS  = {}
        Set OEM_ABANDON_SOFTWARE = FALSE
        Set OEM_ABANDON_ON       = TRUE
    EndIf

    Set DetectedCard = FALSE

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

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

    Set IRQList          = {3,4,5,7,9,10,11,12,15}
    Set IOADDR_Addr_List = {256,272,288,304,320,336,352,368,+
                            384,400,416,432,448,464,480,496,+
                            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,972,992,1008}
    Set IOADDR_Hex_List  = {0x100,0x110,0x120,0x130,0x140,0x150,0x160,0x170,+
                            0x180,0x190,0x1A0,0x1B0,0x1C0,0x1D0,0x1E0,0x1F0,+
                            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 TypeList         = {{IRQ,IRQList,IRQValue},+
                            {IOADDR, IOADDR_Addr_List, IOBaseAddrValue}}
    Set !STF_NC_PARAMS   = {{IRQ,1,80,{3,4,5,7,9,10,11,12,15}},+
                            {IOADDR,1,100,{256,272,288,304,320,336,352,368,+
                                           384,400,416,432,448,464,480,496,+
                                           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,972,992,1008}}}
    Set !STF_NC_PNAMES   = {{IRQ,IRQValue,5},+
                            {IOADDR,IOBaseAddrValue,768}}

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

    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

    Set CurrParamSettings = {}
    IfStr(i) $(DetectedCard) != TRUE
        GoTo adaptersetup2
    EndIf

    StartWait
    Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    EndWait

    IfStr(i) $($R0) != STATUS_SUCCESSFUL
        GoTo daptersetup2
    EndIf

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

    GoTo adaptersetup2

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

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)      == "IoBaseAddress"
            Set IOBaseAddrValue     = $(ValueData)
        Else-IfStr(i) $(ValueName) == "InterruptNumber"
            Set IRQValue            = $(ValueData)
        EndIf
    EndForListDo

    Set BusInterfaceType = $(Adapter$(Option)Type)
    Set BusNumber        = 0
    Shell $(ParamInf) Param_SaveValues
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    Set CurrParamSettings = $($R0)

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

adaptersetup = +
    Set from = adapteroptions
    Set IOADDR_Hex_Value = *($(IOADDR_Hex_List), ~($(IOADDR_Addr_List),$(IOBaseAddrValue)))
    Shell $(ParamInf) Param_ParameterConfidence
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R0) != STATUS_SUCCESSFUL
        GoTo adapteroptions
    EndIf

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

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

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

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

    Read-Syms FileDependentDlg$(!STF_LANGUAGE)
    SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId) $(HelpId)
    ui start "InputDlg"
    IfStr(i) $(DLGEVENT) == "CONTINUE"
        Set IOADDR_Hex_Value = $(Combo1Out)
        Set IOBaseAddrValue  = *($(IOADDR_Addr_List), ~($(IOADDR_Hex_List),$(IOADDR_Hex_Value)))
        Set IRQValue         = $(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

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

getbustype = +
        Set BusInterfaceType = $(Adapter$(Option)Type)
        Set BusNumber        = 0

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

adapterverify = +
    IfStr(i) $(DetectedCard) != TRUE
        Shell $(ParamInf) Param_SaveValues
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set NewParamSettings = $($R0)
        IfStr(i) $(CurrParamSettings) == {}
            Set DiffParamSettings = $(NewParamSettings)
        Else
            Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
            Set DiffParamSettings = $($R0)
        EndIf
        Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        IfStr(i) $($R0) == STATUS_SUCCESSFUL
            GoTo skipoptions
        EndIf
    Else
        Set CardVerifyIndex = $(!STF_NCDETCARD)
        Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        IfStr(i) $($R0) == STATUS_SUCCESSFUL
            GoTo skipoptions
        EndIf
    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 = +
    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\Diamond Multimedia\HF0000" $(MAXIMUM_ALLOWED) MyPcmciaHandle
    IfStr $(MyPcmciaHandle) == $(KeyNull)
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\Diamond Multimedia" $(MAXIMUM_ALLOWED) MyPcmciaKey
        CreateRegKey $(MyPcmciaKey) {"HF0000",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyPcmcialHandle
        CloseRegKey ($MyPcmciaKey)
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\Diamond Multimedia\HF0000" $(MAXIMUM_ALLOWED) MyPcmciaHandle
    EndIf

    Set NewValueList = {{Driver,$(NoTitle),$(!REG_VT_SZ),"skyline"}}
    Shell $(UtilityInf), AddValueList, $(MyPcmciaHandle), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    CloseRegKey $(MyPcmciaHandle)

    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\Diamond Multimedia\HF0000" $(MAXIMUM_ALLOWED) MyPcmciaHandle
    IfStr $(MyPcmciaHandle) == $(KeyNull)
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\Diamond Multimedia" $(MAXIMUM_ALLOWED) MyPcmciaKey
        CreateRegKey $(MyPcmciaKey) {"HF0000",0,GenericClass} "" $(MAXIMUM_ALLOWED) "" MyPcmcialHandle
        CloseRegKey ($MyPcmciaKey)
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\Pcmcia\DataBase\Diamond Multimedia\HF0000" $(MAXIMUM_ALLOWED) MyPcmciaHandle
    EndIf

    Set NewValueList = {{Driver,$(NoTitle),$(!REG_VT_SZ),"skyline"}}
    Shell $(UtilityInf), AddValueList, $(MyPcmciaHandle), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    CloseRegKey $(MyPcmciaHandle)

    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 = {{BusType          ,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)      }, +
                        {BusNumber        ,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)             }, +
                        {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)        }, +
                        {NdisInterface    ,$(NoTitle),$(!REG_VT_DWORD),$(NdisInterfaceValue)    }, +
                        {Pcmcia           ,$(NoTitle),$(!REG_VT_DWORD),1                        }, +
                        {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)
    EndIf
    CloseRegKey $(KeyParameters)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    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)
        OpenRegKey $(!REG_H_LOCAL) "" $(MS_ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    EndIf
    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)}
        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 Severity     = STATUS
    Set CommonStatus = STATUS_USERCANCEL
    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                             = "I/O &Port Address:"
 Label2                             = "&Interrupt Number:"
 DlgType                            = "Combination"
 DlgTemplate                        = "NE2000"
 Caption                            = $(FunctionTitle)
 Combo1List                         = $(IOADDR_Hex_List)
 Combo1Out                          = $(IOADDR_Hex_Value)
 Combo2List                         = $(IRQList)
 Combo2Out                          = $(IRQValue)
 ComboListItemsIn                   = {Combo1List, Combo2List}
 ComboListItemsOut                  = {Combo1Out , Combo2Out }
 EditTextIn                         = ""
 EditTextLim                        = ""
 CBOptionsGreyed                    = {}
 NotifyFields                       = {NO, NO}

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