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