OEMSETUP.INF Driver File Contents (Canyon_GWA-E06.zip)

;********************************************************************
;
;   The Cardbus WLAN miniport driver oemsetup file
;   for WinNT 3.5x, WinNT 4.0
;   (NDIS 4.0 driver)
;
;********************************************************************

[Identification]
    OptionType = NetAdapter

[PlatformsSupported]
    ISA
    EISA
    PCMCIA

[LanguagesSupported]
    ENG

[Options]
    RTL8180

[OptionsTextENG]
    RTL8180   = "Realtek RTL8180 CardBus WLAN Adapter"

[Source Media Descriptions]
    1   = "Realtek RTL8180 CardBus WLAN Adapter Device Driver Diskette"

[Files-Sys]
    1,RTL8180.sys, SIZE=210000

[Files-Inf]
    1, oemsetup.inf, SIZE=40000, RENAME=$(!UG_Filename)

[Files-CPL]
    1,RTLWCFG.CPL, SIZE=130000

[Files-PKT]
    1,PACKET4.SYS, SIZE=19000

[date]
    Now = {} ? $(!LIBHANDLE) GetSystemDate

[FileConstants]
    UtilityInf      = "UTILITY.INF"
    ParamInf        = "NCPARAM.INF"
    SubroutnInf     = "SUBROUTN.INF"
    SoftwareType    = "driver"
    NetEventDLL     = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\Drivers\RTL8180.sys"
    Manufacturer    = "RealTek"
    ProductMajorVersion      = "4"
    ProductMinorVersion      = "31"
    ProductVersion           = $(ProductMajorVersion)"."$(ProductMinorVersion)
    ProductSoftwareName      = "RTL8180"
    ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\RTL8180.sys"
    NetRuleSoftwareType      = "RTL8180Sys ndisDriver RTL8180Driver"
    NetRuleSoftwareUse       = $(SoftwareType)
    NetRuleSoftwareBindForm  = """RTL8180Sys"" yes no container"
    NetRuleSoftwareClass     = {"RTL8180Driver basic"}
    NetRuleSoftwareBindable  = {"RTL8180Driver RTL8180Adapter non exclusive 100"}
    ProductHardwareName      = "RTL8180"
    NetRuleHardwareType      = "RTL8180 RTL8180Adapter"
    NetRuleHardwareBindForm  = " yes yes container"
    NetRuleHardwareClass     = {"RTL8180Adapter basic"}
    ProductKeyName           = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
    ParamKeyName             = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
    ProductSoftwareDescription = "Realtek RTL8180 CardBus WLAN Adapter Driver"
    ProductSoftwareTitle     = "Realtek RTL8180 CardBus WLAN Adapter Driver"
    ProductHardwareDescription = "Realtek RTL8180 CardBus WLAN Adapter"
    ProductHardwareTitle     = "Realtek RTL8180 CardBus WLAN Adapter"

    AdapterType = 5        ;; PCI board
    VendorID = 4332        ;; 0x10EC
    CFID = 2172653804      ;;  0x818010EC

[PcmciaKeys]
    CardManufacturer   = "Realtek"    ;; Manufactutre Name
    CardKeyName        = "Rtl8180"    ;; Product Name
    PcmciaPath         = $(!NTN_ServiceBase)"\Pcmcia\DataBase"
    PcmciaManufacturePath  = $(!NTN_ServiceBase)"\Pcmcia\DataBase\"$(CardManufacturer)
    PcmciaProductPath  = $(!NTN_ServiceBase)"\Pcmcia\DataBase\"$(CardManufacturer)"\"$(CardKeyName)
    PcmciaRMKeyName    = $(!NTN_ServiceBase)"\resman"
    PcmciaRMDBKeyName  = $(!NTN_ServiceBase)"\resman\MacDataBase"

[GeneralConstants]
    from      = ""
    to        = ""
    ExitCodeOk     = 0
    ExitCodeCancel = 1
    ExitCodeFatal  = 2
    KeyNull            = ""
    MAXIMUM_ALLOWED    = 33554432
    RegistryErrorIndex = NO_ERROR
    KeyProduct         = ""
    KeyParameters      = ""
    TRUE            = 1
    FALSE           = 0
    PcmciaKey          = ""
    PcmciaManufactureKey = ""
    PcmciaProductKey   = ""
    NoTitle            = 0
    ExitState   = "Active"
    OldVersionExisted  = FALSE
    DriverPath         = $(!STF_NTPATH)\drivers

[FileConstantsENG]
    ProCaption                 = "Windows NT Setup"
    ProCancel                  = "Cancel"
    ProCancelMsg               = "Windows NT Networking is not correctly installed.   "+
                                 "Are you sure you want to cancel copying files?"
    ProCancelCap               = "Network Setup Message"
    ProText1                   = "Copying:"
    ProText2                   = "To:"
    FunctionTitle              = "Realtek RTL8180 CardBus WLAN Adapter Setup"

    ChannelList       = ^(ChannelDlg, 1)
    ChannelValues     = ^(ChannelDlg, 2)
    NetworkTypeList   = ^(NetworkTypeDlg, 1)
    NetworkTypeValues = ^(NetworkTypeDlg, 2)
    IRQList           = ^(IRQChoicesDlg, 1)
    IRQLevels         = ^(IRQChoicesDlg, 2)
    IOBaseList        = ^(IOBaseAddrChoicesDlg, 1)
    IOBaseValues      = ^(IOBaseAddrChoicesDlg, 2)
    MemAddrList       = ^(MemoryAddrChoicesDlg, 1)
    MemAddrValues     = ^(MemoryAddrChoicesDlg, 2)
    NoList            = ^(NoChoices, 1)
    NoValues          = ^(NoChoices, 2)
    ShellCodeErrorTitle = "Error: "$(Function$(Option)Title)
    ShellCodeErrorText      = "Shell Code Error."
    CANNOT_FIND_ANY_CARD    = "Network card is not present in the system"

[HexDigits]
    Hex0 = 0
    Hex1 = 1
    Hex2 = 2
    Hex3 = 3
    Hex4 = 4
    Hex5 = 5
    Hex6 = 6
    Hex7 = 7
    Hex8 = 8
    Hex9 = 9
    HexA = A
    HexB = B
    HexC = C
    HexD = D
    HexE = E
    HexF = F

[IRQChoicesDlg]
    IRQ0  = "3",3
    IRQ1  = "4",4
    IRQ2  = "5",5
    IRQ3  = "7",7
    IRQ4  = "9",9
    IRQ5  = "10",10
    IRQ6  = "11",11
    IRQ7  = "12",12
    IRQ8  = "15",15

[IOBaseAddrChoicesDlg]
   IOBase_1  = "0x1000",4096
   IOBase_2  = "0x1800",6144
   IOBase_3  = "0x2000",8192
   IOBase_4  = "0x2800",10240
   IOBase_5  = "0x3000",12288
   IOBase_6  = "0x3800",14336
   IOBase_7  = "0x4000",16384
   IOBase_8  = "0x4800",18432
   IOBase_9  = "0x5000",20480
   IOBase_10 = "0x5800",22528
   IOBase_11 = "0x6000",24576
   IOBase_12 = "0x6800",26624
   IOBase_13 = "0x7000",28672
   IOBase_14 = "0x7800",30720
   IOBase_15 = "0x8000",32768
   IOBase_16 = "0x8800",34816
   IOBase_17 = "0x9000",36864
   IOBase_18 = "0x9800",38912
   IOBase_19 = "0xA000",40960
   IOBase_20 = "0xA800",43008
   IOBase_21 = "0xB000",45056
   IOBase_22 = "0xB800",47104
   IOBase_23 = "0xC000",49152
   IOBase_24 = "0xC800",51200
   IOBase_25 = "0xD000",53248
   IOBase_26 = "0xD800",55296
   IOBase_27 = "0xE000",57344
   IOBase_28 = "0xE800",59392
   IOBase_29 = "0xF000",61440
   IOBase_30 = "0xF800",63488

[MemoryAddrChoicesDlg]
    MA_1  = "0xC8000", 819200
    MA_2  = "0xC9000", 823296
    MA_3  = "0xCA000", 827392
    MA_4  = "0xCB000", 831488
    MA_5  = "0xCC000", 835584
    MA_6  = "0xCD000", 839680
    MA_7  = "0xCE000", 843776
    MA_8  = "0xCF000", 847872
    MA_9  = "0xD0000", 851968
    MA_10 = "0xD1000", 856064
    MA_11 = "0xD2000", 860160
    MA_12 = "0xD3000", 864256
    MA_13 = "0xD4000", 868352
    MA_14 = "0xD5000", 872448
    MA_15 = "0xD6000", 876544
    MA_16 = "0xD7000", 880640
    MA_17 = "0xD8000", 884736
    MA_18 = "0xD9000", 888832
    MA_19 = "0xDA000", 892928
    MA_20 = "0xDB000", 897024
    MA_21 = "0xDC000", 901120
    MA_22 = "0xDD000", 905216
    MA_23 = "0xDE000", 909312
    MA_24 = "0xDF000", 913408


[NetworkTypeDlg]
    NetworkType_1 = "0", 0
    NetworkType_2 = "1", 1

[ChannelDlg]
    Channel_01 = "1", 1
    Channel_02 = "2", 2
    Channel_03 = "3", 3
    Channel_04 = "4", 4
    Channel_05 = "5", 5
    Channel_06 = "6", 6
    Channel_07 = "7", 7
    Channel_08 = "8", 8
    Channel_09 = "9", 9
    Channel_10 = "10", 10
    Channel_11 = "11", 11
;;    Channel_12 = "12", 12
;;    Channel_13 = "13", 13
;;    Channel_14 = "14", 14

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

[Identify]
    read-syms Identification
    shell "" DebugControl

    set Status     = STATUS_SUCCESSFUL
    set Identifier = $(OptionType)
    set Media      = #("Source Media Descriptions", 1, 1)

    Return $(Status) $(Identifier) $(Media)

[ReturnOptions]
    shell "" DebugControl

    set OptionList     = ^(Options, 1)
    set OptionTextList = ^(OptionsText$($0), 1)
    set Status         = STATUS_SUCCESSFUL

    set LanguageList = ^(LanguagesSupported, 1)
    Ifcontains(i) $($0) in $(LanguageList)
      ifstr(i) $($0) == ""
        set Status = STATUS_NOLANGUAGE
        goto ExitReturnOptions
      endif
    else
      set Status = STATUS_NOLANGUAGE
      goto ExitReturnOptions
    endif

    set PlatformList = ^(PlatformsSupported, 1)
    Ifcontains(i) $($1) NOT-IN $(PlatformList)
      ifstr(i) $($1) != ""
        set Status = STATUS_NOTSUPPORTED
      endif
    endif

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

[InstallOption]
    set Option   = $($1)
    set SrcDir   = $($2)
    set AddCopy  = $($3)
    set DoCopy   = $($4)
    set DoConfig = $($5)

    read-syms GeneralConstants
    read-syms FileConstants
    read-syms DialogConstants$(!STF_LANGUAGE)
    read-syms FileConstants$(!STF_LANGUAGE)

    shell "" DebugControl
    StartWait

    set LanguageList = ^(LanguagesSupported, 1)

    Ifstr(i) $(!NTN_InstallMode) == deinstall
        set SubFunction = RemoveAdapter
    else-Ifstr(i) $(!NTN_InstallMode) == install
        set SubFunction = InstallAdapter
    else-Ifstr(i) $(!NTN_InstallMode) == update
        set SubFunction = UpgradeSoftware
    else-Ifstr(i) $(!NTN_InstallMode) == configure
        set SubFunction = ConfigureAdapter
    else
        set SubFunction = NoWay
    endif

    Shell "" $(SubFunction)
    EndWait
    return $($R0)

[InstallAdapter]
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)
    read-syms DialogConstants$(!STF_LANGUAGE)
    detect date

    set CurrentTime = *($(Now),1)
    set SrcDir      = $(!p:SrcDir)
    set Option      = $(!p:Option)
    set DoCopy      = $(!p:DoCopy)
    set AddCopy     = $(!p:AddCopy)
    set KeyProduct  = $(KeyNull)
    set DoSetup     = TRUE

    set OldVersionExisted = FALSE
    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct

    Ifstr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)

        ifstr(i) $(!NTN_RegBase) == $(ProductKeyName)
            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle), +
                $(ProductVersion)
            ifstr(i) $($R1) != "OK"
                Return STATUS_FAILED
            endif
        else
            Shell $(UtilityInf), CardExistedDlg
            ifstr(i) $($R1) != "OK"
                Return STATUS_FAILED
            endif
            set OldVersionExisted = TRUE
        endif
    endif

    IfStr(i) $(DoSetup) == TRUE


        ifstr(i) $(DoCopy) == "YES"
            OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
            Ifstr $(KeyProduct) != $(KeyNull)
                CloseRegKey $(KeyProduct)
            else
                set BuiltIn = "YES"
                ifstr(i) $(!NTN_Origination) == "NCPA"
                    Set BuiltIn = "NO"
                endif
                Shell $(UtilityInf) DoAskSource $(!STF_CWDDIR) $(SrcDir) $(BuiltIn)
                set SrcDir  = $($R1)
            endif
        endif

dowind =+
    Set !p:EtherID = ""
    Set !p:NetworkAddress = "000000000000"
    set !p:IRQIndex = 11
    Set !p:SSID = "ANY"
    Set !p:ChannelIndex = 1
    Set !p:NetworkTypeIndex = 1
    set !p:IOBaseValue = 4096                 ;; 0x1000
    set !p:MemAddrValue = 884736              ;; 0xD8000

    set !p:ChannelValue = *($(ChannelList), ~($(ChannelValues),$(!p:ChannelIndex)))
    ifstr(i) $(!p:ChannelValue) == ""
        set !p:ChannelValue = *($(ChannelList), 1)
    endif
    set !p:NetworkTypeValue = *($(NetworkTypeList), ~($(NetworkTypeValues),$(!p:NetworkTypeIndex)))
    ifstr(i) $(!p:NetworkTypeValue) == ""
        set !p:NetworkTypeValue = *($(NetworkTypeList), 1)
    endif
    set !p:IRQLevel = *($(IRQList), ~($(IRQLevels),$(!p:IRQIndex)))
    ifstr(i) $(!p:IRQLevel) == ""
        set !p:IRQLevel = *($(IRQList), 11)
    endif

;;;        Shell "" AdapterSetup
    set AdapterStatus = FALSE

    set NotifyFields   = {NO, NO, NO, NO}
;;;    set EditTextIn     = $(!p:SSID)
;;;    set EditTextLim    = 50
;;;    set EditFocusOn    = "ALL"

    read-syms ResourcesDlg$(!STF_LANGUAGE)
    set Combo1Out = $(!p:IRQIndex)
    set-dectohex Combo2Out = $(!p:IOBaseValue)
    set-dectohex Combo3Out = $(!p:MemAddrValue)

    ui start "Config"

    ifstr(i) $(DLGEVENT) == "CONTINUE"
       set !p:IRQIndex = $(Combo1Out)
       set-hextodec !p:IOBaseValue  = $(Combo2Out)
       set-hextodec !p:MemAddrValue = $(Combo3Out)
       set !p:IOBaseIndex = $(Combo2Out)
       set !p:MemAddrIndex = $(Combo3Out)
       ui pop 1
    else-ifstr(i) $(DLGEVENT) == "BACK"
       set AdapterStatus = STATUS_USERCANCEL
       Debug-Output "$(InfFile) $(Option): User Cancel"
       ui pop 1
       goto end
    else
       ui pop 1
       goto end
    endif

    read-syms WLANDlg$(!STF_LANGUAGE)
    set Combo1Out = $(!p:NetworkTypeIndex)
    set Combo2Out = $(!p:ChannelIndex)
    set EditTextIn = $(!p:SSID)

;;;    ui start "InputDlg"
    ui start "System"

    ifstr(i) $(DLGEVENT) == "CONTINUE"
       set !p:NetworkTypeIndex = $(Combo1Out)
       set !p:ChannelIndex = $(Combo2Out)
       Set !p:SSID = $(EditTextOut)
       set AdapterStatus = TRUE
       Debug-Output "$(InfFile) $(Option): User Continue"
       ui pop 1
    else-ifstr(i) $(DLGEVENT) == "BACK"
       set AdapterStatus = STATUS_USERCANCEL
       Debug-Output "$(InfFile) $(Option): User Cancel"
       ui pop 1
       goto end
    else
       ui pop 1
       goto end
    endif

   set !p:IRQLevel = *($(IRQLevels), ~($(IRQList),$(!p:IRQIndex)))
   set !p:NetworkTypeValue = *($(NetworkTypeValues), ~($(NetworkTypeList),$(!p:NetworkTypeIndex)))
   set !p:ChannelValue = *($(ChannelValues), ~($(ChannelList),$(!p:ChannelIndex)))

    ifstr(i) $(DLGEVENT) == "CONTINUE"
        IfStr(i) $(!STF_NCDETINFO) == {}
            Set !p:BusType   = 0
            Set !p:BusNumber = 0
        Else
            Set !p:BusType   = *($(!STF_NCDETINFO),5)
            Set !p:BusNumber = *($(!STF_NCDETINFO),6)
        EndIf
    Endif

end = +
;;;    return $(AdapterStatus)
    ifstr(i) $(AdapterStatus) == STATUS_USERCANCEL
        Debug-Output "$(InfFile) $(Option): InstallAdapter STATUS_USERCANCEL"
        Return STATUS_USERCANCEL
    endif

;;;        IfStr(i) $($R0) != TRUE
;;;            Return STATUS_USERCANCEL
;;;        endif

        IfStr(i) $(OldVersionExisted) == FALSE
            Debug-Output "$(InfFile) $(Option): OldVersionExisted FALSE"
            Shell "" SetCopy $(DoCopy) $(AddCopy) $(SrcDir) "Install-Option"
            IfStr(i) $($R0) == TRUE
                Shell "" SetSoftware $(CurrentTime)
                Debug-Output "$(InfFile) $(Option): SetSoftware"
                IfStr(i) $($R0) != TRUE
                    Return STATUS_FAILED
                endif
            endif
        endif

        Shell "" SetHardware $(CurrentTime)
        Debug-Output "$(InfFile) $(Option): SetHardware"

        IfStr(i) $($R0) == TRUE
;;;            Shell "" WriteParameters

    Set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(!p:BusType)},+
                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(!p:BusNumber)},+
                        {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(!p:AdapterType)},+
                     ;; {CardType,$(NoTitle),$(!REG_VT_DWORD),2},+
                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
                        {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$(!p:CFID)},+
                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(!p:IOBaseValue)},+
                        {MemoryBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(!p:MemAddrValue)},+
                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(!p:IRQLevel)},+
                        {Channel,$(NoTitle),$(!REG_VT_DWORD),$(!p:ChannelValue)},+
                        {SSID,$(NoTitle),$(!REG_VT_SZ),$(!p:SSID)},+
                        {NetworkType,$(NoTitle),$(!REG_VT_SZ),$(!p:NetworkTypeValue)},+
                     ;; {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
                        {EarlyTxThreshold,$(NoTitle),$(!REG_VT_DWORD),$(!p:EarlyTxThreshold) },+
                        {ChipOnCardbus,$(NoTitle),$(!REG_VT_DWORD),1},+
                        {TxMaxDMABurst,$(NoTitle),$(!REG_VT_DWORD),6},+
                        {RxMaxDMABurst,$(NoTitle),$(!REG_VT_DWORD),6},+
                        {TxInterFrameGap,$(NoTitle),$(!REG_VT_DWORD),3},+
                        {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),0}}

    Shell  $(UtilityInf), AddValueList, $(!KeyParameters), $(NewValueList)
    Set Status = $($R0)

    Shell "" SetUpPcmcia

    CloseRegKey $(!KeyParameters)

    Ifstr(i) $(Status) != NO_ERROR
        Shell $(UtilityInf) RegistryErrorString $(Status)
        Shell "" ShellError $($R0)
        set AdapterStatus = FALSE
;;;        Return FALSE
    endif

    set AdapterStatus = TRUE
;;;    Return TRUE

            Debug-Output "$(InfFile) $(Option): WriteParameters"
        endif
    endif

;;;    IfStr(i) $($R0) == TRUE
    IfStr(i) $(AdapterStatus) == TRUE
        Return STATUS_SUCCESSFUL
    else
        Return STATUS_FAILED
    endif


[ConfigureAdapter]
    set Option = $(!p:Option)

    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    ifstr(i) $(!NTN_RegBase) == $(ProductKeyName)
        Shell $(UtilityInf) RegistryErrorString CANNOT_CONFIGURE_SOFTWARE
        Shell "" ShellError $($R0)
        Return STATUS_FAILED
    endif

    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct

    Ifstr $(KeyProduct) == $(KeyNull)
        Shell $(UtilityInf) RegistryErrorString CANNOT_FIND_COMPONENT_SERVICE
        Shell "" ShellError $($R0)
        Return STATUS_FAILED
    endif

    Shell $(UtilityInf) FindService, $(KeyProduct)

    Ifstr(i) $($R0) != NO_ERROR
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return STATUS_FAILED
    endif

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

    Ifstr $(!KeyParameters) == $(KeyNull)
        Shell $(UtilityInf) RegistryErrorString CANNOT_FIND_COMPONENT_SERVICE
        Shell "" FatalError $($R0)
        Return STATUS_FAILED
    endif

    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) == "Channel"
            set !p:ChannelIndex = $(ValueData)
        else-ifstr(i) $(ValueName) == "EtherID"
            set !p:EtherID = $(ValueData)
        else-ifstr(i) $(ValueName) == "NetworkAddress"
            set !p:NetworkAddress = $(ValueData)
        else-ifstr(i) $(ValueName) == "SSID"
            set !p:SSID = $(ValueData)
        else-ifstr(i) $(ValueName) == "NetworkType"
            set !p:NetworkTypeIndex = $(ValueData)
        else-ifstr(i) $(ValueName) == "InterruptNumber"
            set !p:IRQIndex = $(ValueData)
        else-ifstr(i) $(ValueName) == "IOBaseAddress"
            set !p:IOBaseValue = $(ValueData)
        else-ifstr(i) $(ValueName) == "MemoryBaseAddress"
            set !p:MemAddrValue = $(ValueData)
        endif
    EndForListDo

    set !p:ChannelValue = *($(ChannelList), ~($(ChannelValues),$(!p:ChannelIndex)))
    ifstr(i) $(!p:ChannelValue) == ""
        set !p:ChannelValue = *($(ChannelList), 1)
    endif
    set !p:NetworkTypeValue = *($(NetworkTypeList), ~($(NetworkTypeValues),$(!p:NetworkTypeIndex)))
    ifstr(i) $(!p:NetworkTypeValue) == ""
        set !p:NetworkTypeValue = *($(NetworkTypeList), 1)
    endif
    set !p:IRQLevel = *($(IRQList), ~($(IRQLevels),$(!p:IRQIndex)))
    ifstr(i) $(!p:IRQLevel) == ""
        set !p:IRQLevel = *($(IRQList), 11)
    endif

winagn =+
    ;;; Shell "" AdapterSetup

    set AdapterStatus = FALSE

    set NotifyFields   = {NO, NO, NO, NO}
;;;    set EditTextIn     = $(!p:SSID)
;;;    set EditTextLim    = 50
;;;    set EditFocusOn    = "ALL"

    read-syms ResourcesDlg$(!STF_LANGUAGE)
    set Combo1Out = $(!p:IRQIndex)
    set-dectohex Combo2Out = $(!p:IOBaseValue)
    set-dectohex Combo3Out = $(!p:MemAddrValue)

;;;    ui start "InputDlg"
    ui start "Config"

    ifstr(i) $(DLGEVENT) == "CONTINUE"
       set !p:IRQIndex = $(Combo1Out)
       set-hextodec !p:IOBaseValue  = $(Combo2Out)
       set-hextodec !p:MemAddrValue = $(Combo3Out)
       set !p:IOBaseIndex = $(Combo2Out)
       set !p:MemAddrIndex = $(Combo3Out)
       ui pop 1
    else-ifstr(i) $(DLGEVENT) == "BACK"
       set AdapterStatus = STATUS_USERCANCEL
       Debug-Output "$(InfFile) $(Option): User Cancel"
       ui pop 1
       goto end
    else
       ui pop 1
       goto end
    endif

    read-syms WLANDlg$(!STF_LANGUAGE)
    set Combo1Out = $(!p:NetworkTypeIndex)
    set Combo2Out = $(!p:ChannelIndex)
    set EditTextIn = $(!p:SSID)

    ui start "InputDlg"
;;;    ui start "System"

    ifstr(i) $(DLGEVENT) == "CONTINUE"
       set !p:NetworkTypeIndex = $(Combo1Out)
       set !p:ChannelIndex = $(Combo2Out)
       Set !p:SSID = $(EditTextOut)
       set AdapterStatus = TRUE
       Debug-Output "$(InfFile) $(Option): User Continue"
       ui pop 1
    else-ifstr(i) $(DLGEVENT) == "BACK"
       set AdapterStatus = STATUS_USERCANCEL
       Debug-Output "$(InfFile) $(Option): User Cancel"
       ui pop 1
       goto end
    else
       ui pop 1
       goto end
    endif

   set !p:IRQLevel = *($(IRQLevels), ~($(IRQList),$(!p:IRQIndex)))
   set !p:NetworkTypeValue = *($(NetworkTypeValues), ~($(NetworkTypeList),$(!p:NetworkTypeIndex)))
   set !p:ChannelValue = *($(ChannelValues), ~($(ChannelList),$(!p:ChannelIndex)))

    ifstr(i) $(DLGEVENT) == "CONTINUE"
        IfStr(i) $(!STF_NCDETINFO) == {}
            Set !p:BusType   = 0
            Set !p:BusNumber = 0
        Else
            Set !p:BusType   = *($(!STF_NCDETINFO),5)
            Set !p:BusNumber = *($(!STF_NCDETINFO),6)
        EndIf
    Endif

end = +
;;;    return $(AdapterStatus)
    ifstr(i) $(AdapterStatus) == STATUS_USERCANCEL
        Debug-Output "$(InfFile) $(Option): InstallAdapter STATUS_USERCANCEL"
        Return STATUS_USERCANCEL
    endif

;;;    IfStr(i) $($R0) != TRUE
;;;        Return STATUS_USERCANCEL
;;;    endif

;;;    Shell "" WriteParameters

    Set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(!p:BusType)},+
                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(!p:BusNumber)},+
                        {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(!p:AdapterType)},+
                     ;; {CardType,$(NoTitle),$(!REG_VT_DWORD),2},+
                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
                        {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$(!p:CFID)},+
                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(!p:IOBaseValue)},+
                        {MemoryBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(!p:MemAddrValue)},+
                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(!p:IRQLevel)},+
                        {Channel,$(NoTitle),$(!REG_VT_DWORD),$(!p:ChannelValue)},+
                        {SSID,$(NoTitle),$(!REG_VT_SZ),$(!p:SSID)},+
                        {NetworkType,$(NoTitle),$(!REG_VT_SZ),$(!p:NetworkTypeValue)},+
                     ;; {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
                        {EarlyTxThreshold,$(NoTitle),$(!REG_VT_DWORD),$(!p:EarlyTxThreshold) },+
                        {ChipOnCardbus,$(NoTitle),$(!REG_VT_DWORD),1},+
                        {TxMaxDMABurst,$(NoTitle),$(!REG_VT_DWORD),6},+
                        {RxMaxDMABurst,$(NoTitle),$(!REG_VT_DWORD),6},+
                        {TxInterFrameGap,$(NoTitle),$(!REG_VT_DWORD),3},+
                        {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),0}}

    Shell  $(UtilityInf), AddValueList, $(!KeyParameters), $(NewValueList)
    Set Status = $($R0)

    Shell "" SetUpPcmcia

    CloseRegKey $(!KeyParameters)

    Ifstr(i) $(Status) != NO_ERROR
        Shell $(UtilityInf) RegistryErrorString $(Status)
        Shell "" ShellError $($R0)
        set AdapterStatus = FALSE
;;;        Return FALSE
    endif

    set AdapterStatus = TRUE
;;;    Return TRUE

;;;    IfStr(i) $($R0) == TRUE
    IfStr(i) $(AdapterStatus) == TRUE
        Return STATUS_SUCCESSFUL
    else
        Return STATUS_FAILED
    endif

[NoWay]
    read-syms GeneralConstants
    Shell "" ShellError "NoWay"
    Return STATUS_FAILED

[RemoveAdapter]
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    set Option = $(!p:Option)

        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), $(!NTN_RegBase)

        ifstr(i) $($R0) != NO_ERROR
            Shell $(UtilityInf) RegistryErrorString $($R0)
            Shell "" ShellError $($R0)
            Return STATUS_FAILURE
        endif

    Return STATUS_SUCCESSFUL


[UpgradeSoftware]
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    set SrcDir      = $(!p:SrcDir)
    set Option      = $(!p:Option)

    ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
        OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
        Ifstr $(KeyProduct) == $(KeyNull)
            Return STATUS_FAILED
        endif

        set DoCopy  = YES
        set AddCopy = YES
        Shell "" SetCopy $(DoCopy) $(AddCopy) $(SrcDir) "Install-Update"

        SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
        SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
        CloseRegKey $(KeyProduct)
    else
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetworkCardKey
        Ifstr(i) $(NetworkCardKey) == $(KeyNull)
            Return STATUS_FAILED
        endif

        GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
        set ServiceName = *($(ServiceNameInfo), 4)

        OpenRegKey $(NetworkCardKey) "" "NetRules" $(MAXIMUM_ALLOWED) NetRuleKey
        Ifstr(i) $(NetRuleKey) == $(KeyNull)
            Return STATUS_FAILED
        endif

        CloseRegKey $(NetRules)
        CloseRegKey $(NetworkCardKey)

        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName) $(MAXIMUM_ALLOWED) ServiceKey
        Ifstr(i) $(ServiceKey) == $(KeyNull)
            Return STATUS_FAILED
        endif

        CloseRegKey $(ServiceKey)
    endif

    Return STATUS_SUCCESSFUL

[AdapterSetup]
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)
    read-syms DialogConstants$(!STF_LANGUAGE)

    set Option = $(!p:Option)

    set AdapterStatus = FALSE

    set NotifyFields   = {NO, NO, NO, NO}
    set EditTextIn     = ""
    set EditTextLim    = ""
    set EditFocusOn    = ""

RetryDialog =+

    set Combo1Out = $(!p:IRQIndex)
    set Combo2Out = $(!p:IOBaseIndex)
    set Combo3Out = $(!p:MemAddrIndex)

    read-syms ResourcesDlg$(!STF_LANGUAGE)
    ui start "InputDlg"

    ifstr(i) $(DLGEVENT) == "CONTINUE"
       set !p:IRQIndex = $(Combo1Out)
       set !p:IOBaseIndex = $(Combo2Out)
       set !p:MemAddrIndex = $(Combo3Out)
       ui pop 1
    else-ifstr(i) $(DLGEVENT) == "BACK"
       set AdapterStatus = STATUS_USERCANCEL
       Debug-Output "$(InfFile) $(Option): User Cancel"
       ui pop 1
       goto end
    else
       ui pop 1
       goto end
    endif

    set Combo1Out = $(!p:NetworkTypeIndex)
    set Combo2Out = $(!p:ChannelIndex)
    set EditTextOut = $(!p:SSID)

    read-syms WLANDlg$(!STF_LANGUAGE)
    ui start "InputDlg"

    ifstr(i) $(DLGEVENT) == "CONTINUE"
       set !p:NetworkTypeIndex = $(Combo1Out)
       set !p:ChannelIndex = $(Combo2Out)
       Set !p:SSID = $(EditTextOut)
       set AdapterStatus = TRUE
       Debug-Output "$(InfFile) $(Option): User Continue"
       ui pop 1
    else-ifstr(i) $(DLGEVENT) == "BACK"
       set AdapterStatus = STATUS_USERCANCEL
       Debug-Output "$(InfFile) $(Option): User Cancel"
       ui pop 1
       goto end
    else
       ui pop 1
       goto end
    endif

   set !p:IRQLevel = *($(IRQLevels), ~($(IRQList),$(!p:IRQIndex)))
   set !p:IOBaseValue = *($(IOBaseValues), ~($(IOBaseList),$(!p:IOBaseIndex)))
   set !p:MemAddrValue = *($(MemAddrValues), ~($(MemAddrList),$(!p:MemAddrIndex)))
   set !p:NetworkTypeValue = *($(NetworkTypeValues), ~($(NetworkTypeList),$(!p:NetworkTypeIndex)))
   set !p:ChannelValue = *($(ChannelValues), ~($(ChannelList),$(!p:ChannelIndex)))

    ifstr(i) $(DLGEVENT) == "CONTINUE"
        IfStr(i) $(!STF_NCDETINFO) == {}
            Set !p:BusType   = 0
            Set !p:BusNumber = 0
        Else
            Set !p:BusType   = *($(!STF_NCDETINFO),5)
            Set !p:BusNumber = *($(!STF_NCDETINFO),6)
        EndIf
    Endif

end = +
    return $(AdapterStatus)


[SetCopy]
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    set DoCopy = $($0)
    set AddCopy = $($1)
    set SrcDir  = $($2)
    set InstallSection = $($3)
    set Needcopy = FALSE

    Ifstr(i) $(DoCopy) == "YES"
        set NeedCopy = TRUE
    else-ifstr(i) $(AddCopy) == "YES"
        set NeedCopy = TRUE
    else
        Return TRUE
    endif

    set BuiltIn = "YES"
    ifstr(i) $(!NTN_Origination) == "NCPA"
        set BuiltIn = "NO"
    endif

    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) $(BuiltIn)
    Debug-Output "$(InfFile) $(Option): DoAskSource"

    Ifstr(i) $($R0) == STATUS_FAILED
        Debug-Output "$(InfFile) $(Option): DoAskSource FAILED"
        Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
        Shell "" FatalError $($R0)
        Return FALSE
    Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
        Debug-Output "$(InfFile) $(Option): USERCANCEL"
        Return FALSE
    Endif

    Set SrcDir = $($R1)

    install $(InstallSection)
    Debug-Output "$(InfFile) $(Option): InstallSection"

    ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
        Debug-Output "$(InfFile) $(Option): InstallSection NOT SUCCESS"
        Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
        Shell "" FatalError $($R0)
        Return FALSE
    endif
    Debug-Output "$(InfFile) $(Option): InstallSection SUCCESS"

    Return TRUE

[SetSoftware]
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)
    read-syms date

    set Option = $(!p:Option)

    Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
          $(ProductSoftwareName), +
          $(ProductSoftwareName), +
          $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
          $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
          $(NetEventDLL)

    Ifstr(i) $($R0) != NO_ERROR
        Debug-Output "$(InfFile) $(Option): AddSortware ERROR"
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return FALSE
    endif
    Debug-Output "$(InfFile) $(Option): AddSortware NO_ERROR"

        ;
        ;   At this point:
        ;     $R1 contains the product version key handle;
        ;     $R2 contains the NetRules subkey handle;
        ;     $R3 contains the new Services key handle; and
        ;     $R4 contains the Parameters key
        ;     $R5 contains the Linkage Key
        ;
    set KeyProduct      = $($R1)
    Set SoftNetRulesKey = $($R2)
    CloseRegKey $($R3)
    CloseRegKey $($R4)
    CloseRegKey $($R5)

    Ifstr(i) $($R0) != NO_ERROR
        CloseRegKey $(KeyProduct)
        CloseRegKey $(SoftNetRulesKey)
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return FALSE
    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),$($0)}}

    Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)

    Ifstr(i) $($R0) != NO_ERROR
        CloseRegKey $(KeyProduct)
        CloseRegKey $(SoftNetRulesKey)
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return FALSE
    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)

    CloseRegKey $(KeyProduct)
    CloseRegKey $(SoftNetRulesKey)

    Ifstr(i) $($R0) != NO_ERROR
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return FALSE
    endif
    return TRUE

[SetHardware]
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)
    read-syms date

    set Option = $(!p:Option)

    Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)

    Ifstr(i) $($R0) != NO_ERROR
        CloseRegKey $($R1)
        CloseRegKey $($R2)
        CloseRegKey $($R3)
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return FALSE
    endif

;
;   At this point:
;     $R1  Registry key variable for HARDWARE\Netcard\(n)
;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
;     $R3  Registry key handle for <service>\Parameters key
;     $R4  Adapter number assigned to adapter
;     $R5  Service name generated by combining svc name with adapter number
;
    set !KeyParameters   = $($R3)
    set KeyAdapterRules = $($R2)
    set AdapterNumber   = $($R4)

    set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
                       {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
                       {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
                       {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
                       {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
                       {InstallDate,$(NoTitle),$(!REG_VT_DWORD),$($0)}}

    Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
    Ifstr(i) $($R0) != NO_ERROR
        CloseRegKey $($R1)
        CloseRegKey $($R2)
        CloseRegKey $($R3)
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return FALSE
    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)

    Ifstr(i) $($R0) != NO_ERROR
        CloseRegKey $(!KeyParameters)
        CloseRegKey $(KeyAdapterRules)
        Shell $(UtilityInf) RegistryErrorString $($R0)
        Shell "" ShellError $($R0)
        Return FALSE
    endif

    CloseRegKey $(KeyAdapterRules)
    return TRUE

[WriteParameters]
    read-syms FileConstants
    read-syms GeneralConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    set Option = $(!p:Option)

   set IRQLevel = *($(IRQLevels), ~($(IRQList),$(!p:IRQIndex)))
   set IOBaseValue = *($(IOBaseValues), ~($(IOBaseList),$(!p:IOBaseIndex)))
   set MemAddrValue = *($(MemAddrValues), ~($(MemAddrList),$(!p:MemAddrIndex)))
   set NetworkTypeValue = *($(NetworkTypeValues), ~($(NetworkTypeList),$(!p:NetworkTypeIndex)))
   set ChannelValue = *($(ChannelValues), ~($(ChannelList),$(!p:ChannelIndex)))

    Set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(!p:BusType)},+
                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(!p:BusNumber)},+
                        {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(!p:AdapterType)},+
                     ;; {CardType,$(NoTitle),$(!REG_VT_DWORD),2},+
                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
                        {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$(!p:CFID)},+
                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(!p:IOBaseValue)},+
                        {MemoryBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(!p:MemAddrValue)},+
                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(!p:IRQLevel)},+
                        {Channel,$(NoTitle),$(!REG_VT_DWORD),$(!p:ChannelValue)},+
                        {SSID,$(NoTitle),$(!REG_VT_SZ),$(!p:SSID)},+
                        {NetworkType,$(NoTitle),$(!REG_VT_SZ),$(!p:NetworkTypeValue)},+
                     ;; {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
                        {EarlyTxThreshold,$(NoTitle),$(!REG_VT_DWORD),$(!p:EarlyTxThreshold) },+
                        {ChipOnCardbus,$(NoTitle),$(!REG_VT_DWORD),1},+
                        {TxMaxDMABurst,$(NoTitle),$(!REG_VT_DWORD),6},+
                        {RxMaxDMABurst,$(NoTitle),$(!REG_VT_DWORD),6},+
                        {TxInterFrameGap,$(NoTitle),$(!REG_VT_DWORD),3},+
                        {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),0}}

    Shell  $(UtilityInf), AddValueList, $(!KeyParameters), $(NewValueList)
    Set Status = $($R0)

    Shell "" SetUpPcmcia

    CloseRegKey $(!KeyParameters)

    Ifstr(i) $(Status) != NO_ERROR
        Shell $(UtilityInf) RegistryErrorString $(Status)
        Shell "" ShellError $($R0)
        Return FALSE
    endif

    Return TRUE


[ShellError]
    read-syms DialogConstants$(!STF_LANGUAGE)
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    set DlgType      = "MessageBox"
    set STF_MB_TITLE = $(FunctionTitle)
    set STF_MB_TEXT  = $($0)
    set STF_MB_TYPE  = 1
    set STF_MB_ICON  = 3
    set STF_MB_DEF   = 1

    ifstr(i) $(STF_MB_TEXT) == ""
        set STF_MB_TEXT = "Unknown Error"
    endif

    ui start "Error Message"
    Return

[Install-Option]
    set STF_VITAL = ""

    ifstr(i) $(AddCopy) == "YES"
        AddSectionFilesToCopyList Files-Sys $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
        AddSectionFilesToCopyList Files-PKT $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
        AddSectionFilesToCopyList Files-CPL $(SrcDir) $(!STF_WINDOWSSYSPATH)
    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-Sys $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
   AddSectionFilesToCopyList Files-PKT $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
   AddSectionFilesToCopyList Files-CPL $(SrcDir) $(!STF_WINDOWSSYSPATH)

   set !STF_NCPA_FLUSH_COPYLIST = TRUE
   CopyFilesInCopyList

   exit

[Install-Dll]

    set STF_VITAL = ""

        AddSectionFilesToCopyList Files-Sys $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
        AddSectionFilesToCopyList Files-PKT $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
        AddSectionFilesToCopyList Files-CPL $(SrcDir) $(!STF_WINDOWSSYSPATH)
        set !STF_NCPA_FLUSH_COPYLIST = TRUE
        CopyFilesInCopyList
    Exit


[FatalError]
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    ifstr(i) $($0) == ""
        set Message = "Unknown Error"
    else
        set Message = $($0)
    endif

    Shell $(SubroutnInf) SetupMessage $(!STF_LANGUAGE) FATAL $(Message)
    Return

[VerifyError]
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    ifstr(i) $($0) == ""
        set Message = "Unknown Error"
    else
        set Message = $($0)
    endif

    Shell $(SubroutnInf) SetupMessage $(!STF_LANGUAGE) WARNING $(Message)
    Return $($R1)

[WarnError]
    read-syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)

    ifstr(i) $($0) == ""
        set Message = "Unknown Error"
    else
        set Message = $($0)
    endif

    Shell $(SubroutnInf) SetupMessage $(!STF_LANGUAGE) NONFATAL $(Message)
    Return

[DebugControl]
    set !DebugOutputControl = 1
    return

[NetworkAddressDlgENG]
Caption        = "Input Network Address"
DlgText        = "Please input Network Address: "$(!LF)+
                 "For example:"$(!LF)+
                 "        Ethernet ID: 020102A3B4C5"$(!LF)$(!LF)+
                 "(This option is only required when you need to use"+
                 "some networking applications which need software"+
                 "programmable Network Address)"
Edit1Label  = "&Network Address :"
Continue       = "&OK"
Exit           = "&Skip"
Help           = "&Help"
DlgType        = "Edit"
DlgTemplate    = "QUERY_COMPUTER_NAME"
EditTextLim    = 12
EditTextIn     = $(NetworkAddress)
EditFocus      = "ALL"

[WLANDlgENG]
Caption        = "WLAN Properties"
Edit1Label     = "&SSID :"
Combo1Label    = "&Network: 0 = Ad hoc, 1 = Infrastructure"
Combo2Label    = "&Channel :"
Help           = "&Help"
Continue       = "&OK"
Cancel         = "C&ancel"
DlgType        = Combination
DlgTemplate    = "RPCPROVIDE"
EditTextIn     = $(SSID)
EditFocus      = "ALL"
EditTextLim    = ""
Combo1List     = $(NetworkTypeList)
Combo1Out      = $(NetworkTypeIndex)
Combo2List     = $(ChannelList)
Combo2Out      = $(ChannelIndex)
ComboListItemsIn  = {Combo1List, Combo2List}
ComboListItemsOut = {Combo1Out, Combo2Out}
CBOptionsGreyed = {}
ExitState   = "Active"

[ResourcesDlgENG]
Group1 = "Resources Properties"
HelpContext = 1
Caption        = "Resources Properties"
Combo1Label    = "&Interrupt :"
Combo2Label    = "I/O &Port :"
Combo3Label    = "&Memory Address :"
Combo1List     = $(IRQList)
Combo1Out      = $(IRQIndex)
Combo2List     = $(IOBaseList)
Combo2Out      = $(IOBaseValue)
Combo3List     = $(MemAddrList)
Combo3Out      = $(MemAddrValue)
DlgType        = Combination
DlgTemplate    = "WD"
ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
CBOptionsGreyed = {}
EditTextIn = ""
EditTextLim = ""
NotifyFields = {NO, NO, NO}
HelpContext = 1
Help           = "&Help"
Continue       = "&Continue"
Cancel         = "C&ancel"

[SetUpPcmcia]
    Read-Syms FileConstants
    read-syms FileConstants$(!STF_LANGUAGE)
    Read-Syms PcmciaKeys
    Read-Syms GeneralConstants

    Debug-Output "Opening PCMCIA DataBase"
    OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaPath) $(MAXIMUM_ALLOWED) PcmciaKey

    IfStr(i) $(PcmciaKey) == $(KeyNull)
        Debug-Output "Failed to open "$(PcmciaPath)
        Shell "" FatalError "Cannot Open PCMCIA Registry DataBase!"
        Return FALSE
    EndIf

    Debug-Output "Opening PCMCIA Manufacture Key"

    OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaManufacturePath) $(MAXIMUM_ALLOWED) PcmciaManufactureKey

    IfStr(i) $(PcmciaManufactureKey) == $(KeyNull)
        Debug-Output "Open failed - creating key"
        CreateRegKey $(PcmciaKey) {$(CardManufacturer), 0, 0 } "" $(MAXIMUM_ALLOWED) "" PcmciaManufactureKey
        IfStr(i) $(PcmciaManufactureKey) == $(KeyNull)
            Debug-Output "Failed to create PCMCIA Manufacture key"
            Shell "" FatalError "Cannot Create Manufacture Key in Registry DataBase PCMCIA!"
            CloseRegKey $(PcmciaKey)
            Return FALSE
        EndIf
    EndIf

    Debug-Output "Opening PCMCIA Product Key = "$(PcmciaProductPath)
    OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaProductPath) $(MAXIMUM_ALLOWED) PcmciaProductKey

    IfStr(i) $(PcmciaProductKey) == $(KeyNull)
        Debug-Output "Open failed - creating key"
        CreateRegKey $(PcmciaManufactureKey) {$(CardKeyName), 0, 0 } "" $(MAXIMUM_ALLOWED) "" PcmciaProductKey
        IfStr(i) $(PcmciaProductKey) == $(KeyNull)
            Shell "" FatalError "Cannot Create PCMCIA Product Key in Registry DataBase PCMCIA!"
            CloseRegKey $(PcmciaManufactureKey)
            CloseRegKey $(PcmciaKey)
            Return FALSE
        EndIf
    EndIf

    Debug-Output "Writing Driver Keyword"
    SetRegValue $(PcmciaProductKey) {DeviceType, 0, $(!REG_VT_SZ), NET}
    SetRegValue $(PcmciaProductKey) {Driver, 0, $(!REG_VT_SZ), $(ProductSoftwareName)}

    CloseRegKey $(PcmciaProductKey)
    CloseRegKey $(PcmciaManufactureKey)
    CloseRegKey $(PcmciaKey)

    Debug-Output "Opening CardWizard Resource Manager"
    OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaRMKeyName) $(MAXIMUM_ALLOWED) PcmciaRMKey

    ifstr $(PcmciaRMKey) == $(NULL)
        Debug-Output "Systemsoft CardWizard service not present"
        Debug-Output "Disable the Pcmcia.Sys"
        set PcmciaSysKeyName = $(!NTN_ServiceBase)"\Pcmcia"
        OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaSysKeyName) $(MAXIMUM_ALLOWED) PcmciaSysKey
;        SetRegValue $(PcmciaSysKey) {Start, 0, $(!REG_VT_DWORD),4}  ; '4' disables the driver
        CloseRegKey $(PcmciaSysKey)
    else
        set SystemsoftPresent = $(TRUE)
        OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaRMDBKeyName) $(MAXIMUM_ALLOWED) PcmciaRMDBKey
        ifstr $(PcmciaRMDBKey) == $(NULL)
            debug-output "Adding "$(PcmciaRMDBKeyName)
            CreateRegKey $(PcmciaRMKey) {"MacDataBase" , 0, 0} "" $(MAXIMUM_ALLOWED) "" PcmciaRMDBKey
            CloseRegKey PcmciaRMDBKey
        endif
        CloseRegKey $(PcmciaRMKey)
    endif

    OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaRMDBKeyName) $(MAXIMUM_ALLOWED) PcmciaRMDBKey
    ifstr $(PcmciaRMDBKey) == $(NULL)
        Debug-Output "Systemsoft CardWizard service not present"
    else
        Debug-Output $(PcmciaRMDBKeyName)"\"$(CardManufacturer)
        OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaRMDBKeyName)"\"$(CardManufacturer) $(MAXIMUM_ALLOWED) PcmciaManufactureKey
        ifstr $(PcmciaManufactureKey) == $(NULL)
            debug-output "Adding "$(PcmciaRMDBKeyName)"\"$(CardManufacturer)
            CreateRegKey $(PcmciaRMDBKey) {$(CardManufacturer), 0, 0} "" $(MAXIMUM_ALLOWED) "" PcmciaManufactureKey
        else
            debug-output "Manufacture sub key already exist"
        endif
        OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaRMDBKeyName)"\"$(CardManufacturer)"\"$(CardKeyName) $(MAXIMUM_ALLOWED) PcmciaProductKey
        ifstr $(PcmciaProductKey) == $(NULL)
            debug-output "Adding "$(PcmciaRMDBKeyName)"\"$(CardManufacturer)"\"$(CardKeyName)
            CreateRegKey $(PcmciaManufactureKey) {$(CardKeyName), 0, 0} "" $(MAXIMUM_ALLOWED) "" PcmciaProductKey
            SetRegValue $(PcmciaProductKey) {MacDriverHandle, 0, $(!REG_VT_DWORD),0}
            SetRegValue $(PcmciaProductKey) {MacDriverName,0,$(!REG_VT_SZ),$(ProductSoftwareName)}
            SetRegValue $(PcmciaProductKey) {MacDriverState,0,$(!REG_VT_DWORD),1}
            SetRegValue $(PcmciaProductKey) {MacDriverVersion,0,$(!REG_VT_DWORD),$(ProductMajorVersion)$(ProductMinorVersion)}
            SetRegValue $(PcmciaProductKey) {MacSwapCapability,0,$(!REG_VT_DWORD),2}
        else
            debug-output "Device sub key already exist"
            GetRegValue $(PcmciaProductKey),+"MacDriverName",GetData
            ifstr *($(GetData),7) != $(ProductSoftwareName)
            SetRegValue $(PcmciaProductKey) {MacDriverHandle, 0, $(!REG_VT_DWORD),0}
            SetRegValue $(PcmciaProductKey) {MacDriverName,0,$(!REG_VT_SZ),$(ProductSoftwareName)}
            SetRegValue $(PcmciaProductKey) {MacDriverState,0,$(!REG_VT_DWORD),1}
            SetRegValue $(PcmciaProductKey) {MacDriverVersion,0,$(!REG_VT_DWORD),$(ProductMajorVersion)$(ProductMinorVersion)}
            SetRegValue $(PcmciaProductKey) {MacSwapCapability,0,$(!REG_VT_DWORD),2}
            endif
        endif
        CloseRegKey $(PcmciaProductKey)
        CloseRegKey $(PcmciaManufactureKey)
        CloseRegKey $(PcmciaRMDBKey)
    endif

    Debug-Output "All done with SetUpPcmcia"
    return TRUE

;
Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: web5, load: 0.65