home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 August / VPR0008B.BIN / DRIVER / IODATA / PCR9100 / PCR9100.EXE / DISK.EXE / NT40 / OEMSETUP.INF next >
INI File  |  2000-04-01  |  37KB  |  1,259 lines

  1. ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  2. ; PCET/TX-R 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) 2000 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.     PCETTXR
  58.  
  59. ;***********************************************************************
  60. ; CONSTANTS FOR USING DIALOGS
  61. ;***********************************************************************
  62.  
  63. [FileConstants]
  64. GenericInfVersion    = "v1.0"
  65. GenericAdapterName    = "I-O DATA PCET/TX-R ファースト イーサネット アダプタ"
  66. GenericDriverName    = "I-O DATA PCET/TX-R ファースト イーサネット ドライバ"
  67. GenericSysName        = "PCETTXR.SYS"
  68. GenericName            = "PCETTXR"
  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            = "PCETTXR"
  96. ProductSoftwareImagePath    = "\SystemRoot\System32\drivers\"$(GenericSysName)
  97. NetRuleSoftwareType            = "pcettxrSys ndisDriver pcettxrDriver"
  98.  
  99. NetRuleSoftwareUse            = $(SoftwareType)
  100. NetRuleSoftwareBindForm        = """pcettxrSys"" yes no container"
  101.  
  102. NetRuleSoftwareClass        = {"pcettxrDriver basic"}
  103. NetRuleSoftwareBindable        = {"pcettxrDriver pcettxrAdapter non exclusive 100"}
  104.  
  105. ;
  106. ; Hardware
  107. ;
  108. ProductHardwareName            = "PCETTXR"
  109. NetRuleHardwareType            = "pcettxr pcettxrAdapter"
  110. NetRuleHardwareBindForm        = " yes yes container"
  111. NetRuleHardwareClass        = {"pcettxrAdapter 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\PCETTXR"
  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), 5)
  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 SrcDir = $($R1)
  410. ;    install "Install-Dll"
  411. ;    goto adaptersetup
  412.     Set DLLPATH = $(SrcDir)
  413.     install "Install-Dll"
  414.     goto adaptersetup
  415.  
  416. ;-----------------------------------------------
  417. ; Configuration Section
  418. ;-----------------------------------------------
  419. ;
  420. ;   Get the current values of all the parameters
  421. ;
  422. configureadapter = +
  423.     Ifstr $(KeyProduct) == $(KeyNull)
  424.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  425.         Ifstr $(KeyProduct) == $(KeyNull)
  426.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  427.             Debug-Output "Cannot find component product key"
  428.             goto fatalregistry
  429.         Endif
  430.     Endif
  431.     ;
  432.     ; Get the other parameters;  they're attached to the service parameters key
  433.     ;
  434.     Debug-Output "INF: Shelling to FindService"
  435.     Shell $(UtilityInf) FindService, $(KeyProduct)
  436.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  437.         Debug-Output "INF: FindService shell failure"
  438.         Goto ShellCodeError
  439.     Endif
  440.     Ifstr(i) $($R0) != NO_ERROR
  441.         Debug-Output "INF: FindService Shell error: "$($R0)
  442.         Goto fatalregistry
  443.     endif
  444.     Set KeyParameters = $($R2)
  445.     ;
  446.     ;  We don't need the services key, so close it.
  447.     ;
  448.     CloseRegKey $($R1)
  449.     Ifstr $(KeyParameters) == $(KeyNull)
  450.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  451.         Debug-Output "Cannot find component service"
  452.         goto fatalregistry
  453.     endif
  454.     set OldVersionExisted = $(TRUE)
  455.     set ValueName = ""
  456.     set ValueData = ""
  457.     set ValueStr  = ""
  458.     set ValueList = {}
  459.     ;
  460.     ; Get the old values
  461.     ;
  462.     EnumRegValue $(KeyParameters) ValueList
  463.     ForListDo $(ValueList)
  464.         set ValueItem = $($)
  465.         set ValueName = *($(ValueItem),1)
  466.         set ValueData = *($(ValueItem),4)
  467.         ifstr(i) $(ValueName) == "IOBaseAddress"
  468.             set IOBaseAddrIndex = $(ValueData)
  469.         else-ifstr(i) $(ValueName) == "InterruptNumber"
  470.             set IRQValueIndex = $(ValueData)
  471.         else-ifstr(i) $(ValueName) == "ConnectionType"
  472.             set ConnectionTypeIndex = $(ValueData)
  473.         else-ifstr(i) $(ValueName) == "NetworkAddress"
  474.             set NetworkAddress = $(ValueData)
  475.         endif
  476.     EndForListDo
  477.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  478.     ifstr(i) $(IRQValue) == ""
  479.         set IRQValue = *($(IRQList), 1)
  480.     endif
  481.     Debug-Output $(InfName)" IRQ_Level is "$(IRQValue)
  482.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  483.     ifstr(i) $(IOBaseAddrValue) == ""
  484.         set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  485.     endif
  486.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  487.     set ConnectionTypeValue = *($(ConnectionTypeList), ~($(ConnectionTypeValues),$(ConnectionTypeIndex)))
  488.  
  489.     ifstr(i) $(ConnectionTypeValue) == ""
  490.         set ConnectionTypeValue = *($(ConnectionTypeList), 1)
  491.     endif
  492.  
  493.     ;  Save the settings as they were read from the Registry.
  494.  
  495. ;    Shell $(ParamInf) Param_SaveValues
  496. ;    Set CurrParamSettings = $($R0)
  497. ;
  498. ;   Put up the adapter configuration dialog if necessary.
  499. ;
  500. ;   Note that $(CurrParamSettings) has the old known parameter values.
  501. ;
  502. adaptersetup = +
  503. ;    Shell "" DebugConfiguration "before displaying dialog"
  504.     Set from = adapteroptions
  505.  
  506. adapteroptions = +
  507.     LoadLibrary "Disk 1" $(DialogDllName) hLib
  508.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  509.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  510.     ui start "InputDlg"  $(hLib)
  511.     set ExitButton      = $(ButtonPressed)
  512.     Debug-Output " ButtonPressed "$(ButtonPressed)
  513.     FreeLibrary $(hLib)
  514.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  515.         set IOBaseAddrIndex = $(Combo1Out)
  516.         set IRQValueIndex = $(Combo2Out)
  517.         set ConnectionTypeIndex = $(Combo3Out)
  518.         set ExitButton      = $(ButtonPressed)
  519.         set NetworkAddress = *($(EditTextOut), 1)
  520.         ui pop 1
  521.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  522.         set CommonStatus = STATUS_USERCANCEL
  523.         Debug-Output "Action: exit. Bye."
  524.         ui pop 1
  525.         goto end
  526.     else
  527.         ;
  528.         ; Unknow command
  529.         ;
  530.         ui pop 1
  531.         Debug-Output "Action: unknown. Bye."
  532.         goto end
  533.     endif
  534.     Debug-Output " Combo list out "$(ComboListItemsOut)
  535.  
  536. ;
  537. ;   If installing, go create the necessary keys;
  538. ;   if configuring, they're already open.
  539. ;
  540. skipoptions =+
  541.     ifint $(OldVersionExisted) == $(TRUE)
  542.         ifstr(i) $(!NTN_InstallMode) == configure
  543.             goto writeparameters
  544.         endif
  545.     endif
  546.     StartWait
  547.     ;
  548.     ; Add Software Component
  549.     ;
  550.     ifint $(OldVersionExisted) == $(FALSE)
  551.         ifstr(i) $(!NTN_InstallMode) == "install"
  552.             Ifstr(i) $(DoCopy) == "YES"
  553.                 Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  554.                 Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  555.                     Goto ShellCodeError
  556.                 Else-Ifstr(i) $($R0) == STATUS_FAILED
  557.                     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  558.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  559.                         goto ShellCodeError
  560.                     endif
  561.                     set Error = $($R0)
  562.                     Goto fatal
  563.                 Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  564.                     Goto successful
  565.                 Endif
  566.                 Set SrcDir = $($R1)
  567.             Endif
  568.             install "Install-Option"
  569.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  570.                 Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  571.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  572.                     goto ShellCodeError
  573.                 endif
  574.                 set Error = $($R0)
  575.                 goto fatal
  576.             endif
  577.         endif
  578.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  579.                 $(ProductSoftwareName), +
  580.                 $(ProductSoftwareName), +
  581.                 $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  582.                 $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  583.                 $(NetEventDLL)
  584.         Set OEM_ABANDON_SOFTWARE = TRUE
  585.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  586.             Debug-Output "ShellCode error"
  587.             goto ShellCodeError
  588.         endif
  589.         ;
  590.         ;   At this point:
  591.         ;     $R1 contains the product version key handle;
  592.         ;     $R2 contains the NetRules subkey handle;
  593.         ;     $R3 contains the new Services key handle; and
  594.         ;     $R4 contains the Parameters key
  595.         ;     $R5 contains the Linkage Key
  596.         ;
  597.         set RegistryErrorIndex = $($R0)
  598.         set KeyProduct      = $($R1)
  599.         Set SoftNetRulesKey = $($R2)
  600.         CloseRegKey $($R3)
  601.         CloseRegKey $($R4)
  602.         CloseRegKey $($R5)
  603.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  604.             EndWait
  605.             Debug-Output "Registry error: add software components"
  606.             CloseRegKey $(KeyProduct)
  607.             CloseRegKey $(SoftNetRulesKey)
  608.             goto fatalregistry
  609.         endif
  610.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  611.                             {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  612.                             {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  613.                             {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  614.                             {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  615.                             {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  616.                             {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  617.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  618.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  619.             Debug-Output "ShellCode error."
  620.             goto ShellCodeError
  621.         endif
  622.         set RegistryErrorIndex = $($R0)
  623.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  624.             EndWait
  625.             Debug-Output "Registry error: add value list."
  626.             CloseRegKey $(KeyProduct)
  627.             CloseRegKey $(SoftNetRulesKey)
  628.             goto fatalregistry
  629.         endif
  630.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  631.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  632.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  633.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  634.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  635.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  636.  
  637.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  638.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  639.             Debug-Output "ShellCode error."
  640.             goto ShellCodeError
  641.         endif
  642.         set RegistryErrorIndex = $($R0)
  643.         CloseRegKey $(KeyProduct)
  644.         CloseRegKey $(SoftNetRulesKey)
  645.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  646.             EndWait
  647.             Debug-Output "Resgitry error: add value list."
  648.             goto fatalregistry
  649.         endif
  650.     endif
  651. ;
  652. ;   Create the HARDWARE\Netcard region and its corresponding service
  653. ;
  654.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  655.     ifint $($R4) != -1
  656.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  657.     endif
  658.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  659.         Debug-Output "Cannot add hardware component"
  660.         goto ShellCodeError
  661.     endif
  662.     set RegistryErrorIndex = $($R0)
  663.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  664.         EndWait
  665.         Debug-Output "Registry error: add hardware component"
  666.         CloseRegKey $($R1)
  667.         CloseRegKey $($R2)
  668.         CloseRegKey $($R3)
  669.         goto fatalregistry
  670.     endif
  671. ;
  672. ;   At this point:
  673. ;     $R1  Registry key variable for HARDWARE\Netcard\(n)
  674. ;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  675. ;     $R3  Registry key handle for <service>\Parameters key
  676. ;     $R4  Adapter number assigned to adapter
  677. ;     $R5  Service name generated by combining svc name with adapter number
  678. ;
  679.     set KeyParameters = $($R3)
  680.     set KeyAdapterRules = $($R2)
  681.     set AdapterNumber = $($R4)
  682.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  683.                         {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  684.                         {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  685.                         {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  686.                         {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  687.                         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  688.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  689.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  690.         Debug-Output "ShellCode error"
  691.         goto ShellCodeError
  692.     endif
  693.     CloseRegKey $($R1)
  694.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  695.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  696.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  697.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  698.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  699.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  700.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  701.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  702.         Debug-Output "ShellCode error."
  703.         goto ShellCodeError
  704.     endif
  705.     set RegistryErrorIndex = $($R0)
  706.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  707.         EndWait
  708.         Debug-Output "Resgitry error: add value list."
  709.         CloseRegKey $(KeyParameters)
  710.         CloseRegKey $(KeyAdapterRules)
  711.         goto fatalregistry
  712.     endif
  713.     CloseRegKey $(KeyAdapterRules)
  714.     goto writeparameters
  715. ;
  716. ;   REQUIRED:   $(KeyParameters) contains service Parameters key handle
  717. ;
  718. writeparameters = +
  719.     Shell $(UtilityInf), GetBusTypeNum
  720.     set BusTypeNum = $($R1)
  721. ; Testing the BusNum. We are coding it to 0
  722.     set BusNumValue = 0 ;
  723. ; End of BusNum
  724.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  725.         Debug-Output "ShellCode error."
  726.         goto ShellCodeError
  727.     endif
  728.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  729.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  730.     set ConnectionTypeValue = *($(ConnectionTypeValues), ~($(ConnectionTypeList),$(ConnectionTypeIndex)))
  731.     set NewValueList = {{IOBaseAddress,  $(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  732.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),1},+
  733.                         {BusNumber,  $(NoTitle),$(!REG_VT_DWORD),$(BusNumValue)},+
  734.                         {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  735.                         {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1},+
  736.                         {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
  737.                         {InterruptNumber,  $(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  738.                         {ConnectionType,  $(NoTitle),$(!REG_VT_DWORD),$(ConnectionTypeValue)}}
  739.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  740.  
  741. ;;=============================================================
  742.     Debug-Output "D66: IRQ="$(IRQValue)
  743.     Debug-Output "D66: BusType="$(BusTypeNum)
  744.     Debug-Output "D66: BusNumber="$(BusNumber)
  745.     Debug-Output "D66: MediaType=1"
  746.     Debug-Output "D66: Cardtype=0"
  747.     Debug-Output "D66: IoBaseAddress="$(IOBaseAddrValue)
  748.     Debug-Output "D66: ConnectionType="$(ConnectionTypeValue)
  749. ;;=============================================================
  750.     CloseRegKey $(KeyParameters)
  751.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  752.         Debug-Output "ShellCode error."
  753.         goto ShellCodeError
  754.     endif
  755.     set RegistryErrorIndex = $($R0)
  756.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  757.         Debug-Output "Registry error: Add value list"
  758.         goto fatalregistry
  759.     endif
  760. ;;+ 1-12-1996 Andge
  761.     OpenRegKey $(!REG_H_LOCAL) "" $(PCCardDataBase) $(MAXIMUM_ALLOWED) KeyPCCard
  762.     ifstr $(KeyPCCard) == $(KeyNull)
  763.         Debug-Output "D66: Registry Open Fail -- PCCardDataBase"
  764.         goto fatalregistry
  765.     endif
  766.     Debug-Output "D66: Open PCCardDataBase Registry Successful"
  767.     OpenRegKey $(!REG_H_LOCAL) "" $(NICDataBase) $(MAXIMUM_ALLOWED) KeyDataBase
  768.     ifstr $(KeyDataBase) == $(KeyNull)
  769.         Debug-Output "D66: Keyword I-O DATA\PCETTXR does not exist"
  770.         CreateRegKey $(KeyPCCard) {"IO DATA\PCETTXR",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDataBase
  771.         ifstr $(KeyDataBase) == $(KeyNull)
  772.             Debug-Output "D66: I-O DATA\PCETTXR Can not Create"
  773.             CloseRegKey $(KeyPCCard)
  774.             goto fatalregistry
  775.         endif
  776.         Debug-Output "D66: Create I-O DATA\PCETTXR Successful"
  777.     endif
  778.     Debug-Output "D66: Set Keyword value -- Driver"
  779.     SetRegValue $(KeyDataBase) {"Driver",$(NoTitle),$(!REG_VT_SZ),"pcettxr"}
  780.     SetRegValue $(KeyDataBase) {"DeviceType",$(NoTitle),$(!REG_VT_SZ),"NET"}
  781.     CloseRegKey $(KeyDataBase)
  782.     CloseRegKey $(KeyPCCard)
  783. ;;-
  784.     EndWait
  785.     goto successful
  786.  
  787. ;-----------------------------------------------
  788. ; Binding section
  789. ;-----------------------------------------------
  790. bindingadapter =+
  791.     set Error = "Binding: Sorry, not yet implemented."
  792.     goto fatal
  793.  
  794. ;-----------------------------------------------
  795. ; Removeadapter section
  796. ;-----------------------------------------------
  797. removeadapter = +
  798.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  799.         ; Remove Software Component
  800.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  801.                 $(ProductSoftwareName)
  802.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  803.             Debug-Output "ShellCode error"
  804.             goto ShellCodeError
  805.         endif
  806.         set RegistryErrorIndex = $($R0)
  807.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  808.             goto fatalregistry
  809.         endif
  810.     else
  811.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  812.                 $(ProductSoftwareName), $(!NTN_RegBase)
  813.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  814.             Debug-Output "ShellCode error"
  815.             goto ShellCodeError
  816.         endif
  817.         set RegistryErrorIndex = $($R0)
  818.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  819.             goto fatalregistry
  820.         endif
  821.     endif
  822.  
  823.     goto end
  824.  
  825. ;-----------------------------------------------
  826. ; Upgrade Software section
  827. ;-----------------------------------------------
  828. UpgradeSoftware = +
  829.     ;
  830.     ; First determine whether we want to do upgrade or update for software
  831.     ; or hardware component. Then we will determine whether the Mode is
  832.     ; update or upgrade.
  833.     ;
  834.     ; If the same version of the product existed in the registry, we do
  835.     ; update. Otherwise, we will do a upgrade
  836.     ;
  837.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  838.         ; Upgrade software component
  839.         ;
  840.         ; see whether the same version exist or not
  841.         ;
  842.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  843.         Ifstr $(KeyProduct) != $(KeyNull)
  844.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  845.             set Version = *($(VersionInfo), 4)
  846.             ;
  847.             ; Update the binaries
  848.             ;
  849.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  850.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  851.                 Debug-Output "ShellCode error"
  852.                 goto ShellCodeError
  853.             endif
  854.             set !UG_Filename = $($R0)
  855.             ifstr(i) $(!UG_Filename) != ""
  856.                 install "Install-Update"
  857.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  858.                     goto fatal
  859.                 endif
  860.             endif
  861.             ; Upgrade the version number
  862.             ;
  863.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  864.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  865.             ;
  866.             ; do nothing for update
  867.             ;
  868.             ifint $(Version) != $(ProductVersion)
  869.                 ;
  870.                 ; If the major version number is not the same,
  871.                 ; it is major upgrade. So let Upgrade the product
  872.                 ;
  873.                 ;
  874.                 ; make other upgrade change if necessary
  875.                 ;
  876.             endif
  877.             CloseRegKey $(KeyProduct)
  878.         else
  879.             ;
  880.             ; Cannot Open software key, goto ERROR
  881.             ;
  882.             goto fatalregistry
  883.         endif
  884.     else
  885.         ;
  886.         ; upgrade/update hardware component
  887.         ; There is no different between upgrade and update for hardware
  888.         ; component
  889.         ;
  890.         ; 1. Get the Service Name
  891.         ; 2. Change the NetRule section if necessary
  892.         ;
  893.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  894.                 $(MAXIMUM_ALLOWED) NetworkCardKey
  895.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  896.             ;
  897.             ; Get Service name
  898.             ;
  899.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  900.             set ServiceName = *($(ServiceNameInfo), 4)
  901.             ;
  902.             ; Change the NetRule if necessary
  903.             ;
  904.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  905.                     $(MAXIMUM_ALLOWED) NetRuleKey
  906.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  907.                 ;
  908.                 ; Make the change....
  909.                 ;
  910.             else
  911.                 ;
  912.                 ; Error, cannot open net rules key
  913.                 ;
  914.                 goto fatalregistry
  915.             endif
  916.             CloseRegKey $(NetRules)
  917.             CloseRegKey $(NetworkCardKey)
  918.         else
  919.             ;
  920.             ; Error, cannot open network card key
  921.             ;
  922.             goto fatalregistry
  923.         endif
  924.         ;
  925.         ; 3. Change the service section of the hardware. i.e.,
  926.         ;    ParameterName change, value change, etc.
  927.         ;
  928.         OpenRegKey $(!REG_H_LOCAL) "" +
  929.                 $(!NTN_ServiceBase)"\"$(ServiceName) +
  930.                 $(MAXIMUM_ALLOWED) ServiceKey
  931.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  932.             ;
  933.             ; Get the ServiceKey to change the Start value
  934.             ; or Type value. Or open Parameters key to
  935.             ; change the hardware parameters if necessary.
  936.             ;
  937.             CloseRegKey $(ServiceKey)
  938.         else
  939.             ;
  940.             ; Error, cannot open network card key
  941.             ;
  942.             goto fatalregistry
  943.         endif
  944.     endif
  945.     goto end
  946.     ;
  947.     ; End of Upgrade Software
  948.     ;
  949.  
  950. ;
  951. ;  Escape hatches
  952. ;
  953. successful = +
  954.     goto end
  955.  
  956. abandon = +
  957.     ForListDo $(OEM_ABANDON_OPTIONS)
  958.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  959.                 $(ProductSoftwareName), $($)
  960.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  961.             Debug-Output "ShellCode error"
  962.             goto ShellCodeError
  963.         endif
  964.         set RegistryErrorIndex = $($R0)
  965.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  966.             goto fatalregistry
  967.         endif
  968.     EndForListDo
  969.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  970.         ; Remove Software Component
  971.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  972.                 $(ProductSoftwareName), FALSE
  973.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  974.             Debug-Output "ShellCode error"
  975.             goto ShellCodeError
  976.         endif
  977.         set RegistryErrorIndex = $($R0)
  978.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  979.             goto fatalregistry
  980.         endif
  981.     endif
  982.     goto end
  983.  
  984. ;
  985. ; warning display
  986. ;
  987. warning = +
  988.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  989.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  990.         goto ShellCodeError
  991.     endif
  992.     ifstr(i) $($R1) == "OK"
  993.         goto $(to)
  994.     else-ifstr(i) $($R1) == "CANCEL"
  995.         goto $(from)
  996.     else
  997.         goto "end"
  998.     endif
  999.  
  1000. ;
  1001. ; non fatal error display
  1002. ;
  1003. nonfatalinfo = +
  1004.     Set Severity = STATUS
  1005.     Set CommonStatus = STATUS_USERCANCEL
  1006.     goto nonfatalmsg
  1007.  
  1008. nonfatal = +
  1009.     Set Severity = NONFATAL
  1010.     goto nonfatalmsg
  1011.  
  1012. nonfatalmsg = +
  1013.     ifstr(i) $(Error) == ""
  1014.         Set Severity = NONFATAL
  1015.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1016.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1017.             goto ShellCodeError
  1018.         endif
  1019.         set Error = $($R0)
  1020.     endif
  1021.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1022.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1023.         goto ShellCodeError
  1024.     endif
  1025.     ifstr(i) $($R1) == "OK"
  1026.         goto $(from)
  1027.     else
  1028.         goto "end"
  1029.     endif
  1030.  
  1031. ;
  1032. ;  Registry is broken
  1033. ;
  1034. fatalregistry = +
  1035.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1036.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1037.         goto ShellCodeError
  1038.     endif
  1039.     set Error = $($R0)
  1040.     goto fatal
  1041.  
  1042. ;
  1043. ;  Netcard detection failure
  1044. ;
  1045. fataldetect = +
  1046.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1047.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1048.         Debug-Output "ShellCode error: cannot get an error string."
  1049.         goto ShellCodeError
  1050.     endif
  1051.     set Error = $($R0)
  1052.     Goto fatal
  1053. ;
  1054. ; fatal error display
  1055. ;
  1056. fatal = +
  1057.     ifstr(i) $(Error) == ""
  1058.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1059.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1060.             goto ShellCodeError
  1061.         endif
  1062.         set Error = $($R0)
  1063.     endif
  1064.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1065.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1066.         goto ShellCodeError
  1067.     endif
  1068.  
  1069.     goto setfailed
  1070.  
  1071. ;
  1072. ;  Shelling error
  1073. ;
  1074. ShellCodeError = +
  1075.     set DlgType            = "MessageBox"
  1076.     set STF_MB_TITLE    = $(ShellCodeErrorTitle)
  1077.     set STF_MB_TEXT        = $(ShellCodeErrorText)
  1078.     set STF_MB_TYPE        = 1
  1079.     set STF_MB_ICON        = 3
  1080.     set STF_MB_DEF        = 1
  1081.     ui start "Error Message"
  1082.     goto setfailed
  1083.  
  1084. setfailed = +
  1085.     set CommonStatus = STATUS_FAILED
  1086.     ;
  1087.     ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1088.     ;
  1089.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1090.         set OEM_ABANDON_ON = FALSE
  1091.         goto abandon
  1092.     endif
  1093.     goto end
  1094.  
  1095. end = +
  1096.     goto term
  1097.  
  1098. term = +
  1099.     Return $(CommonStatus)
  1100.  
  1101. [DebugConfiguration]
  1102.     Set InfName = "OEMNAD22E.INF"
  1103.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  1104.     Debug-Output $(InfName)" IRQ_Level is "$(!p:IRQValue)
  1105.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  1106.     Debug-Output $(InfName)" TransceiverValue is "$(!p:TransceiverValue)
  1107.     Debug-Output $(InfName)" MemBaseAddrDec is "$(!p:MemBaseAddrDec)
  1108.     Debug-Output $(InfName)" MappedValue is "$(!p:MappedValue)
  1109.  
  1110.     return
  1111.  
  1112.  
  1113. ;***************************************************************
  1114. ;  INSTALL SECTIONS
  1115. ;***************************************************************
  1116. [Install-Option]
  1117.     set STF_VITAL = ""
  1118.     ifstr(i) $(AddCopy) == "YES"
  1119.         ;
  1120.         ; Add the files to the copy list
  1121.         ;
  1122.         ;  BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1123.         ;      the other INF files
  1124.         ;
  1125.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1126.     endif
  1127.     ifstr(i) $(DoCopy) == "YES"
  1128.         ;
  1129.         ; Copy files in the copy list
  1130.         ;
  1131.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1132.         CopyFilesInCopyList
  1133.     endif
  1134.     Exit
  1135.  
  1136. [Install-Update]
  1137.     set STF_VITAL        = ""
  1138.     set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1139. ;    set STF_VERSION        = "YES"
  1140.  
  1141.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1142.     AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1143.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1144.     CopyFilesInCopyList
  1145.     exit
  1146.  
  1147. [Install-Dll]
  1148.     set STF_VITAL = ""
  1149.     AddSectionFilesToCopyList Files-Dll $(DLLPATH) $(!STF_WINDOWSSYSPATH)
  1150.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1151.     CopyFilesInCopyList
  1152.     exit
  1153.  
  1154. [Source Media Descriptions]
  1155.     1  = "PCET/TX-R サポートソフト"
  1156.  
  1157. [ProductType]
  1158. STF_PRODUCT  = Winnt
  1159. STF_PLATFORM = I386
  1160.  
  1161. [Files-Inf]
  1162. 1, oemsetup.inf, SIZE=1000, RENAME=$(!UG_Filename)
  1163.  
  1164. [Files-PCETTXR]
  1165. 1, PCETTXR.SYS , SIZE=88888
  1166.  
  1167. [Files-Dll]
  1168. 1, pcettxr.dll, SIZE=999
  1169.  
  1170. [LanguagesSupported]
  1171.     ENG
  1172.  
  1173. [OptionsTextENG]
  1174.     PCETTXR    = "I-O DATA PCET/TX-R ファースト イーサネット アダプタ"
  1175.  
  1176. [FileConstantsENG]
  1177. ProCaption                    = "Windows NT セットアップ"
  1178. ProCancel                    = "Cancel"
  1179. ProCancelMsg                = "Windows NT ネットワークは正常に組み込まれていません。"+
  1180.                                 "本当にファイルのコピーを中止しますか?"
  1181. ProCancelCap                = "ネットワーク セットアップ メッセージ"
  1182. ProText1                    = "コピー元:"
  1183. ProText2                    = "コピー先:"
  1184. FunctionTitle                = $(GenericAdapterName)" セットアップ"
  1185. ProductSoftwareDescription    = $(GenericDriverName)
  1186. ProductSoftwareTitle        = $(GenericDriverName)
  1187. ProductHardwareDescription    = $(GenericAdapterName)
  1188. ProductHardwarePCETTXRDescription = "I-O DATA PCET/TX-R ファースト イーサネット アダプタ"
  1189. ProductHardwarePCETTXRTitle    = $(GenericAdapterName)
  1190. DialogDllName                = "pcettxr.dll"
  1191. IRQList                        = ^(IRQChoices, 1)
  1192. IRQValues                    = ^(IRQChoices, 2)
  1193. IOBaseAddrList                = ^(IOBaseAddrChoices, 1)
  1194. IOBaseAddrValues            = ^(IOBaseAddrChoices, 2)
  1195. ConnectionTypeList            = ^(ConnectionTypeChoices, 1)
  1196. ConnectionTypeValues        = ^(ConnectionTypeChoices, 2)
  1197.  
  1198. [DialogConstantsENG]
  1199. Help        = "&Help"
  1200. Exit        = "Cancel"
  1201. OK            = "OK"
  1202. HelpContext    = ""
  1203. Continue    = "Continue"
  1204. Cancel        = "Cancel"
  1205.  
  1206. [MemoryMappedChoicesENG]
  1207. Map_1        = 1, "ON"
  1208. Map_2        = 0, "OFF"
  1209.  
  1210. [FileDependentDlgENG]
  1211. DlgText            = "Please select values for the follwing fields:"
  1212. DlgType            = "RadioCombination"
  1213. DlgTemplate        = "PCETTXRDLG"
  1214. Caption            = $(FunctionTitle)
  1215. CBOptionsGreyed    = {}
  1216. NotifyFields    = {NO, NO}
  1217. Combo1Label        = "I/O アドレス :"
  1218. Combo2Label        = "IRQ :"
  1219. Combo3Label        = "接続タイプ :"
  1220. Combo1List        = $(IOBaseAddrList)
  1221. Combo1Out        = $(IOBaseAddrValue)
  1222. Combo2List        = $(IRQList)
  1223. Combo2Out        = $(IRQValue)
  1224. Combo3List        = $(ConnectionTypeList)
  1225. Combo3Out        = $(ConnectionTypeValue)
  1226. ComboListItemsIn    = {Combo1List,Combo2List,Combo3List}
  1227. ComboListItemsOut    = {Combo1Out,Combo2Out,Combo3Out}
  1228. EditTextLim        = 12
  1229. EditTextIn        = $(NetworkAddress)
  1230. Edit1Label        = "NetworkAddress"
  1231.  
  1232. [IRQChoices]
  1233. IRQ_1        = "3",  3
  1234. IRQ_2        = "4",  4
  1235. IRQ_3        = "5",  5
  1236. IRQ_4        = "9",  9
  1237. IRQ_5        = "10", 10
  1238. IRQ_6        = "11", 11
  1239. IRQ_7        = "12", 12
  1240. IRQ_8        = "15", 15
  1241.  
  1242. [IOBaseAddrChoices]
  1243. IOBase_1    = "0x200", 512
  1244. IOBase_2    = "0x220", 544
  1245. IOBase_3    = "0x240", 576
  1246. IOBase_4    = "0x260", 608
  1247. IOBase_5    = "0x300", 768
  1248. IOBase_6    = "0x320", 800
  1249. IOBase_7    = "0x340", 832
  1250. IOBase_8    = "0x360", 864
  1251. IOBase_9    = "0x380", 896
  1252.  
  1253. [ConnectionTypeChoices]
  1254. CT_1        = "自動選択",5
  1255. CT_2        = "100BASE-TX フルデュプレックス",6
  1256. CT_3        = "100BASE-TX",4
  1257. CT_4        = "10BASE-T フルデュプレックス",2
  1258. CT_5        = "10BASE-T",0
  1259.