home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 August / VPR9708B.ISO / DRIVER / DEC / DEFEA280 / OEMSETNT.INF < prev    next >
INI File  |  1996-05-28  |  41KB  |  1,219 lines

  1. ; OEMSETUP FILE FOR DEC FDDIcontroller/EISA Adapters
  2. ; Windows NT v3.5 and v3.51 - DEFEA.SYS V1.82
  3. ;
  4. ;     Platform type: Alpha, x86, MIPS, PowerPC
  5. ;     Supported Adapters: DEFEA
  6. ;
  7. ; Digital Equipment Corporation, Littleton, Mass.
  8. ;
  9. ; The information in this software is subject to change without 
  10. ; notice and should not be construed as a commitment by Digital 
  11. ; Equipment Corporation.
  12. ;
  13. ; Usage:
  14. ;     This file is the installation/configuration/deinstallation
  15. ;     procedure of the driver for Windows NT (DEFEA).  It can be
  16. ;     called from Windows setup directly, or via the Windows NT
  17. ;     Networks Control Program Applet (NCPA) from inside the
  18. ;     Windows Control Panel.
  19. ;
  20. ;    set !DebugOutputControl = 1  ; Turn On Debugging for Install testing
  21. ;         Debug-Output " Turn on Debugger... "
  22.  
  23. ;******************
  24. ;* IDENTIFICATION *
  25. ;******************
  26. [Identification]
  27.     OptionType = NetAdapter
  28.  
  29. ;***********************
  30. ;* PLATFORMS SUPPORTED *
  31. ;***********************
  32. [PlatformsSupported]
  33.     ISA
  34.     EISA
  35.     "Jazz-Internal Bus"
  36.     PCI
  37.  
  38. ;****************************************
  39. ;* OPTIONS - Order IS be important here *
  40. ;*  Must match order in OptionsTextENG  *
  41. ;****************************************
  42. [Options]
  43.     DEFEA
  44.  
  45. ;**************************
  46. ;* RECEIVE BUFFER CHOICES *
  47. ;**************************
  48. [ReceiveBuffChoices]
  49.     Receive_1 = "2", 2
  50.     Receive_2 = "4", 4
  51.     Receive_3 = "8", 8
  52.  
  53. ;***************************
  54. ;* TRANSMIT BUFFER CHOICES *
  55. ;***************************
  56. [TransmitBuffChoices]
  57.     Transmit_1 = "8", 8
  58.     Transmit_2 = "16", 16
  59.     Transmit_3 = "32", 32
  60.     Transmit_4 = "64", 64
  61.     Transmit_5 = "128", 128
  62.  
  63. ;****************************
  64. ;* DEFINITIONS USED IN CODE *
  65. ;****************************
  66. [FileConstants]
  67. UtilityInf      = "UTILITY.INF"
  68. subroutineinf   = "SUBROUTN.INF"
  69. SoftwareType    = "driver"
  70. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  71. Manufacturer    = "DigitalEquipmentCorporation"
  72. ProductMajorVersion     = "1"
  73. ProductMinorVersion     = "82"
  74. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  75.  
  76. DEFEA_1BYTE = 3187472    ; DEC300 EISA hardware ID
  77.  
  78. ;
  79. ; Software Specific Information Below.
  80. ;
  81. ProductSoftwareName        = "Defea"          ; current driver name
  82. ProductSoftwareTitle       = "DEC FDDIcontroller/EISA Driver"
  83. ProductSoftwareImagePath   = "%SystemRoot%\System32\drivers\defea.sys"
  84. NetRuleSoftwareType        = "defeaSys ndisDriver defeaDriver"
  85. NetRuleSoftwareUse         = $(SoftwareType)
  86. NetRuleSoftwareBindForm    = """DefeaSys"" yes no container"
  87. NetRuleSoftwareClass       = {"defeaDriver basic"}
  88. NetRuleSoftwareSWBindable  = {"defeaDriver defeaAdapter non exclusive 100"}
  89.  
  90. OptionHelpFile = "DEFDDI.HLP"
  91. ProductHardwareName = "Defea"
  92.  
  93. ;
  94. ; Hardware Specific Information Below.
  95. ;
  96. ; Note that in the HardwareParam Lists, FullDuplexEnable,
  97. ; RcvBuffCnt, RequestedTTRT, and XmtBuffCnt are not    present.
  98. ; That's because all of these parameters are queried by a
  99. ; dialog box and entered into the registry with that information.
  100. ;
  101. ; Also note that only parameters with CONSTANT values can be here.
  102. ; If you try to use a variable in one of these lists, it will not
  103. ; work the way you expect!
  104. ;
  105.  
  106. ; DEFEA Information
  107.  
  108. ProductHardwareDEFEATitle   = "DEC FDDIcontroller/EISA Adapter"
  109. NetRuleHardwareDEFEAType    = "defea defeaAdapter"
  110. NetRuleHardwareDEFEAClass   = {"defeaAdapter basic"}
  111. HelpDEFEAId = 1
  112.  
  113. EISABusType        = 2
  114. FDDIMediaType    = 3
  115.  
  116. DEFEAHardwareParamList = {{BurstSize,$(NoTitle),$(!REG_VT_DWORD),2},+
  117.     {BusType,$(NoTitle),$(!REG_VT_DWORD),$(EISABusType)},+
  118.     {EisaCompressedID,$(NoTitle),$(!REG_VT_DWORD),$($(Option)_1BYTE)},+
  119.     {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(FDDIMediaType)}}
  120.  
  121.  
  122. NetRuleHardwareBindForm = " yes yes container"
  123. ProductKeyName    = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  124. VersionKeyName    = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion"
  125.  
  126. [GeneralConstants]
  127. KeyNull           = ""
  128. MAXIMUM_ALLOWED   = 33554432
  129. KeyProduct        = ""
  130. KeyParameters     = ""
  131. TRUE              = 1
  132. FALSE             = 0
  133. NoTitle           = 0
  134.  
  135. [date]
  136.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  137.  
  138. ;********************
  139. ;* IDENTIFY SECTION *
  140. ;********************
  141. ;
  142. ; The [Identify] section is the first section executed by Setup. It
  143. ; returns information to Setup about the type of drivers that can 
  144. ; be installed by this .INF file (in our case, network drivers).
  145. ;
  146. [Identify]
  147.     read-syms Identification
  148.     set Status     = STATUS_SUCCESSFUL
  149.     set Identifier = $(OptionType)
  150.     set SourceMedia = #("Source Media Descriptions", 1, 1)
  151.     Return $(Status) $(Identifier) $(SourceMedia)
  152.  
  153. ;**************************
  154. ;* RETURN OPTIONS SECTION *
  155. ;**************************
  156. ;
  157. ; If the [Identify] section indicates that the .INF file supports
  158. ; the appropriate type of driver, Setup calls the [ReturnOptions]
  159. ; section.  Setup passes a single parameter to this section,
  160. ; indicating the language to be used for dialog strings.  This 
  161. ; section returns information to the Setup program, listing the
  162. ; names of any drivers which can be installed by this .INF file.
  163. ; It also returns the text strings for each driver to be used in 
  164. ; the dialog box asking the user to select the driver to install.
  165. ;
  166. [ReturnOptions]
  167.     ;
  168.     ; Initialize variables to failure state.
  169.     ;
  170.     set Status         = STATUS_FAILED
  171.     set OptionList     = {}
  172.     set OptionTextList = {}
  173.     
  174.     ;
  175.     ; See if our language list supports the language specified.
  176.     ;
  177.     set LanguageList = ^(LanguagesSupported, 1)
  178.     Ifcontains(i) $($0) not-in $(LanguageList)
  179.         set Status = STATUS_NOLANGUAGE
  180.         goto finish_ReturnOptions
  181.     endif
  182.     
  183.     ;
  184.     ; If a second parameter was passed in, see if it is a supported
  185.     ; platform.
  186.     ;
  187.     ifstr(i) $($1) != ""
  188.         set PlatformList = ^(PlatformsSupported, 1)
  189.         Ifcontains(i) $($1) not-in $(PlatformList)
  190.             set Status = STATUS_NOTSUPPORTED
  191.             goto finish_ReturnOptions
  192.         endif
  193.     endif
  194.     
  195.     ;
  196.     ; If we get here, we are successful, so return the option list.
  197.     ;
  198.     set OptionList     = ^(Options, 1)
  199.     set OptionTextList = ^(OptionsText$($0), 1)
  200.     set Status         = STATUS_SUCCESSFUL
  201.     
  202.     ;
  203.     ; Exit from this section.
  204.     ;
  205. finish_ReturnOptions = +
  206.     Return $(Status) $(OptionList) $(OptionTextList)
  207.  
  208. ;*************************
  209. ;* INSTALLOPTION SECTION *
  210. ;*************************
  211. ;
  212. ; If the [ReturnOptions] section returns successfully, indicating
  213. ; the language is supported, Setup displays a dialog box from which
  214. ; the user can select a driver to install.  Setup then calls the 
  215. ; [InstallOption] section, with the following parameters:
  216. ;
  217. ;       Language to use
  218. ;       OptionID to install (DEFEA)
  219. ;       SourceDirectory
  220. ;       AddCopy  (yes/no)
  221. ;       DoCopy   (yes/no)
  222. ;       DoConfig (yes/no)
  223. ;
  224. ; ScrDir seems to always be A:\, even when you later install from
  225. ; the oemnad#.inf which is copied to the system32 directory.
  226. ;
  227. ; AddCopy and DoCopy are valid only when NTN_InstallMode = install.
  228. ; AddCopy is yes if the files should be added to the copy list.
  229. ; DoCopy is yes if CopyFilesInCopyList should be called.
  230. ;
  231. ; DoConfig is not used for network cards.
  232. ;
  233. ; This .INF file is automatically copied to the SYSTEM32 directory,
  234. ; by WinNT, and renamed so as to have a unique name.
  235. ;
  236.  
  237. [InstallOption]
  238.  
  239. ;    set !DebugOutputControl = 1  ; Turn On Debugging for Install testing 
  240.     Debug-Output "oemsetup for "$(ProductHardwareName)" V"$(ProductVersion)" ..."
  241.     
  242.     ;
  243.     ; Read input parameters.
  244.     ;
  245.     set Option   = $($1)
  246.     set SrcDir   = $($2)
  247.     set AddCopy  = $($3)
  248.     set DoCopy   = $($4)
  249.     set DoConfig = $($5)
  250.     
  251.     ;
  252.     ; Check if specified language is supported.
  253.     ;
  254.     set LanguageList = ^(LanguagesSupported, 1)
  255.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  256.         Return STATUS_NOLANGUAGE
  257.     endif
  258.     
  259.     ;
  260.     ; Set up local variables and constant values.
  261.     ;
  262.     set-subst LF = "\n"
  263.     read-syms GeneralConstants
  264.     read-syms FileConstants
  265.     read-syms DialogConstants$(!STF_LANGUAGE)
  266.     read-syms FileConstants$(!STF_LANGUAGE)
  267.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  268.     SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId)
  269.     detect date
  270.     set-title  $(Function$(Option)Title)
  271.     set CommonStatus = STATUS_SUCCESSFUL
  272.     EndWait
  273.  
  274.     ;
  275.     ; NTN_InstallMode
  276.     ;   install   - this is a primary or original installation, it
  277.     ;               may be an upgrade
  278.     ;   deinstall - this product and its binaries are to be removed
  279.     ;               from the disk
  280.     ;   configure - this product is to be (re-) configured
  281.     ;   bind      - this product's relationships to other products
  282.     ;               have changed and should be reviewed. 
  283.     ;
  284.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  285.         set StartLabel = removeadapter
  286.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  287.         set StartLabel = UpgradeSoftware
  288.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  289.         set StartLabel = bindingadapter
  290.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  291.         set StartLabel = configureadapter
  292.     else
  293.         set StartLabel = installadapter
  294.     endif
  295.  
  296.     ;
  297.     ; HARDWARE_PUT_IN_REGISTRY gets set to true once the hardware
  298.     ; component is installed.  That way if we get an error we know 
  299.     ; to uninstall it.  HWList has the path to the hardware that 
  300.     ; is needed by RemoveHardwareComponent.
  301.     ;
  302.     ; SOFTWARE_PUT_IN_REGISTRY gets set to true once the software
  303.     ; component is installed.
  304.     ;
  305.     set HARDWARE_PUT_IN_REGISTRY = $(FALSE)
  306.     set HWList = ""
  307.     set SOFTWARE_PUT_IN_REGISTRY = $(FALSE)
  308.     
  309.     ;
  310.     ; Go to the appropriate section for this installation mode.
  311.     ;
  312.     Debug-Output "StartLabel "$(StartLabel)
  313.     goto $(StartLabel)
  314.  
  315. ;------------------------------------------------------------------------
  316. ; InstallMode = install
  317. ; Came here straight from figuring out which platform we are on.
  318. ; Option, SrcDir, AddCopy, DoCopy, and DoConfig are valid.
  319. ;
  320. installadapter = +
  321.     
  322.     ;-------------------------------------------------------------------
  323.     ; Get the NT version (3.50 or ...)
  324.     ;-------------------------------------------------------------------
  325.     ;
  326.     OpenRegKey $(!REG_H_LOCAL) "" $(VersionKeyName) $(MAXIMUM_ALLOWED) KeyVersion
  327.     GetRegValue $(KeyVersion),"CurrentVersion",VersionStruct
  328.     CloseRegKey $(KeyVersion)
  329.     Set NTVersion = *($(VersionStruct),4)
  330.     
  331.     ;-------------------------------------------------------------------
  332.     ; Determine the platform and set the correct driver/help paths.
  333.     ;-------------------------------------------------------------------
  334.     ;
  335.     set Help_Directory = "WINNT"
  336.     Ifstr $(!STF_PLATFORM) == "Alpha"
  337.         set Source_Directory = "WINNT\ALPHA"
  338.     else-ifstr $(!STF_PLATFORM) == "Mips"
  339.         set Source_Directory = "WINNT\MIPS"
  340.     else-ifstr $(!STF_PLATFORM) == "I386"
  341.         set Source_Directory = "WINNT\INTEL"
  342.     else-ifstr $(!STF_PLATFORM) == "ppc"
  343.         set $R0 = "Windows NT PowerPC drivers are not on this distribution."
  344.         goto fatal
  345.     else
  346.         set $R0 = "This platform is not recognized and not supported by this distribution."
  347.         goto fatal
  348.     endif
  349.     
  350.     ;-------------------------------------------------------------------
  351.     ; Check to see if a different version of this driver was installed.
  352.     ;-------------------------------------------------------------------
  353. SWCheckThisProductKeyName = +
  354.     ;
  355.     ; Get open handle KeyProduct. 
  356.     ; Returns an empty string if key does not exist.
  357.     ;
  358.     ; NTN_RegBase appears empty on the installation of the first card.
  359.     ; KeyProduct will be KeyNull on the installation of the first card.
  360.     ;
  361.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  362.     
  363.     ;
  364.     ; We cannot assume that the adapter has never been installed before.
  365.     ; The spec says we must check for older versions of the software 
  366.     ;   (NTN_RegBase = ProductKeyName) and tell the user to use update.
  367.     ;   However, NT 3.50 does not do update properly, so tell user
  368.     ;   to remove and re-install in this situation.
  369.     ; The spec says we should warn about already finding this hardware 
  370.     ;   installed.  We'll do that and allow the option of continuing.
  371.     ;
  372.     Ifstr $(KeyProduct) != $(KeyNull)
  373.     ;-------------------------------------------------------------------
  374.     ; Software exists - do some checking
  375.     ;-------------------------------------------------------------------
  376.     ; If key already exists, get software version info.
  377.     ;
  378.     GetRegValue $(KeyProduct) MajorVersion OldMajorVersionList
  379.     GetRegValue $(KeyProduct) MinorVersion OldMinorVersionList
  380.     CloseRegKey $(KeyProduct)
  381.     set OldMajorVersion = *($(OldMajorVersionList),4)
  382.     set OldMinorVersion = *($(OldMinorVersionList),4)
  383.     ;
  384.     ; If the old version is the same as ours, no problem.
  385.     ; If not the same, fatal error.
  386.     ;
  387.     ifstr(i) $(OldMajorVersion) != $(ProductMajorVersion)
  388.         goto SWversionMismatch
  389.     endif
  390.     ifstr(i) $(OldMinorVersion) != $(ProductMinorVersion)
  391.         goto SWversionMismatch
  392.     endif
  393.     goto SWversionOK
  394.  
  395. SWversionMismatch = +
  396.     set $R0 = $(Option)".SYS V"$(OldMajorVersion)"."$(OldMinorVersion)+
  397.         "already exists on the system.  Please use the remove button for all DEFEA and re-install."
  398.     goto fatal         
  399.  
  400. SWversionOK = +
  401.     Else
  402.     ;-------------------------------------------------------------------
  403.     ; Add software info to the registry
  404.     ;-------------------------------------------------------------------
  405.     ; This is a new software component - need to add version, descr, ...
  406.     ;
  407.     StartWait
  408.     ;
  409.     ; If we are not installing from floppy, NT will detect that the
  410.     ; floppy is not present and ask for one.
  411.     ;
  412.     ; Copy the driver and help file.
  413.     ; If this is being installed from the oemnad#.inf on the
  414.     ; hard disk, NT will look for the disk in the floppy drive,
  415.     ; not find it, and prompt the user to install it.
  416.     ;
  417.     ifstr(i) $(AddCopy) == "YES"
  418.         install "Install-AddList"
  419.         ;
  420.         ; Only do the copy if the add was successful.
  421.         ; Note: do NOT use !STF_INSTALL_OUTCOME, it doesn't work!
  422.         ;
  423.         ifstr(i) $(STF_INSTALL_OUTCOME) == STF_SUCCESS
  424.             ifstr $(DoCopy) == "YES"
  425.                 install "Install-CopyList"
  426.             endif
  427.         endif
  428.     endif
  429.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  430.         set $R0 = "Could not copy driver and help files."
  431.         goto fatal
  432.     endif
  433.  
  434.     ;
  435.     ; AddSoftwareComponent adds all the registry information 
  436.     ; neccessary for a new software component.  This involves
  437.     ; creating the SOFTWARE area and the SERVICE area. Returns:
  438.     ;       R1      key for SOFTWARE\Manufacturer\Product\Version
  439.     ;       R2      key for SOFTWARE\..\NetRules
  440.     ;       R3      key handle for SERVICES key
  441.     ;       R4      "Parameters" key handle for Services area
  442.     ;       R5      "Linkage" key handle for Services area
  443.     ;
  444.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  445.         $(ProductSoftwareName), +
  446.         $(ProductSoftwareName), +
  447.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  448.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  449.         $(NetEventDLL)
  450.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  451.         goto ShellCodeError
  452.     endif
  453.     Set SOFTWARE_PUT_IN_REGISTRY = $(TRUE)
  454.     Set SoftProductKey      = $($R1)
  455.     Set SoftNetRuleKey      = $($R2)
  456.     Set SoftServiceKey      = $($R3)
  457.     Set SoftParameterKey    = $($R4)
  458.     Set SoftLinkageKey      = $($R5)
  459.     ifstr(i) $($R0) != "NO_ERROR"
  460.         set $R0 = "Error adding software component.  Reboot and try again."
  461.         goto SWAddComplete
  462.     endif
  463.     ;
  464.     ; Create a value list for this entry.
  465.     ; Each entry in ValueList is a list containing:
  466.     ;           ValueName
  467.     ;           Index (must be zero)
  468.     ;           ValueType
  469.     ;           ValueData
  470.     ;
  471.     ; Put this value list in SOFTWARE\Manufacturer\Product\Version
  472.     ;
  473.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  474.         {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)},+
  475.         {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)},+
  476.         {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  477.         {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  478.         {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  479.         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  480.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  481.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  482.         goto SWAddComplete
  483.     endif
  484.     ifstr(i) $($R0) != "NO_ERROR"
  485.         set $R0 = "Error adding software version info."
  486.         goto SWAddComplete
  487.     endif
  488.     ;
  489.     ; Set up value list for SOFTWARE\..\NetRules and write it.
  490.     ;
  491.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  492.         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  493.         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  494.         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  495.         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareSWBindable)}, +
  496.         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  497.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  498.     ifstr(i) $($R0) != "NO_ERROR"
  499.         set $R0 = "Error adding software netrules."
  500.     endif
  501.  
  502. SWAddComplete = +
  503.     CloseRegKey $(SoftProductKey)
  504.     CloseRegKey $(SoftNetRuleKey)
  505.     CloseRegKey $(SoftServiceKey)
  506.     CloseRegKey $(SoftParameterKey)
  507.     CloseRegKey $(SoftLinkageKey)
  508.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  509.         goto ShellCodeError
  510.     endif
  511.     ifstr(i) $($R0) != "NO_ERROR"
  512.         goto fatal
  513.     endif
  514.     endif  ; end installation of SW component, if this is a new component
  515.     
  516.     ;-----------------------------------------------------------------------
  517.     ; Get the list of cards to install.
  518.     ;-----------------------------------------------------------------------
  519.  
  520.     ;
  521.     ; EISAFindBus returns AdapterList entry in R1 and Error status in R0
  522.     ;   - the list contains all cards of that EISA ID,
  523.     ;   with their BusNum and SlotNum.
  524.     ;
  525.     Shell $(UtilityInf), EISAFindBus, $($(Option)_1BYTE)
  526.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  527.         goto ShellCodeError
  528.     endif
  529.  
  530.     ifstr $($R0) != "NO_ERROR"
  531.         goto fatal
  532.     endif
  533.  
  534.     set AdapterList = $($R1)
  535.     endif
  536.     
  537.     ifstr(i) $(AdapterList) == {}
  538.         set $R0 = $(Option)" network card is not present in the system."
  539.         goto fatal
  540.     endif
  541.     
  542.     ;-----------------------------------------------------------------------
  543.     ; Put the hardware information in the registry
  544.     ;-----------------------------------------------------------------------
  545.     ; Keep going until the adapterlist is empty.
  546.     ;
  547.     ; Note it is illegal to use a "goto" inside the ForListDo
  548.     ; that jumps to somewhere outside the ForListDo.
  549.     ;
  550.     set DropThroughForListDo = $(FALSE)
  551.     ForListDo $(AdapterList)
  552.     Set HW_KEYS_OPEN = $(FALSE)
  553.     ifint $(DropThroughForListDo) == $(FALSE)
  554.         ;
  555.         ; Set up BusNum and SlotNum.
  556.         ;
  557.         set BusNum = *($($),1)
  558.         set SlotNum = *($($),2)
  559.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  560.             $(SlotNum), $(ProductHardware$(Option)Description), +
  561.             $(ProductHardwareName) "YES"
  562.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  563.             goto ForListDropThrough
  564.         else-ifstr(i) $($R0) != "NO_ERROR"
  565.             set $R0 = "Error in determining if netcard is already installed."
  566.             goto ForListDropThrough
  567.         else-ifstr(i) $($R1) == "YES"   ;already installed,
  568.             goto ThisForIterationDone   ;  so skip it and try next
  569.         endif
  570.  
  571.         set ParamFullDuplexEnable = 2
  572.         set ParamRcvBuffCnt = 4
  573.         set ParamRequestedTTRT = 8
  574.         set ParamXmtBuffCnt = 32
  575.  
  576.         ;
  577.         ; Install one iteration of the hardware in the registry.
  578.         ;
  579.         ; Note that $(STF_CONTEXTINFNAME) translates to oemnad#.inf
  580.         ;          $(!STF_CONTEXTINFNAME) translates to NCPASHEL.INF        
  581.         ;
  582.         Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName), +
  583.             $(STF_CONTEXTINFNAME), $(ProductKeyName)
  584.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  585.             goto ForListDropThrough
  586.         endif
  587.         ifint $($R4) == -1
  588.             set $R0 = "Error getting "$(Option)" adapter number."
  589.             goto ForListDropThrough
  590.         endif
  591.         Set HW_KEYS_OPEN = $(TRUE)
  592.         Set HARDWARE_PUT_IN_REGISTRY = $(TRUE)
  593.         Set HWList = >($(HWList), +
  594.         $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  595.         Set HardNetCardKey      = $($R1)
  596.         Set HardNetRuleKey      = $($R2)
  597.         Set HardParameterKey    = $($R3)
  598.         Set AdapterNumber       = $($R4)
  599.         ifstr(i) $($R0) != "NO_ERROR"
  600.             set $R0 = "Error adding hardware to registry."
  601.             goto ForListDropThrough
  602.         endif
  603.         
  604.         ;
  605.         ; Set up and write general card information to registry.
  606.         ;
  607.         set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  608.         {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  609.         {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  610.         {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  611.         {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  612.         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  613.         Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  614.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  615.             goto ForListDropThrough
  616.         endif
  617.         ifstr(i) $($R0) != "NO_ERROR"
  618.             set $R0 = "Error adding general hardware info to registry."
  619.             goto ForListDropThrough
  620.         endif
  621.  
  622.         ;
  623.         ; Set up and write hardware parameters to registry.
  624.         ; Write:
  625.         ;   FullDuplexEnable, RcvBuffCnt, RequestedTTRT, XmtBuffCnt,
  626.         ;    BusNumber, SlotNumber
  627.         ;   Hardware parameters defined as constants
  628.         ;
  629.         set NewValueList = {{FullDuplexEnable,$(NoTitle),$(!REG_VT_DWORD),$(ParamFullDuplexEnable)},+
  630.         {RcvBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(ParamRcvBuffCnt)},+
  631.         {RequestedTTRT,$(NoTitle),$(!REG_VT_DWORD),$(ParamRequestedTTRT)},+
  632.         {XmtBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(ParamXmtBuffCnt)},+
  633.         {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  634.         {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  635.         Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  636.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  637.             goto ForListDropThrough
  638.         endif
  639.         ifstr(i) $($R0) != "NO_ERROR"
  640.             set $R0 = "Error adding programmable parameters to registry."
  641.             goto ForListDropThrough
  642.         endif
  643.         Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $($(Option)HardwareParamList)
  644.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  645.             goto ForListDropThrough
  646.         endif
  647.         ifstr(i) $($R0) != "NO_ERROR"
  648.             set $R0 = "Error adding hardware parameters to registry."
  649.             goto ForListDropThrough
  650.         endif
  651.  
  652.         ;
  653.         ; Set up and write hardware net rules.
  654.         ;
  655.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  656.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  657.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  658.         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  659.         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  660.         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  661.         Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  662.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  663.             goto ForListDropThrough
  664.         endif
  665.         ifstr(i) $($R0) != "NO_ERROR"
  666.             set $R0 = "Error adding hardware net rules to registry."
  667.             goto ForListDropThrough
  668.         endif
  669.     
  670.         ;
  671.         ; If we get here, we have successfully installed the HW.
  672.         ;
  673.         goto ThisForIterationDone
  674.     endif           ; end of "If DropThroughForList is false ..."
  675.  
  676. ForListDropThrough = +
  677.     set DropThroughForListDo = $(TRUE)
  678. ThisForIterationDone = +
  679.     ifint $(HW_KEYS_OPEN) == $(TRUE)
  680.         CloseRegKey $(HardNetCardKey)
  681.         CloseRegKey $(HardNetRuleKey)
  682.         CloseRegKey $(HardParameterKey)
  683.     endif
  684.  
  685.     EndForListDo
  686.     
  687.     CloseRegKey $(KeyProduct)
  688.     
  689.     ;
  690.     ; There are a number of ways to exit the above ForListDo.
  691.     ;   1. ShellCodeError - fatal, just go process the error 
  692.     ;                   SHOULD NEVER HAPPEN
  693.     ;   2. Error Condition - fatal, error message in R0
  694.     ;                   SHOULD NEVER HAPPEN
  695.     ;   3. Hardware not in registry
  696.     ;           a. user cancelled, remove software if just installed
  697.     ;                   THIS MAY HAPPEN
  698.     ;           b. all adapters previously installed
  699.     ;                   THIS MAY HAPPEN
  700.     ;   4. Success - just continue
  701.     ;                   THIS MAY HAPPEN
  702.     ;
  703.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  704.         goto ShellCodeError
  705.     endif
  706.     ifstr(i) $($R0) != "NO_ERROR"
  707.         goto fatal
  708.     endif
  709.     ifstr(i) $(HARDWARE_PUT_IN_REGISTRY) == $(FALSE)
  710.         ifstr(i) $(CommonStatus) == "STATUS_USERCANCEL"
  711.             goto AbandonComponentsInRegistry
  712.         endif
  713.         set $R0 = "All "$(Option)" adapters already installed."
  714.         goto fatal
  715.     endif
  716.     
  717.     EndWait
  718.     goto end
  719.     
  720.  
  721.  
  722. ;------------------------------------------------------------------------
  723. ; InstallMode = configure
  724. ; Came here straight from figuring out which platform we are on.
  725. ; Option, SrcDir, AddCopy, DoCopy, and DoConfig are valid.
  726. ;
  727. ; The whole purpose of this to to reconfigure ConnectionType.
  728. ;
  729. ;   Get a registry key (KeyProduct).
  730. ;   Get the hardware parameter key (KeyParameters).
  731. ;   Find the ConnectionType parameter location.
  732. ;   Put up the dialog box to get the new ConnectionType.
  733. ;   Write the new ConnectionType to the registry.
  734. ;
  735. configureadapter = +
  736.     ;
  737.     ; Can't configure software component
  738.     ;
  739.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  740.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  741.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  742.             goto ShellCodeError
  743.         endif
  744.         goto nonfatal
  745.     endif
  746.     
  747.     ;
  748.     ; Open the registry key to this product.
  749.     ;
  750.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  751.     Ifstr $(KeyProduct) == $(KeyNull)
  752.         Set $R0 = "Cannot find "$(ProductSoftwareName)" Service for "$(Option)
  753.         Goto fatal
  754.     Endif
  755.     
  756.     ;
  757.     ; FindService returns:  R0  RegistryErrorIndex
  758.     ;                       R1  KeyThisService
  759.     ;                       R2  KeyParameters
  760.     ;
  761.     Shell $(UtilityInf) FindService, $(KeyProduct)
  762.     CloseRegKey $(KeyProduct)
  763.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  764.     Goto ShellCodeError
  765.     Endif
  766.     ifstr(i) $($R0) != "NO_ERROR"
  767.     Goto fatal
  768.     endif
  769.     CloseRegKey $($R1)
  770.  
  771.     set KeyParameters = $($R2)
  772.     Ifstr $(KeyParameters) == $(KeyNull)
  773.     set $R0 = "Cannot find service for "$(Option)
  774.     goto fatal
  775.     endif
  776.     
  777.     ;
  778.     ; Read the parameters from the registry which are changeable from
  779.     ; the dialog box
  780.     ;
  781.  
  782.     EnumRegValue $(KeyParameters) ValueList
  783.     ForListDo $(ValueList)
  784.         set ValueItem = $($)
  785.         set ValueName = *($(ValueItem),1)
  786.         set ValueData = *($(ValueItem),4)
  787.         ifstr(i) $(ValueName) == "FullDuplexEnable"
  788.             set FullDuplexEnableIndex = $(ValueData)
  789.         else-ifstr(i) $(ValueName) == "RcvBuffCnt"
  790.             set RcvBuffCntIndex = $(ValueData)
  791.         else-ifstr(i) $(ValueName) == "XmtBuffCnt"
  792.             set XmtBuffCntIndex = $(ValueData) 
  793.         else-ifstr(i) $(ValueName) == "RequestedTTRT"
  794.             set RequestedTTRTIndex = $(ValueData)
  795.         endif
  796.     EndForListDo
  797.  
  798.     ;
  799.     ; Initialize the variables we need to feed into the dialog
  800.     ;
  801.  
  802.     Ifstr(i) $(FullDuplexEnableIndex) == 1
  803.         set RadioIn = {1}
  804.     else
  805.         set RadioIn = {2}
  806.     endif
  807.  
  808.     ifstr(i) $(RequestedTTRTIndex) == ""
  809.         set EditText1 = 8
  810.     else
  811.         set EditText1 = $(RequestedTTRTIndex)
  812.     endif
  813.  
  814.     set ReceiveBuffValue = *($(ReceiveBuffList), ~($(ReceiveBuffValues),$(RcvBuffCntIndex)))
  815.     ifstr(i) $(ReceiveBuffValue) == ""
  816.         set ReceiveBuffValue = 4
  817.     endif
  818.  
  819.     set TransmitBuffValue = *($(TransmitBuffList), ~($(TransmitBuffValues),$(XmtBuffCntIndex)))
  820.     ifstr(i) $(TransmitBuffValue) == ""
  821.         set TransmitBuffValue = 32
  822.     endif
  823.  
  824.     set RequestedTTRTValue = RequestedTTRTIndex
  825.     ifstr(i) $(RequestedTTRTValue) == ""
  826.         set RequestedTTRTValue = 8
  827.     endif
  828.  
  829.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  830.  
  831.     ;
  832.     ; Load the library containing the DLL
  833.     ;
  834.     
  835. restart = +
  836.     LoadLibrary "Disk 1" $(!STF_WINDOWSSYSPATH)"\"$(DialogDllName) hLib
  837.     
  838.     ;
  839.     ; Display the dialog box and free the library after completion
  840.     ;
  841.     ui start "InputDlg" $(hLib)
  842.     ui pop 1
  843.     FreeLibrary $(hLib)
  844.  
  845.     ifstr(i) $(DLGEVENT) != "CONTINUE"
  846.         set CommonStatus = STATUS_USERCANCEL
  847.         CloseRegKey $(KeyParameters)
  848.         goto end
  849.     endif
  850.  
  851.     ;
  852.     ; Determine the values set in the dialog
  853.     ;
  854.  
  855.     ifint *($(EditTextOut),1) < 4
  856.         shell $(subroutineinf) SetupMessage ENG NONFATAL "Requested TTRT must be between 4 and 165 ms"
  857.         goto restart
  858.     else-ifint *($(EditTextOut),1) > 165
  859.         shell $(subroutineinf) SetupMessage ENG NONFATAL "Requested TTRT must be between 4 and 165 ms"
  860.         goto restart
  861.     endif
  862.     set RequestedTTRTIndex = *($(EditTextOut),1)
  863.     set RcvBuffCntIndex = *($(ReceiveBuffValues), ~($(ReceiveBuffList),$(Combo1Out)))
  864.     set XmtBuffCntIndex = *($(TransmitBuffValues), ~($(TransmitBuffList),$(Combo2Out)))
  865.     ifstr(i) *($(RadioOut),1) == 1
  866.         Set FullDuplexEnableIndex = 1
  867.     else
  868.         Set FullDuplexEnableIndex = 2
  869.     endif
  870.  
  871.     ;
  872.     ; Write the new values to the registry
  873.     ;
  874.  
  875.     set NewValueList = {{RcvBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(RcvBuffCntIndex)},+
  876.                 {XmtBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(XmtBuffCntIndex)},+
  877.                 {FullDuplexEnable,$(NoTitle),$(!REG_VT_DWORD),$(FullDuplexEnableIndex)},+
  878.                 {RequestedTTRT,$(NoTitle),$(!REG_VT_DWORD),$(RequestedTTRTIndex)}}
  879.  
  880.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  881.     CloseRegKey $(KeyParameters)
  882.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  883.         goto ShellCodeError
  884.     endif
  885.     goto end
  886.  
  887. ;------------------------------------------------------------------------
  888. ; Binding adapter not supported.
  889. ; Option, SrcDir, AddCopy, DoCopy, and DoConfig are valid.
  890. ;
  891. bindingadapter =+
  892.     set $R0 = "Binding: not implemented."
  893.     goto fatal
  894.  
  895. ;------------------------------------------------------------------------
  896. ; Remove adapter.
  897. ; Option, SrcDir, AddCopy, DoCopy, and DoConfig are valid.
  898. ;
  899. ; All references to the adapter are to be deleted from the registry.
  900. ; Does NOT delete files.
  901. ;
  902. ;       If ProductKeyName is the registry base,
  903. ;         remove the software component.
  904. ;       Otherwise, remove the hardware component.
  905. ;       
  906. ; If it is the hardware component that is being removed, the NTN_RegBase
  907. ; will be: SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\#
  908. ; where # will be the DEFEA# of the card to be removed.  If the # is 1,
  909. ; while you are off doing RemoveHardwareComponent, RemoveSoftwareComponent
  910. ; will be called before control is returned to this .INF file.
  911. ;
  912. ; In theory, RemoveSoftwareComponent should never be called by this
  913. ; .INF file because it is done automatically when #1 is removed.
  914. ;
  915. removeadapter = +
  916.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  917.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  918.             $(ProductSoftwareName)
  919.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  920.             goto ShellCodeError
  921.         endif
  922.         ifstr(i) $($R0) != "NO_ERROR"
  923.             set $R0 = "Error removing software component."
  924.             goto fatal
  925.         endif
  926.     else
  927.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  928.             $(ProductSoftwareName), $(!NTN_RegBase)
  929.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  930.             goto ShellCodeError
  931.         endif
  932.         ifstr(i) $($R0) != "NO_ERROR"
  933.             set $R0 = "Error removing hardware component."
  934.             goto fatal
  935.         endif
  936.     endif
  937.     goto end
  938.  
  939. ;------------------------------------------------------------------------
  940. ; Upgrade software.
  941. ; Came here straight from figuring out which platform we are on.
  942. ; Option, SrcDir, AddCopy, DoCopy, and DoConfig are valid.
  943. ;
  944. ; If product exists in registry, copy help file and drivers.
  945. ;
  946. ; If this is implemented, also have to make sure all installed cards
  947. ; are supported by this .INF file (see [Options]).  Then need to update
  948. ; hardware parameters of the options.
  949. ;
  950. UpgradeSoftware = +
  951.     ;-------------------------------------------------------------------
  952.     ; Get the NT version (3.50 or ...)
  953.     ;-------------------------------------------------------------------
  954.     OpenRegKey $(!REG_H_LOCAL) "" $(VersionKeyName) $(MAXIMUM_ALLOWED) KeyVersion
  955.     GetRegValue $(KeyVersion),"CurrentVersion",VersionStruct
  956.     CloseRegKey $(KeyVersion)
  957.     Set NTVersion = *($(VersionStruct),4)
  958.     ;-------------------------------------------------------------------
  959.     ; Determine the platform and set the correct driver/help paths.
  960.     ;-------------------------------------------------------------------
  961.     set Help_Directory = "WINNT"
  962.     Ifstr $(!STF_PLATFORM) == "Alpha"
  963.         set Source_Directory = "WINNT\ALPHA"
  964.     else-ifstr $(!STF_PLATFORM) == "Mips"
  965.         set Source_Directory = "WINNT\MIPS"
  966.     else-ifstr $(!STF_PLATFORM) == "I386"
  967.         set Source_Directory = "WINNT\INTEL"
  968.     else-ifstr $(!STF_PLATFORM) == "ppc"
  969.         set $R0 = "Windows NT PowerPC drivers are not on this distribution."
  970.         goto fatal
  971.     else
  972.         set $R0 = "This platform is not recognized and not supported by this distribution."
  973.         goto fatal
  974.     endif
  975.     ;---------------------------------------------------------------
  976.     ; Make sure product exists in the registry
  977.     ;---------------------------------------------------------------
  978.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  979.     Ifstr $(KeyProduct) != $(KeyNull)
  980.     ;---------------------------------
  981.     ; Get the name of the INF file
  982.     ;---------------------------------
  983.     Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  984.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  985.         Debug-Output "ShellCode error"
  986.         goto ShellCodeError
  987.     endif
  988.     set !UG_Filename = $($R0)
  989.     ;---------------------------------
  990.     ; Copy the files if newer
  991.     ;---------------------------------
  992.     install "Install-Update"
  993.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  994.         goto fatal
  995.     endif
  996.     ;-----------------------------
  997.     ; Update the Version Number
  998.     ;-----------------------------
  999.     SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1000.     SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1001.     CloseRegKey $(KeyProduct)
  1002.     else
  1003.     set $R0 = "Upgrade not supported for the installed driver version."
  1004.     goto fatal
  1005.     endif
  1006.     goto end
  1007.  
  1008. ;------------------------------------------------------------------------
  1009. ; Shell Code Error.
  1010. ;
  1011. ShellCodeError = +
  1012.     set $R0 = "SHELL_CODE_ERROR"
  1013.     goto fatal
  1014.  
  1015. ;------------------------------------------------------------------------
  1016. ; Non fatal.
  1017. ;
  1018. ; Message to be displayed is in R0.
  1019. ;
  1020. nonfatal = +
  1021.     ;
  1022.     ; Set up status user cancel indicator.
  1023.     ;
  1024.     set CommonStatus = STATUS_USERCANCEL
  1025.     
  1026.     ;
  1027.     ; Print the error message, contained in $R0.
  1028.     ;
  1029.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $($R0)
  1030.     goto end
  1031.  
  1032. ;------------------------------------------------------------------------
  1033. ; Fatal.
  1034. ;
  1035. ; Message to be displayed is in R0.
  1036. ;
  1037. fatal = +
  1038.     ;
  1039.     ; Set up status failed indicator.
  1040.     ;
  1041.     set CommonStatus = STATUS_FAILED
  1042.     
  1043.     ;
  1044.     ; Print the error message, contained in $R0.
  1045.     ;
  1046.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $($R0)
  1047.     goto AbandonComponentsInRegistry
  1048.  
  1049. ;------------------------------------------------------------------------
  1050. ; AbandonComponentsInRegistry.
  1051. ;
  1052. ; No message to be displayed.
  1053. ;
  1054. AbandonComponentsInRegistry = +
  1055.     Ifint $(HARDWARE_PUT_IN_REGISTRY) == $(TRUE)
  1056.     ;
  1057.     ; Remove hardware components listed in HWList. 
  1058.     ; Since we only allow installation of one component, there will
  1059.     ; be only one component to remove.  RemoveHardwareComponent will 
  1060.     ; automatically remove the software component if this is the only
  1061.     ; hardware component, so we don't need to worry about removing
  1062.     ; the software component from here.
  1063.     ;
  1064.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1065.         $(ProductSoftwareName), $(HWList)
  1066.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1067.         goto AbandonError
  1068.     endif
  1069.     ifstr(i) $($R0) != "NO_ERROR"
  1070.         goto AbandonError
  1071.     endif
  1072.     
  1073.     else-Ifstr(i) $(SOFTWARE_PUT_IN_REGISTRY) == $(TRUE)
  1074.     ;
  1075.     ; If SOFTWARE_PUT_IN_REGISTRY is true, remove software component.
  1076.     ; We only need to do this if the hardware component was not removed.
  1077.     ;
  1078.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1079.         $(ProductSoftwareName), $(FALSE)
  1080.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1081.         goto AbandonError
  1082.     endif
  1083.     ifstr(i) $($R0) != "NO_ERROR"
  1084.         goto AbandonError
  1085.     endif
  1086.     endif        
  1087.     goto end
  1088.  
  1089. AbandonError = +
  1090.     set $R0 = "Couldn't remove registry components.  Registry may be corrupt."
  1091.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $($R0)
  1092.     goto end
  1093.  
  1094. ;------------------------------------------------------------------------
  1095. ; End.
  1096. ;
  1097. end = +
  1098.     Return $(CommonStatus)
  1099.  
  1100.  
  1101. ;***********************
  1102. ;* INSTALL SUBROUTINES *
  1103. ;***********************
  1104. [Install-AddList]
  1105.     set !STF_VITAL = 1
  1106.     AddSectionFilesToCopyList Files-Sys $(SrcDir)$(Source_Directory) $(!STF_WINDOWSSYSPATH)\drivers
  1107.     AddSectionFilesToCopyList Files-Hlp $(SrcDir)$(Help_Directory) $(!STF_WINDOWSSYSPATH)
  1108.     AddSectionFIlesToCopyList Files-Dll $(SrcDir)$(Source_Directory) $(!STF_WINDOWSSYSPATH)
  1109.     Exit
  1110.  
  1111. [Install-Update]
  1112.     set STF_VITAL        = ""
  1113.     set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1114.     AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1115.     AddSectionFilesToCopyList Files-Sys $(SrcDir)$(Source_Directory) $(!STF_WINDOWSSYSPATH)\drivers
  1116.     AddSectionFilesToCopyList Files-Hlp $(SrcDir)$(Help_Directory) $(!STF_WINDOWSSYSPATH)
  1117.     AddSectionFIlesToCopyList Files-Dll $(SrcDir)$(Source_Directory) $(!STF_WINDOWSSYSPATH)
  1118.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1119.     CopyFilesInCopyList
  1120.     Exit
  1121.  
  1122. [Install-CopyList]
  1123.     set !STF_VITAL = 1
  1124.     set !STF_NCPA_FLUSH_COPYLIST = $(TRUE)
  1125.     CopyFilesInCopyList
  1126.     Exit
  1127.  
  1128. ;*****************************
  1129. ;* SOURCE MEDIA DESCRIPTIONS *
  1130. ;*****************************
  1131. ;
  1132. ; This section is required.  Format is as follows:
  1133. ;   LineKey = (DiskDescription, TAGFILE = TagFileName)
  1134. ;
  1135. ;   LineKey         An integer (1-999) that identifies the line for 
  1136. ;                   later use. Must be consecutive, starting with 1.
  1137. ;
  1138. ;   DiskDescription Disk name string prompting the user to insert
  1139. ;                   the disk.
  1140. ;
  1141. ;   TagFileName     Specifies the name of the file whose presence
  1142. ;                   on the disk indicates to Setup that the correct
  1143. ;                   disk has been inserted.  Whitespace must 
  1144. ;                   surround the "=".
  1145. ;
  1146. [Source Media Descriptions]
  1147.     1  = "DEC FDDIcontroller/EISA Driver", TAGFILE = DISK1
  1148.  
  1149. ;
  1150. ; Info needed for AddSectionFilesToCopyList
  1151. ;       Format: DiskID, FileName, Option
  1152. ;
  1153. ; DiskID is an integer defined in Source Media Descriptions
  1154.  
  1155. [Files-Hlp]
  1156. 1,DEFDDI.HL_, SIZE=10000, DECOMPRESS, RENAME=DEFDDI.HLP
  1157.  
  1158. [Files-Sys]
  1159. 1,DEFEA.SY_ , SIZE=25000, DECOMPRESS, RENAME=DEFEA.SYS
  1160.  
  1161. [Files-Dll]
  1162. 1,DEFEA.DL_ , SIZE=2000, DECOMPRESS, RENAME=DEFEA.DLL
  1163.  
  1164. [Files-Inf]
  1165. 1,OEMSETUP.INF, SIZE=45000, RENAME=$(!UG_Filename)
  1166.  
  1167. ;***************
  1168. ;* DEFINITIONS *
  1169. ;***************
  1170. [LanguagesSupported]
  1171.     ENG
  1172.  
  1173. [OptionsTextENG]
  1174.     DEFEA = "DEC FDDIcontroller/EISA Adapter"
  1175.  
  1176. [FileConstantsENG]
  1177. DialogDllName = "defea.dll"
  1178. ProductSoftwareDescription = "DEC FDDIcontroller/EISA Driver"
  1179.  
  1180. FunctionDEFEATitle = "DEC FDDIcontroller/EISA Card Setup"
  1181. ProductHardwareDEFEADescription = "DEC FDDIcontroller/EISA Adapter"
  1182. ReceiveBuffList = ^(ReceiveBuffChoices,1)
  1183. ReceiveBuffValues = ^(ReceiveBuffChoices,2)
  1184. TransmitBuffList = ^(TransmitBuffChoices,1)
  1185. TransmitBuffValues = ^(TransmitBuffChoices,2)
  1186.  
  1187. ;**************************
  1188. ;* DIALOG BOX INFORMATION *
  1189. ;**************************
  1190. [DialogConstantsENG]
  1191. Help        = "&Help"
  1192. Exit        = "Cancel"
  1193. OK          = "OK"
  1194. Continue    = "Continue"
  1195. Cancel      = "Cancel"
  1196.  
  1197. [FileDependentDlgENG]
  1198. DlgTemplate = "DEFEA"
  1199. DlgType = "RadioCombination"
  1200. Caption = $(Function$(Option)Title)
  1201. Combo1 = "Receive Buffers:"
  1202. Combo2 = "Transmit Buffers:"
  1203. Edit1 = "Requested TTRT(ms):"
  1204. Group = "Full Duplex Enable"
  1205. Combo1List = $(ReceiveBuffList)
  1206. Combo1Out = $(ReceiveBuffValue)
  1207. Combo2List = $(TransmitBuffList)
  1208. Combo2Out = $(TransmitBuffValue)
  1209. ComboListItemsIn = {Combo1List,Combo2List}
  1210. ComboListItemsOut = {Combo1Out,Combo2Out}
  1211. EditTextLim = {3}
  1212. EditTextIn = {$(EditText1)}
  1213. EditTextOut = {$(EditText1)}
  1214. MinHelpId = 1
  1215. MaxHelpId = 10
  1216. HelpContext = $(Help$(Option)Id)
  1217.