OBSOLETE/NT4PCI/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 PCI adapter
;
; 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]
    PCI

[Options]
    HF0002

[OptionsTextENG]
    HF0002 = "Diamond Multimedia HomeFree PCI Adapter"

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

[FileConstants]
 UtilityInf                       = "UTILITY.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

 ProductHardwareHF0002Description = "Diamond Multimedia HomeFree PCI Adapter"
 ProductHardwareHF0002Title       = "Diamond Multimedia HomeFree PCI Adapter"
 ProductHardwareHF0002Ndis        = 5      ; PCI
 AdapterHF0002Type                = 5      ; PCI
 HF0002VendorId                   = 57689  ; 0xE159
 HF0002DeviceId                   = 2      ; 0x0002

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

[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

    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
        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
        Else
            Set StartLabel = configureadapter
        EndIf
    Else
        Set StartLabel           = Installadapter
        Set OEM_ABANDON_OPTIONS  = {}
        Set OEM_ABANDON_SOFTWARE = FALSE
        Set OEM_ABANDON_ON       = TRUE
    EndIf

    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) $(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

    GoTo Installproduct

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

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 HardParameterKey = $($R2)
    CloseRegKey $($R1)

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

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

    EnumRegValue $(HardParameterKey) ValueList

    ForListDo $(ValueList)
        Set ValueItem = $($)
        Set ValueName = *($(ValueItem), 1)
        Set ValueData = *($(ValueItem), 4)
        IfStr(i) $(ValueName)          == "DefaultCoNetId"
            Set DefaultCoNetIdValue     = $(ValueData)
;       Else-IfStr(i) $(ValueName)     == "InterruptNumber"
;           Set InterruptNumberValue    = $(ValueData)
;       Else-IfStr(i) $(ValueName)     == "IoBaseAddress"
;           Set IoBaseAddressValue      = $(ValueData)
        Else-IfStr(i) $(ValueName)     == "MaximumLinkSpeed"
            Set MaximumLinkSpeedIndex   = $(ValueData)
        Else-IfStr(i) $(ValueName)     == "NetworkAddress"
            Set NetworkAddressValue     = $(ValueData)
        Else-IfStr(i) $(ValueName)     == "TxMinimumHoldoff"
            Set TxMinimumHoldoffIndex   = $(ValueData)
        Else-IfStr(i) $(ValueName)     == "VendorDescription"
            Set VendorDescriptionValue  = $(ValueData)
        EndIf
    EndForListDo

    IfStr(i) $(DefaultCoNetIdValue)   == ""
        Set DefaultCoNetIdValue        = "MYNETWORK"
    EndIf

;   IfStr(i) $(InterruptNumberValue)  == ""
;       Set InterruptNumberValue       = 0
;   EndIf

;   IfStr(i) $(IoBaseAddressValue)    == ""
;       Set IoBaseAddressValue         = 0
;   EndIf

    Set MaximumLinkSpeedValue          = *($(MaximumLinkSpeedList), ~($(MaximumLinkSpeedValues),$(MaximumLinkSpeedIndex)))
    IfStr(i) $(MaximumLinkSpeedValue) == ""
        Set MaximumLinkSpeedValue      = *($(MaximumLinkSpeedList), 1)
    EndIf

    IfStr(i) $(NetworkAddressValue)   == ""
        Set NetworkAddressValue        = "000000000000"
    EndIf

    Set TxMinimumHoldoffValue          = *($(TxMinimumHoldoffList), ~($(TxMinimumHoldoffValues),$(TxMinimumHoldoffIndex)))
    IfStr(i) $(TxMinimumHoldoffValue) == ""
        Set TxMinimumHoldoffValue      = *($(TxMinimumHoldoffList), 10)
    EndIf

    IfStr(i) $(VendorDescriptionValue) == ""
        Set VendorDescriptionValue      = "HOMEFREE"
    EndIf

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

adapteroptions = +
    Set from = adapteroptions

    Read-Syms FileDependentDlg$(!STF_LANGUAGE)
    SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId) $(HelpId)
    UI start "InputDlg"
    IfStr(i) $(DLGEVENT)          == "CONTINUE"
        Set MaximumLinkSpeedIndex  = $(Combo1Out)
        Set TxMinimumHoldoffIndex  = $(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 MaximumLinkSpeedValue = *($(MaximumLinkSpeedValues), ~($(MaximumLinkSpeedList),$(MaximumLinkSpeedIndex)))
    Set TxMinimumHoldoffValue = *($(TxMinimumHoldoffValues), ~($(TxMinimumHoldoffList),$(TxMinimumHoldoffIndex)))

    Read-Syms DefaultCoNetIdDlg$(!STF_LANGUAGE)
    UI start "InputDlg"
    IfStr(i) $(DLGEVENT) == "CONTINUE"
        Set DefaultCoNetIdValue = $(EditTextOut)
        UI pop 1
    Else-IfStr(i) $(DLGEVENT) == "EXIT"
        UI pop 1
    Else
        UI pop 1
        GoTo end
    EndIf

    Read-Syms NetworkAddressDlg$(!STF_LANGUAGE)
    UI start "InputDlg"
    IfStr(i) $(DLGEVENT) == "CONTINUE"
        Set NetworkAddressValue = $(EditTextOut)
        UI pop 1
    Else-IfStr(i) $(DLGEVENT) == "EXIT"
        UI pop 1
    Else
        UI pop 1
        GoTo end
    EndIf

    Read-Syms VendorDescriptionDlg$(!STF_LANGUAGE)
    UI start "InputDlg"
    IfStr(i) $(DLGEVENT) == "CONTINUE"
        Set VendorDescriptionValue = $(EditTextOut)
        UI pop 1
    Else-IfStr(i) $(DLGEVENT) == "EXIT"
        UI pop 1
    Else
        UI pop 1
        GoTo end
    EndIf

    IfStr(i) $(!NTN_InstallMode) == configure
        GoTo updateparameters
    EndIf

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

Installproduct = +
    StartWait

    Shell $(UtilityInf), GetPCIInformation, $($(Option)VendorId) $($(Option)DeviceId)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    Set AdapterList = $($R0)

    IfStr(i) $(AdapterList) == {}
        Set Error            = $(CANNOT_FIND_ANY_CARD)
        Set CommonStatus     = USER_CANCEL
        Set from             = end
        GoTo nonfatal
    EndIf

    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

    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)
    IfStr(i) $(RegistryErrorIndex) != "NO_ERROR"
        EndWait
        CloseRegKey $($R1)
        CloseRegKey $($R2)
        CloseRegKey $($R3)
        CloseRegKey $($R4)
        CloseRegKey $($R5)
        GoTo fatalregistry
    EndIf

    Set SoftProductKey   = $($R1)
    Set SoftNetRuleKey   = $($R2)
    Set SoftServiceKey   = $($R3)
    Set SoftParameterKey = $($R4)
    Set SoftLinkageKey   = $($R5)
    Set NewValueList     = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ)   ,$(SoftwareType)              }, +
                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)       }, +
                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)       }, +
                            {Title       ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductSoftwareTitle)      }, +
                            {Description ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductSoftwareDescription)}, +
                            {ServiceName ,$(NoTitle),$(!REG_VT_SZ)   ,$(ProductSoftwareName)       }, +
                            {InstallDate ,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)                  }}
    Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != "NO_ERROR"
        EndWait
        CloseRegKey $(SoftProductKey)
        CloseRegKey $(SoftNetRuleKey)
        CloseRegKey $(SoftServiceKey)
        CloseRegKey $(SoftParameterKey)
        CloseRegKey $(SoftLinkageKey)
        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, $(SoftNetRuleKey), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf

    Set RegistryErrorIndex = $($R0)
    CloseRegKey $(SoftProductKey)
    CloseRegKey $(SoftNetRuleKey)
    CloseRegKey $(SoftServiceKey)
    CloseRegKey $(SoftParameterKey)
    CloseRegKey $(SoftLinkageKey)
    IfStr(i) $(RegistryErrorIndex) != "NO_ERROR"
        EndWait
        GoTo fatalregistry
    EndIf

    ForListDo $(AdapterList)
        Set BusNum      = *($($),1)
        Set DeviceNum   = *($($),2)
        Set FunctionNum = *($($),3)

        Set-Mul SlotNum = $(FunctionNum), 32
        Set-Add SlotNum = $(SlotNum), $(DeviceNum)

        Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), $(SlotNum), +
              $(ProductHardware$(Option)Description), $(ProductHardwareName)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf

        IfStr(i) $($R0) != "NO_ERROR"
            Set Error = $($R0)
            GoTo fatal
        EndIf

        IfStr(i) $($R1) != "YES"
            Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName), $(STF_CONTEXTINFNAME), $(ProductKeyName)
            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                GoTo ShellCodeError
            EndIf

            IfInt $($R4) != -1
                Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
            EndIf

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

            Set HardNetCardKey   = $($R1)
            Set HardNetRuleKey   = $($R2)
            Set HardParameterKey = $($R3)
            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, $(HardNetCardKey), $(NewValueList)
            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                GoTo ShellCodeError
            EndIf

            Set BusTypeValue           = $(Adapter$(Option)Type)
            Set DefaultCoNetIdValue    = "MYNETWORK"
            Set DriverDescValue        = $(ProductHardware$(Option)Description)
