Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

882 lines
31 KiB

  1. [Identification]
  2. OptionType = NetAdapter
  3. [PlatformsSupported]
  4. EISA
  5. "Jazz-Internal Bus"
  6. ; Oct-18-95
  7. ;
  8. ; CPQTOK is here for compatiblity with past installations.
  9. ; On Release 3.51, some Maple cards may have been isntalled
  10. ; as the CPQTOK, since MAPLE had not yet been added to this inf
  11. ; or the product.
  12. ;
  13. ; The CPQTOK will never be autodetected; and will not show up
  14. ; in present selection lists.
  15. ;
  16. [Options]
  17. CPQTOK
  18. BONSAI
  19. RODAN
  20. NETFLX
  21. DURANGO
  22. MAPLE
  23. [FileConstants]
  24. UtilityInf = "UTILITY.INF"
  25. subroutineinf = "SUBROUTN.INF"
  26. SoftwareType = "driver"
  27. Exit_Code = 0
  28. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  29. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  30. NETFLX_1BYTE = 6361358
  31. DURANGO_1BYTE = 6295822
  32. MAPLE_1BYTE = 6295822
  33. BONSAI_1BYTE = 6426894
  34. RODAN_1BYTE = 6492430
  35. BonsaiString = "BONSAI"
  36. RodanString = "RODAN"
  37. Manufacturer = "Microsoft"
  38. ProductMajorVersion = "4"
  39. ProductMinorVersion = "0"
  40. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  41. ProductSoftwareName = "NETFLX"
  42. ProductSoftwareImagePath = "\SystemRoot\system32\drivers\netflx.sys"
  43. NetRuleSoftwareType = "netflxSys ndisDriver netflxDriver"
  44. NetRuleSoftwareUse = $(SoftwareType)
  45. NetRuleSoftwareBindForm = """NetflxSys"" yes no container"
  46. NetRuleSoftwareClass = {"netflxDriver basic"}
  47. NetRuleSoftwareBindable = {"netflxDriver netflxAdapter non exclusive 100"}
  48. ProductHardwareName = "NETFLX"
  49. NetRuleHardwareType = "netflx netflxAdapter"
  50. NetRuleHardwareBindForm = " yes yes container"
  51. NetRuleHardwareClass = {"netflxAdapter basic"}
  52. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  53. ProductOtherOpSupport = 132 ; 0x0084 ; Display,Removable,Not Properties,Not Updatable
  54. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  55. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  56. NetCardKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\Windows NT\CurrentVersion\NetworkCards"
  57. [GeneralConstants]
  58. from = ""
  59. to = ""
  60. ExitCodeOk = 0
  61. ExitCodeCancel = 1
  62. ExitCodeFatal = 2
  63. KeyNull = ""
  64. MAXIMUM_ALLOWED = 33554432
  65. RegistryErrorIndex = NO_ERROR
  66. KeyProduct = ""
  67. KeyParameters = ""
  68. TRUE = 1
  69. FALSE = 0
  70. NoTitle = 0
  71. ExitState = "Active"
  72. OldVersionExisted = $(FALSE)
  73. DriverPath = $(!STF_NTPATH)\drivers
  74. AdpList = {}
  75. DualNicList = {}
  76. AddAdpCount = 0
  77. [date]
  78. Now = {} ? $(!LIBHANDLE) GetSystemDate
  79. [Identify]
  80. read-syms Identification
  81. set Status = STATUS_SUCCESSFUL
  82. set Identifier = $(OptionType)
  83. set Media = #("Source Media Descriptions", 1, 1)
  84. Return $(Status) $(Identifier) $(Media)
  85. [ReturnOptions]
  86. set Status = STATUS_FAILED
  87. set OptionList = {}
  88. set OptionTextList = {}
  89. set LanguageList = ^(LanguagesSupported, 1)
  90. Ifcontains(i) $($0) in $(LanguageList)
  91. ifstr(i) $($1) == ""
  92. goto returnoptions
  93. endif
  94. set PlatformList = ^(PlatformsSupported, 1)
  95. Ifcontains(i) $($1) in $(PlatformList)
  96. goto returnoptions
  97. else
  98. set Status = STATUS_NOTSUPPORTED
  99. goto finish_ReturnOptions
  100. endif
  101. else
  102. set Status = STATUS_NOLANGUAGE
  103. goto finish_ReturnOptions
  104. endif
  105. returnoptions = +
  106. set TempOptionList = ^(Options, 1)
  107. set TempOptionTextList = ^(OptionsText$($0), 1)
  108. Debug-Output "OEMNADNF.INF: TempOptioList is: "$(TempOptionList)
  109. Debug-Output "OEMNADNF.INF: TempOptionTextList is: "$(TempOptionTextList)
  110. ;
  111. ; do not allow CPQTOK to be included in the option lists
  112. ;
  113. set OptionList = {}
  114. set OptionTextList = {}
  115. ForListDo $(TempOptionList)
  116. ifstr(i) $($) != "CPQTOK"
  117. Debug-Output "OEMNADNF.INF: added option: "$($)" to option list"
  118. Debug-Output "OEMNADNF.INF: added option test: "*( $(TempOptionTextList), $(#) )
  119. set OptionList = >( $(OptionList), $($) )
  120. set OptionTextList = >( $(OptionTextList), *( $(TempOptionTextList), $(#) ) )
  121. endif
  122. EndForListDo
  123. Debug-Output "OEMNADNF.INF: TempOptioList is: "$(OptionList)
  124. Debug-Output "OEMNADNF.INF: TempOptionTextList is: "$(OptionTextList)
  125. set Status = STATUS_SUCCESSFUL
  126. finish_ReturnOptions = +
  127. Return $(Status) $(OptionList) $(OptionTextList)
  128. [InstallOption]
  129. set Option = $($1)
  130. set SrcDir = $($2)
  131. set AddCopy = $($3)
  132. set DoCopy = $($4)
  133. set DoConfig = $($5)
  134. set LanguageList = ^(LanguagesSupported, 1)
  135. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  136. Return STATUS_NOLANGUAGE
  137. endif
  138. Debug-Output "OEMNADNF.INF: STF_CWDIR is: "$(!STF_CWDIR)
  139. Debug-Output "OEMNADNF.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  140. set-subst LF = "\n"
  141. read-syms GeneralConstants
  142. read-syms FileConstants
  143. read-syms DialogConstants$(!STF_LANGUAGE)
  144. ifstr(i) $(!NTN_Origination) == "NCPA"
  145. set Continue = $(OK)
  146. endif
  147. read-syms FileConstants$(!STF_LANGUAGE)
  148. detect date
  149. set-title $(FunctionTitle)
  150. set to = Begin
  151. set from = Begin
  152. set CommonStatus = STATUS_SUCCESSFUL
  153. EndWait
  154. Begin = +
  155. Ifstr(i) $(!NTN_InstallMode) == deinstall
  156. set StartLabel = removeadapter
  157. else-Ifstr(i) $(!NTN_InstallMode) == Update
  158. set StartLabel = UpgradeSoftware
  159. else-Ifstr(i) $(!NTN_InstallMode) == bind
  160. set StartLabel = bindingadapter
  161. else-Ifstr(i) $(!NTN_InstallMode) == configure
  162. set CommonStatus = STATUS_REBOOT
  163. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  164. Debug-Output "Cannot configure the Compaq Netflex driver software."
  165. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  166. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  167. Debug-Output "ShellCode error: cannot get an error string."
  168. goto ShellCodeError
  169. endif
  170. set Error = $($R0)
  171. set from = end
  172. set to = end
  173. goto nonfatal
  174. endif
  175. set CommonStatus = STATUS_REBOOT
  176. set StartLabel = configureadapter
  177. else
  178. set StartLabel = installadapter
  179. set OEM_ABANDON_OPTIONS = {}
  180. set OEM_ABANDON_SOFTWARE = FALSE
  181. set OEM_ABANDON_ON = TRUE
  182. endif
  183. set from = $(fatal)
  184. set to = $(fatal)
  185. goto $(StartLabel)
  186. installadapter = +
  187. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  188. Ifstr $(KeyProduct) != $(KeyNull)
  189. CloseRegKey $(KeyProduct)
  190. ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  191. Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  192. $(ProductVersion)
  193. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  194. goto ShellCodeError
  195. endif
  196. goto end
  197. else
  198. set OldVersionExisted = $(TRUE)
  199. endif
  200. endif
  201. goto nextstep
  202. configureadapter = +
  203. Ifstr $(KeyProduct) == $(KeyNull)
  204. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  205. Ifstr $(KeyProduct) == $(KeyNull)
  206. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  207. Debug-Output "Cannot find component product key"
  208. goto fatalregistry
  209. Endif
  210. Endif
  211. ;
  212. ; Get the other parameters; they're attached to the service parameters key
  213. ;
  214. Debug-Output "INF: Shelling to FindService"
  215. Shell $(UtilityInf) FindService, $(KeyProduct)
  216. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  217. Debug-Output "INF: FindService shell failure"
  218. Goto ShellCodeError
  219. Endif
  220. Ifstr(i) $($R0) != NO_ERROR
  221. Debug-Output "INF: FindService Shell error: "$($R0)
  222. Goto fatalregistry
  223. endif
  224. Set KeyParameters = $($R2)
  225. ifstr(i) $(KeyParameters) != ""
  226. GetRegValue $(KeyParameters),"MediaType", MediaTypeInfo
  227. ifint *($(MediaTypeInfo),4) != 2
  228. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  229. set from = end
  230. set to = end
  231. set Error = $($R0)
  232. goto nonfatal
  233. else
  234. GetRegValue $(KeyParameters),"NetworkAddress", NetworkAddressInfo
  235. set NetworkAddress = *($(NetworkAddressInfo), 4)
  236. read-syms FileDependentDlg$(!STF_LANGUAGE)
  237. ui start "NetworkAddress"
  238. ifstr(i) $(DLGEVENT) == "CONTINUE"
  239. set NetworkAddress = *($(EditTextOut),1)
  240. SetRegValue $(KeyParameters) {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)}
  241. ui pop 1
  242. else
  243. set CommonStatus = STATUS_USERCANCEL
  244. ui pop 1
  245. endif
  246. endif
  247. CloseRegKey $(KeyParameters)
  248. endif
  249. goto successful
  250. nextstep = +
  251. StartWait
  252. set DualPort = FALSE
  253. ifstr $(Option) == "NETFLX"
  254. Shell $(UtilityInf), EISAFindBus, $(NETFLX_1BYTE)
  255. else-ifstr $(Option) == "DURANGO"
  256. Shell $(UtilityInf), EISAFindBus, $(DURANGO_1BYTE)
  257. else-ifstr $(Option) == "MAPLE"
  258. Shell $(UtilityInf), EISAFindBus, $(MAPLE_1BYTE)
  259. else-ifstr $(Option) == "BONSAI"
  260. Shell $(UtilityInf), EISAFindBus, $(BONSAI_1BYTE)
  261. set DualPort = TRUE
  262. else
  263. Shell $(UtilityInf), EISAFindBus, $(RODAN_1BYTE)
  264. set DualPort = TRUE
  265. endif
  266. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  267. goto ShellCodeError
  268. endif
  269. ifstr $($R0) != "NO_ERROR"
  270. set Error = $($R0)
  271. goto fatal
  272. endif
  273. ifstr(i) $($R1) == {}
  274. set Error = $(CANNOT_FIND_ANY_CARD)
  275. set CommonStatus = STATUS_USERCANCEL
  276. set from = end
  277. goto nonfatal
  278. endif
  279. set AdapterList = $($R1)
  280. ifint $(OldVersionExisted) == $(FALSE)
  281. ifstr(i) $(!NTN_InstallMode) == "install"
  282. Ifstr(i) $(DoCopy) == "YES"
  283. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  284. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  285. Goto ShellCodeError
  286. Else-Ifstr(i) $($R0) == STATUS_FAILED
  287. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  288. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  289. goto ShellCodeError
  290. endif
  291. set Error = $($R0)
  292. Goto fatal
  293. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  294. Goto successful
  295. Endif
  296. Set SrcDir = $($R1)
  297. Endif
  298. install "Install-Option"
  299. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  300. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  301. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  302. goto ShellCodeError
  303. endif
  304. set Error = $($R0)
  305. goto fatal
  306. endif
  307. endif
  308. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  309. $(ProductSoftwareName), +
  310. $(ProductSoftwareName), +
  311. $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  312. $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  313. $(NetEventDLL)
  314. Set OEM_ABANDON_SOFTWARE = TRUE
  315. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  316. goto ShellCodeError
  317. endif
  318. set RegistryErrorIndex = $($R0)
  319. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  320. EndWait
  321. CloseRegKey $($R1)
  322. CloseRegKey $($R2)
  323. CloseRegKey $($R3)
  324. CloseRegKey $($R4)
  325. CloseRegKey $($R5)
  326. goto fatalregistry
  327. endif
  328. set SoftProductKey = $($R1)
  329. Set SoftNetRuleKey = $($R2)
  330. Set SoftServiceKey = $($R3)
  331. Set SoftParameterKey = $($R4)
  332. Set SoftLinkageKey = $($R5)
  333. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  334. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  335. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  336. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  337. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  338. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  339. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  340. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  341. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  342. goto ShellCodeError
  343. endif
  344. set RegistryErrorIndex = $($R0)
  345. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  346. EndWait
  347. CloseRegKey $(SoftProductKey)
  348. CloseRegKey $(SoftNetRuleKey)
  349. CloseRegKey $(SoftServiceKey)
  350. CloseRegKey $(SoftParameterKey)
  351. CloseRegKey $(SoftLinkageKey)
  352. goto fatalregistry
  353. endif
  354. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  355. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  356. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  357. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  358. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  359. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  360. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  361. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  362. goto ShellCodeError
  363. endif
  364. set RegistryErrorIndex = $($R0)
  365. CloseRegKey $(SoftProductKey)
  366. CloseRegKey $(SoftNetRuleKey)
  367. CloseRegKey $(SoftServiceKey)
  368. CloseRegKey $(SoftParameterKey)
  369. CloseRegKey $(SoftLinkageKey)
  370. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  371. EndWait
  372. goto fatalregistry
  373. endif
  374. endif
  375. ForListDo $(AdapterList)
  376. set BusNum = *($($),1)
  377. set SlotNum = *($($),2)
  378. Debug-Output $(BusNum)
  379. Debug-Output $(SlotNum)
  380. Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  381. $(SlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)
  382. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  383. goto ShellCodeError
  384. endif
  385. ifstr $($R0) != "NO_ERROR"
  386. set Error = $($R0)
  387. goto fatal
  388. endif
  389. set tempvar = $($R1)
  390. ;******************************
  391. ;
  392. ; ADD DUAL PORT CONTROLLER
  393. ;
  394. ;******************************
  395. ifstr(i) $(DualPort) == TRUE
  396. set AdpList = { {1},{2} }
  397. else
  398. set AdpList = { {1} }
  399. endif
  400. set AddAdpCount = 0
  401. ifstr(i) $(tempvar) != "YES"
  402. ForListDo $(AdpList)
  403. Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  404. ifint $($R4) != -1
  405. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  406. endif
  407. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408. goto ShellCodeError
  409. endif
  410. set RegistryErrorIndex = $($R0)
  411. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  412. EndWait
  413. CloseRegKey $($R1)
  414. CloseRegKey $($R2)
  415. CloseRegKey $($R3)
  416. goto fatalregistry
  417. endif
  418. Set HardNetCardKey = $($R1)
  419. Set HardNetRuleKey = $($R2)
  420. Set HardParameterKey = $($R3)
  421. set AdapterNumber = $($R4)
  422. ifstr $(Option) == "NETFLX"
  423. LoadLibrary "x" $(!STF_CWDDIR)netflx.dll !NETFLEX_HANDLE
  424. set Option_1Byte = $(NETFLX_1BYTE)
  425. LibraryProcedure Result $(!NETFLEX_HANDLE), GetNetFlexMediaType, "EISAAdapter\"$(BusNum), $(SlotNum)
  426. set MediaType = *($(Result),1)
  427. FreeLibrary $(!NETFLEX_HANDLE)
  428. else-ifstr $(Option) == "MAPLE"
  429. set Option_1Byte = $(MAPLE_1BYTE)
  430. set MediaType = 2
  431. else-ifstr $(Option) == "DURANGO"
  432. set Option_1Byte = $(DURANGO_1BYTE)
  433. set MediaType = 2
  434. else-ifstr $(Option) == "BONSAI"
  435. set Option_1Byte = $(BONSAI_1BYTE)
  436. set MediaType = 1
  437. else
  438. set Option_1Byte = $(RODAN_1BYTE)
  439. set MediaType = 2
  440. endif
  441. ifint $(MediaType) != 2
  442. set OpSupport = $(ProductOtherOpSupport)
  443. else
  444. set OpSupport = $(ProductOpSupport)
  445. endif
  446. set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  447. {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  448. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  449. {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  450. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  451. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)},+
  452. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  453. Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  454. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  455. goto ShellCodeError
  456. endif
  457. ;**************************************************************************
  458. ;
  459. ; Get the adapter numbers associated with installing 2 ports from 1 card
  460. ;
  461. ;**************************************************************************
  462. ifint $(AddAdpCount) == 0
  463. Shell $(UtilityInf), AssignAdapterNumber
  464. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  465. goto ShellCodeError
  466. endif
  467. set AdpNumber1 = $(AdapterNumber)
  468. set AdpNumber2 = $($R1)
  469. endif
  470. ifstr(i) $(DualPort) == TRUE
  471. ifint $(AddAdpCount) == 0
  472. set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  473. {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  474. {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  475. {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  476. {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  477. {PortNumber,$(NoTitle),$(!REG_VT_DWORD), 1},+
  478. {PairNumber,$(NoTitle),$(!REG_VT_DWORD), $(AdpNumber2) }}
  479. else
  480. set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  481. {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  482. {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  483. {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  484. {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  485. {PortNumber,$(NoTitle),$(!REG_VT_DWORD), 2},+
  486. {PairNumber,$(NoTitle),$(!REG_VT_DWORD), $(AdpNumber1) }}
  487. endif
  488. else
  489. set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  490. {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  491. {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  492. {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  493. {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  494. endif
  495. Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  496. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  497. goto ShellCodeError
  498. endif
  499. set NetworkAddress = ""
  500. ifint $(MediaType) == 2
  501. read-syms FileDependentDlg$(!STF_LANGUAGE)
  502. ui start "NetworkAddress"
  503. ifstr(i) $(DLGEVENT) == "CONTINUE"
  504. set NetworkAddress = *($(EditTextOut),1)
  505. SetRegValue $(HardParameterKey) {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)}
  506. ui pop 1
  507. endif
  508. endif
  509. set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  510. set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  511. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  512. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  513. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  514. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  515. Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  516. CloseRegKey $(HardNetCardKey)
  517. CloseRegKey $(HardNetRuleKey)
  518. CloseRegKey $(HardParameterKey)
  519. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  520. goto ShellCodeError
  521. endif
  522. ;***************************************************
  523. ;
  524. ; If it's a dual port nic, install the next one
  525. ;
  526. ;***************************************************
  527. ifstr(i) $(DualPort) == TRUE
  528. set-add AddAdpCount = $(AddAdpCount),1
  529. endif
  530. EndForListDo
  531. endif
  532. EndForListDo
  533. goto writeparameters
  534. writeparameters = +
  535. EndWait
  536. goto successful
  537. bindingadapter =+
  538. set Error = "Binding: Sorry, not yet implemented."
  539. goto fatal
  540. removeadapter = +
  541. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  542. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  543. $(ProductSoftwareName)
  544. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  545. Debug-Output "ShellCode error"
  546. goto ShellCodeError
  547. endif
  548. set RegistryErrorIndex = $($R0)
  549. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  550. goto fatalregistry
  551. endif
  552. else
  553. ;
  554. ; Check to see if it is a dual port adapter
  555. ;
  556. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase)"\NetRules" +
  557. $(MAXIMUM_ALLOWED) NetRulesKey
  558. Ifstr $(NetRulesKey) == $(KeyNull)
  559. Debug-Output "UTILITY.INF: Could not open NetRules key"
  560. set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  561. goto ShellCodeError
  562. endif
  563. GetRegValue $(NetRulesKey), "InfOption", RA_InfOptionInfo
  564. set RA_InfOption = *($(RA_InfOptionInfo), 4)
  565. ;
  566. ; If it is a dual port adapter, remove both port in this order:
  567. ; Second port, First port.
  568. ;
  569. ifstr(i) $(RA_InfOption) == $(BonsaiString)
  570. goto RemoveSecondAdapter
  571. else-ifstr(i) $(RA_InfOption) == $(RodanString)
  572. goto RemoveSecondAdapter
  573. else
  574. goto RemoveOriginalAdapter
  575. endif
  576. RemoveSecondAdapter = +
  577. Shell "", GetSecondAdapter, $(!NTN_RegBase)
  578. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  579. Debug-Output "ShellCode error"
  580. goto ShellCodeError
  581. endif
  582. set RegistryErrorIndex = $($R0)
  583. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  584. goto fatalregistry
  585. endif
  586. set PortTwo_RegBase = $($R1)
  587. ;
  588. ; Remove second adapter
  589. ;
  590. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  591. $(ProductSoftwareName), $(PortTwo_RegBase)
  592. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  593. Debug-Output "ShellCode error"
  594. goto ShellCodeError
  595. endif
  596. set RegistryErrorIndex = $($R0)
  597. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  598. goto fatalregistry
  599. endif
  600. ;
  601. ; Remove first adapter of a dual port adapter or single port adapter
  602. ;
  603. RemoveOriginalAdapter = +
  604. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  605. $(ProductSoftwareName), $(!NTN_RegBase)
  606. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  607. Debug-Output "ShellCode error"
  608. goto ShellCodeError
  609. endif
  610. set RegistryErrorIndex = $($R0)
  611. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  612. goto fatalregistry
  613. endif
  614. endif
  615. goto end
  616. UpgradeSoftware = +
  617. ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  618. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  619. Ifstr $(KeyProduct) != $(KeyNull)
  620. install "Install-Update"
  621. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  622. goto fatal
  623. endif
  624. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  625. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  626. CloseRegKey $(KeyProduct)
  627. else
  628. goto fatalregistry
  629. endif
  630. endif
  631. ifstr $(Option) == "NETFLX"
  632. ; actually this can be configured in some cases
  633. ; and not in others. But without alot of painful work
  634. ; this is not going to happen
  635. ;
  636. set MediaType = 2
  637. else-ifstr $(Option) == "MAPLE"
  638. set MediaType = 2
  639. else-ifstr $(Option) == "DURANGO"
  640. set MediaType = 2
  641. else-ifstr $(Option) == "BONSAI"
  642. set MediaType = 1
  643. else
  644. set MediaType = 2
  645. endif
  646. ifint $(MediaType) != 2
  647. set OpSupport = $(ProductOtherOpSupport)
  648. else
  649. set OpSupport = $(ProductOpSupport)
  650. endif
  651. ;
  652. ; Enumerate all netcards installed of this type and update them
  653. ;
  654. set iSearch = 1
  655. nextnetcard = +
  656. Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  657. set KeyNetcard = $($R0)
  658. set iSearch = $($R1)
  659. Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  660. Ifstr $(KeyNetcard) != $(KeyNull)
  661. Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  662. SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)}
  663. CloseRegKey $(KeyNetcard)
  664. goto nextnetcard
  665. Endif
  666. goto end
  667. successful = +
  668. goto end
  669. abandon = +
  670. ForListDo $(OEM_ABANDON_OPTIONS)
  671. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  672. $(ProductSoftwareName), $($)
  673. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  674. Debug-Output "ShellCode error"
  675. goto ShellCodeError
  676. endif
  677. set RegistryErrorIndex = $($R0)
  678. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  679. goto fatalregistry
  680. endif
  681. EndForListDo
  682. Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  683. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  684. $(ProductSoftwareName), FALSE
  685. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  686. Debug-Output "ShellCode error"
  687. goto ShellCodeError
  688. endif
  689. set RegistryErrorIndex = $($R0)
  690. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  691. goto fatalregistry
  692. endif
  693. endif
  694. goto end
  695. warning = +
  696. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  697. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  698. goto ShellCodeError
  699. endif
  700. ifstr(i) $($R1) == "OK"
  701. goto $(to)
  702. else-ifstr(i) $($R1) == "CANCEL"
  703. goto $(from)
  704. else
  705. goto end
  706. endif
  707. nonfatal = +
  708. ifstr(i) $(Error) == ""
  709. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  710. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  711. goto ShellCodeError
  712. endif
  713. set Error = $($R0)
  714. endif
  715. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  716. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  717. goto ShellCodeError
  718. endif
  719. ifstr(i) $($R1) == "OK"
  720. goto $(from)
  721. else
  722. goto end
  723. endif
  724. fatalregistry = +
  725. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  726. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  727. goto ShellCodeError
  728. endif
  729. set Error = $($R0)
  730. goto fatal
  731. fatal = +
  732. ifstr(i) $(Error) == ""
  733. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  734. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  735. goto ShellCodeError
  736. endif
  737. set Error = $($R0)
  738. endif
  739. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  740. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  741. goto ShellCodeError
  742. endif
  743. goto setfailed
  744. ShellCodeError = +
  745. set DlgType = "MessageBox"
  746. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  747. set STF_MB_TEXT = $(ShellCodeErrorText)
  748. set STF_MB_TYPE = 1
  749. set STF_MB_ICON = 3
  750. set STF_MB_DEF = 1
  751. ui start "Error Message"
  752. goto setfailed
  753. setfailed = +
  754. set CommonStatus = STATUS_FAILED
  755. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  756. set OEM_ABANDON_ON = FALSE
  757. goto abandon
  758. endif
  759. goto end
  760. end = +
  761. goto term
  762. term = +
  763. Return $(CommonStatus)
  764. ;*************************************************************************
  765. ;
  766. ; SECTION: GetSecondAdapter
  767. ;
  768. ; PURPOSE: Find the other NIC to be removed with the removal of
  769. ; one of the heads associated with the dual-headed NICs
  770. ;
  771. ; ARGUMENTS: $0 The compress ID of the EISA card
  772. ;
  773. ; RETURNS: $R0 Registry error code or zero if no error
  774. ; $R1 The number of the second adapter
  775. ;
  776. ; REFERENCES: Nothing
  777. ;
  778. ; MODIFIES: Nothing
  779. ;
  780. ;*************************************************************************
  781. [GetSecondAdapter]
  782. read-syms GeneralConstants
  783. read-syms FileConstants
  784. Split-String $($0), "\", CardList
  785. set GS_NetCardNum = *($(CardList),11)
  786. set GS_HardKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)$(GS_NetCardNum)"\Parameters"
  787. set RegistryErrorIndex = NO_ERROR
  788. OpenRegKey $(!REG_H_LOCAL) "" $(GS_HardKeyName) $(MAXIMUM_ALLOWED) GS_ParametersKey
  789. Ifstr $(GS_ParametersKey) == $(KeyNull)
  790. set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  791. goto GS_Return
  792. endif
  793. GetRegValue $(GS_ParametersKey), "PairNumber", GS_AdpNumberInfo
  794. set GS_AdpNumber = *($(GS_AdpNumberInfo),4)
  795. set TempNum = $(GS_AdpNumber)
  796. set ReturnPath = $(NetCardKeyName)"\"$(TempNum)
  797. GS_Return = +
  798. return $(RegistryErrorIndex) $(ReturnPath)
  799. [Install-Option]
  800. set STF_VITAL = ""
  801. ifstr(i) $(AddCopy) == "YES"
  802. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  803. AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  804. endif
  805. ifstr(i) $(DoCopy) == "YES"
  806. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  807. CopyFilesInCopyList
  808. endif
  809. ifstr(i) $(DoConfig) == "YES"
  810. endif
  811. Exit
  812. [Install-Update]
  813. set STF_VITAL = ""
  814. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  815. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  816. AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  817. exit