home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 August / VPR9708B.ISO / DRIVER / DEC / DE450260 / OEMSETNT.INF < prev    next >
INI File  |  1996-12-27  |  42KB  |  1,210 lines

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