;           Set InterruptNumberValue   = 0
;           Set IoBaseAddressValue     = 0
            Set MaximumLinkSpeedValue  = *($(MaximumLinkSpeedValues),  1)
            Set MediaTypeValue         = 1
            Set NdisInterfaceValue     = $(ProductHardware$(Option)Ndis)
            Set NetworkAddressValue    = "000000000000"
            Set TxMinimumHoldoffValue  = *($(TxMinimumHoldoffValues), 10)
            Set VendorDescriptionValue = "HOMEFREE"

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

        EndIf  

        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, $(HardNetRuleKey), $(NewValueList)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf

        CloseRegKey $(HardNetCardKey)
        CloseRegKey $(HardNetRuleKey)

        Set NewValueList = {{BusNumber     ,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)     }, +
                            {SlotNumber    ,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)    }, +
                            {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNum)}}
        Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf

        CloseRegKey $(HardParameterKey)
    EndForListDo

    EndWait
    GoTo successful

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

updateparameters = +
    Set NewValueList = {{DefaultCoNetId   ,$(NoTitle),$(!REG_VT_SZ)   ,$(DefaultCoNetIdValue)   }, +
                        {MaximumLinkSpeed ,$(NoTitle),$(!REG_VT_DWORD),$(MaximumLinkSpeedValue) }, +
                        {NetworkAddress   ,$(NoTitle),$(!REG_VT_SZ)   ,$(NetworkAddressValue)   }, +
                        {TxMinimumHoldoff ,$(NoTitle),$(!REG_VT_DWORD),$(TxMinimumHoldoffValue) }, +
                        {VendorDescription,$(NoTitle),$(!REG_VT_SZ)   ,$(VendorDescriptionValue)}}
    Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
 
    CloseRegKey $(HardParameterKey)
    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

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

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 = +
    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 , SIZE=99999 , RENAME=$(!UG_Filename)

