home *** CD-ROM | disk | FTP | other *** search
/ Tiny System Restore Pack / RESTORE.iso / DRIVERS / NETWORK / E100B / OEMSETUP.INF < prev    next >
Encoding:
INI File  |  1997-01-08  |  37.6 KB  |  1,204 lines

  1. ;***********************************************************************
  2. ; Windows NT OEMSETUP.INF for
  3. ;
  4. ;       Intel 82557-based Ethernet PCI Adapter
  5. ;       Intel EtherExpress PRO/100B PCI Adapter
  6. ;       Intel EtherExpress PRO/10+ PCI Adapter
  7. ;
  8. ; Copyright⌐ 1994-1996 Intel Corporation.  All rights reserved.
  9. ;***********************************************************************
  10. ;
  11. ;       PROSet Version 1.4x
  12. ;       Driver Version 2.x
  13. ;       INF revision 27 (Disk version)
  14. ;
  15. ;       ------------------------------------------------------
  16. ;       Modify Log:
  17. ;       ------------------------------------------------------
  18. ;      12/13/96 DCH INF revision 28
  19. ;                Removed obsolete DLLs
  20. ;      12/4/96  RGB INF revision 27
  21. ;                - modified to place all product specific strings
  22. ;                  aliased at top of file
  23. ;                - added "Path" variable for Disk-based vs CD-based
  24. ;                  installation    
  25. ;      11/18/96  JCB INF revision 26
  26. ;                    added support for NDIS 4 detection/installation
  27. ;                    update now fixes up for NDIS 4
  28. ;       7/15/96  AH  INF revision 25
  29. ;                    Updated and removed obsolete registry entries.
  30. ;       6/28/96  AH  INF revision 24
  31. ;                    Added code for auto-detect multiple board installs
  32. ;       6/24/96  AH  INF revision 23
  33. ;                    Added copying of 557SET.HLP file.
  34. ;                    Removed copying of PROSET.CPL file.
  35. ;                    For now, branded adapter uses the 82557 name.
  36. ;       6/18/96  AH  INF works with NT 4.x, 3.51 and 3.50
  37. ;                    For manual and disk installs, allows installing
  38. ;                      and support of branded adapters.
  39. ;                    Added unattended install support
  40. ;                    Bug Fixes
  41. ;
  42. ;       6/12/96  AH  INF revision 22
  43. ;                    Added individual sections for PRO/100B
  44. ;                    Added individual sections for PRO/10+ PCI
  45. ;                    Added new registry parameters
  46. ;                    Bug Fixes
  47. ;                    Fixed Update button
  48. ;                    Updated adapter names
  49. ;
  50. ;       INF revision 20
  51. ;       Modified by Microsoft for NT 4.0
  52. ;
  53. ;***********************************************************************
  54.  
  55. [Identification]
  56.     OptionType = NetAdapter
  57.  
  58. [PlatformsSupported]
  59.     ISA
  60.     EISA
  61.     MCA
  62.     PCI
  63.    "Jazz-Internal Bus"
  64.  
  65. [LanguagesSupported]
  66.     ENG
  67.  
  68. [Options]
  69.     E100BPCI
  70.     E100BEXP
  71.     E10PPCI
  72.     E100BRWA
  73.  
  74. [OptionsTextENG]
  75.     E100BPCI  = "Intel 82557-based Ethernet PCI Adapter (10/100)"
  76.     E100BEXP  = "Intel EtherExpress PRO/100B PCI Adapter (TX or T4)"
  77.     E10PPCI   = "Intel EtherExpress PRO/10+ PCI Adapter"
  78.     E100BRWA  = "Intel EtherExpress PRO/100B PCI Adapter for Remote Wake Up Systems"
  79.  
  80. [FileConstants]
  81. Ctl3dName = "CTL3D32"
  82. NDIS3Name = "E100B"
  83. NDIS4Name = "E100BNT"
  84. ExeName   = "PROSET"
  85. Sp1Name   = "EP100DG"
  86. Sp3Name   = "SPDO3DG"
  87. KddName   = "PROKDD"
  88. ProdHelp  = "E100SET"
  89. GenHelp   = "557SET"
  90. DllName   = "EPRO100"
  91.  
  92. Manufacturer = "Intel"
  93.  
  94. ProductSoftwareName  = "E100B"
  95. ProductSoftwareTitle = "Intel 82557-based Ethernet PCI Adapter"
  96. ProductSoftwareImagePathNDIS3 = "%SystemRoot%\System32\drivers\e100b.sys"
  97. ProductSoftwareImagePathNDIS4 = "%SystemRoot%\System32\drivers\e100bnt.sys"
  98. NetRuleSoftwareType     = "E100BSys ndisDriver E100BDriver"
  99. NetRuleSoftwareBindForm = """E100BSys"" yes no container"
  100. NetRuleSoftwareClass    = {"E100BDriver basic"}
  101. NetRuleSoftwareBindable = {"E100BDriver E100BAdapter non exclusive 100"}
  102.  
  103. ImagePathNDIS3 = "\SystemRoot\System32\drivers\e100b.sys"
  104. ImagePathNDIS4 = "\SystemRoot\System32\drivers\e100bnt.sys"
  105.  
  106. Configure = "EPRO100_Configure"
  107. Detect = "EPRO100_Detect"
  108. Diagnose = "EPRO100_Diagnose"
  109. DLL = "EPRO100.DLL"
  110. RegistryKey = "EPRO100_GetRegistryKey"
  111. Summary = "EPRO100_Resource_Summary"
  112. AdapterDescription = "EPRO100_GetAdapterDescription"
  113. InstallAnyway = "EPRO100_InstallAnyway"
  114. DeviceExist = "EPRO100_DeviceExist"
  115. Adapter = "Intel 82557-based Ethernet PCI Adapter"
  116. Help = "E100SET.HLP"
  117.  
  118. ExeKeyName = $(!NTN_ServiceBase)"\PROSet"
  119. ExeAdapterName = "EPRO100"
  120. ExeParameters = "Parameters"
  121.  
  122. ProductHardwareName     = "E100B"
  123. ProductHardwareTitle    = "Intel 82557-based Ethernet PCI Adapter"
  124. ProductHardwareDescription = "Intel 82557-based Ethernet PCI Adapter or compatible"
  125. NetRuleHardwareType     = "E100B E100BAdapter"
  126. NetRuleHardwareBindForm = " yes yes container"
  127. NetRuleHardwareClass    = {"E100BAdapter basic"}
  128.  
  129. ProductHardwareE100BPCITitle       = $(ProductHardwareTitle)
  130. ProductHardwareE100BPCIDescription = $(ProductHardwareDescription)
  131.  
  132. ProductHardwareE100BEXPTitle       = $(ProductHardwareTitle)
  133. ProductHardwareE100BEXPDescription = $(ProductHardwareDescription)
  134.  
  135. ProductHardwareE10PPCITitle        = $(ProductHardwareTitle)
  136. ProductHardwareE10PPCIDescription  = $(ProductHardwareDescription)
  137.  
  138. ProductHardwareE100BRWATitle        = $(ProductHardwareTitle)
  139. ProductHardwareE100BRWADescription  = $(ProductHardwareDescription)
  140.  
  141. FuncTitle = "Intel 82557-based Ethernet PCI Adapter Setup"
  142. ProdSoftwareDescription = "Intel 82557-based Ethernet PCI Adapter Driver"
  143. ProdHardwareDescription = $(ProductHardwareTitle)
  144.  
  145. Disk1 = "Intel 82557-based EtherExpress Driver Disk"
  146.  
  147. ;-----------------------------------------------------------------------------
  148.  
  149. ;Path = ""               ; CD version
  150. Path = "NT\"   ; Disk version
  151.  
  152. BusNumber = "0,7,BusNumber,0,2,0,0,16,1"
  153. BusType = "0,7,BusType,0,2,5,2,5,1"
  154. BusTypeLocal = "0,7,BusTypeLocal,0,2,5,2,5,1"
  155. Eid = "0,7,Eid,0,2,0,0,4294967295,1"
  156. Fifo = "0,3,Fifo Depth,0,2,12,0,15,1"
  157. ForceDpx = "1,4,Duplex Mode,0,1,Auto,Auto,Half,Full"
  158. MediaType = "0,7,MediaType,0,2,1,1,1,1"
  159. MsPciScan = "0,4,MsPciScan,0,2,1,0,1,1"
  160. NumCoalesce = "1,7,Coalesce Buffers,0,2,8,1,32,1"
  161. NumRfd = "1,7,Receive Buffers,0,2,32,1,1024,1"
  162. NumTbd = "0,3,Transmit Buffer Descriptors,0,2,64,1,65535,1"
  163. NumTbdPerTcb = "0,4,Transmit Buffers per Frame,0,2,8,1,16,1"
  164. NumTcb = "1,7,Transmit Control Blocks,0,2,16,1,80,1"
  165. Off = "1,3,Off Timer,0,2,2,1,65535,1"
  166. On = "1,3,On Timer,0,2,32768,1,65535,1"
  167. RxDmaCount = "0,4,RxDmaCount,0,2,0,0,63,1"
  168. RxFifo = "0,4,Receive Fifo Depth,0,2,8,0,15,1"
  169. Slot = "0,3,Slot,0,2,0,0,64,1"
  170. Speed = "1,7,Network Speed,0,4,Auto,Auto,0,10Mbps,10,100Mbps,100"
  171. Threshold = "0,7,Transmit Threshold,0,2,16,0,200,1"
  172. TxDmaCount = "0,4,TxDmaCount,0,2,0,0,63,1"
  173. TxFifo = "0,4,Transmit Fifo Depth,0,2,8,0,15,1"
  174. UnderrunRetry = "0,4,UnderrunRetry,0,2,1,0,3,1"
  175. PerfOptims = "0,4,PerfOptims,0,2,0,0,65535,1"
  176.  
  177. UcodeSW = "0,7,UcodeSW,0,2,1,0,1,1"
  178. Adaptive_IFS = "0,7,Adaptive_IFS,0,2,1,0,255,1"
  179. Txmitwait = "0,7,Txmitwait,0,2,1,0,255,1"
  180.  
  181. OLD_1BYTE  = 139
  182. OLD_2BYTE  = 98
  183. NETCARD_ID = 25227
  184.  
  185. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  186. ParamKeyName   = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  187.  
  188. UtilityInf    = "UTILITY.INF"
  189. ParamInf      = "NCPARAM.INF"
  190. subroutineinf = "SUBROUTN.INF"
  191. SoftwareType  = "driver"
  192. Exit_Code     = 0
  193. NetRuleSoftwareUse = $(SoftwareType)
  194.  
  195. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  196. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  197.  
  198. ProductMajorVersion = "3"
  199. ProductMinorVersion = "0"
  200. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  201.  
  202. [Files-Inf]
  203. 1, oemsetup.inf, SIZE=50000, RENAME=$(!UG_Filename)
  204.  
  205. [Files-N3NDIS3]
  206. 1, $(Path)$(NDIS3Name).SY_, SIZE=50000, RENAME=$(NDIS3Name).SYS
  207.  
  208. [Files-N3NDIS4]
  209. 1, $(Path)$(NDIS4Name).SY_, SIZE=50000, RENAME=$(NDIS4Name).SYS
  210.  
  211. [Files-Exe]
  212. 1, $(Path)$(ExeName).EX_,  SIZE=50000, RENAME=$(ExeName).EXE
  213. 1, $(Path)$(ExeName).CP_,  SIZE=50000, RENAME=$(ExeName).CPL
  214. 1, $(Path)$(Sp1Name).DL_,  SIZE=50000, RENAME=$(Sp1Name).DLL
  215. 1, $(Path)$(ProdHelp).HL_, SIZE=50000, RENAME=$(ProdHelp).HLP
  216. 1, $(Path)$(GenHelp).HL_, SIZE=50000, RENAME=$(GenHelp).HLP
  217. 1, $(Path)$(DllName).DL_,  SIZE=50000, RENAME=$(DllName).DLL
  218. 1, $(Path)$(Ctl3dName).DL_,  SIZE=50000, RENAME=$(Ctl3dName).DLL
  219.  
  220.  
  221. [Files-Exe-Drivers]
  222. 1, $(Path)$(Sp3Name).SY_,  SIZE=50000, RENAME=$(Sp3Name).SYS
  223. 1, $(Path)$(KddName).SY_,  SIZE=50000, RENAME=$(KddName).SYS
  224.  
  225. [ProductType]
  226. STF_PRODUCT  = Winnt
  227. STF_PLATFORM = I386
  228.  
  229. [GeneralConstants]
  230. from = ""
  231. to   = ""
  232.  
  233. ExitCodeOk     = 0
  234. ExitCodeCancel = 1
  235. ExitCodeFatal  = 2
  236.  
  237. KeyNull = ""
  238. MAXIMUM_ALLOWED = 33554432
  239. RegistryErrorIndex = NO_ERROR
  240. KeyProduct = ""
  241. KeyParameters = ""
  242.  
  243. TRUE    = 1
  244. FALSE   = 0
  245. NoTitle = 0
  246.  
  247. ExitState = "Active"
  248. OldVersionExisted = $(FALSE)
  249.  
  250. DriverPath = $(!STF_NTPATH)\drivers
  251.  
  252. [FileConstantsENG]
  253. ProCaption   = "Windows NT Setup"
  254. ProCancel    = "Cancel"
  255. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  256.           "Are you sure you want to cancel copying files?"
  257.  
  258. ProCancelCap = "Network Setup Message"
  259. ProText1     = "Copying:"
  260. ProText2     = "To:"
  261.  
  262. FunctionTitle = $(FuncTitle)
  263. ProductSoftwareDescription = $(ProdSoftwareDescription)
  264. ProductHardwareDescription = $(ProdHardwareDescription)
  265.  
  266. [date]
  267.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  268.  
  269. [Source Media Descriptions]
  270.     1 = $(Disk1)
  271.  
  272. [Identify]
  273.     read-syms Identification
  274.  
  275. ;    set !G:DebugOutputControl = 1
  276.  
  277.     set Status     = STATUS_SUCCESSFUL
  278.     set Identifier = $(OptionType)
  279.     set Media      = #("Source Media Descriptions", 1, 1)
  280.  
  281.     Return $(Status) $(Identifier) $(Media)
  282.  
  283. [ReturnOptions]
  284.     set Status = STATUS_FAILED
  285.     set OptionList = {}
  286.     set OptionTextList = {}
  287.  
  288.     set LanguageList = ^(LanguagesSupported, 1)
  289.     Ifcontains(i) $($0) in $(LanguageList)
  290.        ifstr(i) $($1) == ""
  291.        goto returnoptions
  292.        endif
  293.  
  294.        set PlatformList = ^(PlatformsSupported, 1)
  295.        Ifcontains(i) $($1) in $(PlatformList)
  296.        goto returnoptions
  297.        else
  298.        set Status = STATUS_NOTSUPPORTED
  299.        goto finish_ReturnOptions
  300.        endif
  301.     else
  302.        set Status = STATUS_NOLANGUAGE
  303.        goto finish_ReturnOptions
  304.     endif
  305.  
  306. returnoptions = +
  307.     set OptionList = ^(Options, 1)
  308.     set OptionTextList = ^(OptionsText$($0), 1)
  309.     set Status = STATUS_SUCCESSFUL
  310.  
  311. finish_ReturnOptions = +
  312.     Return $(Status) $(OptionList) $(OptionTextList)
  313.  
  314. [InstallOption]
  315. ;    set !G:DebugOutputControl = 1
  316.     set Status   = STATUS_FAILED
  317.     set Option   = $($1)
  318.     set SrcDir   = $($2)
  319.     set AddCopy  = $($3)
  320.     set DoCopy   = $($4)
  321.     set DoConfig = $($5)
  322.  
  323.     set LanguageList = ^(LanguagesSupported, 1)
  324.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  325.        Return STATUS_NOLANGUAGE
  326.     endif
  327.  
  328.     set-subst LF = "\n"
  329.  
  330.     read-syms GeneralConstants
  331.     read-syms FileConstants
  332.  
  333.     ;read-syms DialogConstants$(!STF_LANGUAGE)
  334.     ifstr(i) $(!NTN_Origination) == "NCPA"
  335.        set Continue = "OK"
  336.     endif
  337.     read-syms FileConstants$(!STF_LANGUAGE)
  338.  
  339.     detect date
  340.  
  341.     set-title  $(FunctionTitle)
  342.  
  343.     set CurrentVersionValue = ""
  344.     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" $(!REG_KEY_READ) KeyWinNT
  345.     ifstr(i) $(KeyWinNT) != ""
  346.     GetRegValue $(KeyWinNT) "CurrentVersion" CurrentVersionValue
  347.     CloseRegKey $(KeyWinNT)
  348.     endif
  349.  
  350.     set m_WinNTVersion = *($(CurrentVersionValue),4)
  351.  
  352.     set to   = Begin
  353.     set from = Begin
  354.  
  355.     ifcontains(i) $(m_WinNTVersion) in {"3.50", "3.51"}
  356.     ; WinNT 3.5x
  357.     Shell $(UtilityInf), GetBusTypeNum
  358.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.        goto ShellCodeError
  360.     endif
  361.     Set PlatformList = ^(PlatformsSupported, 1)
  362.     Set MachineType = *($(PlatformList), $($R1))
  363.     else
  364.     ; WinNT 4.x
  365.     Set MachineType = $(!STF_BUSTYPE)
  366.     endif
  367.  
  368.     set CommonStatus = STATUS_SUCCESSFUL
  369.  
  370.     EndWait
  371.  
  372. Begin = +
  373.     Set ActivateDetection = FALSE
  374.  
  375.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  376.        set StartLabel = removeadapter
  377.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  378.        set StartLabel = UpgradeSoftware
  379.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  380.        set StartLabel = bindingadapter
  381.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  382.        set ActivateDetection = TRUE
  383.        set StartLabel = configureadapter
  384.  
  385.        ifstr(i) $(MachineType) == "MCA"
  386.        Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  387.           Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  388.        else
  389.           Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  390.        endif
  391.        set Error = $($R0)
  392.        set from = end
  393.        set to = end
  394.        goto nonfatalinfo
  395.        endif
  396.  
  397.        Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  398.        Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  399.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  400.           goto ShellCodeError
  401.        endif
  402.        set Error = $($R0)
  403.        set from = end
  404.        set to = end
  405.        goto nonfatalinfo
  406.        endif
  407.     else
  408.        set ActivateDetection = TRUE
  409.        set StartLabel = installadapter
  410.        set OEM_ABANDON_OPTIONS = {}
  411.        set OEM_ABANDON_SOFTWARE = FALSE
  412.        set OEM_ABANDON_ON = TRUE
  413.     endif
  414.  
  415.     Set DetectedCard = FALSE
  416.  
  417.     Ifstr(i) $(ActivateDetection) != TRUE
  418.        Goto $(StartLabel)
  419.     Endif
  420.  
  421.     ifstr(i) $(MachineType) == "MCA"
  422.        goto CheckForMCA
  423.     endif
  424.  
  425.     set IRQValue = *($(IRQList), 2)
  426.     set IOAddrValue = *($(IOAddrList), 1)
  427.     set IOReadyValue = *($(IOReadyList), 2)
  428.     set TransceiverValue = *($(TransceiverList), 4)
  429.  
  430.     Ifstr(i) $(!STF_NCDETECT) == YES
  431.        Ifstr(i) $(!STF_NCOPTION) == $(Option)
  432.       Set DetectedCard = TRUE
  433.        Endif
  434.     Endif
  435.  
  436.     Shell "" DebugConfiguration "After parameter querying"
  437.  
  438.     Set from = $(fatal)
  439.     Set to = $(fatal)
  440.     Goto $(StartLabel)
  441.  
  442. installadapter = +
  443.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  444.  
  445.     Ifstr $(KeyProduct) != $(KeyNull)
  446.        CloseRegKey $(KeyProduct)
  447.  
  448.        ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  449.       Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  450.           $(ProductVersion)
  451.       ifint $($ShellCode) != $(!SHELL_CODE_OK)
  452.           goto ShellCodeError
  453.       endif
  454.  
  455.       goto end
  456.        else
  457.       Shell $(UtilityInf), CardExistedDlg
  458.  
  459.       ifint $($ShellCode) != $(!SHELL_CODE_OK)
  460.           goto ShellCodeError
  461.       endif
  462.  
  463.       ifstr(i) $($R1) != "OK"
  464.           goto end
  465.       endif
  466.       set OldVersionExisted = $(TRUE)
  467.        endif
  468.     endif
  469.  
  470.     ifcontains(i) $(m_WinNTVersion) in {"3.50", "3.51"}
  471.     ; WinNT 3.5x
  472.     Ifstr(i) $(DetectedCard) != TRUE
  473.        Goto adaptersetup
  474.     Endif
  475.     else
  476.     ; WinNT 4.x
  477.     Goto adaptersetup
  478.     end
  479.  
  480. CheckForMCA = +
  481.     StartWait
  482.     Shell $(UtilityInf), MCAFindBus, $(OLD_1BYTE), $(OLD_2BYTE)
  483.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  484.        goto CheckForISA
  485.     endif
  486.     ifstr $($R0) != "NO_ERROR"
  487.        goto CheckForISA
  488.     endif
  489.     ifstr(i) $($R1) == {}
  490.        set Error = $(CANNOT_FIND_ANY_CARD)
  491.        set CommonStatus = USER_CANCEL
  492.        set from = "end"
  493.        goto nonfatal
  494.     endif
  495.     set AdapterList = $($R1)
  496.     goto skipoptions
  497.  
  498. CheckForISA = +
  499.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  500.     EndWait
  501.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  502.        Goto adaptersetup
  503.     Endif
  504.     Set DetectedParams = $($R1)
  505.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  506.  
  507.     goto adaptersetup
  508.  
  509. configureadapter = +
  510.     Ifstr $(KeyProduct) == $(KeyNull)
  511.        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  512.        Ifstr $(KeyProduct) == $(KeyNull)
  513.        set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  514.        goto fatalregistry
  515.        Endif
  516.     Endif
  517.     GetRegValue $(KeyProduct),"ServiceName", AdapterServiceKey
  518.     set AdapterServiceKey = *($(AdapterServiceKey),4)
  519.  
  520.     Shell $(UtilityInf) FindService, $(KeyProduct)
  521.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  522.        Goto ShellCodeError
  523.     Endif
  524.     Ifstr(i) $($R0) != NO_ERROR
  525.        Goto fatalregistry
  526.     endif
  527.  
  528.     Set KeyParameters = $($R2)
  529.  
  530.     CloseRegKey $($R1)
  531.  
  532.     Ifstr $(KeyParameters) == $(KeyNull)
  533.        set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  534.        goto fatalregistry
  535.     endif
  536.  
  537.     set OldVersionExisted = $(TRUE)
  538.  
  539.     set ValueName = ""
  540.     set ValueData = ""
  541.     set ValueStr  = ""
  542.     set ValueList = {}
  543.  
  544. adaptersetup = +
  545.     Shell "" DebugConfiguration "before displaying dialog"
  546.     Shell "" DebugConfiguration "After List Translation"
  547.  
  548.     Shell $(ParamInf) Param_ParameterConfidence
  549.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  550.        Goto adapteroptions
  551.     Endif
  552.  
  553.     Ifstr(i) $(DetectedCard) == TRUE
  554.        Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  555.        Goto adapterverify
  556.        Endif
  557.     Endif
  558.  
  559. adapteroptions = +
  560.     Set from = adapteroptions
  561.     ;read-syms FileDependentDlg$(!STF_LANGUAGE)
  562.  
  563. adapterverify = +
  564.     ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"}
  565.     ; WinNT 4.x
  566.     Goto skipoptions
  567.     endif
  568.  
  569.     Shell "" DebugConfiguration "after running dialog"
  570.  
  571.     Ifstr(i) $(DetectedCard) != TRUE
  572.        Goto skipoptions
  573.     Endif
  574.  
  575.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  576.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  577.        Goto skipoptions
  578.     Endif
  579.  
  580.     Set from = adapteroptions
  581.     Set to = skipoptions
  582.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  583.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  584.        goto ShellCodeError
  585.     endif
  586.     set Error = $($R0)
  587.     Goto Warning
  588.  
  589. skipoptions = +
  590.     ifint $(OldVersionExisted) == $(TRUE)
  591.        ifstr(i) $(!NTN_InstallMode) == configure
  592.        goto writeparameters
  593.        endif
  594.     endif
  595.     StartWait
  596.     ifint $(OldVersionExisted) == $(FALSE)
  597.        ifstr(i) $(!NTN_InstallMode) == "install"
  598.       Ifstr(i) $(DoCopy) == "YES"
  599.  
  600.          Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  601.  
  602.          Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  603.         Goto ShellCodeError
  604.          Else-Ifstr(i) $($R0) == STATUS_FAILED
  605.         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  606.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  607.             goto ShellCodeError
  608.         endif
  609.         set Error = $($R0)
  610.         Goto fatal
  611.          Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  612.         Goto successful
  613.          Endif
  614.  
  615.          Set SrcDir = $($R1)
  616.  
  617.       Endif
  618.  
  619.       install "Install-Option"
  620.       ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  621.          Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  622.          ifint $($ShellCode) != $(!SHELL_CODE_OK)
  623.         goto ShellCodeError
  624.          endif
  625.          set Error = $($R0)
  626.          goto fatal
  627.       endif
  628.        endif
  629.  
  630.        ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"}
  631.       ; WinNT 4.X
  632.       Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  633.       $(ProductSoftwareName), +
  634.       $(ProductSoftwareName), +
  635.       $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  636.       $(ProductSoftwareImagePathNDIS4), "kernel", "NDIS", {}, "",+
  637.       $(NetEventDLL)
  638.        else
  639.       ; WinNT 3.51
  640.       Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  641.       $(ProductSoftwareName), +
  642.       $(ProductSoftwareName), +
  643.       $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  644.       $(ProductSoftwareImagePathNDIS3), "kernel", "NDIS", {}, "",+
  645.       $(NetEventDLL)
  646.        endif
  647.  
  648.        Set OEM_ABANDON_SOFTWARE = TRUE
  649.  
  650.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  651.        goto ShellCodeError
  652.        endif
  653.  
  654.        set RegistryErrorIndex = $($R0)
  655.        set KeyProduct      = $($R1)
  656.        Set SoftNetRulesKey = $($R2)
  657.        CloseRegKey $($R3)
  658.        CloseRegKey $($R4)
  659.        CloseRegKey $($R5)
  660.  
  661.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  662.        EndWait
  663.        CloseRegKey $(KeyProduct)
  664.        CloseRegKey $(SoftNetRulesKey)
  665.        goto fatalregistry
  666.        endif
  667.  
  668.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  669.             {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  670.             {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  671.             {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  672.             {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  673.             {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  674.             {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  675.  
  676.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  677.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  678.        goto ShellCodeError
  679.        endif
  680.  
  681.        set RegistryErrorIndex = $($R0)
  682.  
  683.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  684.        EndWait
  685.        CloseRegKey $(KeyProduct)
  686.        CloseRegKey $(SoftNetRulesKey)
  687.        goto fatalregistry
  688.        endif
  689.  
  690.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  691.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  692.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  693.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  694.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  695.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  696.  
  697.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  698.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  699.        goto ShellCodeError
  700.        endif
  701.  
  702.        set RegistryErrorIndex = $($R0)
  703.  
  704.        CloseRegKey $(KeyProduct)
  705.        CloseRegKey $(SoftNetRulesKey)
  706.  
  707.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  708.        EndWait
  709.        goto fatalregistry
  710.        endif
  711.     endif
  712.  
  713. ; Assume a single item in m_AdapterList except for
  714. ; if STF_NCDETECT is NO (Not using auto-detect, installing using the Add button).
  715. set m_AdapterList = {"Item1"}
  716.  
  717. Ifstr(i) $(!NTN_InstallMode) == install
  718.     Ifstr(i) $(!STF_NCDETECT) == YES
  719.     ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"}
  720.           ; WinNT 4.x only
  721.           set Vendor =  32902         ;; 0x8086 is 82557 Vendor ID
  722.           set CFID =  4649            ;; 0x1229 is 82557 Device ID
  723.           Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CFID)
  724.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  725.              goto ShellCodeError
  726.           endif
  727.           ifstr(i) $($R0) == {}
  728.              set Error = $(CANNOT_FIND_ANY_CARD)
  729.              set CommonStatus = USER_CANCEL
  730.              set from = end
  731.              goto nonfatal
  732.           endif
  733.           set m_AdapterList = $($R0)
  734.     endif
  735.     endif
  736. endif
  737.  
  738. ForListDo $(m_AdapterList)
  739.     ; Shell "Subroutn.Inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" "In For Loop!"
  740.  
  741.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  742.  
  743.     ifint $($R4) != -1
  744.        Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  745.     endif
  746.  
  747.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  748.        goto ShellCodeError
  749.     endif
  750.  
  751.     set RegistryErrorIndex = $($R0)
  752.  
  753.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  754.        EndWait
  755.        CloseRegKey $($R1)
  756.        CloseRegKey $($R2)
  757.        CloseRegKey $($R3)
  758.        goto fatalregistry
  759.     endif
  760.  
  761.     set KeyParameters = $($R3)
  762.     set KeyAdapterRules = $($R2)
  763.     set AdapterNumber = $($R4)
  764.  
  765.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  766.              {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  767.              {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  768.              {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  769.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  770.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  771.  
  772.     set AdapterServiceKey = $($R5)
  773.  
  774.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  775.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  776.        goto ShellCodeError
  777.     endif
  778.  
  779.     CloseRegKey $($R1)
  780.  
  781.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  782.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  783.  
  784.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  785.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  786.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  787.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  788.  
  789.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  790.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  791.        goto ShellCodeError
  792.     endif
  793.  
  794.     set RegistryErrorIndex = $($R0)
  795.  
  796.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  797.        EndWait
  798.        CloseRegKey $(KeyParameters)
  799.        CloseRegKey $(KeyAdapterRules)
  800.        goto fatalregistry
  801.     endif
  802.  
  803.     CloseRegKey $(KeyAdapterRules)
  804.  
  805.     goto writeparameters
  806.  
  807. writeparameters = +
  808.     Shell $(UtilityInf), GetBusTypeNum
  809.     set BusTypeNum = $($R1)
  810.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  811.        goto ShellCodeError
  812.     endif
  813.        Set IOAddrValue = *($(IOAddrValues), ~($(IOAddrList),$(IOAddrValue)))
  814.        Shell "" DebugConfiguration "Before Writing Parameters"
  815.        set NewValueList = {{Eid,$(NoTitle),$(!REG_VT_DWORD),0)}}
  816.  
  817.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  818.  
  819.     CloseRegKey $(KeyParameters)
  820.  
  821.    OpenRegKey $(!REG_H_LOCAL) "" $(ExeKeyName)"\"Adapters $(MAXIMUM_ALLOWED) ExeAdapterKey
  822.    ifstr $(ExeAdapterKey) == $(KeyNull)
  823.       CreateRegKey $(!REG_H_LOCAL) {$(ExeKeyName)"\"Adapters,0,GenericClass} "" +
  824.          $(MAXIMUM_ALLOWED) "" ExeAdapterKey
  825.       ifstr $(ExeAdapterKey) == $(KeyNull)
  826.     Shell "Subroutn.Inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" CreateRegAdapterFailed
  827.     goto fatalregistry
  828.       endif
  829.    endif
  830.  
  831.    set NewValueList = {{$(ExeAdapterName),$(NoTitle), $(!REG_VT_SZ), $(Adapter)}}
  832.        Shell  $(UtilityInf), AddValueList, $(ExeAdapterKey), $(NewValueList)
  833.        CloseRegKey $(ExeAdapterKey)
  834.  
  835.    OpenRegKey $(!REG_H_LOCAL) "" $(ExeKeyName)"\"$(ExeAdapterName) $(MAXIMUM_ALLOWED) ExeAdapterKey
  836.    ifstr $(ExeAdapterKey) == $(KeyNull)
  837.       CreateRegKey $(!REG_H_LOCAL) {$(ExeKeyName)"\"$(ExeAdapterName),0,GenericClass} "" +
  838.          $(MAXIMUM_ALLOWED) "" ExeAdapterKey
  839.       ifstr $(ExeAdapterKey) == $(KeyNull)
  840.     Shell "Subroutn.Inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" CreateRegCardFailed
  841.     goto fatalregistry
  842.       endif
  843.    endif
  844.    set NewValueList = {{Configure,$(NoTitle),$(!REG_VT_SZ),$(Configure)},+
  845.              {Detect,$(NoTitle),$(!REG_VT_SZ),$(Detect)},+
  846.              {Diagnose,$(NoTitle),$(!REG_VT_SZ),$(Diagnose)},+
  847.              {DLL,$(NoTitle),$(!REG_VT_SZ),$(DLL)},+
  848.              {Help,$(NoTitle),$(!REG_VT_SZ),$(Help)},+
  849.              {RegistryKey,$(NoTitle),$(!REG_VT_SZ),$(RegistryKey)},+
  850.              {AdapterDescription,$(NoTitle),$(!REG_VT_SZ),$(AdapterDescription)},+
  851.              {InstallAnyway,$(NoTitle),$(!REG_VT_SZ),$(InstallAnyway)},+
  852.              {DeviceExist,$(NoTitle),$(!REG_VT_SZ),$(DeviceExist)},+
  853.              {Summary,$(NoTitle),$(!REG_VT_SZ),$(Summary)}}
  854.    Shell  $(UtilityInf), AddValueList, $(ExeAdapterKey), $(NewValueList)
  855.    CloseRegKey $(ExeAdapterKey)
  856.  
  857.    OpenRegKey $(!REG_H_LOCAL) "" $(ExeKeyName)"\"$(ExeAdapterName)"\"$(ExeParameters) $(MAXIMUM_ALLOWED) ExeAdapterKey
  858.    ifstr $(ExeAdapterKey) == $(KeyNull)
  859.       CreateRegKey $(!REG_H_LOCAL) {$(ExeKeyName)"\"$(ExeAdapterName)"\"$(ExeParameters),0,GenericClass} "" +
  860.          $(MAXIMUM_ALLOWED) "" ExeAdapterKey
  861.       ifstr $(ExeAdapterKey) == $(KeyNull)
  862.     Shell "Subroutn.Inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" CreateRegCardFailed
  863.     goto fatalregistry
  864.       endif
  865.    endif
  866.    set NewValueList = { +
  867.              {BusNumber,$(NoTitle),$(!REG_VT_SZ),$(BusNumber)}, +
  868.              {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)}, +
  869.              {BusTypeLocal,$(NoTitle),$(!REG_VT_SZ),$(BusTypeLocal)}, +
  870.              {Eid,$(NoTitle),$(!REG_VT_SZ),$(Eid)}, +
  871.              {Fifo,$(NoTitle),$(!REG_VT_SZ),$(Fifo)}, +
  872.              {ForceDpx,$(NoTitle),$(!REG_VT_SZ),$(ForceDpx)}, +
  873.              {MapRegisters,$(NoTitle),$(!REG_VT_SZ),$(MapRegisters)}, +
  874.              {MediaType,$(NoTitle),$(!REG_VT_SZ),$(MediaType)}, +
  875.              {MsPciScan,$(NoTitle),$(!REG_VT_SZ),$(MsPciScan)}, +
  876.              {NumCoalesce,$(NoTitle),$(!REG_VT_SZ),$(NumCoalesce)}, +
  877.              {NumRfd,$(NoTitle),$(!REG_VT_SZ),$(NumRfd)}, +
  878.              {NumTbd,$(NoTitle),$(!REG_VT_SZ),$(NumTbd)}, +
  879.              {NumTbdPerTcb,$(NoTitle),$(!REG_VT_SZ),$(NumTbdPerTcb)}, +
  880.              {NumTcb,$(NoTitle),$(!REG_VT_SZ),$(NumTcb)}, +
  881.              {Off,$(NoTitle),$(!REG_VT_SZ),$(Off)}, +
  882.              {On,$(NoTitle),$(!REG_VT_SZ),$(On)}, +
  883.              {RxDmaCount,$(NoTitle),$(!REG_VT_SZ),$(RxDmaCount)}, +
  884.              {RxFifo,$(NoTitle),$(!REG_VT_SZ),$(RxFifo)}, +
  885.              {Slot,$(NoTitle),$(!REG_VT_SZ),$(Slot)}, +
  886.              {Speed,$(NoTitle),$(!REG_VT_SZ),$(Speed)}, +
  887.              {Threshold,$(NoTitle),$(!REG_VT_SZ),$(Threshold)}, +
  888.              {TxDmaCount,$(NoTitle),$(!REG_VT_SZ),$(TxDmaCount)}, +
  889.              {TxFifo,$(NoTitle),$(!REG_VT_SZ),$(TxFifo)}, +
  890.              {UnderrunRetry,$(NoTitle),$(!REG_VT_SZ),$(UnderrunRetry)}, +
  891.              {PerfOptims,$(NoTitle),$(!REG_VT_SZ),$(PerfOptims)}, +
  892.              {UcodeSW,$(NoTitle),$(!REG_VT_SZ),$(UcodeSW)}, +
  893.              {Adaptive_IFS,$(NoTitle),$(!REG_VT_SZ),$(Adaptive_IFS)}, +
  894.              {Txmitwait,$(NoTitle),$(!REG_VT_SZ),$(Txmitwait)}, +
  895.              }
  896.  
  897.     Shell  $(UtilityInf), AddValueList, $(ExeAdapterKey), $(NewValueList)
  898.     CloseRegKey $(ExeAdapterKey)
  899.  
  900.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  901.        goto ShellCodeError
  902.     endif
  903.  
  904.     set RegistryErrorIndex = $($R0)
  905.  
  906.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  907.        goto fatalregistry
  908.     endif
  909.  
  910.     EndWait
  911.  
  912.     ifstr(i) $(!STF_GUI_UNATTENDED) == YES
  913.     RunProgram ExitCode "" "" $(!STF_WINDOWSSYSPATH)\$(ExeName).EXE /BATCH $(AdapterServiceKey)
  914.     else
  915.     RunProgram ExitCode "" "" $(!STF_WINDOWSSYSPATH)\$(ExeName).EXE $(AdapterServiceKey)
  916.     endif
  917.  
  918.     Ifstr(i) $(!NTN_InstallMode) != configure
  919.       ifint $(ExitCode) >= 2
  920.          set CommonStatus = STATUS_USERCANCEL
  921.     goto abandon
  922.       endif
  923.     else
  924.       ifint $(ExitCode) == 0
  925.          set CommonStatus = STATUS_NO_EFFECT
  926.       endif
  927.       ifint $(ExitCode) == 2
  928.      set CommonStatus = STATUS_NO_EFFECT
  929.       endif
  930.     endif
  931.  
  932. ; For auto-detect case, we need this
  933. ; For non-auto detect case, we still need this for the dummy item
  934. ; For all other, we don't need it
  935. Ifstr(i) $(!NTN_InstallMode) == install
  936.        EndForListDo
  937. endif
  938.  
  939.     goto successful
  940.  
  941. bindingadapter =+
  942.     set Error = "Binding: Sorry, not yet implemented."
  943.     goto fatal
  944.  
  945. removeadapter = +
  946.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  947.        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  948.        $(ProductSoftwareName)
  949.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  950.        goto ShellCodeError
  951.        endif
  952.  
  953.        set RegistryErrorIndex = $($R0)
  954.  
  955.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  956.        goto fatalregistry
  957.        endif
  958.     else
  959.        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  960.        $(ProductSoftwareName), $(!NTN_RegBase)
  961.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  962.        goto ShellCodeError
  963.        endif
  964.  
  965.        set RegistryErrorIndex = $($R0)
  966.  
  967.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  968.        goto fatalregistry
  969.        endif
  970.     endif
  971.  
  972.     goto end
  973.  
  974. UpgradeSoftware = +
  975.    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  976.    Ifstr $(KeyProduct) != $(KeyNull)
  977.        Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  978.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  979.        goto ShellCodeError
  980.        endif
  981.        set !UG_Filename = $($R0)
  982.        install "Install-Update"
  983.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  984.        goto fatal
  985.        endif
  986.        SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  987.        SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  988.        CloseRegKey $(KeyProduct)
  989.    else
  990.        goto fatalregistry
  991.    endif
  992.  
  993.    set KeyProduct = ""
  994.  
  995.    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(MAXIMUM_ALLOWED) KeyProduct
  996.    Ifstr $(KeyProduct) != $(KeyNull)
  997.       ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"}
  998.      ; WinNT 4.x
  999.      set NewRegValueList = {+
  1000.         {ImagePath,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(ImagePathNDIS4)}}
  1001.       else
  1002.      ; WinNT 3.5x
  1003.      set NewRegValueList = {+
  1004.         {ImagePath,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(ImagePathNDIS3)}}
  1005.       endif
  1006.       Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewRegValueList)
  1007.       CloseRegKey $(KeyProduct)
  1008.    else
  1009.       goto fatalregistry
  1010.    endif
  1011.  
  1012.    goto end
  1013.  
  1014. successful = +
  1015.     goto end
  1016.  
  1017. abandon = +
  1018.     ForListDo $(OEM_ABANDON_OPTIONS)
  1019.        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1020.        $(ProductSoftwareName), $($)
  1021.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1022.        goto ShellCodeError
  1023.        endif
  1024.  
  1025.        set RegistryErrorIndex = $($R0)
  1026.  
  1027.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1028.        goto fatalregistry
  1029.        endif
  1030.     EndForListDo
  1031.  
  1032.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1033.        ; Remove Software Component
  1034.        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1035.        $(ProductSoftwareName), FALSE
  1036.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1037.        goto ShellCodeError
  1038.        endif
  1039.  
  1040.        set RegistryErrorIndex = $($R0)
  1041.  
  1042.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1043.        goto fatalregistry
  1044.        endif
  1045.     endif
  1046.  
  1047.     goto end
  1048.  
  1049. warning = +
  1050.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1051.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1052.        goto ShellCodeError
  1053.     endif
  1054.     ifstr(i) $($R1) == "OK"
  1055.        goto $(to)
  1056.     else-ifstr(i) $($R1) == "CANCEL"
  1057.        goto $(from)
  1058.     else
  1059.        goto "end"
  1060.     endif
  1061.  
  1062. nonfatalinfo = +
  1063.     Set Severity = STATUS
  1064.     Set CommonStatus = STATUS_USERCANCEL
  1065.     goto nonfatalmsg
  1066.  
  1067. nonfatal = +
  1068.     Set Severity = NONFATAL
  1069.     goto nonfatalmsg
  1070.  
  1071. nonfatalmsg = +
  1072.     ifstr(i) $(Error) == ""
  1073.        Set Severity = NONFATAL
  1074.        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1075.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1076.        goto ShellCodeError
  1077.        endif
  1078.        set Error = $($R0)
  1079.     endif
  1080.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1081.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1082.        goto ShellCodeError
  1083.     endif
  1084.     ifstr(i) $($R1) == "OK"
  1085.        goto $(from)
  1086.     else
  1087.        goto "end"
  1088.     endif
  1089.  
  1090. fatalregistry = +
  1091.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1092.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1093.        goto ShellCodeError
  1094.     endif
  1095.     set Error = $($R0)
  1096.     goto fatal
  1097.  
  1098. fataldetect = +
  1099.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1100.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1101.        goto ShellCodeError
  1102.     endif
  1103.     set Error = $($R0)
  1104.     Goto fatal
  1105.  
  1106. fatal = +
  1107.     ifstr(i) $(Error) == ""
  1108.        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1109.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1110.        goto ShellCodeError
  1111.        endif
  1112.        set Error = $($R0)
  1113.     endif
  1114.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1115.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1116.        goto ShellCodeError
  1117.     endif
  1118.  
  1119.     goto setfailed
  1120.  
  1121. ShellCodeError = +
  1122.     set DlgType      = "MessageBox"
  1123.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  1124.     set STF_MB_TEXT  = "Shell Code Error"
  1125.     set STF_MB_TYPE  = 1
  1126.     set STF_MB_ICON  = 3
  1127.     set STF_MB_DEF   = 1
  1128.     ui start "Error Message"
  1129.     goto setfailed
  1130.  
  1131. setfailed = +
  1132.     set CommonStatus = STATUS_FAILED
  1133.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1134.        set OEM_ABANDON_ON = FALSE
  1135.        goto abandon
  1136.     endif
  1137.     goto end
  1138.  
  1139. end = +
  1140.     goto term
  1141.  
  1142. term = +
  1143.     Return $(CommonStatus)
  1144.  
  1145. [DebugConfiguration]
  1146. ;   Set InfName = "OEMNADIN.INF"
  1147.     return
  1148.  
  1149. [Install-Option]
  1150.     set STF_VITAL = ""
  1151.     ifstr(i) $(AddCopy) == "YES"
  1152.     ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"}
  1153.         ; WinNT 4.x
  1154.         AddSectionFilesToCopyList Files-N3NDIS4 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1155.     else
  1156.         ; WinNT 3.5x
  1157.         AddSectionFilesToCopyList Files-N3NDIS3 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1158.     endif
  1159.  
  1160.     AddSectionFilesToCopyList Files-Exe $(SrcDir)  $(!STF_WINDOWSSYSPATH)
  1161.     AddSectionFilesToCopyList Files-Exe-Drivers $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1162.     endif
  1163.  
  1164.     ifstr(i) $(DoCopy) == "YES"
  1165.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1166.        CopyFilesInCopyList
  1167.     else
  1168.        ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"}
  1169.        ; WinNT 4.x
  1170.        LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(ExeName).EXE  $(!STF_WINDOWSSYSPATH)\$(ExeName).EXE
  1171.            LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(Sp1Name).DLL  $(!STF_WINDOWSSYSPATH)\$(Sp1Name).DLL             
  1172.        LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(ProdHelp).HLP $(!STF_WINDOWSSYSPATH)\$(ProdHelp).HLP
  1173.        LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(GenHelp).HLP $(!STF_WINDOWSSYSPATH)\$(GenHelp).HLP
  1174.        LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(DllName).DLL  $(!STF_WINDOWSSYSPATH)\$(DllName).DLL
  1175.        LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(Sp3Name).SYS  $(!STF_WINDOWSSYSPATH)\DRIVERS\$(Sp3Name).SYS
  1176.        LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(KddName).SYS  $(!STF_WINDOWSSYSPATH)\DRIVERS\$(KddName).SYS
  1177.        LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\$(Path)$(Ctl3dName).DLL  $(!STF_WINDOWSSYSPATH)\DRIVERS\$(Ctl3dName).DLL
  1178.        endif
  1179.     endif
  1180.  
  1181.     Exit
  1182.  
  1183. [Install-Update]
  1184.    set STF_VITAL     = ""
  1185.    set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1186.  
  1187.    ifcontains(i) $(m_WinNTVersion) not-in {"3.50", "3.51"}
  1188.        ; WinNT 4.x
  1189.        AddSectionFilesToCopyList Files-N3NDIS4 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1190.    else
  1191.        ; WinNT 3.5x
  1192.        AddSectionFilesToCopyList Files-N3NDIS3 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1193.    endif
  1194.  
  1195.  
  1196.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1197.    AddSectionFilesToCopyList Files-Exe $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1198.    AddSectionFilesToCopyList Files-Exe-Drivers   $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1199.  
  1200.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1201.    CopyFilesInCopyList
  1202.  
  1203.    Exit
  1204.