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.

985 lines
38 KiB

  1. ; BUGBUG - what should Manufacturer be?
  2. ; BUGBUG - what should version be? 1.0 or 3.5?
  3. ; BUGBUG - what should the Source Media Descriptions be?
  4. ; ------------------------------------------------------------------------
  5. ; Microsoft Windows NT 3.5 Driver Installation
  6. ; Thomas-Conrad Driver for TCNS and generic ARCNET Adapters
  7. ; Copyright 1994 Thomas-Conrad Corporation
  8. ; v1.00 (940713)
  9. ; ------------------------------------------------------------------------
  10. [FileConstants]
  11. Manufacturer = "Thomas-Conrad"
  12. TccBaseName = "tcarc"
  13. SoftwareMajorVersion = "4"
  14. SoftwareMinorVersion = "0"
  15. InterruptTextList = ^(InterruptChoices, 1)
  16. InterruptValueList = ^(InterruptChoices, 2)
  17. IoBaseTextList = ^(IoBaseChoices, 1)
  18. IoBaseValueList = ^(IoBaseChoices, 2)
  19. MemoryBaseTextList = ^(MemoryBaseChoices, 1)
  20. MemoryBaseValueList = ^(MemoryBaseChoices, 2)
  21. EisaSlotTextList = ^(EisaSlotChoices, 1)
  22. EisaSlotValueList = ^(EisaSlotChoices, 2)
  23. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  24. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  25. UtilityInf = "UTILITY.INF"
  26. SubroutineInf = "SUBROUTN.INF"
  27. SoftwareType = "driver"
  28. Exit_Code = 0
  29. SoftwareVersion = $(SoftwareMajorVersion)"."$(SoftwareMinorVersion)
  30. SoftwareImage = "\SystemRoot\System32\drivers\"$(TccBaseName)".sys"
  31. NetRuleSoftwareType = $(TccBaseName)"Sys ndisDriver "$(TccBaseName)"Driver"
  32. NetRuleSoftwareBindForm = """"$(TccBaseName)"Sys"" yes no container"
  33. NetRuleSoftwareBindable = {""$(TccBaseName)"Driver "$(TccBaseName)"Adapter non exclusive 100"}
  34. NetRuleSoftwareClass = {""$(TccBaseName)"Driver basic"}
  35. NetRuleSoftwareUse = $(SoftwareType)
  36. NetRuleHardwareType = $(TccBaseName)" "$(TccBaseName)"Adapter"
  37. NetRuleHardwareClass = {""$(TccBaseName)"Adapter basic"}
  38. NetRuleHardwareBindForm = " yes yes container"
  39. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  40. KeyName_SoftwareRoot = $(!NTN_SoftwareBase)"\"$(Manufacturer)
  41. KeyName_Software = $(KeyName_SoftwareRoot)"\"$(TccBaseName)"\CurrentVersion"
  42. [InterruptChoices]
  43. Interrupt_1 = "2/9", 2
  44. Interrupt_2 = "3" , 3
  45. Interrupt_3 = "4" , 4
  46. Interrupt_4 = "5" , 5
  47. Interrupt_5 = "6" , 6
  48. Interrupt_6 = "7" , 7
  49. Interrupt_7 = "10" , 10
  50. Interrupt_8 = "11" , 11
  51. Interrupt_9 = "12" , 12
  52. Interrupt_10 = "14" , 14
  53. Interrupt_11 = "15" , 15
  54. [MemoryBaseChoices]
  55. MemoryBaseChoice_1 = "C0000", 49152
  56. MemoryBaseChoice_2 = "C4000", 50176
  57. MemoryBaseChoice_3 = "C8000", 51200
  58. MemoryBaseChoice_4 = "CC000", 52224
  59. MemoryBaseChoice_5 = "D0000", 53248
  60. MemoryBaseChoice_6 = "D4000", 54272
  61. MemoryBaseChoice_7 = "D8000", 55296
  62. MemoryBaseChoice_8 = "DC000", 56320
  63. [IoBaseChoices]
  64. IoBaseChoice_1 = "260", 608
  65. IoBaseChoice_2 = "290", 656
  66. IoBaseChoice_3 = "2E0", 736
  67. IoBaseChoice_4 = "2F0", 752
  68. IoBaseChoice_5 = "300", 768
  69. IoBaseChoice_6 = "350", 848
  70. IoBaseChoice_7 = "380", 896
  71. IoBaseChoice_8 = "3E0", 992
  72. [EisaSlotChoices]
  73. EisaSlot_1 = "1", 1
  74. EisaSlot_2 = "2", 2
  75. EisaSlot_3 = "3" , 3
  76. EisaSlot_4 = "4" , 4
  77. EisaSlot_5 = "5" , 5
  78. EisaSlot_6 = "6" , 6
  79. EisaSlot_7 = "7" , 7
  80. EisaSlot_8 = "8" , 8
  81. EisaSlot_9 = "9" , 9
  82. EisaSlot_10 = "10" , 10
  83. EisaSlot_11 = "11" , 11
  84. EisaSlot_12 = "12" , 12
  85. [TcarcIsaDlg]
  86. DlgType = "RadioCombination"
  87. Label1 = $(InterruptLabel)
  88. Label2 = $(BaseIoLabel)
  89. Label3 = $(MemoryLabel)
  90. DlgTemplate = "UBNDIS"
  91. Caption = $(FunctionTitle)
  92. Combo1List = $(InterruptTextList)
  93. Combo1Out = $(InterruptTextDlgDefault)
  94. Combo2List = $(IoBaseTextList)
  95. Combo2Out = $(IoBaseTextDlgDefault)
  96. Combo3List = $(MemoryBaseTextList)
  97. Combo3Out = $(MemoryBaseTextDlgDefault)
  98. RadioIn = {}
  99. ComboListItemsIn = {Combo1List,Combo2List,Combo3List}
  100. ComboListItemsOut = {Combo1Out,Combo2Out,Combo3Out}
  101. CBOptionsGreyed = {}
  102. EditTextIn = ""
  103. EditTextLim = ""
  104. NotifyFields = {NO, NO, NO}
  105. HelpContext = $(!IDH_DB_OEMNADAR1_INS)
  106. [TcnsIsaDlg]
  107. DlgType = "RadioCombination"
  108. Label1 = $(InterruptLabel)
  109. Label2 = $(BaseIoLabel)
  110. Label3 = $(MemoryLabel)
  111. DlgTemplate = "UBNDIS"
  112. Caption = $(TcnsCaption)
  113. Combo1List = $(InterruptTextList)
  114. Combo1Out = $(InterruptTextDlgDefault)
  115. Combo2List = $(IoBaseTextList)
  116. Combo2Out = $(IoBaseTextDlgDefault)
  117. Combo3List = $(MemoryBaseTextList)
  118. Combo3Out = $(MemoryBaseTextDlgDefault)
  119. RadioIn = {}
  120. ComboListItemsIn = {Combo1List,Combo2List,Combo3List}
  121. ComboListItemsOut = {Combo1Out,Combo2Out,Combo3Out}
  122. CBOptionsGreyed = {}
  123. EditTextIn = ""
  124. EditTextLim = ""
  125. NotifyFields = {NO, NO, NO}
  126. HelpContext = $(!IDH_DB_OEMNADAR2_INS)
  127. [TcnsEisaDlg]
  128. DlgType = "RadioCombination"
  129. Label1 = $(SlotNumberLabel)
  130. DlgTemplate = "SINGLE_COMBO"
  131. Caption = $(TcnsEISACaption)
  132. Combo1List = $(EisaSlotTextList)
  133. Combo1Out = $(EisaSlotTextDlgDefault)
  134. RadioIn = {}
  135. ComboListItemsIn = {Combo1List}
  136. ComboListItemsOut = {Combo1Out}
  137. CBOptionsGreyed = {}
  138. EditTextIn = ""
  139. EditTextLim = ""
  140. NotifyFields = {NO}
  141. HelpContext = $(!IDH_DB_OEMNADAR3_INS)
  142. [Identify]
  143. set Status = STATUS_SUCCESSFUL
  144. set Identifier = NetAdapter
  145. set Media = #("Source Media Descriptions", 1, 1)
  146. Return $(Status) $(Identifier) $(Media)
  147. [ReturnOptions]
  148. set Status = STATUS_FAILED
  149. set OptionList = {}
  150. set OptionTextList = {}
  151. set LanguageList = ^(LanguagesSupported, 1)
  152. Ifcontains(i) $($0) in $(LanguageList)
  153. ifstr(i) $($1) == ""
  154. goto ReturnOptions_Set
  155. endif
  156. set PlatformList = ^(PlatformsSupported, 1)
  157. Ifcontains(i) $($1) in $(PlatformList)
  158. goto ReturnOptions_Set
  159. else
  160. set Status = STATUS_NOTSUPPORTED
  161. goto ReturnOptions_Exit
  162. endif
  163. else
  164. set Status = STATUS_NOLANGUAGE
  165. goto ReturnOptions_Exit
  166. endif
  167. ReturnOptions_Set = +
  168. set OptionList = ^(OptList$($0), 1)
  169. set OptionTextList = ^(OptList$($0), 2)
  170. set Status = STATUS_SUCCESSFUL
  171. ReturnOptions_Exit = +
  172. Return $(Status) $(OptionList) $(OptionTextList)
  173. [GeneralConstants]
  174. from = ""
  175. to = ""
  176. ExitCodeOk = 0
  177. ExitCodeCancel = 1
  178. ExitCodeFatal = 2
  179. Key_Null = ""
  180. MAXIMUM_ALLOWED = 33554432
  181. RegistryErrorIndex = NO_ERROR
  182. Key_Product = ""
  183. Key_HardwareParameters = ""
  184. TRUE = 1
  185. FALSE = 0
  186. NoTitle = 0
  187. ExitState = "Active"
  188. OldVersionExisted = $(FALSE)
  189. DriverPath = $(!STF_NTPATH)\drivers
  190. [date]
  191. Now = {} ? $(!LIBHANDLE) GetSystemDate
  192. [PlatformsSupported]
  193. ISA
  194. EISA
  195. MCA
  196. [Install-Option]
  197. Debug-Output "$(STF_CONTEXTINFNAME): Entering Install-Option"
  198. set STF_VITAL = ""
  199. ifstr(i) $(AddCopy) == "YES"
  200. set STF_VITAL = "YES"
  201. AddSectionFilesToCopyList Files-Driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  202. endif
  203. ifstr(i) $(DoCopy) == "YES"
  204. set STF_VITAL = "YES"
  205. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  206. CopyFilesInCopyList
  207. endif
  208. ifstr(i) $(DoConfig) == "YES"
  209. endif
  210. exit
  211. [Install-Update]
  212. Debug-Output "$(STF_CONTEXTINFNAME): Entering Install-Update"
  213. set STF_VITAL = "YES"
  214. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  215. AddSectionFilesToCopyList Files-Driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  216. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  217. CopyFilesInCopyList
  218. exit
  219. [InstallOption]
  220. ; set !DebugOutputControl = 1
  221. ; set !STF_DISPLAYDEBUGOUTPUT = 1
  222. set TccOption = $($1)
  223. set SrcDir = $($2)
  224. set AddCopy = $($3)
  225. set DoCopy = $($4)
  226. set DoConfig = $($5)
  227. Debug-Output "$(STF_CONTEXTINFNAME): Entering InstallOption"
  228. Debug-Output "$(STF_CONTEXTINFNAME): STF_CWDIR: .$(!STF_CWDIR)."
  229. Debug-Output "$(STF_CONTEXTINFNAME): STF_LANGUAGE: .$(!STF_LANGUAGE)."
  230. Debug-Output "$(STF_CONTEXTINFNAME): !NTN_RegBase .$(!NTN_RegBase)."
  231. Debug-Output "$(STF_CONTEXTINFNAME): !NTN_SoftwareBase .$(!NTN_SoftwareBase)."
  232. Debug-Output "$(STF_CONTEXTINFNAME): TccOption: .$(TccOption). SrcDir: .$(SrcDir)."
  233. Debug-Output "$(STF_CONTEXTINFNAME): AddCopy: .$(AddCopy). DoCopy: .$(DoCopy). DoConfig: .$(DoConfig)."
  234. set LanguageList = ^(LanguagesSupported, 1)
  235. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  236. Return STATUS_NOLANGUAGE
  237. endif
  238. set-subst LF = "\n"
  239. read-syms GeneralConstants
  240. read-syms FileConstants
  241. set OptionNameList = ^(OptList$(!STF_LANGUAGE), 1 )
  242. set OptionHdwrNameList = ^(OptList$(!STF_LANGUAGE), 3 )
  243. set OptionHdwrTitleList = ^(OptList$(!STF_LANGUAGE), 4 )
  244. set OptionHdwrDescList = ^(OptList$(!STF_LANGUAGE), 5 )
  245. set ProductHdwrName = *($(OptionHdwrNameList),+
  246. ~($(OptionNameList), $($1)))
  247. set ProductHdwrTitle = *($(OptionHdwrTitleList),+
  248. ~($(OptionNameList), $($1)))
  249. set ProductHdwrDesc = *($(OptionHdwrDescList),+
  250. ~($(OptionNameList), $($1)))
  251. Debug-Output "$(STF_CONTEXTINFNAME): ProductHdwrName .$(ProductHdwrName)."
  252. Debug-Output "$(STF_CONTEXTINFNAME): ProductHdwrTitle .$(ProductHdwrTitle)."
  253. Debug-Output "$(STF_CONTEXTINFNAME): ProductHdwrDesc .$(ProductHdwrDesc)."
  254. read-syms DialogConstants$(!STF_LANGUAGE)
  255. ifstr(i) $(!NTN_Origination) == "NCPA"
  256. set Continue = "OK"
  257. endif
  258. read-syms FileConstants$(!STF_LANGUAGE)
  259. detect date
  260. set-title $(FunctionTitle)
  261. set to = InstallOptionDispatch
  262. set from = InstallOptionDispatch
  263. set CommonStatus = STATUS_SUCCESSFUL
  264. EndWait
  265. InstallOptionDispatch = +
  266. Debug-Output "$(STF_CONTEXTINFNAME): Entering InstallOptionDispatch"
  267. Ifstr(i) $(!NTN_InstallMode) == deinstall
  268. set StartLabel = RemoveAdapterFromRegistry
  269. else-Ifstr(i) $(!NTN_InstallMode) == Update
  270. set StartLabel = UpgradeSoftware
  271. else-Ifstr(i) $(!NTN_InstallMode) == bind
  272. set StartLabel = CheckAdapterBinding
  273. else-Ifstr(i) $(!NTN_InstallMode) == configure
  274. set StartLabel = GetAdapterConfigFromRegistry
  275. Ifstr(i) $(KeyName_Software) == $(!NTN_RegBase)
  276. Debug-Output "$(STF_CONTEXTINFNAME): Cannot configure driver software."
  277. Shell $(UtilityInf), RegistryErrorString, CANNOT_CONFIGURE_SOFTWARE
  278. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  279. set ShellErrorSection = UtilityInf:RegistryErrorString
  280. goto ShellCodeError
  281. endif
  282. set Error = $($R0)
  283. set from = InstallOptionExit
  284. set to = InstallOptionExit
  285. goto SetNonFatalInfo
  286. endif
  287. else
  288. set StartLabel = TestForExistingInstallation
  289. set OEM_ABANDON_OPTIONS = {}
  290. set OEM_ABANDON_SOFTWARE = FALSE
  291. set OEM_ABANDON_ON = TRUE
  292. endif
  293. set InterruptValue = 2
  294. set MemoryBaseValue = 53248
  295. set IoBaseValue = 736
  296. set SlotNumberValue = 1
  297. set BusNumberValue = 0
  298. set BusTypeValue = 1
  299. set MediaTypeValue = 8
  300. set PacketSizeValue = 1024
  301. set NdisInterfaceIsa = 1
  302. set NdisInterfaceEisa = 2
  303. set Tc3047EisaIdValue = 1349464391
  304. set Tc3147EisaIdValue = 1349464135
  305. set from = $(FatalError)
  306. set to = $(FatalError)
  307. goto $(StartLabel)
  308. TestForExistingInstallation = +
  309. set OldVersionExisted = $(FALSE)
  310. Debug-Output "$(STF_CONTEXTINFNAME): Entering TestForExistingInstallation"
  311. OpenRegKey $(!REG_H_LOCAL) "" $(KeyName_Software) $(MAXIMUM_ALLOWED) Key_Product
  312. Ifstr $(Key_Product) != $(Key_Null)
  313. CloseRegKey $(Key_Product)
  314. ifstr(i) $(!NTN_RegBase) == $(KeyName_Software)
  315. Shell $(UtilityInf), VerExistedDlg, $(SoftwareTitle), $(SoftwareVersion)
  316. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  317. set ShellErrorSection = UtilityInf:VerExistedDlg
  318. goto ShellCodeError
  319. endif
  320. goto end
  321. else
  322. Shell $(UtilityInf), CardExistedDlg
  323. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  324. set ShellErrorSection = UtilityInf:CardExistedDlg
  325. goto ShellCodeError
  326. endif
  327. ifstr(i) $($R1) == "OK"
  328. set OldVersionExisted = $(TRUE)
  329. else
  330. goto InstallOptionExit
  331. endif
  332. endif
  333. endif
  334. CopyAdapterFiles = +
  335. Debug-Output "$(STF_CONTEXTINFNAME): Entering CopyAdapterFiles"
  336. ifint $(OldVersionExisted) == $(TRUE)
  337. ifstr(i) $(!NTN_InstallMode) == configure
  338. goto GetAdapterConfigFromUser
  339. endif
  340. endif
  341. StartWait
  342. ifint $(OldVersionExisted) == $(FALSE)
  343. ifstr(i) $(!NTN_InstallMode) == "install"
  344. Ifstr(i) $(DoCopy) == "YES"
  345. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  346. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  347. set ShellErrorSection = UtilityInf:DoAskSource
  348. Goto ShellCodeError
  349. Else-Ifstr(i) $($R0) == STATUS_FAILED
  350. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  351. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  352. set ShellErrorSection = UtilityInf:RegistryErrorString
  353. goto ShellCodeError
  354. endif
  355. set Error = $($R0)
  356. Goto FatalError
  357. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  358. Goto ProcessSuccessExit
  359. Endif
  360. Set SrcDir = $($R1)
  361. Endif
  362. install "Install-Option"
  363. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  364. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  365. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  366. set ShellErrorSection = UtilityInf:RegistryErrorString
  367. goto ShellCodeError
  368. endif
  369. set Error = $($R0)
  370. goto FatalError
  371. endif
  372. endif
  373. endif
  374. GetAdapterConfigFromRegistry = +
  375. Debug-Output "$(STF_CONTEXTINFNAME): Entering GetAdapterConfigFromRegistry"
  376. ifstr(i) $(!NTN_InstallMode) == "install"
  377. goto GetAdapterConfigFromUser
  378. else
  379. Ifstr $(Key_Product) == $(Key_Null)
  380. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) Key_Product
  381. Ifstr $(Key_Product) == $(Key_Null)
  382. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  383. Debug-Output $(STF_CONTEXTINFNAME)": Cannot find component product key"
  384. goto FatalRegistryError
  385. Endif
  386. Endif
  387. Shell $(UtilityInf) FindService, $(Key_Product)
  388. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389. set ShellErrorSection = UtilityInf:FindService
  390. Goto ShellCodeError
  391. Endif
  392. Ifstr(i) $($R0) != NO_ERROR
  393. Debug-Output "$(STF_CONTEXTINFNAME): Utility:FindService error: $($R0)"
  394. Goto FatalRegistryError
  395. endif
  396. set Key_HardwareParameters = $($R2)
  397. CloseRegKey $($R1)
  398. Ifstr $(Key_HardwareParameters) == $(Key_Null)
  399. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  400. Debug-Output $(STF_CONTEXTINFNAME)": Cannot find component service"
  401. goto FatalRegistryError
  402. endif
  403. set OldVersionExisted = $(TRUE)
  404. set ValueName = ""
  405. set ValueData = ""
  406. set ValueStr = ""
  407. set ValueList = {}
  408. EnumRegValue $(Key_HardwareParameters) ValueList
  409. ForListDo $(ValueList)
  410. set ValueItem = $($)
  411. set ValueName = *($(ValueItem),1)
  412. set ValueData = *($(ValueItem),4)
  413. Ifstr(i) $(ValueName) == "AdapterType"
  414. set AdapterTypeValue = $(ValueData)
  415. else-Ifstr(i) $(ValueName) == "BusNumber"
  416. set BusNumberValue = $(ValueData)
  417. else-Ifstr(i) $(ValueName) == "BusType"
  418. set BusTypeValue = $(ValueData)
  419. else-Ifstr(i) $(ValueName) == "Interrupt"
  420. set InterruptValue = $(ValueData)
  421. else-Ifstr(i) $(ValueName) == "IoBase"
  422. set IoBaseValue = $(ValueData)
  423. else-Ifstr(i) $(ValueName) == "MediaType"
  424. set MediaTypeValue = $(ValueData)
  425. else-Ifstr(i) $(ValueName) == "MemoryBase"
  426. set MemoryBaseValue = $(ValueData)
  427. else-Ifstr(i) $(ValueName) == "PacketSize"
  428. set PacketSizeValue = $(ValueData)
  429. else-Ifstr(i) $(ValueName) == "SlotNumber"
  430. set SlotNumberValue = $(ValueData)
  431. endif
  432. Debug-Output "$(STF_CONTEXTINFNAME): $(ValueName) == .$(ValueData)."
  433. EndForListDo
  434. Endif
  435. GetAdapterConfigFromUser = +
  436. Debug-Output "$(STF_CONTEXTINFNAME): Entering GetAdapterConfigFromUser"
  437. set from = GetAdapterConfigFromUser
  438. set InterruptTextDlgDefault = *($(InterruptTextList),+
  439. ~($(InterruptValueList), +
  440. $(InterruptValue)))
  441. set MemoryBaseTextDlgDefault = *($(MemoryBaseTextList),+
  442. ~($(MemoryBaseValueList), +
  443. $(MemoryBaseValue)))
  444. set IoBaseTextDlgDefault = *($(IoBaseTextList),+
  445. ~($(IoBaseValueList), +
  446. $(IoBaseValue)))
  447. set SlotTextDlgDefault = ~($(SlotSupportValueList), +
  448. $(SlotSupportValue))
  449. ifstr(i) $(TccOption) == "tc$arcnet"
  450. read-syms TcarcIsaDlg
  451. else-ifstr(i) $(TccOption) == "tc$tcns"
  452. read-syms TcnsIsaDlg
  453. else-ifstr(i) $(TccOption) == "tc$3147"
  454. read-syms TcnsEisaDlg
  455. else
  456. read-syms TcarcIsaDlg
  457. endif
  458. ui start "InputDlg"
  459. ifstr(i) $(DLGEVENT) == "CONTINUE"
  460. ifstr(i) $(TccOption) == "tc$3147e"
  461. set SlotNumberValue = *($(SlotValueList),+
  462. ~($(SlotTextList),+
  463. $(Combo1Out)))
  464. else
  465. set InterruptValue = *($(InterruptValueList),+
  466. ~($(InterruptTextList),+
  467. $(Combo1Out)))
  468. set IoBaseValue = *($(IoBaseValueList),+
  469. ~($(IoBaseTextList),+
  470. $(Combo2Out)))
  471. set MemoryBaseValue = *($(MemoryBaseValueList),+
  472. ~($(MemoryBaseTextList),+
  473. $(Combo3Out)))
  474. endif
  475. ui pop 1
  476. Debug-Output "$(STF_CONTEXTINFNAME): After Dialog..."
  477. Debug-Output "$(STF_CONTEXTINFNAME): InterruptValue == .$(InterruptValue)."
  478. Debug-Output "$(STF_CONTEXTINFNAME): IoBaseValue == .$(IoBaseValue)."
  479. Debug-Output "$(STF_CONTEXTINFNAME): MemoryBaseValue == .$(MemoryBaseValue)."
  480. Debug-Output "$(STF_CONTEXTINFNAME): SlotValue == .$(SlotValue)."
  481. else-ifstr(i) $(DLGEVENT) == "CANCEL"
  482. set CommonStatus = STATUS_USERCANCEL
  483. Debug-Output "$(STF_CONTEXTINFNAME): Dialog Action Exit. Bye."
  484. ui pop 1
  485. goto InstallOptionExit
  486. else
  487. set CommonStatus = STATUS_USERCANCEL
  488. ui pop 1
  489. Debug-Output "$(STF_CONTEXTINFNAME): Dialog Action Unknown. Bye."
  490. goto InstallOptionExit
  491. endif
  492. AddAdapterSoftwareToRegistry = +
  493. Ifstr(i) $(!NTN_InstallMode) == configure
  494. goto AddAdapterConfigurationToRegistry
  495. Endif
  496. ifint $(OldVersionExisted) == $(TRUE)
  497. goto AddAdapterHardwareToRegistry
  498. Endif
  499. Shell $(UtilityInf), +
  500. AddSoftwareComponent, +
  501. $(Manufacturer), +
  502. $(TccBaseName), +
  503. $(TccBaseName), +
  504. $(SoftwareTitle), +
  505. $(STF_CONTEXTINFNAME), +
  506. $(SoftwareImage), +
  507. "kernel", "NDIS", {}, "",+
  508. $(NetEventDLL)
  509. Set OEM_ABANDON_SOFTWARE = TRUE
  510. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  511. set ShellErrorSection = UtilityInf:AddSoftwareComponent
  512. goto ShellCodeError
  513. endif
  514. set RegistryErrorIndex = $($R0)
  515. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  516. EndWait
  517. Debug-Output $(STF_CONTEXTINFNAME)": AddAdapterSoftware - add component error"
  518. CloseRegKey $($R1)
  519. CloseRegKey $($R2)
  520. CloseRegKey $($R3)
  521. CloseRegKey $($R4)
  522. CloseRegKey $($R5)
  523. goto FatalRegistryError
  524. endif
  525. Set Key_SoftwareProduct = $($R1)
  526. Set Key_SoftwareNetRules = $($R2)
  527. CloseRegKey $($R3)
  528. CloseRegKey $($R4)
  529. CloseRegKey $($R5)
  530. set NewValueList = {+
  531. {SoftwareType, $(NoTitle), $(!REG_VT_SZ), $(SoftwareType)},+
  532. {MajorVersion, $(NoTitle), $(!REG_VT_DWORD), $(SoftwareMajorVersion)},+
  533. {MinorVersion, $(NoTitle), $(!REG_VT_DWORD), $(SoftwareMinorVersion)},+
  534. {Title, $(NoTitle), $(!REG_VT_SZ), $(SoftwareTitle)},+
  535. {Description, $(NoTitle), $(!REG_VT_SZ), $(SoftwareDescription)},+
  536. {ServiceName, $(NoTitle), $(!REG_VT_SZ), $(TccBaseName)},+
  537. {InstallDate, $(NoTitle), $(!REG_VT_DWORD), *($(Now),1)}+
  538. }
  539. Shell $(UtilityInf), AddValueList, $(Key_SoftwareProduct), $(NewValueList)
  540. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  541. set ShellErrorSection = UtilityInf:AddValueList
  542. goto ShellCodeError
  543. endif
  544. Set RegistryErrorIndex = $($R0)
  545. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  546. EndWait
  547. Debug-Output $(STF_CONTEXTINFNAME)": AddAdapterSoftware - add value list error"
  548. CloseRegKey $(Key_SoftwareProduct)
  549. CloseRegKey $(Key_SoftwareNetRules)
  550. goto FatalRegistryError
  551. endif
  552. Set NewValueList = {+
  553. {type, $(NoTitle), $(!REG_VT_SZ), $(NetRuleSoftwareType)},+
  554. {use, $(NoTitle), $(!REG_VT_SZ), $(NetRuleSoftwareUse)}, +
  555. {bindform, $(NoTitle), $(!REG_VT_SZ), $(NetRuleSoftwareBindForm)}, +
  556. {class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NetRuleSoftwareClass)}, +
  557. {bindable, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NetRuleSoftwareBindable)}, +
  558. {InfOption, $(NoTitle), $(!REG_VT_SZ), $(TccOption)}+
  559. }
  560. Shell $(UtilityInf), AddValueList, $(Key_SoftwareNetRules), $(NewValueList)
  561. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  562. set ShellErrorSection = UtilityInf:AddValueList
  563. goto ShellCodeError
  564. endif
  565. Set RegistryErrorIndex = $($R0)
  566. CloseRegKey $(Key_SoftwareProduct)
  567. CloseRegKey $(Key_SoftwareNetRules)
  568. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  569. EndWait
  570. Debug-Output $(STF_CONTEXTINFNAME)": AddAdapterSoftware - add NetRule error"
  571. goto FatalRegistryError
  572. endif
  573. AddAdapterHardwareToRegistry = +
  574. Shell $(UtilityInf), +
  575. AddHardwareComponent, +
  576. $(ProductHdwrName), +
  577. $(STF_CONTEXTINFNAME), +
  578. $(KeyName_Software)
  579. ifint $($R4) != -1
  580. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  581. endif
  582. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  583. set ShellErrorSection = UtilityInf:AddHardwareComponent
  584. goto ShellCodeError
  585. endif
  586. set RegistryErrorIndex = $($R0)
  587. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  588. EndWait
  589. Debug-Output $(STF_CONTEXTINFNAME)": AddAdapterHardware - add component error"
  590. CloseRegKey $($R1)
  591. CloseRegKey $($R2)
  592. CloseRegKey $($R3)
  593. goto FatalRegistryError
  594. endif
  595. set Key_HardwareNetRules = $($R2)
  596. set Key_HardwareParameters = $($R3)
  597. set AdapterNumber = $($R4)
  598. set NewValueList = {+
  599. {Manufacturer, $(NoTitle), $(!REG_VT_SZ), $(Manufacturer)},+
  600. {Title, $(NoTitle), $(!REG_VT_SZ), "["$($R4)"] "$(ProductHdwrTitle)},+
  601. {Description, $(NoTitle), $(!REG_VT_SZ), $(ProductHdwrDesc)},+
  602. {ProductName, $(NoTitle), $(!REG_VT_SZ), $(ProductHdwrName)},+
  603. {ServiceName, $(NoTitle), $(!REG_VT_SZ), $($R5)},+
  604. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  605. {InstallDate, $(NoTitle), $(!REG_VT_DWORD), *($(Now),1)}+
  606. }
  607. Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  608. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  609. set ShellErrorSection = UtilityInf:AddValueList
  610. goto ShellCodeError
  611. endif
  612. CloseRegKey $($R1)
  613. set TempProdName = """"$(ProductHdwrName)$(AdapterNumber)""""
  614. set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  615. set NewValueList = {+
  616. {type, $(NoTitle), $(!REG_VT_SZ), $(NetRuleHardwareType)},+
  617. {bindform, $(NoTitle), $(!REG_VT_SZ), $(TempBindForm)}, +
  618. {class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NetRuleHardwareClass)}, +
  619. {InfOption, $(NoTitle), $(!REG_VT_SZ), $(TccOption)}+
  620. }
  621. Shell $(UtilityInf), AddValueList, $(Key_HardwareNetRules), $(NewValueList)
  622. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  623. set ShellErrorSection = UtilityInf:AddValueList
  624. goto ShellCodeError
  625. endif
  626. set RegistryErrorIndex = $($R0)
  627. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  628. EndWait
  629. Debug-Output $(STF_CONTEXTINFNAME)": AddAdapterHardware - add NetRule error"
  630. CloseRegKey $(Key_HardwareParameters)
  631. CloseRegKey $(Key_HardwareNetRules)
  632. goto FatalRegistryError
  633. endif
  634. CloseRegKey $(Key_HardwareNetRules)
  635. goto AddAdapterConfigurationToRegistry
  636. AddAdapterConfigurationToRegistry = +
  637. Debug-Output "$(STF_CONTEXTINFNAME): Entering AddAdapterConfigurationToRegistry"
  638. Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  639. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  640. Shell $(UtilityInf), GetBusTypeNum
  641. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  642. set ShellErrorSection = UtilityInf:GetBusTypeNum
  643. goto ShellCodeError
  644. else
  645. set BusTypeValue = $($R1)
  646. set BusNumberValue = 0
  647. endif
  648. else
  649. set BusTypeValue = $($R1)
  650. set BusNumberValue = $($R2)
  651. endif
  652. ifstr(i) $(TccOption) == "tc$arcnet"
  653. set NewValueList = {+
  654. {AdapterType, $(NoTitle), $(!REG_VT_DWORD), $(NdisInterfaceIsa)},+
  655. {BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNumberValue)},+
  656. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeValue)},+
  657. {Interrupt, $(NoTitle), $(!REG_VT_DWORD), $(InterruptValue)},+
  658. {IoBase, $(NoTitle), $(!REG_VT_DWORD), $(IoBaseValue)},+
  659. {MediaType, $(NoTitle), $(!REG_VT_DWORD), $(MediaTypeValue)},+
  660. {MemoryBase, $(NoTitle), $(!REG_VT_DWORD), $(MemoryBaseValue)},+
  661. {PacketSize, $(NoTitle), $(!REG_VT_DWORD), $(PacketSizeValue)},+
  662. }
  663. else-ifstr(i) $(TccOption) == "tc$tcns"
  664. set NewValueList = {+
  665. {AdapterType, $(NoTitle), $(!REG_VT_DWORD), $(NdisInterfaceIsa)},+
  666. {BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNumberValue)},+
  667. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeValue)},+
  668. {Interrupt, $(NoTitle), $(!REG_VT_DWORD), $(InterruptValue)},+
  669. {IoBase, $(NoTitle), $(!REG_VT_DWORD), $(IoBaseValue)},+
  670. {MediaType, $(NoTitle), $(!REG_VT_DWORD), $(MediaTypeValue)},+
  671. {MemoryBase, $(NoTitle), $(!REG_VT_DWORD), $(MemoryBaseValue)},+
  672. {PacketSize, $(NoTitle), $(!REG_VT_DWORD), $(PacketSizeValue)},+
  673. }
  674. else-ifstr(i) $(TccOption) == "tc$3147e"
  675. set NewValueList = {+
  676. {AdapterType, $(NoTitle), $(!REG_VT_DWORD), $(NdisInterfaceEisa)},+
  677. {BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNumberValue)},+
  678. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeValue)},+
  679. {EisaCompressedId, $(NoTitle), $(!REG_VT_DWORD), $(Tc3147EisaIdValue)},+
  680. {MediaType, $(NoTitle), $(!REG_VT_DWORD), $(MediaTypeValue)},+
  681. {PacketSize, $(NoTitle), $(!REG_VT_DWORD), $(PacketSizeValue)},+
  682. {SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(SlotNumberValue)},+
  683. }
  684. else
  685. set NewValueList = {+
  686. {AdapterType, $(NoTitle), $(!REG_VT_DWORD), $(NdisInterfaceIsa)},+
  687. {BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNumberValue)},+
  688. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeValue)},+
  689. {Interrupt, $(NoTitle), $(!REG_VT_DWORD), $(InterruptValue)},+
  690. {IoBase, $(NoTitle), $(!REG_VT_DWORD), $(IoBaseValue)},+
  691. {MediaType, $(NoTitle), $(!REG_VT_DWORD), $(MediaTypeValue)},+
  692. {MemoryBase, $(NoTitle), $(!REG_VT_DWORD), $(MemoryBaseValue)},+
  693. {PacketSize, $(NoTitle), $(!REG_VT_DWORD), $(PacketSizeValue)},+
  694. }
  695. Endif
  696. Shell $(UtilityInf), AddValueList, $(Key_HardwareParameters), $(NewValueList)
  697. CloseRegKey $(Key_HardwareParameters)
  698. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  699. set ShellErrorSection = UtilityInf:AddValueList
  700. goto ShellCodeError
  701. endif
  702. set RegistryErrorIndex = $($R0)
  703. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  704. Debug-Output $(STF_CONTEXTINFNAME)": AddAdapterConfiguration - add value list error"
  705. goto FatalRegistryError
  706. endif
  707. EndWait
  708. goto ProcessSuccessExit
  709. CheckAdapterBinding =+
  710. Debug-Output "$(STF_CONTEXTINFNAME): Entering CheckAdapterBinding"
  711. set Error = "CheckAdapterBinding: not required for this adapter"
  712. goto FatalError
  713. RemoveAdapterFromRegistry = +
  714. Debug-Output "$(STF_CONTEXTINFNAME): Entering RemoveAdapterFromRegistry"
  715. OpenRegKey $(!REG_H_LOCAL) "" $(KeyName_Software) $(MAXIMUM_ALLOWED) KeyToReferenceCount
  716. Ifstr $(KeyToReferenceCount) == ""
  717. Debug-Output "$(STF_CONTEXTINFNAME): Could not open Software Base Key"
  718. set RefCountBeforeRemove = 2
  719. goto InstallOptionExit
  720. endif
  721. GetRegValue $(KeyToReferenceCount),"RefCount", RefCountInfo
  722. set RefCountBeforeRemove = *($(RefCountInfo), 4)
  723. CloseRegKey $(KeyToReferenceCount)
  724. Debug-Output "$(STF_CONTEXTINFNAME): Removing Hardware Component"
  725. Shell $(UtilityInf), +
  726. RemoveHardwareComponent, +
  727. $(Manufacturer), +
  728. $(TccBaseName), +
  729. $(!NTN_RegBase)
  730. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  731. set ShellErrorSection = UtilityInf:RemoveHardwareComponent
  732. goto ShellCodeError
  733. endif
  734. Ifstr(i) $($R0) != NO_ERROR
  735. Ifstr(i) $($R0) != REF_COUNT_NOT_ZERO
  736. goto FatalRegistryError
  737. endif
  738. endif
  739. ifint $(RefCountBeforeRemove) == 1
  740. OpenRegKey $(!REG_H_LOCAL) "" $(KeyName_SoftwareRoot) $(MAXIMUM_ALLOWED) Key_SoftwareRoot
  741. EnumRegKey $(Key_SoftwareRoot) KeyList
  742. EnumRegValue $(Key_SoftwareRoot) ValueList
  743. CloseRegKey $(Key_SoftwareRoot)
  744. Debug-Output "$(STF_CONTEXTINFNAME): Reg Key .$(KeyName_SoftwareRoot). opened"
  745. Debug-Output "$(STF_CONTEXTINFNAME): KeyList == .$(KeyList)."
  746. Debug-Output "$(STF_CONTEXTINFNAME): ValueList == .$(ValueList)."
  747. ifstr $(KeyList) == "{}"
  748. ifstr $(ValueList) == "{}"
  749. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase) $(MAXIMUM_ALLOWED) Key_SoftwareBase
  750. DeleteRegKey $(Key_SoftwareBase) $(Manufacturer)
  751. CloseRegKey $(Key_SoftwareBase)
  752. endif
  753. endif
  754. endif
  755. goto InstallOptionExit
  756. UpgradeSoftware = +
  757. Debug-Output "$(STF_CONTEXTINFNAME): Entering UpgradeSoftware"
  758. ifstr(i) $(KeyName_Software) == $(!NTN_RegBase)
  759. OpenRegKey $(!REG_H_LOCAL) "" $(KeyName_Software) $(MAXIMUM_ALLOWED) Key_Product
  760. Ifstr $(Key_Product) != $(Key_Null)
  761. GetRegValue $(Key_Product),"MajorVersion", VersionInfo
  762. set Version = *($(VersionInfo), 4)
  763. Shell $(UtilityInf), GetInfFileNameFromRegistry, $(Key_Product)
  764. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  765. set ShellErrorSection = UtilityInf:GetFileNameFromRegistry
  766. goto ShellCodeError
  767. endif
  768. set !UG_Filename = $($R0)
  769. ifstr(i) $(!UG_Filename) != ""
  770. install "Install-Update"
  771. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  772. goto FatalError
  773. endif
  774. endif
  775. SetRegValue $(Key_Product) {MajorVersion, $(NoTitle), $(!REG_VT_SZ), $(SoftwareMajorVersion)}
  776. SetRegValue $(Key_Product) {MinorVersion, $(NoTitle), $(!REG_VT_SZ), $(SoftwareMinorVersion)}
  777. ifint $(Version) != $(SoftwareVersion)
  778. Debug-Output "$(STF_CONTEXTINFNAME): Version .$(Version). != SoftwareVersion .$(SoftwareVersion)."
  779. endif
  780. CloseRegKey $(Key_Product)
  781. else
  782. goto FatalRegistryError
  783. endif
  784. else
  785. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetworkCardKey
  786. Ifstr(i) $(NetworkCardKey) != $(Key_Null)
  787. GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  788. set ServiceName = *($(ServiceNameInfo), 4)
  789. OpenRegKey $(NetworkCardKey) "" "NetRules" $(MAXIMUM_ALLOWED) NetRuleKey
  790. Ifstr(i) $(NetRuleKey) != $(Key_Null)
  791. Debug-Output "$(STF_CONTEXTINFNAME): NetRuleKey .$(NetRuleKey). != Key_Null .$(Key_Null)."
  792. else
  793. goto FatalRegistryError
  794. endif
  795. CloseRegKey $(NetRules)
  796. CloseRegKey $(NetworkCardKey)
  797. else
  798. goto FatalRegistryError
  799. endif
  800. OpenRegKey $(!REG_H_LOCAL) +
  801. "" $(!NTN_ServiceBase)"\"$(ServiceName) +
  802. $(MAXIMUM_ALLOWED) +
  803. ServiceKey
  804. Ifstr(i) $(ServiceKey) != $(Key_Null)
  805. CloseRegKey $(ServiceKey)
  806. else
  807. goto FatalRegistryError
  808. endif
  809. endif
  810. ;
  811. ; Enumerate all netcards installed of this type and update them
  812. ;
  813. set iSearch = 1
  814. nextnetcard = +
  815. Shell $(UtilityInf), FindNextNetworkCard, $(TccBaseName), $(iSearch)
  816. set KeyNetcard = $($R0)
  817. set iSearch = $($R1)
  818. Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  819. Ifstr $(KeyNetcard) != $(KeyNull)
  820. Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  821. SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  822. CloseRegKey $(KeyNetcard)
  823. goto nextnetcard
  824. Endif
  825. goto InstallOptionExit
  826. ProcessSuccessExit = +
  827. goto InstallOptionExit
  828. ProcessAbandonInstall = +
  829. ForListDo $(OEM_ABANDON_OPTIONS)
  830. Shell $(UtilityInf), +
  831. RemoveHardwareComponent, +
  832. $(Manufacturer), +
  833. $(TccBaseName), +
  834. $($)
  835. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  836. set ShellErrorSection = UtilityInf:RemoveHardwareComponent
  837. goto ShellCodeError
  838. endif
  839. set RegistryErrorIndex = $($R0)
  840. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  841. goto FatalRegistryError
  842. endif
  843. EndForListDo
  844. Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  845. Shell $(UtilityInf), +
  846. RemoveSoftwareComponent, +
  847. $(Manufacturer), +
  848. $(TccBaseName), +
  849. FALSE
  850. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  851. set ShellErrorSection = UtilityInf:RemoveSoftwareComponent
  852. goto ShellCodeError
  853. endif
  854. set RegistryErrorIndex = $($R0)
  855. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  856. goto FatalRegistryError
  857. endif
  858. endif
  859. goto InstallOptionExit
  860. ProcessWarningMessage = +
  861. Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  862. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  863. set ShellErrorSection = SubroutineInf:SetupMessage
  864. goto ShellCodeError
  865. endif
  866. ifstr(i) $($R1) == "OK"
  867. goto $(to)
  868. else-ifstr(i) $($R1) == "CANCEL"
  869. goto $(from)
  870. else
  871. goto "InstallOptionExit"
  872. endif
  873. SetNonFatalInfo = +
  874. Set CommonStatus = STATUS_USERCANCEL
  875. Set Severity = STATUS
  876. goto ProcessNonFatalMessage
  877. ProcessNonFatalMessage = +
  878. ifstr(i) $(Error) == ""
  879. Set Severity = NONFATAL
  880. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  881. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  882. set ShellErrorSection = UtilityInf:RegistryErrorString
  883. goto ShellCodeError
  884. endif
  885. set Error = $($R0)
  886. endif
  887. Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  888. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  889. set ShellErrorSection = SubroutineInf:SetupMessage
  890. goto ShellCodeError
  891. endif
  892. ifstr(i) $($R1) == "OK"
  893. goto $(from)
  894. else
  895. goto "InstallOptionExit"
  896. endif
  897. FatalRegistryError = +
  898. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  899. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  900. set ShellErrorSection = UtilityInf:RegistryErrorString
  901. goto ShellCodeError
  902. endif
  903. set Error = $($R0)
  904. goto FatalError
  905. FatalError = +
  906. ifstr(i) $(Error) == ""
  907. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  908. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  909. set ShellErrorSection = UtilityInf:RegistryErrorString
  910. goto ShellCodeError
  911. endif
  912. set Error = $($R0)
  913. endif
  914. Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  915. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  916. set ShellErrorSection = UtilityInf:SetupMessage
  917. goto ShellCodeError
  918. endif
  919. goto SetFailedStatusAndExit
  920. ShellCodeError = +
  921. Debug-Output $(STF_CONTEXTINFNAME)": Shell error, $(ShellErrorSection)"
  922. set DlgType = "MessageBox"
  923. set STF_MB_TITLE = "Error: "$(FunctionTitle)
  924. set STF_MB_TEXT = "Shell Code Error"
  925. set STF_MB_TYPE = 1
  926. set STF_MB_ICON = 3
  927. set STF_MB_DEF = 1
  928. ui start "Error Message"
  929. goto SetFailedStatusAndExit
  930. SetFailedStatusAndExit = +
  931. set CommonStatus = STATUS_FAILED
  932. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  933. set OEM_ABANDON_ON = FALSE
  934. goto ProcessAbandonInstall
  935. endif
  936. goto InstallOptionExit
  937. InstallOptionExit = +
  938. Return $(CommonStatus)