[Files-Hlp]
 1, SKYLINE.HLP  , SIZE=9999

[Files-Drv]
 1, SKYLINE.SYS  , SIZE=99999

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

 MaximumLinkSpeedList             = ^(MaximumLinkSpeedChoices, 1)
 MaximumLinkSpeedValues           = ^(MaximumLinkSpeedChoices, 2)
 TxMinimumHoldoffList             = ^(TxMinimumHoldoffChoices, 1)
 TxMinimumHoldoffValues           = ^(TxMinimumHoldoffChoices, 2)

 ShellCodeErrorTitle              = "Error: "$(FunctionTitle)
 ShellCodeErrorText               = "Shell Code Error."
 CANNOT_FIND_ANY_CARD             = "Network adapter or card is not present in the system"

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

[FileDependentDlgENG]
 DlgText                          = "Please select values for: "
 DlgTemplate                      = "TWO_COMBO"
 DlgType                          = "Combination"
 Caption                          = $(FunctionTitle)

 Combo1Label                      = "&Maximum Link Speed :"
 Combo1List                       = $(MaximumLinkSpeedList)
 Combo1Out                        = $(MaximumLinkSpeedValue)
 Combo2Label                      = "&Tx Minimum Holdoff :"
 Combo2List                       = $(TxMinimumHoldoffList)
 Combo2Out                        = $(TxMinimumHoldoffValue)

 ComboListItemsIn                 = {Combo1List, Combo2List}
 ComboListItemsOut                = {Combo1Out , Combo2Out }

 EditTextLim                      = ""
 CBOptionsGreyed                  = {} 

 MinHelpId                        = 100
 MaxHelpId                        = 1000
 HelpContext                      = $(HelpId) 

