home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1999 July / VPR9907B.BIN / DRIVER / IODATA / PET98102 / pet98102.exe / DISK.EXE / NT351 / OEMSETUP.INF next >
INI File  |  1998-04-03  |  37KB  |  1,256 lines

  1. ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  2. ; PCET/TX Setup File
  3. ; File Name : OEMSETUP.INF
  4. ; Operating System : WindowsNT 3.51/4.0
  5. ; Platform Type : PC98-NX Series, DOS/V, PC-9821 Series
  6. ; Copyright (C) 1998 I-O DATA DEVICE,INC.
  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 and EISA
  37. ;-----------------------------------------------------------------------
  38.  
  39. [PlatformsSupported]
  40.     ISA
  41.     EISA
  42.     "Jazz-Internal Bus"
  43. ;;+ Andge
  44.     PCMCIA
  45. ;;-
  46.  
  47. ;-----------------------------------------------------------------------
  48. ; OPTION LIST
  49. ; -----------
  50. ; This section lists the OEM Option key names.  These keys are locale
  51. ; independent and used to represent the option in a locale independent
  52. ; manner.
  53. ;
  54. ;-----------------------------------------------------------------------
  55.  
  56. [Options]
  57.     PCETTX
  58.  
  59. ;***********************************************************************
  60. ; CONSTANTS FOR USING DIALOGS
  61. ;***********************************************************************
  62.  
  63. [FileConstants]
  64. GenericInfVersion    = "v1.0"
  65. GenericAdapterName    = "I-O DATA PCET/TX ファースト イーサネット アダプタ"
  66. GenericDriverName    = "I-O DATA PCET/TX ファースト イーサネット ドライバ"
  67. GenericSysName        = "PCETTX.SYS"
  68. GenericName            = "PCETTX"
  69.  
  70. ;
  71. ;  File names, etc.
  72. ;
  73. UtilityInf        = "UTILITY.INF"
  74. ParamInf        = "NCPARAM.INF"
  75. subroutineinf    = "SUBROUTN.INF"
  76. SoftwareType    = "driver"
  77. Exit_Code        = 0
  78.  
  79. ;
  80. ; EventLog Message File
  81. ;
  82. NetEventDLL        = "%SystemRoot%\System32\netevent.dll"
  83. IoLogMsgDLL        = "%SystemRoot%\System32\IoLogMsg.dll"
  84.  
  85. ; Product Info
  86. ;
  87. Manufacturer            = "I-O DATA DEVICE,INC."
  88. ProductMajorVersion        = "1"
  89. ProductMinorVersion        = "00"
  90. ProductVersion            = $(ProductMajorVersion)"."$(ProductMinorVersion)
  91.  
  92. ;
  93. ; Software
  94. ;
  95. ProductSoftwareName            = "PCETTX"
  96. ProductSoftwareImagePath    = "\SystemRoot\System32\drivers\"$(GenericSysName)
  97. NetRuleSoftwareType            = "PCETTXSys ndisDriver PCETTXDriver"
  98.  
  99. NetRuleSoftwareUse            = $(SoftwareType)
  100. NetRuleSoftwareBindForm        = """PCETTXSys"" yes no container"
  101.  
  102. NetRuleSoftwareClass        = {"PCETTXDriver basic"}
  103. NetRuleSoftwareBindable        = {"PCETTXDriver PCETTXAdapter non exclusive 100"}
  104.  
  105. ;
  106. ; Hardware
  107. ;
  108. ProductHardwareName            = "PCETTX"
  109. NetRuleHardwareType            = "PCETTX PCETTXAdapter"
  110. NetRuleHardwareBindForm        = " yes yes container"
  111. NetRuleHardwareClass        = {"PCETTXAdapter basic"}
  112.  
  113. ;
  114. ; Registry Key
  115. ;
  116. ProductKeyName    = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  117. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  118. PCCardDataBase    = $(!NTN_ServiceBase)"\Pcmcia\DataBase"
  119. NICDataBase        = $(PCCardDataBase)"\IO DATA\PCETTX"
  120.  
  121. [GeneralConstants]
  122. ;
  123. ;  Program flow control variables.
  124. ;
  125. from    = ""
  126. to        = ""
  127. ;
  128. ;  Return codes; Exit_Code is set to one of these
  129. ;
  130. ExitCodeOk            = 0
  131. ExitCodeCancel        = 1
  132. ExitCodeFatal        = 2
  133. KeyNull                = ""
  134. MAXIMUM_ALLOWED        = 33554432
  135. RegistryErrorIndex    = NO_ERROR
  136. KeyProduct            = ""
  137. KeyParameters        = ""
  138. ;;+ 1-12-1996 Andge
  139. KeyPCCard            = ""
  140. KeyDataBase            = ""
  141. ;;-
  142.  
  143. TRUE                = 1
  144. FALSE                = 0
  145. NoTitle                = 0
  146. ExitState            = "Active"
  147. OldVersionExisted    = $(FALSE)
  148. DriverPath            = $(!STF_NTPATH)\drivers
  149.  
  150. [date]
  151.     ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  152.     ; Minute, Second }
  153.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  154.  
  155. ;---------------------------------------------------------------------------
  156. ; 1. Identify
  157. ;
  158. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  159. ;                as we are choosing currently.
  160. ;
  161. ; INPUT:         None
  162. ;
  163. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  164. ;                $($R1): Option Type (COMPUTER ...)
  165. ;                $($R2): Diskette description
  166. ;---------------------------------------------------------------------------
  167.  
  168. [Identify]
  169.     read-syms Identification
  170.  
  171.     set Status        = STATUS_SUCCESSFUL
  172.     set Identifier    = $(OptionType)
  173.     set Media        = #("Source Media Descriptions", 1, 1)
  174.  
  175.     Return $(Status) $(Identifier) $(Media)
  176.  
  177. ;------------------------------------------------------------------------
  178. ; 2. ReturnOptions:
  179. ;
  180. ; DESCRIPTION:   To return the option list supported by this INF and the
  181. ;                localised text list representing the options.
  182. ;
  183. ;
  184. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  185. ;
  186. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  187. ;                                STATUS_NOLANGUAGE
  188. ;                                STATUS_FAILED
  189. ;                                STATUS_NOTSUPPORTED
  190. ;
  191. ;                $($R1): Option List
  192. ;                $($R2): Option Text List
  193. ;------------------------------------------------------------------------
  194.  
  195. [ReturnOptions]
  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.         set PlatformList = ^(PlatformsSupported, 1)
  212.         Ifcontains(i) $($1) in $(PlatformList)
  213.             goto returnoptions
  214.         else
  215.             set Status = STATUS_NOTSUPPORTED
  216.             goto finish_ReturnOptions
  217.         endif
  218.     else
  219.         set Status = STATUS_NOLANGUAGE
  220.         goto finish_ReturnOptions
  221.     endif
  222.  
  223.     ;
  224.     ; form a list of all the options and another of the text representing
  225.     ;
  226.  
  227. returnoptions = +
  228.     set OptionList        = ^(Options, 1)
  229.     set OptionTextList    = ^(OptionsText$($0), 1)
  230.     set Status            = STATUS_SUCCESSFUL
  231.  
  232. finish_ReturnOptions = +
  233.     Return $(Status) $(OptionList) $(OptionTextList)
  234.  
  235. ;------------------------------------------------------------------------
  236. ;
  237. ; InstallOption:
  238. ;
  239. ;      This section is shelled to by main installation processing
  240. ;      or by NCPASHEL.INF during reconfig, removal, update, etc.
  241. ;
  242. ;
  243. ; FUNCTION:  To copy files representing Options
  244. ;            To configure the installed option
  245. ;            To update the registry for the installed option
  246. ;
  247. ; INPUT:     $($0):  Language to use
  248. ;            $($1):  OptionID to install
  249. ;            $($2):  SourceDirectory
  250. ;            $($3):  AddCopy  (YES | NO)
  251. ;            $($4):  DoCopy   (YES | NO)
  252. ;            $($5):  DoConfig (YES | NO)
  253. ;
  254. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  255. ;                            STATUS_NOLANGUAGE |
  256. ;                            STATUS_USERCANCEL |
  257. ;                            STATUS_FAILED
  258. ;
  259. ;------------------------------------------------------------------------
  260. [InstallOption]
  261.     ;
  262.     ; Set default values for
  263.     ;
  264.     set Status   = STATUS_FAILED
  265.     ;
  266.     ; extract parameters
  267.     ;
  268.     set Option   = $($1)
  269.     set SrcDir   = $($2)
  270.     set AddCopy  = $($3)
  271.     set DoCopy   = $($4)
  272.     set DoConfig = $($5)
  273.  
  274.     ;
  275.     ; Check if the language requested is supported
  276.     ;
  277.     set LanguageList = ^(LanguagesSupported, 1)
  278.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  279.         Return STATUS_NOLANGUAGE
  280.     endif
  281.     set-subst LF = "\n"
  282.     read-syms GeneralConstants
  283.     read-syms FileConstants
  284.     read-syms DialogConstants$(!STF_LANGUAGE)
  285.     ifstr(i) $(!NTN_Origination) == "NCPA"
  286.         set Continue = $(OK)
  287.     endif
  288.     read-syms FileConstants$(!STF_LANGUAGE)
  289.     detect date
  290.     set-title  $(FunctionTitle)
  291.     set to   = Begin
  292.     set from = Begin
  293. ;
  294. ;  Assume all is well.
  295. ;
  296.     set CommonStatus = STATUS_SUCCESSFUL
  297.     EndWait
  298.  
  299. ;
  300. ;   Set up the operation-mode-based variables and gaily welcome
  301. ;   the user.  If the "install mode" variable is improperly set,
  302. ;   assume this is a new installation.
  303. ;
  304.  
  305. Begin = +
  306.     Set ActivateDetection = FALSE
  307.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  308.         set StartLabel = removeadapter
  309.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  310.         set StartLabel = UpgradeSoftware
  311.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  312.         set StartLabel = bindingadapter
  313.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  314. ;        set ActivateDetection = TRUE
  315.         set StartLabel = configureadapter
  316.         ;
  317.         ;   You cannot config the software component
  318.         ;
  319.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  320.             Debug-Output "Cannot configure the driver software."
  321.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  322.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  323.                 Debug-Output "ShellCode error: cannot get an error string."
  324.                 goto ShellCodeError
  325.             endif
  326.             set Error = $($R0)
  327.             set from = end
  328.             set to = end
  329.             goto nonfatalinfo
  330.         endif
  331.     else
  332. ;        set ActivateDetection = TRUE
  333.         set StartLabel = installadapter
  334.         set OEM_ABANDON_OPTIONS = {}
  335.         set OEM_ABANDON_SOFTWARE = FALSE
  336.         set OEM_ABANDON_ON = TRUE
  337.     endif
  338.     ;  set the default values
  339.     ; IRQ Level = 10
  340.     set IRQValue = *($(IRQList), 6)
  341.     ; IOBase Address = 0x300
  342.     set IOBaseAddrValue = *($(IOBaseAddrList), 5)
  343.     ; Connection Type = 0
  344.     set ConnectiontypeValue = *($(ConnectionTypeList), 1)
  345.  
  346.     Set from = $(fatal)
  347.     Set to = $(fatal)
  348.     Goto $(StartLabel)
  349.  
  350. ;-----------------------------------------------
  351. ; Installation Section
  352. ;-----------------------------------------------
  353. installadapter = +
  354. ;
  355. ;   First, check whether the same version of the software exists
  356. ;
  357.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  358.  
  359.     Ifstr $(KeyProduct) != $(KeyNull)
  360.         ;
  361.         ; Same version already existed in the local machine
  362.         ; Popup the dialog and ask the user whether he wants to continue
  363.         ;
  364.         CloseRegKey $(KeyProduct)
  365.  
  366.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  367.             ;
  368.             ; Cannot Install the same software again
  369.             ;
  370.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  371.                     $(ProductVersion)
  372.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  373.                 Debug-Output "ShellCode error: cannot get an error string."
  374.                 goto ShellCodeError
  375.             endif
  376.             goto end
  377.         else
  378.             ;
  379.             ; Add a new adapter card?
  380.             ;
  381.             Shell $(UtilityInf), CardExistedDlg
  382.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  383.                 Debug-Output "ShellCode error: cannot get an error string."
  384.                 goto ShellCodeError
  385.             endif
  386.             ifstr(i) $($R1) != "OK"
  387.                 goto end
  388.             endif
  389.             set OldVersionExisted = $(TRUE)
  390.         endif
  391.     endif
  392.  
  393. ;
  394. ;  dll load addition
  395. ;
  396. ;    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  397. ;    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398. ;        Goto ShellCodeError
  399. ;    Else-Ifstr(i) $($R0) == STATUS_FAILED
  400. ;        Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  401. ;        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  402. ;            goto ShellCodeError
  403. ;        endif
  404. ;        set Error = $($R0)
  405. ;        Goto fatal
  406. ;    Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  407. ;        Goto successful
  408. ;    Endif
  409.     Set DLLPATH = $(SrcDir)
  410.     install "Install-Dll"
  411.     goto adaptersetup
  412.  
  413. ;-----------------------------------------------
  414. ; Configuration Section
  415. ;-----------------------------------------------
  416. ;
  417. ;   Get the current values of all the parameters
  418. ;
  419. configureadapter = +
  420.     Ifstr $(KeyProduct) == $(KeyNull)
  421.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  422.         Ifstr $(KeyProduct) == $(KeyNull)
  423.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  424.             Debug-Output "Cannot find component product key"
  425.             goto fatalregistry
  426.         Endif
  427.     Endif
  428.     ;
  429.     ; Get the other parameters;  they're attached to the service parameters key
  430.     ;
  431.     Debug-Output "INF: Shelling to FindService"
  432.     Shell $(UtilityInf) FindService, $(KeyProduct)
  433.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  434.         Debug-Output "INF: FindService shell failure"
  435.         Goto ShellCodeError
  436.     Endif
  437.     Ifstr(i) $($R0) != NO_ERROR
  438.         Debug-Output "INF: FindService Shell error: "$($R0)
  439.         Goto fatalregistry
  440.     endif
  441.     Set KeyParameters = $($R2)
  442.     ;
  443.     ;  We don't need the services key, so close it.
  444.     ;
  445.     CloseRegKey $($R1)
  446.     Ifstr $(KeyParameters) == $(KeyNull)
  447.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  448.         Debug-Output "Cannot find component service"
  449.         goto fatalregistry
  450.     endif
  451.     set OldVersionExisted = $(TRUE)
  452.     set ValueName = ""
  453.     set ValueData = ""
  454.     set ValueStr  = ""
  455.     set ValueList = {}
  456.     ;
  457.     ; Get the old values
  458.     ;
  459.     EnumRegValue $(KeyParameters) ValueList
  460.     ForListDo $(ValueList)
  461.         set ValueItem = $($)
  462.         set ValueName = *($(ValueItem),1)
  463.         set ValueData = *($(ValueItem),4)
  464.         ifstr(i) $(ValueName) == "IOBaseAddress"
  465.             set IOBaseAddrIndex = $(ValueData)
  466.         else-ifstr(i) $(ValueName) == "InterruptNumber"
  467.             set IRQValueIndex = $(ValueData)
  468.         else-ifstr(i) $(ValueName) == "ConnectionType"
  469.             set ConnectionTypeIndex = $(ValueData)
  470.         else-ifstr(i) $(ValueName) == "NetworkAddress"
  471.             set NetworkAddress = $(ValueData)
  472.         endif
  473.     EndForListDo
  474.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  475.     ifstr(i) $(IRQValue) == ""
  476.         set IRQValue = *($(IRQList), 1)
  477.     endif
  478.     Debug-Output $(InfName)" IRQ_Level is "$(IRQValue)
  479.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  480.     ifstr(i) $(IOBaseAddrValue) == ""
  481.         set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  482.     endif
  483.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  484.     set ConnectionTypeValue = *($(ConnectionTypeList), ~($(ConnectionTypeValues),$(ConnectionTypeIndex)))
  485.  
  486.     ifstr(i) $(ConnectionTypeValue) == ""
  487.         set ConnectionTypeValue = *($(ConnectionTypeList), 1)
  488.     endif
  489.  
  490.     ;  Save the settings as they were read from the Registry.
  491.  
  492. ;    Shell $(ParamInf) Param_SaveValues
  493. ;    Set CurrParamSettings = $($R0)
  494. ;
  495. ;   Put up the adapter configuration dialog if necessary.
  496. ;
  497. ;   Note that $(CurrParamSettings) has the old known parameter values.
  498. ;
  499. adaptersetup = +
  500. ;    Shell "" DebugConfiguration "before displaying dialog"
  501.     Set from = adapteroptions
  502.  
  503. adapteroptions = +
  504.     LoadLibrary "Disk 1" $(DialogDllName) hLib
  505.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  506.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  507.     ui start "InputDlg"  $(hLib)
  508.     set ExitButton      = $(ButtonPressed)
  509.     Debug-Output " ButtonPressed "$(ButtonPressed)
  510.     FreeLibrary $(hLib)
  511.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  512.         set IOBaseAddrIndex = $(Combo1Out)
  513.         set IRQValueIndex = $(Combo2Out)
  514.         set ConnectionTypeIndex = $(Combo3Out)
  515.         set ExitButton      = $(ButtonPressed)
  516.         set NetworkAddress = *($(EditTextOut), 1)
  517.         ui pop 1
  518.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  519.         set CommonStatus = STATUS_USERCANCEL
  520.         Debug-Output "Action: exit. Bye."
  521.         ui pop 1
  522.         goto end
  523.     else
  524.         ;
  525.         ; Unknow command
  526.         ;
  527.         ui pop 1
  528.         Debug-Output "Action: unknown. Bye."
  529.         goto end
  530.     endif
  531.     Debug-Output " Combo list out "$(ComboListItemsOut)
  532.  
  533. ;
  534. ;   If installing, go create the necessary keys;
  535. ;   if configuring, they're already open.
  536. ;
  537. skipoptions =+
  538.     ifint $(OldVersionExisted) == $(TRUE)
  539.         ifstr(i) $(!NTN_InstallMode) == configure
  540.             goto writeparameters
  541.         endif
  542.     endif
  543.     StartWait
  544.     ;
  545.     ; Add Software Component
  546.     ;
  547.     ifint $(OldVersionExisted) == $(FALSE)
  548.         ifstr(i) $(!NTN_InstallMode) == "install"
  549.             Ifstr(i) $(DoCopy) == "YES"
  550.                 Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  551.                 Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  552.                     Goto ShellCodeError
  553.                 Else-Ifstr(i) $($R0) == STATUS_FAILED
  554.                     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  555.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  556.                         goto ShellCodeError
  557.                     endif
  558.                     set Error = $($R0)
  559.                     Goto fatal
  560.                 Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  561.                     Goto successful
  562.                 Endif
  563.                 Set SrcDir = $($R1)
  564.             Endif
  565.             install "Install-Option"
  566.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  567.                 Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  568.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  569.                     goto ShellCodeError
  570.                 endif
  571.                 set Error = $($R0)
  572.                 goto fatal
  573.             endif
  574.         endif
  575.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  576.                 $(ProductSoftwareName), +
  577.                 $(ProductSoftwareName), +
  578.                 $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  579.                 $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  580.                 $(NetEventDLL)
  581.         Set OEM_ABANDON_SOFTWARE = TRUE
  582.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  583.             Debug-Output "ShellCode error"
  584.             goto ShellCodeError
  585.         endif
  586.         ;
  587.         ;   At this point:
  588.         ;     $R1 contains the product version key handle;
  589.         ;     $R2 contains the NetRules subkey handle;
  590.         ;     $R3 contains the new Services key handle; and
  591.         ;     $R4 contains the Parameters key
  592.         ;     $R5 contains the Linkage Key
  593.         ;
  594.         set RegistryErrorIndex = $($R0)
  595.         set KeyProduct      = $($R1)
  596.         Set SoftNetRulesKey = $($R2)
  597.         CloseRegKey $($R3)
  598.         CloseRegKey $($R4)
  599.         CloseRegKey $($R5)
  600.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  601.             EndWait
  602.             Debug-Output "Registry error: add software components"
  603.             CloseRegKey $(KeyProduct)
  604.             CloseRegKey $(SoftNetRulesKey)
  605.             goto fatalregistry
  606.         endif
  607.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  608.                             {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  609.                             {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  610.                             {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  611.                             {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  612.                             {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  613.                             {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  614.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  615.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  616.             Debug-Output "ShellCode error."
  617.             goto ShellCodeError
  618.         endif
  619.         set RegistryErrorIndex = $($R0)
  620.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  621.             EndWait
  622.             Debug-Output "Registry error: add value list."
  623.             CloseRegKey $(KeyProduct)
  624.             CloseRegKey $(SoftNetRulesKey)
  625.             goto fatalregistry
  626.         endif
  627.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  628.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  629.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  630.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  631.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  632.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  633.  
  634.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  635.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  636.             Debug-Output "ShellCode error."
  637.             goto ShellCodeError
  638.         endif
  639.         set RegistryErrorIndex = $($R0)
  640.         CloseRegKey $(KeyProduct)
  641.         CloseRegKey $(SoftNetRulesKey)
  642.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  643.             EndWait
  644.             Debug-Output "Resgitry error: add value list."
  645.             goto fatalregistry
  646.         endif
  647.     endif
  648. ;
  649. ;   Create the HARDWARE\Netcard region and its corresponding service
  650. ;
  651.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  652.     ifint $($R4) != -1
  653.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  654.     endif
  655.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  656.         Debug-Output "Cannot add hardware component"
  657.         goto ShellCodeError
  658.     endif
  659.     set RegistryErrorIndex = $($R0)
  660.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  661.         EndWait
  662.         Debug-Output "Registry error: add hardware component"
  663.         CloseRegKey $($R1)
  664.         CloseRegKey $($R2)
  665.         CloseRegKey $($R3)
  666.         goto fatalregistry
  667.     endif
  668. ;
  669. ;   At this point:
  670. ;     $R1  Registry key variable for HARDWARE\Netcard\(n)
  671. ;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  672. ;     $R3  Registry key handle for <service>\Parameters key
  673. ;     $R4  Adapter number assigned to adapter
  674. ;     $R5  Service name generated by combining svc name with adapter number
  675. ;
  676.     set KeyParameters = $($R3)
  677.     set KeyAdapterRules = $($R2)
  678.     set AdapterNumber = $($R4)
  679.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  680.                         {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  681.                         {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  682.                         {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  683.                         {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  684.                         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  685.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  686.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  687.         Debug-Output "ShellCode error"
  688.         goto ShellCodeError
  689.     endif
  690.     CloseRegKey $($R1)
  691.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  692.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  693.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  694.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  695.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  696.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  697.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  698.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  699.         Debug-Output "ShellCode error."
  700.         goto ShellCodeError
  701.     endif
  702.     set RegistryErrorIndex = $($R0)
  703.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  704.         EndWait
  705.         Debug-Output "Resgitry error: add value list."
  706.         CloseRegKey $(KeyParameters)
  707.         CloseRegKey $(KeyAdapterRules)
  708.         goto fatalregistry
  709.     endif
  710.     CloseRegKey $(KeyAdapterRules)
  711.     goto writeparameters
  712. ;
  713. ;   REQUIRED:   $(KeyParameters) contains service Parameters key handle
  714. ;
  715. writeparameters = +
  716.     Shell $(UtilityInf), GetBusTypeNum
  717.     set BusTypeNum = $($R1)
  718. ; Testing the BusNum. We are coding it to 0
  719.     set BusNumValue = 0 ;
  720. ; End of BusNum
  721.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  722.         Debug-Output "ShellCode error."
  723.         goto ShellCodeError
  724.     endif
  725.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  726.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  727.     set ConnectionTypeValue = *($(ConnectionTypeValues), ~($(ConnectionTypeList),$(ConnectionTypeIndex)))
  728.     set NewValueList = {{IOBaseAddress,  $(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  729.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),1},+
  730.                         {BusNumber,  $(NoTitle),$(!REG_VT_DWORD),$(BusNumValue)},+
  731.                         {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  732.                         {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1},+
  733.                         {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
  734.                         {InterruptNumber,  $(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  735.                         {ConnectionType,  $(NoTitle),$(!REG_VT_DWORD),$(ConnectionTypeValue)}}
  736.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  737.  
  738. ;;=============================================================
  739.     Debug-Output "D66: IRQ="$(IRQValue)
  740.     Debug-Output "D66: BusType="$(BusTypeNum)
  741.     Debug-Output "D66: BusNumber="$(BusNumber)
  742.     Debug-Output "D66: MediaType=1"
  743.     Debug-Output "D66: Cardtype=0"
  744.     Debug-Output "D66: IoBaseAddress="$(IOBaseAddrValue)
  745.     Debug-Output "D66: ConnectionType="$(ConnectionTypeValue)
  746. ;;=============================================================
  747.     CloseRegKey $(KeyParameters)
  748.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  749.         Debug-Output "ShellCode error."
  750.         goto ShellCodeError
  751.     endif
  752.     set RegistryErrorIndex = $($R0)
  753.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  754.         Debug-Output "Registry error: Add value list"
  755.         goto fatalregistry
  756.     endif
  757. ;;+ 1-12-1996 Andge
  758.     OpenRegKey $(!REG_H_LOCAL) "" $(PCCardDataBase) $(MAXIMUM_ALLOWED) KeyPCCard
  759.     ifstr $(KeyPCCard) == $(KeyNull)
  760.         Debug-Output "D66: Registry Open Fail -- PCCardDataBase"
  761.         goto fatalregistry
  762.     endif
  763.     Debug-Output "D66: Open PCCardDataBase Registry Successful"
  764.     OpenRegKey $(!REG_H_LOCAL) "" $(NICDataBase) $(MAXIMUM_ALLOWED) KeyDataBase
  765.     ifstr $(KeyDataBase) == $(KeyNull)
  766.         Debug-Output "D66: Keyword IO DATA\PCETTX does not exist"
  767.         CreateRegKey $(KeyPCCard) {"IO DATA\PCETTX",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDataBase
  768.         ifstr $(KeyDataBase) == $(KeyNull)
  769.             Debug-Output "D66: IO DATA\PCETTX Can not Create"
  770.             CloseRegKey $(KeyPCCard)
  771.             goto fatalregistry
  772.         endif
  773.         Debug-Output "D66: Create IO DATA\PCETTX Successful"
  774.     endif
  775.     Debug-Output "D66: Set Keyword value -- Driver"
  776.     SetRegValue $(KeyDataBase) {"Driver",$(NoTitle),$(!REG_VT_SZ),"PCETTX"}
  777.     SetRegValue $(KeyDataBase) {"DeviceType",$(NoTitle),$(!REG_VT_SZ),"NET"}
  778.     CloseRegKey $(KeyDataBase)
  779.     CloseRegKey $(KeyPCCard)
  780. ;;-
  781.     EndWait
  782.     goto successful
  783.  
  784. ;-----------------------------------------------
  785. ; Binding section
  786. ;-----------------------------------------------
  787. bindingadapter =+
  788.     set Error = "Binding: Sorry, not yet implemented."
  789.     goto fatal
  790.  
  791. ;-----------------------------------------------
  792. ; Removeadapter section
  793. ;-----------------------------------------------
  794. removeadapter = +
  795.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  796.         ; Remove Software Component
  797.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  798.                 $(ProductSoftwareName)
  799.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  800.             Debug-Output "ShellCode error"
  801.             goto ShellCodeError
  802.         endif
  803.         set RegistryErrorIndex = $($R0)
  804.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  805.             goto fatalregistry
  806.         endif
  807.     else
  808.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  809.                 $(ProductSoftwareName), $(!NTN_RegBase)
  810.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  811.             Debug-Output "ShellCode error"
  812.             goto ShellCodeError
  813.         endif
  814.         set RegistryErrorIndex = $($R0)
  815.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  816.             goto fatalregistry
  817.         endif
  818.     endif
  819.  
  820.     goto end
  821.  
  822. ;-----------------------------------------------
  823. ; Upgrade Software section
  824. ;-----------------------------------------------
  825. UpgradeSoftware = +
  826.     ;
  827.     ; First determine whether we want to do upgrade or update for software
  828.     ; or hardware component. Then we will determine whether the Mode is
  829.     ; update or upgrade.
  830.     ;
  831.     ; If the same version of the product existed in the registry, we do
  832.     ; update. Otherwise, we will do a upgrade
  833.     ;
  834.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  835.         ; Upgrade software component
  836.         ;
  837.         ; see whether the same version exist or not
  838.         ;
  839.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  840.         Ifstr $(KeyProduct) != $(KeyNull)
  841.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  842.             set Version = *($(VersionInfo), 4)
  843.             ;
  844.             ; Update the binaries
  845.             ;
  846.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  847.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  848.                 Debug-Output "ShellCode error"
  849.                 goto ShellCodeError
  850.             endif
  851.             set !UG_Filename = $($R0)
  852.             ifstr(i) $(!UG_Filename) != ""
  853.                 install "Install-Update"
  854.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  855.                     goto fatal
  856.                 endif
  857.             endif
  858.             ; Upgrade the version number
  859.             ;
  860.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  861.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  862.             ;
  863.             ; do nothing for update
  864.             ;
  865.             ifint $(Version) != $(ProductVersion)
  866.                 ;
  867.                 ; If the major version number is not the same,
  868.                 ; it is major upgrade. So let Upgrade the product
  869.                 ;
  870.                 ;
  871.                 ; make other upgrade change if necessary
  872.                 ;
  873.             endif
  874.             CloseRegKey $(KeyProduct)
  875.         else
  876.             ;
  877.             ; Cannot Open software key, goto ERROR
  878.             ;
  879.             goto fatalregistry
  880.         endif
  881.     else
  882.         ;
  883.         ; upgrade/update hardware component
  884.         ; There is no different between upgrade and update for hardware
  885.         ; component
  886.         ;
  887.         ; 1. Get the Service Name
  888.         ; 2. Change the NetRule section if necessary
  889.         ;
  890.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  891.                 $(MAXIMUM_ALLOWED) NetworkCardKey
  892.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  893.             ;
  894.             ; Get Service name
  895.             ;
  896.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  897.             set ServiceName = *($(ServiceNameInfo), 4)
  898.             ;
  899.             ; Change the NetRule if necessary
  900.             ;
  901.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  902.                     $(MAXIMUM_ALLOWED) NetRuleKey
  903.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  904.                 ;
  905.                 ; Make the change....
  906.                 ;
  907.             else
  908.                 ;
  909.                 ; Error, cannot open net rules key
  910.                 ;
  911.                 goto fatalregistry
  912.             endif
  913.             CloseRegKey $(NetRules)
  914.             CloseRegKey $(NetworkCardKey)
  915.         else
  916.             ;
  917.             ; Error, cannot open network card key
  918.             ;
  919.             goto fatalregistry
  920.         endif
  921.         ;
  922.         ; 3. Change the service section of the hardware. i.e.,
  923.         ;    ParameterName change, value change, etc.
  924.         ;
  925.         OpenRegKey $(!REG_H_LOCAL) "" +
  926.                 $(!NTN_ServiceBase)"\"$(ServiceName) +
  927.                 $(MAXIMUM_ALLOWED) ServiceKey
  928.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  929.             ;
  930.             ; Get the ServiceKey to change the Start value
  931.             ; or Type value. Or open Parameters key to
  932.             ; change the hardware parameters if necessary.
  933.             ;
  934.             CloseRegKey $(ServiceKey)
  935.         else
  936.             ;
  937.             ; Error, cannot open network card key
  938.             ;
  939.             goto fatalregistry
  940.         endif
  941.     endif
  942.     goto end
  943.     ;
  944.     ; End of Upgrade Software
  945.     ;
  946.  
  947. ;
  948. ;  Escape hatches
  949. ;
  950. successful = +
  951.     goto end
  952.  
  953. abandon = +
  954.     ForListDo $(OEM_ABANDON_OPTIONS)
  955.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  956.                 $(ProductSoftwareName), $($)
  957.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  958.             Debug-Output "ShellCode error"
  959.             goto ShellCodeError
  960.         endif
  961.         set RegistryErrorIndex = $($R0)
  962.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  963.             goto fatalregistry
  964.         endif
  965.     EndForListDo
  966.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  967.         ; Remove Software Component
  968.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  969.                 $(ProductSoftwareName), FALSE
  970.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  971.             Debug-Output "ShellCode error"
  972.             goto ShellCodeError
  973.         endif
  974.         set RegistryErrorIndex = $($R0)
  975.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  976.             goto fatalregistry
  977.         endif
  978.     endif
  979.     goto end
  980.  
  981. ;
  982. ; warning display
  983. ;
  984. warning = +
  985.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  986.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  987.         goto ShellCodeError
  988.     endif
  989.     ifstr(i) $($R1) == "OK"
  990.         goto $(to)
  991.     else-ifstr(i) $($R1) == "CANCEL"
  992.         goto $(from)
  993.     else
  994.         goto "end"
  995.     endif
  996.  
  997. ;
  998. ; non fatal error display
  999. ;
  1000. nonfatalinfo = +
  1001.     Set Severity = STATUS
  1002.     Set CommonStatus = STATUS_USERCANCEL
  1003.     goto nonfatalmsg
  1004.  
  1005. nonfatal = +
  1006.     Set Severity = NONFATAL
  1007.     goto nonfatalmsg
  1008.  
  1009. nonfatalmsg = +
  1010.     ifstr(i) $(Error) == ""
  1011.         Set Severity = NONFATAL
  1012.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1013.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1014.             goto ShellCodeError
  1015.         endif
  1016.         set Error = $($R0)
  1017.     endif
  1018.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1019.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1020.         goto ShellCodeError
  1021.     endif
  1022.     ifstr(i) $($R1) == "OK"
  1023.         goto $(from)
  1024.     else
  1025.         goto "end"
  1026.     endif
  1027.  
  1028. ;
  1029. ;  Registry is broken
  1030. ;
  1031. fatalregistry = +
  1032.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1033.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1034.         goto ShellCodeError
  1035.     endif
  1036.     set Error = $($R0)
  1037.     goto fatal
  1038.  
  1039. ;
  1040. ;  Netcard detection failure
  1041. ;
  1042. fataldetect = +
  1043.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1044.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1045.         Debug-Output "ShellCode error: cannot get an error string."
  1046.         goto ShellCodeError
  1047.     endif
  1048.     set Error = $($R0)
  1049.     Goto fatal
  1050. ;
  1051. ; fatal error display
  1052. ;
  1053. fatal = +
  1054.     ifstr(i) $(Error) == ""
  1055.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1056.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1057.             goto ShellCodeError
  1058.         endif
  1059.         set Error = $($R0)
  1060.     endif
  1061.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1062.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1063.         goto ShellCodeError
  1064.     endif
  1065.  
  1066.     goto setfailed
  1067.  
  1068. ;
  1069. ;  Shelling error
  1070. ;
  1071. ShellCodeError = +
  1072.     set DlgType            = "MessageBox"
  1073.     set STF_MB_TITLE    = $(ShellCodeErrorTitle)
  1074.     set STF_MB_TEXT        = $(ShellCodeErrorText)
  1075.     set STF_MB_TYPE        = 1
  1076.     set STF_MB_ICON        = 3
  1077.     set STF_MB_DEF        = 1
  1078.     ui start "Error Message"
  1079.     goto setfailed
  1080.  
  1081. setfailed = +
  1082.     set CommonStatus = STATUS_FAILED
  1083.     ;
  1084.     ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1085.     ;
  1086.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1087.         set OEM_ABANDON_ON = FALSE
  1088.         goto abandon
  1089.     endif
  1090.     goto end
  1091.  
  1092. end = +
  1093.     goto term
  1094.  
  1095. term = +
  1096.     Return $(CommonStatus)
  1097.  
  1098. [DebugConfiguration]
  1099.     Set InfName = "OEMNAD22E.INF"
  1100.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  1101.     Debug-Output $(InfName)" IRQ_Level is "$(!p:IRQValue)
  1102.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  1103.     Debug-Output $(InfName)" TransceiverValue is "$(!p:TransceiverValue)
  1104.     Debug-Output $(InfName)" MemBaseAddrDec is "$(!p:MemBaseAddrDec)
  1105.     Debug-Output $(InfName)" MappedValue is "$(!p:MappedValue)
  1106.  
  1107.     return
  1108.  
  1109.  
  1110. ;***************************************************************
  1111. ;  INSTALL SECTIONS
  1112. ;***************************************************************
  1113. [Install-Option]
  1114.     set STF_VITAL = ""
  1115.     ifstr(i) $(AddCopy) == "YES"
  1116.         ;
  1117.         ; Add the files to the copy list
  1118.         ;
  1119.         ;  BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1120.         ;      the other INF files
  1121.         ;
  1122.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1123.     endif
  1124.     ifstr(i) $(DoCopy) == "YES"
  1125.         ;
  1126.         ; Copy files in the copy list
  1127.         ;
  1128.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1129.         CopyFilesInCopyList
  1130.     endif
  1131.     Exit
  1132.  
  1133. [Install-Update]
  1134.     set STF_VITAL        = ""
  1135.     set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1136. ;    set STF_VERSION        = "YES"
  1137.  
  1138.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1139.     AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1140.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1141.     CopyFilesInCopyList
  1142.     exit
  1143.  
  1144. [Install-Dll]
  1145.     set STF_VITAL        = ""
  1146.     AddSectionFilesToCopyList Files-Dll $(DLLPATH) $(!STF_WINDOWSSYSPATH)
  1147.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1148.     CopyFilesInCopyList
  1149.     exit
  1150.  
  1151. [Source Media Descriptions]
  1152.     1  = "PCET/TX サポートソフト"
  1153.  
  1154. [ProductType]
  1155. STF_PRODUCT  = Winnt
  1156. STF_PLATFORM = I386
  1157.  
  1158. [Files-Inf]
  1159. 1,    oemsetup.inf,    SIZE=1000,    RENAME=$(!UG_Filename)
  1160.  
  1161. [Files-PCETTX]
  1162. 1,    PCETTX.SYS,        SIZE=88888
  1163.  
  1164. [Files-Dll]
  1165. 1,    pcettx.dll,        SIZE=999
  1166.  
  1167. [LanguagesSupported]
  1168.     ENG
  1169.  
  1170. [OptionsTextENG]
  1171.     PCETTX    = "I-O DATA PCET/TX ファースト イーサネット アダプタ"
  1172.  
  1173. [FileConstantsENG]
  1174. ProCaption                    = "Windows NT セットアップ"
  1175. ProCancel                    = "Cancel"
  1176. ;ProCancel                    = "キャンセル"
  1177. ProCancelMsg                = "Windows NT ネットワークは正常に組み込まれていません。"+
  1178.                                 "本当にファイルのコピーを中止しますか?"
  1179. ProCancelCap                = "ネットワーク セットアップ メッセージ"
  1180. ProText1                    = "コピー元:"
  1181. ProText2                    = "コピー先:"
  1182. FunctionTitle                = $(GenericAdapterName)" セットアップ"
  1183. ProductSoftwareDescription    = $(GenericDriverName)
  1184. ProductSoftwareTitle        = $(GenericDriverName)
  1185. ProductHardwareDescription    = $(GenericAdapterName)
  1186. ProductHardwarePCETTXDescription ="I-O DATA PCET/TX ファースト イーサネット アダプタ"
  1187. ProductHardwarePCETTXTitle    = $(GenericAdapterName)
  1188. DialogDllName                = "pcettx.dll"
  1189. IRQList                        = ^(IRQChoices, 1)
  1190. IRQValues                    = ^(IRQChoices, 2)
  1191. IOBaseAddrList                = ^(IOBaseAddrChoices, 1)
  1192. IOBaseAddrValues            = ^(IOBaseAddrChoices, 2)
  1193. ConnectionTypeList            = ^(ConnectionTypeChoices, 1)
  1194. ConnectionTypeValues        = ^(ConnectionTypeChoices, 2)
  1195.  
  1196. [DialogConstantsENG]
  1197. Help        = "&Help"
  1198. Exit        = "Cancel"
  1199. OK          = "OK"
  1200. HelpContext = ""
  1201. Continue    = "Continue"
  1202. Cancel      = "Cancel"
  1203.  
  1204. [MemoryMappedChoicesENG]
  1205. Map_1 = 1, "ON"
  1206. Map_2 = 0, "OFF"
  1207.  
  1208. [FileDependentDlgENG]
  1209. DlgText            = "Please select values for the follwing fields:"
  1210. DlgType            = "RadioCombination"
  1211. DlgTemplate        = "PCETTXDLG"
  1212. Caption            = $(FunctionTitle)
  1213. CBOptionsGreyed    = {}
  1214. NotifyFields    = {NO, NO}
  1215. Combo1Label        = "I/O Port:"
  1216. Combo2Label        = "IRQ Number:"
  1217. Combo3Label        = "Connection Type:"
  1218. Combo1List        = $(IOBaseAddrList)
  1219. Combo1Out        = $(IOBaseAddrValue)
  1220. Combo2List        = $(IRQList)
  1221. Combo2Out        = $(IRQValue)
  1222. Combo3List        = $(ConnectionTypeList)
  1223. Combo3Out        = $(ConnectionTypeValue)
  1224. ComboListItemsIn    = {Combo1List,Combo2List,Combo3List}
  1225. ComboListItemsOut    = {Combo1Out,Combo2Out,Combo3Out}
  1226. EditTextLim        = 12
  1227. EditTextIn        = $(NetworkAddress)
  1228. Edit1Label        = "NetworkAddress"
  1229.  
  1230. [IRQChoices]
  1231. IRQ_1 = "3",3
  1232. IRQ_2 = "4",4
  1233. IRQ_3 = "5",5
  1234. IRQ_4 = "9",9
  1235. IRQ_5 = "10",10
  1236. IRQ_6 = "11",11
  1237. IRQ_7 = "12",12
  1238. IRQ_8 = "15",15
  1239.  
  1240. [IOBaseAddrChoices]
  1241. IOBase_1 = "0x200",512
  1242. IOBase_2 = "0x220",544
  1243. IOBase_3 = "0x240",576
  1244. IOBase_4 = "0x260",608
  1245. IOBase_5 = "0x300",768
  1246. IOBase_6 = "0x320",800
  1247. IOBase_7 = "0x340",832
  1248. IOBase_8 = "0x360",864
  1249. IOBase_9 = "0x380",896
  1250.  
  1251. [ConnectionTypeChoices]
  1252. CT_1 = "AutoSense",5
  1253. CT_2 = "100BaseTx",4
  1254. CT_3 = "10BaseT Full_Duplex",2
  1255. CT_4 = "10BaseT",0
  1256.