home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 August / VPR0008B.BIN / DRIVER / MELCO / WPCI3002 / WPCI3002.EXE / WINNT / OEMSETUP.INF next >
INI File  |  2000-04-18  |  54KB  |  1,887 lines

  1. ;***********************************************************************
  2. ;
  3. ; OEMSETUP.INF
  4. ;                              
  5. ;       MELCO WLI-PCM 802.11 Network Adapter .INF file
  6. ;
  7. ;***********************************************************************
  8.  
  9. ;-----------------------------------------------------------------------
  10. ; OPTION TYPE
  11. ; -----------
  12. ; This identifies the Option type we are dealing with.  The different
  13. ; possible types are:
  14. ;
  15. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  16. ;
  17. ;  Types specific to networking:
  18. ;
  19. ; NetAdapter,        a netcard / adapter combination or just a netcard
  20. ; NetDriver,         just a netcard driver
  21. ; NetTransport,      a complete NDIS-compliant TDI transport stack
  22. ; NetService,        an NT networking service
  23. ; NetWork,           a complete network ensemble.
  24. ; NetProvider        a complete network which supports NT MPR protocol
  25. ;-----------------------------------------------------------------------
  26.  
  27. [Identification]
  28.     OptionType = NetAdapter
  29.  
  30. ;-----------------------------------------------------------------------
  31. ; PlatformsSupported
  32. ; ------------------
  33. ; This identifies the platforms supported by the adapter card.
  34. ; Possible types are:
  35. ;
  36. ; ISA, EISA, MCA and PCMCIA
  37. ;-----------------------------------------------------------------------
  38.  
  39. [PlatformsSupported]
  40.     ISA
  41. ;    EISA
  42.     PCI
  43.     PCMCIA
  44.  
  45. ;-----------------------------------------------------------------------
  46. ; OPTION LIST
  47. ; -----------
  48. ; This section lists the OEM Option key names.  These keys are locale
  49. ; independent and used to represent the option in a locale independent
  50. ; manner.
  51. ;
  52. ;-----------------------------------------------------------------------
  53.  
  54. [Options]
  55.     WLIPCM
  56.  
  57. ;***********************************************************************
  58. ; CONSTANTS FOR USING DIALOGS
  59. ;***********************************************************************
  60.  
  61. [FileConstants]
  62.     GenericAdapterName = "MELCO WLI-PCM 802.11 Network Adapter"
  63.     GenericDriverName  = "MELCO WLI-PCM 802.11 NDIS3 miniport driver"
  64.     GenericSysName     = "wlipcm.sys"
  65.     GenericName        = "Wlipcm"
  66.  
  67.     ;
  68.     ;  File names, etc.
  69.     ;
  70.     UtilityInf      = "UTILITY.INF"
  71.     ParamInf        = "NCPARAM.INF"
  72.     subroutineinf   = "SUBROUTN.INF"
  73.     SoftwareType    = "driver"
  74.     Exit_Code       = 0
  75.  
  76.     ;
  77.     ; EventLog Message File
  78.     ;
  79.     NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  80.     IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  81.  
  82.     ;
  83.     ; Product Info
  84.     ;
  85.     Manufacturer    = "MELCO"
  86.     ProductMajorVersion     = "1"
  87.     ProductMinorVersion     = "43"
  88.     ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  89.  
  90.     ;
  91.     ; Software
  92.     ;
  93.     ProductSoftwareName         = "Wlipcm"
  94.     ProductSoftwareImagePath    = "\SystemRoot\System32\drivers\"$(GenericSysName)
  95.     NetRuleSoftwareType         = "wlipcmSys ndisDriver wlipcmDriver"
  96.  
  97.     NetRuleSoftwareUse          = $(SoftwareType)
  98.     NetRuleSoftwareBindForm     = """wlipcmSys"" yes no container"
  99.  
  100.     NetRuleSoftwareClass        = {"wlipcmDriver basic"}
  101.     NetRuleSoftwareBindable     = {"wlipcmDriver wlipcmAdapter non exclusive 100"}
  102.     ;
  103.     ; Hardware
  104.     ;
  105.     ProductHardwareName         = "Wlipcm"
  106.     NetRuleHardwareType         = "wlipcm wlipcmAdapter"
  107.     NetRuleHardwareBindForm     = " yes yes container"
  108.     NetRuleHardwareClass        = {"wlipcmAdapter basic"}
  109.  
  110.     ;
  111.     ; Registry Key
  112.     ;
  113.     ProductKeyName          = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  114.     ParamKeyName            = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  115.     PcmciaDataBaseKeyName   = $(!NTN_ServiceBase)"\Pcmcia\Database"
  116.  
  117. [GeneralConstants]
  118.     ;
  119.     ;  Program flow control variables.
  120.     ;
  121.     from      = ""
  122.     to        = ""
  123.     ;
  124.     ;  Return codes; Exit_Code is set to one of these
  125.     ;
  126.     ExitCodeOk     = 0
  127.     ExitCodeCancel = 1
  128.     ExitCodeFatal  = 2
  129.  
  130.     KeyNull             = ""
  131.     MAXIMUM_ALLOWED     = 33554432
  132.     RegistryErrorIndex  = NO_ERROR
  133.     KeyProduct          = ""
  134.     KeyParameters       = ""
  135.  
  136.     TRUE    = 1
  137.     FALSE   = 0
  138.     NoTitle = 0
  139.  
  140.     ExitState           = "Active"
  141.     OldVersionExisted   = $(FALSE)
  142.  
  143.     DriverPath = $(!STF_NTPATH)\drivers
  144.  
  145. [date]
  146.     ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  147.     ; Minute, Second }
  148.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  149.  
  150.  
  151. ;---------------------------------------------------------------------------
  152. ; 1. Identify
  153. ;
  154. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  155. ;                as we are choosing currently.
  156. ;
  157. ; INPUT:         None
  158. ;
  159. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  160. ;                $($R1): Option Type (COMPUTER ...)
  161. ;                $($R2): Diskette description
  162. ;---------------------------------------------------------------------------
  163.  
  164. [Identify]
  165.     ;
  166.     ;
  167.     read-syms Identification
  168.  
  169.     set Status     = STATUS_SUCCESSFUL
  170.     set Identifier = $(OptionType)
  171.     set Media      = #("Source Media Descriptions", 1, 1)
  172.  
  173.     Return $(Status) $(Identifier) $(Media)
  174.  
  175. ;------------------------------------------------------------------------
  176. ; 2. ReturnOptions:
  177. ;
  178. ; DESCRIPTION:   To return the option list supported by this INF and the
  179. ;                localised text list representing the options.
  180. ;
  181. ;
  182. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  183. ;
  184. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  185. ;                                STATUS_NOLANGUAGE
  186. ;                                STATUS_FAILED
  187. ;                                STATUS_NOTSUPPORTED
  188. ;
  189. ;                $($R1): Option List
  190. ;                $($R2): Option Text List
  191. ;------------------------------------------------------------------------
  192.  
  193. [ReturnOptions]
  194.     ;
  195.     ;
  196.     set Status        = STATUS_FAILED
  197.     set OptionList     = {}
  198.     set OptionTextList = {}
  199.  
  200.     ;
  201.     ; Check if the language requested is supported
  202.     ;
  203.     set LanguageList = ^(LanguagesSupported, 1)
  204.     Ifcontains(i) $($0) in $(LanguageList)
  205.     ;
  206.     ; Check if the platforms requested is supported
  207.     ;
  208.     ifstr(i) $($1) == ""
  209.         goto returnoptions
  210.     endif
  211.  
  212.     set PlatformList = ^(PlatformsSupported, 1)
  213.     Ifcontains(i) $($1) in $(PlatformList)
  214.         goto returnoptions
  215.     else
  216.         set Status = STATUS_NOTSUPPORTED
  217.         goto finish_ReturnOptions
  218.     endif
  219.     else
  220.     set Status = STATUS_NOLANGUAGE
  221.     goto finish_ReturnOptions
  222.     endif
  223.  
  224.     ;
  225.     ; form a list of all the options and another of the text representing
  226.     ;
  227.  
  228. returnoptions = +
  229.     set OptionList     = ^(Options, 1)
  230.     set OptionTextList = ^(OptionsText$($0), 1)
  231.     set Status         = STATUS_SUCCESSFUL
  232.  
  233. finish_ReturnOptions = +
  234.     Return $(Status) $(OptionList) $(OptionTextList)
  235.  
  236. ;------------------------------------------------------------------------
  237. ;
  238. ; InstallOption:
  239. ;
  240. ;      This section is shelled to by main installation processing
  241. ;      or by NCPASHEL.INF during reconfig, removal, update, etc.
  242. ;
  243. ;
  244. ; FUNCTION:  To copy files representing Options
  245. ;            To configure the installed option
  246. ;            To update the registry for the installed option
  247. ;
  248. ; INPUT:     $($0):  Language to use
  249. ;            $($1):  OptionID to install
  250. ;            $($2):  SourceDirectory
  251. ;            $($3):  AddCopy  (YES | NO)
  252. ;            $($4):  DoCopy   (YES | NO)
  253. ;            $($5):  DoConfig (YES | NO)
  254. ;
  255. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  256. ;                            STATUS_NOLANGUAGE |
  257. ;                            STATUS_USERCANCEL |
  258. ;                            STATUS_FAILED
  259. ;
  260. ;------------------------------------------------------------------------
  261. [InstallOption]
  262.     ;
  263.     ; Set default values for
  264.     ;
  265.     set Status   = STATUS_FAILED
  266.     ;
  267.     ; extract parameters
  268.     ;
  269.     set Option   = $($1)
  270.     set SrcDir   = $($2)
  271.     set AddCopy  = $($3)
  272.     set DoCopy   = $($4)
  273.     set DoConfig = $($5)
  274.     Set !DebugOutputControl = 0
  275.  
  276.     ;
  277.     ; Check if the language requested is supported
  278.     ;
  279.     set LanguageList = ^(LanguagesSupported, 1)
  280.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  281.     Return STATUS_NOLANGUAGE
  282.     endif
  283.  
  284.     set-subst LF = "\n"
  285.  
  286.     read-syms GeneralConstants
  287.     read-syms FileConstants
  288.  
  289.     read-syms DialogConstants$(!STF_LANGUAGE)
  290.     ifstr(i) $(!NTN_Origination) == "NCPA"
  291.     set Continue = $(OK)
  292.     endif
  293.     read-syms FileConstants$(!STF_LANGUAGE)
  294.  
  295.     detect date
  296.  
  297.     set-title  $(FunctionTitle)
  298.  
  299.     set to   = Begin
  300.     set from = Begin
  301.     ;
  302.     ;  Assume all is well.
  303.     ;
  304.     set CommonStatus = STATUS_SUCCESSFUL
  305.  
  306.     EndWait
  307.  
  308.     ;
  309.     ;   Set up the operation-mode-based variables and gaily welcome
  310.     ;   the user.  If the "install mode" variable is improperly set,
  311.     ;   assume this is a new installation.
  312.     ;
  313.  
  314. Begin = +
  315.     Set ActivateDetection = FALSE
  316.  
  317.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  318.     set StartLabel = removeadapter
  319.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  320.     set StartLabel = UpgradeSoftware
  321.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  322.     set StartLabel = bindingadapter
  323.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  324. ;        set ActivateDetection = TRUE
  325.     set StartLabel = configureadapter
  326.     ;
  327.     ;   You cannot config the software component
  328.     ;
  329.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  330.         Debug-Output "Cannot configure the PCNet-Mobile driver software."
  331.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  332.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  333.         Debug-Output "ShellCode error: cannot get an error string."
  334.         goto ShellCodeError
  335.         endif
  336.         set Error = $($R0)
  337.         set from = end
  338.         set to = end
  339.         goto nonfatalinfo
  340.     endif
  341.     else
  342. ;        set ActivateDetection = TRUE
  343.     set StartLabel = installadapter
  344.     set OEM_ABANDON_OPTIONS = {}
  345.     set OEM_ABANDON_SOFTWARE = FALSE
  346.     set OEM_ABANDON_ON = TRUE
  347.     endif
  348.  
  349.     ;  set the default values
  350.  
  351.     ; I/O Base Address = 0x200
  352.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  353.     ; IRQ Level = 10
  354.     set IRQValue = *($(IRQList), 6)
  355.  
  356.     ; PCMCIA Attribute Memory Base Address = D1000
  357.     set MemBaseAddrValue = *($(MemBaseAddrList), 10)
  358.     set NetworkModeValue = 0
  359.     set Chk1 = "OFF"
  360.     set FHPatternValue = *($(FHPatternList), 1)
  361.     set DSChannelValue = *($(DSChannelList), 14)
  362.     set PowerManValue = *($(PowerManList), 1)       
  363.     set PktSizeValue = *($(PktSizeList), 12)
  364.     set ESSIDValue = "AIRCONNECT"
  365.     set IoAccessValue = 0
  366.     set Chk2 = "OFF"
  367.     set WlipciValue = 1
  368.     set Chk3 = "ON"
  369.     set EncapsulatedValue = 0
  370.     set Chk4 = "OFF"
  371.     set PcmciaValue = 1
  372.     set Chk5 = "ON"
  373.  
  374.     Set from = $(fatal)
  375.     Set to = $(fatal)
  376.     Goto $(StartLabel)
  377.  
  378. ;-----------------------------------------------
  379. ; Installation Section
  380. ;-----------------------------------------------
  381.  
  382. installadapter = +
  383.     ;
  384.     ; Create/recreate the Registry's PCMCIA database entry for the PCnet-Mobile.
  385.     ;
  386.  
  387.     set KeyPcmciaDataBase = ""
  388.     OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaDataBaseKeyName) $(MAXIMUM_ALLOWED) KeyPcmciaDataBase
  389.     Shell "" ExCreateRegKey $(KeyPcmciaDataBase) "AMD\Am79C930"
  390.     OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaDataBaseKeyName)"\AMD\Am79C930" $(MAXIMUM_ALLOWED) KeyTemp
  391.     SetRegValue $(KeyTemp) {Driver,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)}
  392.     SetRegValue $(KeyTemp) {DeviceType,$(NoTitle),$(!REG_VT_SZ),"NET"}
  393.     CloseRegKey $(KeyTemp)
  394.     CloseRegKey $(KeyPcmciaDataBase)
  395.  
  396.     ;
  397.     ; Check whether the same version of the software exists
  398.     ;
  399.  
  400.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  401.  
  402.     Ifstr $(KeyProduct) != $(KeyNull)
  403.     ;
  404.     ; Same version already existed in the local machine
  405.     ; Popup the dialog and ask the user whether he wants to continue
  406.     ;
  407.     CloseRegKey $(KeyProduct)
  408.  
  409.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  410.        ;
  411.        ; Cannot Install the same software again
  412.        ;
  413.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  414.            $(ProductVersion)
  415.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  416.            Debug-Output "ShellCode error: cannot get an error string."
  417.            goto ShellCodeError
  418.        endif
  419.  
  420.        goto end
  421.     else
  422.        ;
  423.        ; Add a new adapter card?
  424.        ;
  425.        Shell $(UtilityInf), CardExistedDlg
  426.  
  427.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  428.            Debug-Output "ShellCode error: cannot get an error string."
  429.            goto ShellCodeError
  430.        endif
  431.  
  432.        ifstr(i) $($R1) != "OK"
  433.            goto end
  434.        endif
  435.        set OldVersionExisted = $(TRUE)
  436.     endif
  437.     endif
  438.  
  439. ;
  440. ;  dll load addition
  441. ;
  442.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  443.  
  444.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  445.     Goto ShellCodeError
  446.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  447.     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  448.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  449.         goto ShellCodeError
  450.     endif
  451.     set Error = $($R0)
  452.     Goto fatal
  453.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  454.     Goto successful
  455.     Endif
  456.  
  457.     Set SrcDir = $($R1)
  458.  
  459.     install "Install-Dll"
  460.  
  461.     goto adaptersetup
  462.  
  463. ;-----------------------------------------------
  464. ; Configuration Section
  465. ;-----------------------------------------------
  466. ;
  467. ;   Get the current values of all the parameters
  468. ;
  469. configureadapter = +
  470.     Ifstr $(KeyProduct) == $(KeyNull)
  471.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  472.     Ifstr $(KeyProduct) == $(KeyNull)
  473.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  474.         Debug-Output "Cannot find component product key"
  475.         goto fatalregistry
  476.     Endif
  477.     Endif
  478.  
  479.     ;
  480.     ; Get the other parameters;  they're attached to the service parameters key
  481.     ;
  482.     Debug-Output "INF: Shelling to FindService"
  483.     Shell $(UtilityInf) FindService, $(KeyProduct)
  484.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  485.     Debug-Output "INF: FindService shell failure"
  486.     Goto ShellCodeError
  487.     Endif
  488.     Ifstr(i) $($R0) != NO_ERROR
  489.     Debug-Output "INF: FindService Shell error: "$($R0)
  490.     Goto fatalregistry
  491.     endif
  492.  
  493.     Set KeyParameters = $($R2)
  494.  
  495.     ;
  496.     ;  We don't need the services key, so close it.
  497.     ;
  498.     CloseRegKey $($R1)
  499.  
  500.     Ifstr $(KeyParameters) == $(KeyNull)
  501.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  502.     Debug-Output "Cannot find component service"
  503.     goto fatalregistry
  504.     endif
  505.  
  506.     set OldVersionExisted = $(TRUE)
  507.  
  508.     set ValueName = ""
  509.     set ValueData = ""
  510.     set ValueStr  = ""
  511.     set ValueList = {}
  512.  
  513.     ;
  514.     ; Get the old values
  515.     ;
  516.     EnumRegValue $(KeyParameters) ValueList
  517.  
  518.     ForListDo $(ValueList)
  519.     set ValueItem = $($)
  520.     set ValueName = *($(ValueItem),1)
  521.     set ValueData = *($(ValueItem),4)
  522.     ifstr(i) $(ValueName) == "IoBaseAddress"
  523.         set IOBaseAddrIndex = $(ValueData)
  524.     else-ifstr(i) $(ValueName) == "InterruptNumber"
  525.         set IRQValueIndex = $(ValueData)
  526.     else-ifstr(i) $(ValueName) == "NetworkMode"
  527.         set NetworkModeValue = $(ValueData)
  528.     else-ifstr(i) $(ValueName) == "Interrupt_Mode"
  529.         set WlipciValue = $(ValueData)
  530.     else-ifstr(i) $(ValueName) == "Pcmcia"
  531.         set PcmciaValue = $(ValueData)
  532.     else-ifstr(i) $(ValueName) == "Encapsulated"
  533.         set EncapsulatedValue = $(ValueData)
  534.     else-ifstr(i) $(ValueName) == "IoAccessMode"
  535.         set IoAccessValue = $(ValueData)
  536.     else-ifstr(i) $(ValueName) == "Power_Management"
  537.         set PowerManIndex = $(ValueData)
  538.     else-ifstr(i) $(ValueName) == "PktSize"
  539.         set PktSizeValue = $(ValueData)
  540.     else-ifstr(i) $(ValueName) == "Desired_ESS_ID"
  541.         set ESSIDValue = $(ValueData)
  542.     else-ifstr(i) $(ValueName) == "DS_Channel"
  543.         set DSChannelValue = $(ValueData)
  544.     else-ifstr(i) $(ValueName) == "FH_Index"
  545.         set FHIndValue = $(ValueData)
  546.     else-ifstr(i) $(ValueName) == "FH_Pattern"
  547.         set FHPatternValue = $(ValueData)
  548.     ;else-ifstr(i) $(ValueName) == "PCCARDAttributeMemoryAddress"
  549.     else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
  550.         set MemBaseAddrIndex = $(ValueData)
  551.     endif
  552.  
  553.     EndForListDo
  554.  
  555.     ifint $(NetworkModeValue) == 1
  556.       set Chk1 = "ON"
  557.     else
  558.       set Chk1 = "OFF"
  559.     endif
  560.  
  561.     ifint $(IoAccessValue) == 1
  562.       set Chk2 = "ON"
  563.     else
  564.       set Chk2 = "OFF"
  565.     endif
  566.  
  567.     ifint $(WlipciValue) == 1
  568.       set Chk3 = "ON"
  569.     else
  570.       set Chk3 = "OFF"
  571.     endif
  572.  
  573.     ifint $(EncapsulatedValue) == 1
  574.       set Chk4 = "OFF"
  575.     else
  576.       set Chk4 = "ON"
  577.     endif
  578.  
  579.     ifint $(PcmciaValue) == 1
  580.       set Chk5 = "ON"
  581.     else
  582.       set Chk5 = "OFF"
  583.     endif
  584.  
  585.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  586.     ifstr(i) $(IOBaseAddrValue) == ""
  587.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  588.     endif
  589.  
  590.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  591.     ifstr(i) $(IRQValue) == ""
  592.     set IRQValue = *($(IRQList), 1)
  593.     endif
  594.  
  595.     set MemBaseAddrValue = *($(MemBaseAddrList), ~($(MemBaseAddrValues),$(MemBaseAddrIndex)))
  596.     ifstr(i) $(MemBaseAddrValue) == ""
  597.     set MemBaseAddrValue = *($(MemBaseAddrList), 1)
  598.     endif
  599.  
  600.     set PktSizeValue = *($(PktSizeList), ~($(PktSizeValues),$(PktSizeValue)))
  601.     ifstr(i) $(PktSizeValue) == ""
  602.     set PktSizeValue = *($(PktSizeList), 7)
  603.     endif
  604.  
  605.     set FHIndValue = *($(FHIndList), ~($(FHIndValues),$(FHIndValue)))
  606.     ifstr(i) $(FHIndValue) == ""
  607.     set FHIndValue = *($(FHIndList), 1)
  608.     endif
  609.     
  610.     set FHPatternValue = *($(FHPatternList), ~($(FHPatternValues),$(FHPatternValue)))
  611.     ifstr(i) $(FHPatternValue) == ""
  612.     set FHPatternValue = *($(FHPatternList), 1)
  613.     endif
  614.  
  615.     set DSChannelValue = *($(DSChannelList), ~($(DSChannelValues),$(DSChannelValue)))
  616.     ifstr(i) $(DSChannelValue) == ""
  617.     set DSChannelValue = *($(DSChannelList), 1)
  618.     endif
  619.  
  620.  
  621.     set PowerManValue = *($(PowerManList), ~($(PowerManValues),$(PowerManIndex)))
  622.     ifstr(i) $(PowerManValue) == ""
  623.     set PowerManValue = *($(PowerManList), 1)
  624.     endif
  625.  
  626.     ;  Save the settings as they were read from the Registry.
  627.  
  628. ;    Shell $(ParamInf) Param_SaveValues
  629. ;    Set CurrParamSettings = $($R0)
  630. ;
  631. ;   Put up the adapter configuration dialog if necessary.
  632. ;
  633. ;   Note that $(CurrParamSettings) has the old known parameter values.
  634. ;
  635. adaptersetup = +
  636.  
  637. ;    Shell "" DebugConfiguration "before displaying dialog"
  638.  
  639.     Set from = adapteroptions
  640.  
  641.  
  642. adapteroptions = +
  643.  
  644.     LoadLibrary "WLI-PCI Driver Disk #2" $(DialogDllName) hLib
  645.  
  646.     set OldIOBaseAddrValue = $(IOBaseAddrIndex)
  647.     set OldIRQValue = $(IRQValueIndex)
  648.     set OldMemBaseAddrValue = $(MemBaseAddrIndex)
  649.  
  650. configure_adapter = +
  651.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  652.  
  653.     ui start "InputDlg"  $(hLib)
  654.  
  655.     set ExitButton  = $(ButtonPressed)
  656.  
  657.     Debug-Output " ButtonPressed "$(ButtonPressed)
  658.  
  659.     FreeLibrary $(hLib)
  660.  
  661.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  662.     set IOBaseAddrIndex     = $(Combo1Out)
  663.     set IRQValueIndex       = $(Combo2Out)
  664.     set MemBaseAddrIndex    = $(Combo3Out)
  665. ;kpdebug switch pktsize and fhind        
  666.     set PktSizeValue = $(Combo4Out)
  667. ;       set FHIndValue = $(Combo5Out)
  668. ;       set PowerManIndex = $(Combo7Out)
  669.     set ESSIDValue = *($(EditTextOut),1)                          
  670. ;       set DSChannelValue = $(Combo8Out)                       
  671. ;       set FHPatternValue = $(Combo6Out)                        
  672.     Set Chk = *($(CheckItemsOut), 1)
  673.     Ifstr(i) $(Chk) == "ON"
  674.         Set NetworkModeValue = 1
  675.         set Chk1 = "ON"
  676.     Else
  677.         Set NetworkModeValue = 0
  678.         set Chk1 = "OFF"
  679.     Endif
  680.     Set Chk = *($(CheckItemsOut), 2)
  681.     Ifstr(i) $(Chk) == "ON"
  682.         Set IoAccessValue = 1
  683.         set Chk2 = "ON"
  684.     Else
  685.         Set IoAccessValue = 0
  686.         set Chk2 = "OFF"
  687.     Endif
  688.     Set Chk = *($(CheckItemsOut), 3)
  689.     Ifstr(i) $(Chk) == "ON"
  690.         Set WlipciValue = 1
  691.         set Chk3 = "ON"
  692.     Else
  693.         Set WlipciValue = 0
  694.         set Chk3 = "OFF"
  695.     Endif
  696.     Set Chk = *($(CheckItemsOut), 4)
  697.     Ifstr(i) $(Chk) == "ON"
  698.         Set EncapsulatedValue = 0
  699.         set Chk4 = "ON"
  700.     Else
  701.         Set EncapsulatedValue = 1
  702.         set Chk4 = "OFF"
  703.     Endif
  704.  
  705. ;    Set Chk = *($(CheckItemsOut), 5)
  706. ;    Ifstr(i) $(Chk) == "ON"
  707. ;        Set PcmciaValue = 1
  708. ;        set Chk5 = "ON"
  709. ;    Else
  710. ;        Set PcmciaValue = 0
  711. ;        set Chk5 = "OFF"
  712. ;    Endif
  713.  
  714.     LoadLibrary "WLI-PCI Driver Disk #2" $(DialogDllName) hLib
  715.  
  716.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  717.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  718.     set MemBaseAddrValue = *($(MemBaseAddrValues), ~($(MemBaseAddrList),$(MemBaseAddrIndex)))
  719.  
  720.     LibraryProcedure Result $(hLib) CheckIrqUsage $(IRQValue)
  721.     
  722.     Ifstr(i) $(!NTN_InstallMode) == install
  723.     ifstr(i) $(Result) == "FALSE"
  724.         read-syms IrqConflictMsgDlg  ; set up the message box variables
  725.         ui start "IrqConflictMsgBox"
  726.         goto configure_adapter
  727.     endif
  728.     else
  729.     ifstr(i) $(IRQValue) != $(OldIRQValue)
  730.         ifstr(i) $(Result) == "FALSE"
  731.         read-syms IrqConflictMsgDlg ; set up the message box variables
  732.         ui start "IrqConflictMsgBox"
  733.         goto configure_adapter
  734.         endif
  735.        endif
  736.    endif
  737.    
  738.     LibraryProcedure Result $(hLib) CheckIoUsage $(IOBaseAddrValue)
  739.  
  740.     Ifstr(i) $(!NTN_InstallMode) == install
  741.     ifstr(i) $(Result) == "FALSE"
  742.         read-syms IoConflictMsgDlg  ; set up the message box variables
  743.         ui start "IoConflictMsgBox"
  744.         goto configure_adapter
  745.     endif
  746.     else
  747.     ifstr(i) $(IOBaseAddrValue) != $(OldIOBaseAddrValue)
  748.         ifstr(i) $(Result) == "FALSE"
  749.         read-syms IoConflictMsgDlg  ; set up the message box variables
  750.         ui start "IoConflictMsgBox"
  751.         goto configure_adapter
  752.         endif
  753.     endif
  754.     endif
  755.  
  756.     Ifstr(i) $(!NTN_InstallMode) == install
  757.     LibraryProcedure Result $(hLib) CheckMemUsage $(MemBaseAddrValue)
  758.     else
  759.     LibraryProcedure Result $(hLib) CheckMemUsageRange $(MemBaseAddrValue) $(OldMemBaseAddrValue)
  760.     endif
  761.     ifstr(i) $(Result) == "FALSE"
  762.     read-syms MemConflictMsgDlg  ; set up the message box variables
  763.     ui start "MemConflictMsgBox"
  764.     goto configure_adapter
  765.     endif
  766.     
  767. ;    LibraryProcedure Result $(hLib) CheckMemUsage $(MemBaseAddrValue)
  768. ;    Ifstr(i) $(!NTN_InstallMode) == install
  769. ;        ifstr(i) $(Result) == "FALSE"
  770. ;            read-syms MemConflictMsgDlg  ; set up the message box variables
  771. ;            ui start "MemConflictMsgBox"
  772. ;            goto configure_adapter
  773. ;        endif
  774. ;    else
  775. ;        ifstr(i) $(MemBaseAddrValue) != $(OldMemBaseAddrValue)
  776. ;            ifstr(i) $(Result) == "FALSE"
  777. ;                read-syms MemConflictMsgDlg  ; set up the message box variables
  778. ;                ui start "MemConflictMsgBox"
  779. ;                goto configure_adapter
  780. ;            endif
  781. ;        endif
  782. ;    endif
  783.  
  784.     FreeLibrary $(hLib)
  785.  
  786.     set ExitButton          = $(ButtonPressed)
  787.  
  788.     ui pop 1
  789. ;        goto nextstep
  790.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  791.     set CommonStatus = STATUS_USERCANCEL
  792.     Debug-Output "Action: exit. Bye."
  793.     ui pop 1
  794.     goto end
  795.     else
  796.     ;
  797.     ; Unknow command
  798.     ;
  799.     ui pop 1
  800.  
  801.     Debug-Output "Action: unknown. Bye."
  802.     goto end
  803.     endif
  804.  
  805.     Debug-Output " Combo list out "$(ComboListItemsOut)
  806.  
  807. ;
  808. ;   If installing, go create the necessary keys;
  809. ;   if configuring, they're already open.
  810. ;
  811. skipoptions =+
  812.  
  813.     ifint $(OldVersionExisted) == $(TRUE)
  814.     ifstr(i) $(!NTN_InstallMode) == configure
  815.         goto writeparameters
  816.     endif
  817.     endif
  818.     StartWait
  819.     ;
  820.     ; Add Software Component
  821.     ;
  822.     ifint $(OldVersionExisted) == $(FALSE)
  823.  
  824.     ifstr(i) $(!NTN_InstallMode) == "install"
  825.        Ifstr(i) $(DoCopy) == "YES"
  826.  
  827.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  828.  
  829.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  830.           Goto ShellCodeError
  831.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  832.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  833.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  834.               goto ShellCodeError
  835.           endif
  836.           set Error = $($R0)
  837.           Goto fatal
  838.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  839.           Goto successful
  840.           Endif
  841.  
  842.           Set SrcDir = $($R1)
  843.  
  844.        Endif
  845.  
  846.        install "Install-Option"
  847.  
  848.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  849.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  850.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  851.           goto ShellCodeError
  852.           endif
  853.           set Error = $($R0)
  854.           goto fatal
  855.        endif
  856.     endif
  857.  
  858.  
  859.  
  860.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  861.         $(ProductSoftwareName), +
  862.         $(ProductSoftwareName), +
  863.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  864.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  865.         $(NetEventDLL)
  866.  
  867.     Set OEM_ABANDON_SOFTWARE = TRUE
  868.  
  869.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  870.         Debug-Output "ShellCode error"
  871.         goto ShellCodeError
  872.     endif
  873.     ;
  874.     ;   At this point:
  875.     ;     $R1 contains the product version key handle;
  876.     ;     $R2 contains the NetRules subkey handle;
  877.     ;     $R3 contains the new Services key handle; and
  878.     ;     $R4 contains the Parameters key
  879.     ;     $R5 contains the Linkage Key
  880.     ;
  881.     set RegistryErrorIndex = $($R0)
  882.     set KeyProduct      = $($R1)
  883.     Set SoftNetRulesKey = $($R2)
  884.     CloseRegKey $($R3)
  885.     CloseRegKey $($R4)
  886.     CloseRegKey $($R5)
  887.  
  888.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  889.         EndWait
  890.         Debug-Output "Registry error: add software components"
  891.         CloseRegKey $(KeyProduct)
  892.         CloseRegKey $(SoftNetRulesKey)
  893.         goto fatalregistry
  894.     endif
  895.  
  896.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  897.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  898.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  899.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  900.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  901.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  902.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  903.  
  904.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  905.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  906.         Debug-Output "ShellCode error."
  907.         goto ShellCodeError
  908.     endif
  909.  
  910.     set RegistryErrorIndex = $($R0)
  911.  
  912.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  913.         EndWait
  914.         Debug-Output "Registry error: add value list."
  915.         CloseRegKey $(KeyProduct)
  916.         CloseRegKey $(SoftNetRulesKey)
  917.         goto fatalregistry
  918.     endif
  919.  
  920.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  921.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  922.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  923.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  924.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  925.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  926.  
  927.     Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  928.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  929.         Debug-Output "ShellCode error."
  930.         goto ShellCodeError
  931.     endif
  932.  
  933.     set RegistryErrorIndex = $($R0)
  934.  
  935.     CloseRegKey $(KeyProduct)
  936.     CloseRegKey $(SoftNetRulesKey)
  937.  
  938.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  939.         EndWait
  940.         Debug-Output "Resgitry error: add value list."
  941.         goto fatalregistry
  942.     endif
  943.     endif
  944. ;
  945. ;   Create the HARDWARE\Netcard region and its corresponding service
  946. ;
  947.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  948.  
  949.     ifint $($R4) != -1
  950.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  951.     endif
  952.  
  953.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  954.     Debug-Output "Cannot add hardware component"
  955.     goto ShellCodeError
  956.     endif
  957.  
  958.     set RegistryErrorIndex = $($R0)
  959.  
  960.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  961.     EndWait
  962.     Debug-Output "Registry error: add hardware component"
  963.     CloseRegKey $($R1)
  964.     CloseRegKey $($R2)
  965.     CloseRegKey $($R3)
  966.     goto fatalregistry
  967.     endif
  968.  
  969. ;
  970. ;   At this point:
  971. ;     $R1  Registry key variable for HARDWARE\Netcard\(n)
  972. ;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  973. ;     $R3  Registry key handle for <service>\Parameters key
  974. ;     $R4  Adapter number assigned to adapter
  975. ;     $R5  Service name generated by combining svc name with adapter number
  976. ;
  977.     set KeyParameters = $($R3)
  978.     set KeyAdapterRules = $($R2)
  979.     set AdapterNumber = $($R4)
  980.     Set WlipcmServiceName = $($R5)
  981.  
  982.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  983.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  984.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  985.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  986.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  987.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  988.  
  989.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  990.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  991.     Debug-Output "ShellCode error"
  992.     goto ShellCodeError
  993.     endif
  994.  
  995.     CloseRegKey $($R1)
  996.  
  997.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  998.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  999.  
  1000.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  1001.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1002.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  1003.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1004.  
  1005.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1006.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1007.     Debug-Output "ShellCode error."
  1008.     goto ShellCodeError
  1009.     endif
  1010.  
  1011.     set RegistryErrorIndex = $($R0)
  1012.  
  1013.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1014.     EndWait
  1015.     Debug-Output "Resgitry error: add value list."
  1016.     CloseRegKey $(KeyParameters)
  1017.     CloseRegKey $(KeyAdapterRules)
  1018.     goto fatalregistry
  1019.     endif
  1020.  
  1021.     CloseRegKey $(KeyAdapterRules)
  1022.  
  1023.     goto writeparameters
  1024. ;
  1025. ;   REQUIRED:   $(KeyParameters) contains service Parameters key handle
  1026. ;
  1027. writeparameters = +
  1028.     Shell $(UtilityInf), GetBusTypeNum
  1029.     set BusTypeNum = $($R1)
  1030.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1031.     Debug-Output "ShellCode error."
  1032.     goto ShellCodeError
  1033.     endif
  1034.  
  1035. ;
  1036. ;   Add the rest of the parameters to the Services area
  1037. ;
  1038.  
  1039.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  1040.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  1041.     set MemBaseAddrValue = *($(MemBaseAddrValues), ~($(MemBaseAddrList),$(MemBaseAddrIndex)))
  1042.     set PktSizeValue = *($(PktSizeValues), ~($(PktSizeList),$(PktSizeValue)))
  1043.     set FHIndValue = *($(FHIndValues), ~($(FHIndList),$(FHIndValue)))
  1044.     set FHPatternValue = *($(FHPatternValues), ~($(FHPatternList),$(FHPatternValue)))
  1045.     
  1046.     set PowerManValue = *($(PowerManValues), ~($(PowerManList),$(PowerManIndex)))
  1047.     set DSChannelValue = *($(DSChannelValues), ~($(DSChannelList),$(DSChannelValue)))
  1048.     
  1049.  
  1050.     set NewValueList = {+
  1051.             {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1052.             {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  1053.             {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  1054.             {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1055.             {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  1056.             {IoLength,$(NoTitle),$(!REG_VT_DWORD),16},+
  1057.             {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  1058.             {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemBaseAddrValue)},+
  1059.             {MemoryMappedSize,$(NoTitle),$(!REG_VT_DWORD),24576},+
  1060.             {Interrupt_Mode,$(NoTitle),$(!REG_VT_DWORD),$(WlipciValue)},+
  1061.             {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),$(PcmciaValue)},+
  1062.             {Encapsulated,$(NoTitle),$(!REG_VT_DWORD),$(EncapsulatedValue)},+
  1063.             {Power_Management,$(NoTitle),$(!REG_VT_DWORD),$(PowerManValue)},+
  1064.             {PktSize,$(NoTitle),$(!REG_VT_DWORD),$(PktSizeValue)},+
  1065.             {DS_Channel,$(NoTitle),$(!REG_VT_DWORD),$(DSChannelValue)},+
  1066.             {FH_Index,$(NoTitle),$(!REG_VT_DWORD),$(FHIndValue)},+   
  1067.             {FH_Pattern,$(NoTitle),$(!REG_VT_DWORD),$(FHPatternValue)},+   
  1068.             {Desired_ESS_ID,$(NoTitle),$(!REG_VT_SZ),$(ESSIDValue)},+
  1069.             {IoAccessMode,$(NoTitle),$(!REG_VT_DWORD),$(IoAccessValue)},+
  1070.             {WinNT,$(NoTitle),$(!REG_VT_DWORD),1},+
  1071.             {NetworkMode,$(NoTitle),$(!REG_VT_DWORD),$(NetworkModeValue)}}
  1072.  
  1073.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  1074.  
  1075.     CloseRegKey $(KeyParameters)
  1076.  
  1077.     ifint $(WlipciValue) == 1
  1078.         LoadLibrary "WLI-PCI Driver Disk #2" $(DialogDllName) hLib
  1079.         LibraryProcedure Result $(hLib) SetWlipciIrq $(IRQValue) $(WlipciValue) $(WlipcmServiceName)
  1080.     Endif
  1081.  
  1082.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1083.     Debug-Output "ShellCode error."
  1084.     goto ShellCodeError
  1085.     endif
  1086.  
  1087.     set RegistryErrorIndex = $($R0)
  1088.  
  1089.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1090.     Debug-Output "Registry error: Add value list"
  1091.     goto fatalregistry
  1092.     endif
  1093.  
  1094.     EndWait
  1095.  
  1096.     goto successful
  1097.  
  1098. ;-----------------------------------------------
  1099. ; Binding section
  1100. ;-----------------------------------------------
  1101. bindingadapter =+
  1102.     set Error = "Binding: Sorry, not yet implemented."
  1103.     goto fatal
  1104.  
  1105. ;-----------------------------------------------
  1106. ; Removeadapter section
  1107. ;-----------------------------------------------
  1108.  
  1109. removeadapter = +
  1110.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1111.     ; Remove Software Component
  1112.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1113.         $(ProductSoftwareName)
  1114.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1115.         Debug-Output "ShellCode error"
  1116.         goto ShellCodeError
  1117.     endif
  1118.  
  1119.     set RegistryErrorIndex = $($R0)
  1120.  
  1121.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1122.         goto fatalregistry
  1123.     endif
  1124.     else
  1125.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1126.         $(ProductSoftwareName), $(!NTN_RegBase)
  1127.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1128.         Debug-Output "ShellCode error"
  1129.         goto ShellCodeError
  1130.     endif
  1131.  
  1132.     set RegistryErrorIndex = $($R0)
  1133.  
  1134.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1135.         goto fatalregistry
  1136.     endif
  1137.     endif
  1138.  
  1139.     goto end
  1140.  
  1141. ;-----------------------------------------------
  1142. ; Upgrade Software section
  1143. ;-----------------------------------------------
  1144.  
  1145. UpgradeSoftware = +
  1146.     ;
  1147.     ; First determine whether we want to do upgrade or update for software
  1148.     ; or hardware component. Then we will determine whether the Mode is
  1149.     ; update or upgrade.
  1150.     ;
  1151.     ; If the same version of the product existed in the registry, we do
  1152.     ; update. Otherwise, we will do a upgrade
  1153.     ;
  1154. ;    ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1155.     ; Upgrade software component
  1156.     ;
  1157.     ; see whether the same version exist or not
  1158.     ;
  1159.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1160.  
  1161.     Ifstr $(KeyProduct) != $(KeyNull)
  1162.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1163.         set Version = *($(VersionInfo), 4)
  1164.  
  1165.         ;
  1166.         ; Update the binaries
  1167.         ;
  1168.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1169.  
  1170.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1171.         Debug-Output "ShellCode error"
  1172.         goto ShellCodeError
  1173.         endif
  1174.  
  1175.         set !UG_Filename = $($R0)
  1176.  
  1177.         ifstr(i) $(!UG_Filename) != ""
  1178.         install "Install-Update"
  1179.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1180.             goto fatal
  1181.         endif
  1182.         endif
  1183.  
  1184.         ; Upgrade the version number
  1185.         ;
  1186.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1187.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1188.  
  1189.         ;
  1190.         ; do nothing for update
  1191.         ;
  1192.         ifint $(Version) != $(ProductVersion)
  1193.            ;
  1194.            ; If the major version number is not the same,
  1195.            ; it is major upgrade. So let Upgrade the product
  1196.            ;
  1197.            ;
  1198.            ; make other upgrade change if necessary
  1199.            ;
  1200.         endif
  1201.         CloseRegKey $(KeyProduct)
  1202.     else
  1203.         ;
  1204.         ; Cannot Open software key, goto ERROR
  1205.         ;
  1206.         goto fatalregistry
  1207.     endif
  1208. ;    else
  1209.     ;
  1210.     ; upgrade/update hardware component
  1211.     ; There is no different between upgrade and update for hardware
  1212.     ; component
  1213.     ;
  1214.     ; 1. Get the Service Name
  1215.     ; 2. Change the NetRule section if necessary
  1216.     ;
  1217. ;       OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1218. ;             $(MAXIMUM_ALLOWED) NetworkCardKey
  1219. ;       Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1220.         ;
  1221.         ; Get Service name
  1222.         ;
  1223. ;           GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1224. ;           set ServiceName = *($(ServiceNameInfo), 4)
  1225.  
  1226.         ;
  1227.         ; Change the NetRule if necessary
  1228.         ;
  1229. ;           OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1230. ;               $(MAXIMUM_ALLOWED) NetRuleKey
  1231. ;           Ifstr(i) $(NetRuleKey) != $(KeyNull)
  1232.         ;
  1233.         ; Make the change....
  1234.         ;
  1235. ;           else
  1236.         ;
  1237.         ; Error, cannot open net rules key
  1238.         ;
  1239. ;                goto fatalregistry
  1240. ;           endif
  1241.  
  1242. ;           CloseRegKey $(NetRules)
  1243. ;           CloseRegKey $(NetworkCardKey)
  1244. ;       else
  1245.         ;
  1246.         ; Error, cannot open network card key
  1247.         ;
  1248. ;           goto fatalregistry
  1249. ;       endif
  1250.     ;
  1251.     ; 3. Change the service section of the hardware. i.e.,
  1252.     ;    ParameterName change, value change, etc.
  1253.     ;
  1254. ;       OpenRegKey $(!REG_H_LOCAL) "" +
  1255. ;             $(!NTN_ServiceBase)"\"$(ServiceName) +
  1256. ;             $(MAXIMUM_ALLOWED) ServiceKey
  1257.  
  1258. ;       Ifstr(i) $(ServiceKey) != $(KeyNull)
  1259.         ;
  1260.         ; Get the ServiceKey to change the Start value
  1261.         ; or Type value. Or open Parameters key to
  1262.         ; change the hardware parameters if necessary.
  1263.         ;
  1264. ;           CloseRegKey $(ServiceKey)
  1265. ;       else
  1266.         ;
  1267.         ; Error, cannot open network card key
  1268.         ;
  1269. ;           goto fatalregistry
  1270. ;       endif
  1271. ;    endif
  1272.  
  1273.     goto end
  1274.     ;
  1275.     ; End of Upgrade Software
  1276.     ;
  1277.  
  1278. ;
  1279. ;  Escape hatches
  1280. ;
  1281. successful = +
  1282.     goto end
  1283.  
  1284. abandon = +
  1285.     ForListDo $(OEM_ABANDON_OPTIONS)
  1286.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1287.         $(ProductSoftwareName), $($)
  1288.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1289.         Debug-Output "ShellCode error"
  1290.         goto ShellCodeError
  1291.     endif
  1292.  
  1293.     set RegistryErrorIndex = $($R0)
  1294.  
  1295.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1296.         goto fatalregistry
  1297.     endif
  1298.     EndForListDo
  1299.  
  1300.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1301.     ; Remove Software Component
  1302.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1303.         $(ProductSoftwareName), FALSE
  1304.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1305.         Debug-Output "ShellCode error"
  1306.         goto ShellCodeError
  1307.     endif
  1308.  
  1309.     set RegistryErrorIndex = $($R0)
  1310.  
  1311.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1312.         goto fatalregistry
  1313.     endif
  1314.     endif
  1315.  
  1316.     goto end
  1317.  
  1318. ;
  1319. ; warning display
  1320. ;
  1321. warning = +
  1322.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1323.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1324.     goto ShellCodeError
  1325.     endif
  1326.     ifstr(i) $($R1) == "OK"
  1327.     goto $(to)
  1328.     else-ifstr(i) $($R1) == "CANCEL"
  1329.     goto $(from)
  1330.     else
  1331.     goto "end"
  1332.     endif
  1333. ;
  1334. ; non fatal error display
  1335. ;
  1336. nonfatalinfo = +
  1337.     Set Severity = STATUS
  1338.     Set CommonStatus = STATUS_USERCANCEL
  1339.     goto nonfatalmsg
  1340. nonfatal = +
  1341.     Set Severity = NONFATAL
  1342.     goto nonfatalmsg
  1343. nonfatalmsg = +
  1344.     ifstr(i) $(Error) == ""
  1345.     Set Severity = NONFATAL
  1346.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1347.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1348.         goto ShellCodeError
  1349.     endif
  1350.     set Error = $($R0)
  1351.     endif
  1352.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1353.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1354.     goto ShellCodeError
  1355.     endif
  1356.     ifstr(i) $($R1) == "OK"
  1357.     goto $(from)
  1358.     else
  1359.     goto "end"
  1360.     endif
  1361.  
  1362. ;
  1363. ;  Registry is broken
  1364. ;
  1365. fatalregistry = +
  1366.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1367.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1368.     goto ShellCodeError
  1369.     endif
  1370.     set Error = $($R0)
  1371.     goto fatal
  1372. ;
  1373. ;  Netcard detection failure
  1374. ;
  1375. fataldetect = +
  1376.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1377.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1378.     Debug-Output "ShellCode error: cannot get an error string."
  1379.     goto ShellCodeError
  1380.     endif
  1381.     set Error = $($R0)
  1382.     Goto fatal
  1383. ;
  1384. ; fatal error display
  1385. ;
  1386. fatal = +
  1387.     ifstr(i) $(Error) == ""
  1388.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1389.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1390.         goto ShellCodeError
  1391.     endif
  1392.     set Error = $($R0)
  1393.     endif
  1394.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1395.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1396.     goto ShellCodeError
  1397.     endif
  1398.  
  1399.     goto setfailed
  1400.  
  1401. ;
  1402. ;  Shelling error
  1403. ;
  1404. ShellCodeError = +
  1405.     set DlgType      = "MessageBox"
  1406.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1407.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  1408.     set STF_MB_TYPE  = 1
  1409.     set STF_MB_ICON  = 3
  1410.     set STF_MB_DEF   = 1
  1411.     ui start "Error Message"
  1412.     goto setfailed
  1413.  
  1414. setfailed = +
  1415.     set CommonStatus = STATUS_FAILED
  1416.     ;
  1417.     ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1418.     ;
  1419.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1420.     set OEM_ABANDON_ON = FALSE
  1421.     goto abandon
  1422.     endif
  1423.     goto end
  1424.  
  1425. end = +
  1426.     goto term
  1427.  
  1428. term = +
  1429.  
  1430.     Return $(CommonStatus)
  1431.  
  1432. [DebugConfiguration]
  1433.  
  1434.     Set InfName = "OEMNADE2.INF"
  1435.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  1436.     Debug-Output $(InfName)" IRQ_Level is "$(!p:IRQ_Level)
  1437.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  1438.     Debug-Output $(InfName)" TransceiverValue is "$(!p:TransceiverValue)
  1439.     Debug-Output $(InfName)" MemBaseAddrDec is "$(!p:MemBaseAddrDec)
  1440.     Debug-Output $(InfName)" MappedValue is "$(!p:MappedValue)
  1441.     
  1442.     Debug-Output $(InfName)" PowerManValue is "$(!p:PowerManValue)
  1443.     Debug-Output $(InfName)" DSChannelValue is "$(!p:DSChannelValue)
  1444.  
  1445.     Debug-Output $(InfName)" FHIndValue is "$(!p:FHIndValue)
  1446.     Debug-Output $(InfName)" FHPatternValue is "$(!p:FHPatternValue)
  1447.  
  1448.  
  1449.  
  1450.  
  1451.     return
  1452.  
  1453.  
  1454. ;***************************************************************
  1455. ;  INSTALL SECTIONS
  1456. ;***************************************************************
  1457. [Install-Option]
  1458.     set STF_VITAL = ""
  1459.  
  1460.     ifstr(i) $(AddCopy) == "YES"
  1461.  
  1462.     ;
  1463.     ; Add the files to the copy list
  1464.     ;
  1465.     ;  BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1466.     ;      the other INF files
  1467.     ;
  1468.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1469.     AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1470.  
  1471.     endif
  1472.  
  1473.     ifstr(i) $(DoCopy) == "YES"
  1474.  
  1475.        ;
  1476.        ; Copy files in the copy list
  1477.        ;
  1478.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1479.        CopyFilesInCopyList
  1480.  
  1481.     endif
  1482.  
  1483.     Exit
  1484.  
  1485. [Install-Update]
  1486.    set STF_VITAL        = ""
  1487.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1488.    ;set STF_VERSION     = "YES"
  1489.  
  1490.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1491.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1492.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1493.  
  1494.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1495.    CopyFilesInCopyList
  1496.  
  1497.    exit
  1498.  
  1499. [Install-Dll]
  1500.    set STF_VITAL        = ""
  1501.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1502.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1503.    CopyFilesInCopyList
  1504.    exit
  1505.  
  1506. [Source Media Descriptions]
  1507.     1  = "MELCO WLI-PCM 802.11 Network Adapter"
  1508.  
  1509. [ProductType]
  1510.     STF_PRODUCT  = Winnt
  1511.     STF_PLATFORM = I386
  1512.  
  1513. [Files-Inf]
  1514.     1, oemsetup.inf, SIZE=40558, RENAME=$(!UG_Filename)
  1515.  
  1516. [Files-WLIPCM]
  1517.     1, wlipcm.sys, SIZE=12800
  1518.  
  1519. [Files-Dll]
  1520.     1, wlipcm.dll , SIZE=5632
  1521.  
  1522. [LanguagesSupported]
  1523.     ENG
  1524.  
  1525. [OptionsTextENG]
  1526.     WLIPCM = "MELCO WLI-PCM 802.11 Network Adapter"
  1527.  
  1528. [FileConstantsENG]
  1529.     ProCaption   = "Windows NT Setup"
  1530.     ProCancel    = "Cancel"
  1531.     ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1532.            "Are you sure you want to cancel copying files?"
  1533.     ProCancelCap = "Network Setup Message"
  1534.     ProText1     = "Copying:"
  1535.     ProText2     = "To:"
  1536.  
  1537.     FunctionTitle   = $(GenericAdapterName)" Setup"
  1538.  
  1539.     ProductSoftwareDescription = $(GenericDriverName)
  1540.     ProductHardwareDescription = $(GenericAdapterName)
  1541.  
  1542.     ProductSoftwareTitle =       $(GenericDriverName)
  1543.     ProductHardwareTitle =       $(GenericAdapterName)
  1544.  
  1545.     DialogDllName   = "wlipcm.dll"
  1546.  
  1547.     IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  1548.     IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  1549.  
  1550.     IRQList  = ^(IRQChoices, 1)
  1551.     IRQValues = ^(IRQChoices, 2)
  1552.  
  1553.     MemBaseAddrList = ^(MemBaseAddrChoices, 1)
  1554.     MemBaseAddrValues = ^(MemBaseAddrChoices, 2)
  1555.  
  1556.     PktSizeList = ^(PktSizeChoices,1)
  1557.     PktSizeValues = ^(PktSizeChoices,2)
  1558.  
  1559.     FHIndList = ^(FHIndChoices,1)
  1560.     FHIndValues = ^(FHIndChoices,2)
  1561.     FHPatternList = ^(FHIndChoices,1)
  1562.     FHPatternValues = ^(FHIndChoices,2)
  1563.     DSChannelList = ^(DSChannelChoices,1)
  1564.     DSChannelValues = ^(DSChannelChoices,2)
  1565.  
  1566.     PowerManList = ^(PowerManChoices,1)
  1567.     PowerManValues = ^(PowerManChoices,2)
  1568.  
  1569.  
  1570. [DialogConstantsENG]
  1571. ;    Help        = "&Help"
  1572. ;    Exit        = "Cancel"
  1573. ;    OK          = "OK"
  1574. ;    HelpContext = ""
  1575. ;    Continue    = "Continue"
  1576. ;    Cancel      = "Cancel"
  1577.     Help        = "ヘルプ(&H)"
  1578.     Exit        = "キャンセル"
  1579.     OK          = "OK"
  1580.     HelpContext = ""
  1581.     Continue    = "OK"
  1582.     Cancel      = "キャンセル"
  1583.  
  1584. [MemoryMappedChoicesENG]
  1585.     Map_1 = 1, "ON"
  1586.     Map_2 = 0, "OFF"
  1587.  
  1588. [FileDependentDlgENG]
  1589.     DlgText = "Please select values for the follwing fields:"
  1590.  
  1591.     DlgType = "RadioCombination"
  1592.     DlgTemplate = "PCNTN3"
  1593.     Caption = $(FunctionTitle)
  1594.  
  1595.     CBOptionsGreyed = {}
  1596.     NotifyFields = {NO, NO}
  1597.     HelpContext = $(!IDH_DB_OEMNADE2_INS)
  1598.  
  1599.     Combo1Label = "I/&Oポート:"
  1600.     Combo2Label = "I&RQレベル:"
  1601.     Combo3Label = "メモリアドレス(&M):"
  1602.     Combo4Label = "パケットサイズ(&S):"
  1603.     Edit1Label = "&ESS ID:"
  1604.     BigButton   = "More pcntn3 BS >>"
  1605.     CheckBox1 = "アクセスポイント経由通信(&I)"
  1606.     CheckBox2 = "&PIO Mode"
  1607.     CheckBox3 = "&WLI-PCI"
  1608.     CheckBox4 = "R&FC 1042"
  1609.  
  1610.     Combo1List = $(IOBaseAddrList)
  1611.     Combo1Out  = $(IOBaseAddrValue)
  1612.  
  1613.     Combo2List = $(IRQList)
  1614.     Combo2Out  = $(IRQValue)
  1615.  
  1616.     Combo3List = $(MemBaseAddrList)
  1617.     Combo3Out  = $(MemBaseAddrValue)
  1618. ;kpdbg
  1619.     Combo4List = $(PktSizeList)
  1620.     Combo4Out  = $(PktSizeValue)
  1621.     
  1622.     Combo5List = $(FHIndList)
  1623.     Combo5Out  = $(FHIndValue)
  1624.     
  1625.     Combo6List = $(FHPatternList)
  1626.     Combo6Out  = $(FHPatternValue)
  1627.     
  1628.  
  1629.     Combo7List = $(PowerManList)
  1630.     Combo7Out  = $(PowerManValue)
  1631.  
  1632.     Combo8List = $(DSChannelList)
  1633.     Combo8Out  = $(DSChannelValue)
  1634.  
  1635.  
  1636.  
  1637.     ComboListItemsIn  = {Combo1List,Combo2List,Combo3List,Combo4List}
  1638.     ComboListItemsOut = {Combo1Out,Combo2Out,Combo3Out,Combo4Out}
  1639.  
  1640.     EditTextIn = {$(ESSIDValue)}
  1641.     EditTextLim = {"32","6"}
  1642.  
  1643.     CheckItemsIn = {$(Chk1), $(Chk2), $(Chk3), $(Chk4), $(Chk5)}
  1644.  
  1645. [IOBaseAddrChoices]
  1646.     IOBase_1  = "200",512
  1647.     IOBase_2  = "240",576
  1648.     IOBase_3  = "280",640
  1649.     IOBase_4  = "2C0",714
  1650.     IOBase_5  = "300",768
  1651.     IOBase_6 =  "340",832
  1652.     IOBase_7 =  "380",896
  1653.     IOBase_8 =  "3C0",960
  1654.  
  1655. [IRQChoices]
  1656.     IRQ_1 = "3",3
  1657.     IRQ_2 = "4",4
  1658.     IRQ_3 = "5",5
  1659.     IRQ_4 = "7",7
  1660.     IRQ_5 = "9",9
  1661.     IRQ_6 = "10",10
  1662.     IRQ_7 = "11",11
  1663.     IRQ_8 = "12",12
  1664. ;    IRQ_9 = "15",15
  1665.  
  1666. [MemBaseAddrChoices]
  1667.     Add_1  = "C8000",819200
  1668.     Add_2  = "C9000",823296
  1669.     Add_3  = "CA000",827392
  1670.     Add_4  = "CB000",831488
  1671.     Add_5  = "CC000",835584
  1672.     Add_6  = "CD000",839680
  1673.     Add_7  = "CE000",843776
  1674.     Add_8  = "CF000",847872
  1675.     Add_9  = "D0000",851968
  1676.     Add_10 = "D1000",856064
  1677.     Add_11 = "D2000",860160
  1678.     Add_12 = "D3000",864256
  1679.     Add_13 = "D4000",868352
  1680.     Add_14 = "D5000",872448
  1681.     Add_15 = "D6000",876544
  1682.     Add_16 = "D7000",880640
  1683.     Add_17 = "D8000",884736
  1684.     Add_18 = "D9000",888832
  1685.     Add_19 = "DA000",892928
  1686.     Add_20 = "DB000",897024
  1687.     Add_21 = "DC000",901120
  1688.     Add_22 = "DD000",905216
  1689.     Add_23 = "DE000",909312
  1690.     Add_24 = "DF000",913408
  1691.  
  1692. [PktSizeChoices]
  1693.     PktSize_1 = "400",400
  1694.     PktSize_2 = "500",500
  1695.     PktSize_3 = "600",600
  1696.     PktSize_4 = "700",700
  1697.     PktSize_5 = "800",800
  1698.     PktSize_6 = "900",900
  1699.     PktSize_7 = "1000",1000
  1700.     PktSize_8 = "1100",1100
  1701.     PktSize_9 = "1200",1200
  1702.     PktSize_10 = "1300",1300
  1703.     PktSize_11 = "1400",1400
  1704.     PktSize_12 = "1500",1500
  1705.     PktSize_13 = "1550",1550
  1706.  
  1707. [FHIndChoices]
  1708.     FHInd_1 = "1",1
  1709.     FHInd_2 = "2",2
  1710.     FHInd_3 = "3",3
  1711.     FHInd_4 = "4",4
  1712.     FHInd_5 = "5",5
  1713.     FHInd_6 = "6",6
  1714.     FHInd_7 = "7",7
  1715.     FHInd_8 = "8",8
  1716.     FHInd_9 = "9",9
  1717.     FHInd_10 = "10",10
  1718.     FHInd_11 = "11",11
  1719.     FHInd_12 = "12",12
  1720.     FHInd_13 = "13",13
  1721.     FHInd_14 = "14",14
  1722.     FHInd_15 = "15",15
  1723.     FHInd_16 = "16",16
  1724.     FHInd_17 = "17",17
  1725.     FHInd_18 = "18",18
  1726.     FHInd_19 = "19",19
  1727.     FHInd_20 = "20",20
  1728.     FHInd_21 = "21",21
  1729.     FHInd_22 = "22",22
  1730.     FHInd_23 = "23",23
  1731.     FHInd_24 = "24",24
  1732.     FHInd_25 = "25",25
  1733.     FHInd_26 = "26",26
  1734.     FHInd_27 = "27",27
  1735.     FHInd_28 = "28",28
  1736.     FHInd_29 = "29",29
  1737.     FHInd_30 = "30",30
  1738.     FHInd_31 = "31",31
  1739.     FHInd_32 = "32",32
  1740.     FHInd_33 = "33",33
  1741.     FHInd_34 = "34",34
  1742.     FHInd_35 = "35",35
  1743.     FHInd_36 = "36",36
  1744.     FHInd_37 = "37",37
  1745.     FHInd_38 = "38",38
  1746.     FHInd_39 = "39",39
  1747.     FHInd_40 = "40",40
  1748.     FHInd_41 = "41",41
  1749.     FHInd_42 = "42",42
  1750.     FHInd_43 = "43",43
  1751.     FHInd_44 = "44",44
  1752.     FHInd_45 = "45",45
  1753.     FHInd_46 = "46",46
  1754.     FHInd_47 = "47",47
  1755.     FHInd_48 = "48",48
  1756.     FHInd_49 = "49",49
  1757.     FHInd_50 = "50",50
  1758.     FHInd_51 = "51",51
  1759.     FHInd_52 = "52",52
  1760.     FHInd_53 = "53",53
  1761.     FHInd_54 = "54",54
  1762.     FHInd_55 = "55",55
  1763.     FHInd_56 = "56",56
  1764.     FHInd_57 = "57",57
  1765.     FHInd_58 = "58",58
  1766.     FHInd_59 = "59",59
  1767.     FHInd_60 = "60",60
  1768.     FHInd_61 = "61",61
  1769.     FHInd_62 = "62",62
  1770.     FHInd_63 = "63",63
  1771.     FHInd_64 = "64",64
  1772.     FHInd_65 = "65",65
  1773.     FHInd_66 = "66",66
  1774.     FHInd_67 = "67",67
  1775.     FHInd_68 = "68",68
  1776.     FHInd_69 = "69",69
  1777.     FHInd_70 = "70",70
  1778.     FHInd_71 = "71",71
  1779.     FHInd_72 = "72",72
  1780.     FHInd_73 = "73",73
  1781.     FHInd_74 = "74",74
  1782.     FHInd_75 = "75",75
  1783.     FHInd_76 = "76",76
  1784.     FHInd_77 = "77",77
  1785.     FHInd_78 = "78",78
  1786.     FHInd_79 = "79",79
  1787.    
  1788.  
  1789.  
  1790. [FHPatternChoices]
  1791.     FHPattern_1 = "1",1
  1792.     FHPattern_2 = "2",2
  1793.     FHPattern_3 = "3",3
  1794.  
  1795. [DSChannelChoices]
  1796.     DSChannel_1 = "1",1
  1797.     DSChannel_2 = "2",2
  1798.     DSChannel_3 = "3",3
  1799.     DSChannel_4 = "4",4
  1800.     DSChannel_5 = "5",5
  1801.     DSChannel_6 = "6",6
  1802.     DSChannel_7 = "7",7
  1803.     DSChannel_8 = "8",8
  1804.     DSChannel_9 = "9",9
  1805.     DSChannel_10 = "10",10
  1806.     DSChannel_11= "11",11
  1807.     DSChannel_12 = "12",12
  1808.     DSChannel_13 = "13",13
  1809.     DSChannel_14 = "14",14
  1810.  
  1811.  
  1812. [PowerManChoices]
  1813.     PowerMan_1 = "disabled",0
  1814.     PowerMan_2 = "enabled",1
  1815.     PowerMan_3 = "auto",2
  1816.  
  1817. [IrqConflictMsgDlg]
  1818. DlgType = "MessageBox"
  1819.     STF_MB_TITLE = "MELCO WLI-PCM Network Adapter Setup"
  1820.     STF_MB_TEXT  = "このIRQレベルは他のボードが使用しています。別の値を選択してください。"
  1821.     STF_MB_TYPE  = 1    ; OK button
  1822.     STF_MB_ICON  = 5    ; ! icon
  1823.     STF_MB_DEF   = 1    ; default button is OK
  1824.     
  1825. [IoConflictMsgDlg]
  1826. DlgType = "MessageBox"
  1827.     STF_MB_TITLE = "MELCO WLI-PCM Network Adapter Setup"
  1828.     STF_MB_TEXT  = "このI/Oポートアドレスは他のボードが使用しています。別の値を選択してください。"
  1829.     STF_MB_TYPE  = 1    ; OK button
  1830.     STF_MB_ICON  = 5    ; ! icon
  1831.     STF_MB_DEF   = 1    ; default button is OK
  1832.     
  1833. [MemConflictMsgDlg]
  1834. DlgType = "MessageBox"
  1835.     STF_MB_TITLE = "MELCO WLI-PCM Network Adapter Setup"
  1836.     STF_MB_TEXT  = "このメモリベースアドレスは他のボードが使用しています。別の値を選択してください。"
  1837.     STF_MB_TYPE  = 1    ; OK button
  1838.     STF_MB_ICON  = 5    ; ! icon
  1839.     STF_MB_DEF   = 1    ; default button is OK
  1840.  
  1841. [ExCreateRegKey]
  1842.     Debug-Output "******************Entering [ExCreateRegKey]******************"
  1843.     set ECR_Result          = NO_ERROR
  1844.     set ECR_BaseKeyHandle   = $($0)
  1845.     set ECR_NewPath         = $($1)
  1846.     set KeyNull         = ""
  1847.     set MAXIMUM_ALLOWED   = 33554432
  1848.     Debug-Output "ExCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1849.     Debug-Output "                 ECR_NewPath = "$(ECR_NewPath)
  1850.     Debug-Output "                 MAXIMUM_ALLOWED = "$(MAXIMUM_ALLOWED)
  1851.     Debug-Output "                 KeyNull = "$(KeyNull)
  1852.     OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1853.            ECR_BaseKey
  1854.     Debug-Output "ECR_BaseKey = "$(ECR_BaseKey)
  1855.     Debug-Output "    OpenRegKey returned "$($R0)
  1856.     Ifstr $(ECR_BaseKey) == $(KeyNull)
  1857.     Debug-Output "ECR_BaseKey == KeyNull"
  1858.     Else
  1859.     Debug-Output "ECR_BaseKey != KeyNull"
  1860.     set ECR_KeyHandle = $(ECR_BaseKey)
  1861.     goto  ECR_Return
  1862.     Endif
  1863.     set ECR_TmpPath = ""
  1864.     Split-String $(ECR_NewPath) "\" ECR_PList
  1865.     Debug-Output "ECR_PList = "$(ECR_PList)
  1866.     ForListDo $(ECR_PList)
  1867.     Ifstr(i) $($) != "\"
  1868.         Ifint $(#) == 1
  1869.         set ECR_TmpPath = $($)
  1870.         Else
  1871.         set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  1872.         Endif
  1873.         Debug-Output "Determining if "$(ECR_TmpPath)" exists"
  1874.         OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  1875.         Ifstr $(ECR_BaseKey) == $(KeyNull)
  1876.         Debug-Output "Creating "$(ECR_TmpPath)
  1877.         CreateRegKey $(ECR_BaseKeyHandle)  {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  1878.         Ifstr(i) $(ECR_KeyHandle) == $(KeyNull)
  1879.             set ECR_Result = $($R0)
  1880.             goto ECR_Return
  1881.         Endif
  1882.         Endif
  1883.     Endif
  1884.     EndForListDo
  1885. ECR_Return = +
  1886.     return $(ECR_Result) $(ECR_KeyHandle)
  1887.