[MaximumLinkSpeedChoices]
 MLS_1                            = "1 Mbps (12MHz)", 1000000
 MLS_2                            = "2 Mbps (24MHz)", 2000000
 MLS_3                            = "4 Mbps (48MHz)", 4000000 

[TxMinimumHoldOffChoices]
 TXMHO_1                          =  "100", 100
 TXMHO_2                          =  "200", 200
 TXMHO_3                          =  "300", 300
 TXMHO_4                          =  "400", 400
 TXMHO_5                          =  "500", 500
 TXMHO_6                          =  "600", 600
 TXMHO_7                          =  "700", 700
 TXMHO_8                          =  "800", 800
 TXMHO_9                          =  "900", 900
 TXMHO_10                         = "1000",1000
 TXMHO_11                         = "1100",1100
 TXMHO_12                         = "1200",1200
 TXMHO_13                         = "1300",1300
 TXMHO_14                         = "1400",1400
 TXMHO_15                         = "1500",1500
 TXMHO_16                         = "1600",1600
 TXMHO_17                         = "1700",1700
 TXMHO_18                         = "1800",1800
 TXMHO_19                         = "1900",1900
 TXMHO_20                         = "2000",2000

[DefaultCoNetIdDlgENG]
 Caption                          = "Input Default CoNetId"
 DlgText                          = "Please input Default CoNetId: "$(!LF)+
                                    "For example: MYNETWORK"$(!LF)$(!LF)
 Edit1Label                       = "&Default CoNetId :"
 Continue                         = "&OK"
 Exit                             = "&Skip"
 Help                             = "&Help"
 DlgType                          = "Edit"
 DlgTemplate                      = "QUERY_COMPUTER_NAME"
 EditTextLim                      = 32
 EditTextIn                       = $(DefaultCoNetIdValue)
 EditFocus                        = "ALL"

[NetworkAddressDlgENG]
 Caption                          = "Input Network Address"
 DlgText                          = "Please input Network Address: "$(!LF)+
                                    "Example ID: 134130220237"$(!LF)$(!LF)
 Edit1Label                       = "&Network Address :"
 Continue                         = "&OK"
 Exit                             = "&Skip"
 Help                             = "&Help"
 DlgType                          = "Edit"
 DlgTemplate                      = "QUERY_COMPUTER_NAME"
 EditTextLim                      = 12
 EditTextIn                       = $(NetworkAddressValue)
 EditFocus                        = "ALL"

[VendorDescriptionDlgENG]
 Caption                          = "Input Vendor Description"
 DlgText                          = "Please input Vendor Description: "$(!LF)+
                                    "For example: HOMEFREE"$(!LF)$(!LF)
 Edit1Label                       = "&Vendor Description :"
 Continue                         = "&OK"
 Exit                             = "&Skip"
 Help                             = "&Help"
 DlgType                          = "Edit"
 DlgTemplate                      = "QUERY_COMPUTER_NAME"
 EditTextLim                      = 32
 EditTextIn                       = $(VendorDescriptionValue)
 EditFocus                        = "ALL"
server: web4, load: 0.51