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.

806 lines
22 KiB

  1. ;***********************************************************************
  2. ;
  3. ; OEMNXPXS.INF
  4. ;
  5. ; XNS network SETUP INF file.
  6. ;
  7. ; History:
  8. ; davidhov 00-Feb-1992 Created
  9. ; terryk 27-Feb-1992 Reorganize section location
  10. ; added comment
  11. ; terryk 03-Mar-1992 Changed to XNS setup
  12. ; terryk 02-Apr-1992 Code review changed
  13. ; davidhov 03-Apr-1992 Enhanced to use new INF section
  14. ; structure from SunilP, et al.
  15. ;
  16. ;***********************************************************************
  17. ;-----------------------------------------------------------------------
  18. ; OPTION TYPE
  19. ; -----------
  20. ; This identifies the Option type we are dealing with. The different
  21. ; possible types are:
  22. ;
  23. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  24. ;
  25. ; Types specific to networking:
  26. ;
  27. ; NetAdapter, a netcard / adapter combination or just a netcard
  28. ; NetDriver, just a netcard driver
  29. ; NetTransport, a complete NDIS-compliant TDI transport stack
  30. ; NetService, an NT networking service
  31. ; NetWork, a complete network ensemble.
  32. ; NetProvider a complete network which supports NT MPR protocol
  33. ;-----------------------------------------------------------------------
  34. [Identification]
  35. OptionType = NetTransport
  36. ;-----------------------------------------------------------------------
  37. ; LANGUAGES SUPPORTED
  38. ; -------------------
  39. ;
  40. ; The languages supported by the OEM INF, For every language supported
  41. ; we need to have a separate text section for every displayable text
  42. ; section.
  43. ;
  44. ;-----------------------------------------------------------------------
  45. [LanguagesSupported]
  46. ENG
  47. ;-----------------------------------------------------------------------
  48. ; OPTION LIST
  49. ; -----------
  50. ; This section lists the OEM Option key names. These keys are locale
  51. ; independent and used to represent the option in a locale independent
  52. ; manner.
  53. ;
  54. ;-----------------------------------------------------------------------
  55. [Options]
  56. XNS
  57. ;-----------------------------------------------------------------------
  58. ; OPTION TEXT SECTION
  59. ; -------------------
  60. ; These are text strings used to identify the option to the user. There
  61. ; are separate sections for each language supported. The format of the
  62. ; section name is "OptionsText" concatenated with the Language represented
  63. ; by the section.
  64. ;
  65. ;-----------------------------------------------------------------------
  66. [OptionsTextENG]
  67. XNS = "Ungermann-Bass XNS"
  68. ;***********************************************************************
  69. ; CONSTANTS FOR USING DIALOGS
  70. ;***********************************************************************
  71. [FileConstants]
  72. ;
  73. ; File names, etc.
  74. ;
  75. UtilityInf = "UTILITY.INF"
  76. subroutineinf = "SUBROUTN.INF"
  77. SoftwareType = "transport"
  78. Exit_Code = 0
  79. ;ShellCode = 0
  80. ;
  81. ; EventLog Message File
  82. ;
  83. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  84. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  85. ;
  86. ; Product Info
  87. ;
  88. Manufacturer = "Ungermann-Bass"
  89. ProductMajorVersion = "4"
  90. ProductMinorVersion = "0"
  91. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  92. ;
  93. ; Software
  94. ;
  95. ProductSoftwareName = "XNS"
  96. ProductSoftwareDisplayName = "Ungermann-Bass XNS"
  97. ProductSoftwareTitle = "Ungermann-Bass XNS"
  98. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ubXNS.sys"
  99. NetRuleSoftwareType = "XNS netBiosTransport"
  100. NetRuleSoftwareUse = $(SoftwareType)" yes yes"
  101. NetRuleSoftwareBindForm = """XNS"" yes yes simple"
  102. ;
  103. ; Registry Key
  104. ;
  105. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  106. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductSoftwareName)"\Parameters"
  107. [GeneralConstants]
  108. ;
  109. ; Program flow control variables.
  110. ;
  111. from = ""
  112. to = ""
  113. ;
  114. ; Return codes; Exit_Code is set to one of these
  115. ;
  116. ExitCodeOk = 0
  117. ExitCodeCancel = 1
  118. ExitCodeFatal = 2
  119. KeyNull = ""
  120. MAXIMUM_ALLOWED = 33554432
  121. RegistryErrorIndex = NO_ERROR
  122. KeyProduct = ""
  123. KeyParameters = ""
  124. TRUE = 1
  125. FALSE = 0
  126. NoTitle = 0
  127. ExitState = "Active"
  128. OldVersionExisted = $(FALSE)
  129. DriverPath = $(!STF_NTPATH)\drivers
  130. ;***********************************************************************
  131. ; Language-Dependent Dialog Constants
  132. ;***********************************************************************
  133. [FileConstantsENG]
  134. ;
  135. ; Variables to support thermometer gauge and error dialogs
  136. ;
  137. ProCaption = "Windows NT Setup"
  138. ProCancel = "Cancel"
  139. ProCancelMsg = "Windows NT Networking is not correctly installed. "+
  140. "Are you sure you want to cancel copying files?"
  141. ProCancelCap = "Network Setup Message"
  142. ProText1 = "Copying:"
  143. ProText2 = "To:"
  144. ;
  145. ; Product Info
  146. ;
  147. FunctionTitle = "Xns Setup"
  148. ;
  149. ; Software
  150. ;
  151. ProductSoftwareDescription = "Ungermann-Bass XNS 1.0 Transport"
  152. ;
  153. [DialogConstantsENG]
  154. ;
  155. ; Common button names, etc.
  156. ;
  157. Help = "&Help"
  158. Exit = "Cancel"
  159. OK = "OK"
  160. HelpContext = ""
  161. Continue = "Continue"
  162. Cancel = "Cancel"
  163. [date]
  164. ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  165. ; Minute, Second }
  166. Now = {} ? $(!LIBHANDLE) GetSystemDate
  167. ;-----------------------------------------------
  168. ; Input DIALOGS
  169. ;-----------------------------------------------
  170. [FileDependentDlgENG]
  171. DlgType = "Radio" ; DON'T NATIONALIZE
  172. DlgTemplate = "NBF" ; DON'T NATIONALIZE
  173. Caption = $(FunctionTitle)
  174. GroupLabel = "Optimization:"
  175. Radio1 = "&Minimize Memory Used"
  176. Radio2 = "&Balance"
  177. Radio3 = "M&aximize Throughput && Connections"
  178. OptionsGreyed = {}
  179. HelpContext = $(!IDH_DB_OEMNXPXS_INS)
  180. ;---------------------------------------------------------------------------
  181. ; 1. Identify
  182. ;
  183. ; DESCRIPTION: To verify that this INF deals with the same type of options
  184. ; as we are choosing currently.
  185. ;
  186. ; INPUT: None
  187. ;
  188. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  189. ; $($R1): Option Type (COMPUTER ...)
  190. ; $($R2): Diskette description
  191. ;---------------------------------------------------------------------------
  192. [Identify]
  193. ;
  194. ;
  195. read-syms Identification
  196. set Status = STATUS_SUCCESSFUL
  197. set Identifier = $(OptionType)
  198. set Media = #("Source Media Descriptions", 1, 1)
  199. Return $(Status) $(Identifier) $(Media)
  200. ;------------------------------------------------------------------------
  201. ; 2. ReturnOptions:
  202. ;
  203. ; DESCRIPTION: To return the option list supported by this INF and the
  204. ; localised text list representing the options.
  205. ;
  206. ;
  207. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  208. ;
  209. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  210. ; STATUS_NOLANGUAGE
  211. ; STATUS_FAILED
  212. ;
  213. ; $($R1): Option List
  214. ; $($R2): Option Text List
  215. ;------------------------------------------------------------------------
  216. [ReturnOptions]
  217. ;
  218. ;
  219. set Status = STATUS_FAILED
  220. set OptionList = {}
  221. set OptionTextList = {}
  222. ;
  223. ; Check if the language requested is supported
  224. ;
  225. set LanguageList = ^(LanguagesSupported, 1)
  226. Ifcontains(i) $($0) in $(LanguageList)
  227. goto returnoptions
  228. else
  229. set Status = STATUS_NOLANGUAGE
  230. goto finish_ReturnOptions
  231. endif
  232. ;
  233. ; form a list of all the options and another of the text representing
  234. ;
  235. returnoptions = +
  236. set OptionList = ^(Options, 1)
  237. set OptionTextList = ^(OptionsText$($0), 1)
  238. set Status = STATUS_SUCCESSFUL
  239. finish_ReturnOptions = +
  240. Return $(Status) $(OptionList) $(OptionTextList)
  241. ;----------InstallOption-------------------------------------------------
  242. ;
  243. ; InstallOption:
  244. ;
  245. ; This section is shelled to by main installation processing
  246. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  247. ;
  248. ;
  249. ; FUNCTION: To copy files representing Options
  250. ; To configure the installed option
  251. ; To update the registry for the installed option
  252. ;
  253. ; INPUT: $($0): Language to use
  254. ; $($1): OptionID to install
  255. ; $($2): SourceDirectory
  256. ; $($3): AddCopy (YES | NO)
  257. ; $($4): DoCopy (YES | NO)
  258. ; $($5): DoConfig (YES | NO)
  259. ;
  260. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  261. ; STATUS_NOLANGUAGE |
  262. ; STATUS_USERCANCEL |
  263. ; STATUS_FAILED
  264. ;
  265. ;------------------------------------------------------------------------
  266. [InstallOption]
  267. ;
  268. ; extract parameters
  269. ;
  270. set Option = $($1)
  271. set SrcDir = $($2)
  272. set AddCopy = $($3)
  273. set DoCopy = $($4)
  274. set DoConfig = $($5)
  275. ;
  276. ; Check if the language requested is supported
  277. ;
  278. set LanguageList = ^(LanguagesSupported, 1)
  279. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  280. Return STATUS_NOLANGUAGE
  281. endif
  282. Debug-Output "OEMNXPXS.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  283. Debug-Output "OEMNXPXS.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  284. ; define all the constants
  285. set-subst LF = "\n"
  286. read-syms GeneralConstants
  287. read-syms FileConstants
  288. read-syms DialogConstants$(!STF_LANGUAGE)
  289. ifstr(i) $(!NTN_Origination) == "NCPA"
  290. set Continue = $(OK)
  291. endif
  292. read-syms FileConstants$(!STF_LANGUAGE)
  293. detect date
  294. set-title $(FunctionTitle)
  295. set to = Begin
  296. set from = Begin
  297. ;
  298. ; Assume all is well.
  299. ;
  300. set CommonStatus = STATUS_SUCCESSFUL
  301. EndWait
  302. ;
  303. ; Set up the operation-mode-based variables and gaily welcome
  304. ; the user. If the "install mode" variable is improperly set,
  305. ; assume this is a new installation.
  306. ;
  307. Begin = +
  308. Ifstr(i) $(!NTN_InstallMode) == deinstall
  309. set StartLabel = removeadapter
  310. else-Ifstr(i) $(!NTN_InstallMode) == Update
  311. set StartLabel = UpgradeSoftware
  312. else-Ifstr(i) $(!NTN_InstallMode) == bind
  313. set StartLabel = bindingadapter
  314. else-Ifstr(i) $(!NTN_InstallMode) == configure
  315. ;
  316. ; You cannot config the software and hardware component
  317. ;
  318. Debug-Output "Cannot configure the XNS driver software."
  319. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  320. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  321. Debug-Output "ShellCode error: cannot get an error string."
  322. goto ShellCodeError
  323. endif
  324. set Error = $($R0)
  325. set from = end
  326. set to = end
  327. goto nonfatal
  328. else
  329. set StartLabel = installadapter
  330. endif
  331. ;
  332. ; set up default parameter
  333. ;
  334. set RadioDefault = 2
  335. set RadioIn = {$(RadioDefault)}
  336. set Size = 2
  337. set from = $(fatal)
  338. set to = $(fatal)
  339. goto $(StartLabel)
  340. ;-----------------------------------------------
  341. ; Installation Section
  342. ;-----------------------------------------------
  343. installadapter = +
  344. ;
  345. ; First, check whether the same version of the software exists
  346. ;
  347. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  348. Ifstr $(KeyProduct) != $(KeyNull)
  349. ;
  350. ; Same version already existed in the local machine
  351. ; Popup the dialog and ask the user whether he wants to continue
  352. ;
  353. CloseRegKey $(KeyProduct)
  354. Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  355. $(ProductVersion)
  356. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  357. Debug-Output "ShellCode error: cannot get an error string."
  358. goto ShellCodeError
  359. endif
  360. goto end
  361. endif
  362. CloseRegKey $(KeyProduct)
  363. goto adapteroptions
  364. ;-----------------------------------------------
  365. ; Configuration Section
  366. ;-----------------------------------------------
  367. ;
  368. ; Get the current values of all the parameters
  369. ;
  370. configureadapter = +
  371. goto successful
  372. ;
  373. ; Let the user bang on the options until satisfied.
  374. ;
  375. adapteroptions = +
  376. set from = adapteroptions
  377. goto installproduct
  378. ;
  379. ; If installing, go create the necessary keys;
  380. ; if configuring, they're already open.
  381. ;
  382. installproduct = +
  383. StartWait
  384. ;
  385. ; Now XNS is to be installed
  386. ;
  387. ifint $(OldVersionExisted) == $(FALSE)
  388. Ifstr(i) $(DoCopy) == "YES"
  389. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  390. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  391. Goto ShellCodeError
  392. Else-Ifstr(i) $($R0) == STATUS_FAILED
  393. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  394. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  395. goto ShellCodeError
  396. endif
  397. set Error = $($R0)
  398. Goto fatal
  399. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  400. Goto successful
  401. Endif
  402. Set SrcDir = $($R1)
  403. Endif
  404. install "Install-Option"
  405. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  406. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  407. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408. goto ShellCodeError
  409. endif
  410. set Error = $($R0)
  411. goto fatal
  412. endif
  413. set OEM_ABANDON_ON = TRUE
  414. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  415. $(ProductSoftwareName), +
  416. $(ProductSoftwareName), +
  417. $(ProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +
  418. $(ProductSoftwareImagePath), "kernel", "TDI", {}, "",+
  419. $(IoLogMsgDLL)
  420. set RegistryErrorIndex = $($R0)
  421. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  422. EndWait
  423. CloseRegKey $($R1)
  424. CloseRegKey $($R2)
  425. CloseRegKey $($R3)
  426. CloseRegKey $($R4)
  427. CloseRegKey $($R5)
  428. goto fatalRegistry
  429. endif
  430. ;
  431. ; At this point:
  432. ; $R1 contains the product version key handle;
  433. ; $R2 contains the NetRules subkey handle;
  434. ; $R3 contains the new Services key handle; and
  435. ; $R4 contains the Parameters key
  436. ; $R5 contains the Linkage Key
  437. ;
  438. Set SoftProductKey = $($R1)
  439. Set SoftNetRuleKey = $($R2)
  440. Set SoftServiceKey = $($R3)
  441. set KeyParameters = $($R4)
  442. Set SoftLinkageKey = $($R5)
  443. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  444. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  445. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  446. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  447. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  448. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  449. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  450. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  451. set RegistryErrorIndex = $($R0)
  452. Ifstr $(RegistryErrorIndex) != NO_ERROR
  453. CloseRegKey $(SoftProductKey)
  454. CloseRegKey $(SoftNetRuleKey)
  455. CloseRegKey $(SoftServiceKey)
  456. CloseRegKey $(SoftLinkageKey)
  457. CloseRegKey $(KeyParameters)
  458. goto fatalRegistry
  459. endif
  460. set NewValueList = {{type ,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)}, +
  461. {use ,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  462. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  463. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  464. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  465. set RegistryErrorIndex = $($R0)
  466. Ifstr $(RegistryErrorIndex) != NO_ERROR
  467. CloseRegKey $(SoftProductKey)
  468. CloseRegKey $(SoftNetRuleKey)
  469. CloseRegKey $(SoftServiceKey)
  470. CloseRegKey $(SoftLinkageKey)
  471. CloseRegKey $(KeyParameters)
  472. goto fatalRegistry
  473. endif
  474. ;
  475. ; Write the RPC protocol string token.
  476. ;
  477. Set NewValueList = {{NbProvider,$(NoTitle),$(!REG_VT_SZ),"_nb"}}
  478. Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  479. Ifstr $(RegistryErrorIndex) != NO_ERROR
  480. CloseRegKey $(SoftProductKey)
  481. CloseRegKey $(SoftNetRuleKey)
  482. CloseRegKey $(SoftServiceKey)
  483. CloseRegKey $(SoftLinkageKey)
  484. goto fatalRegistry
  485. endif
  486. CloseRegKey $(SoftProductKey)
  487. CloseRegKey $(SoftNetRuleKey)
  488. CloseRegKey $(SoftServiceKey)
  489. CloseRegKey $(SoftLinkageKey)
  490. endif
  491. goto writeparameters
  492. ;
  493. ; REQUIRED: $(KeyParameters) contains service Parameters key handle
  494. ;
  495. writeparameters = +
  496. ;
  497. ; Add the rest of the parameters to the Services area
  498. ;
  499. EndWait
  500. goto successful
  501. ;-----------------------------------------------
  502. ; Binding section
  503. ;-----------------------------------------------
  504. bindingadapter =+
  505. set Error = "Binding: Sorry, not yet implemented."
  506. goto fatal
  507. ;-----------------------------------------------
  508. ; Removeadapter section
  509. ;-----------------------------------------------
  510. removeadapter = +
  511. ;
  512. ; Remove NETBIOS service
  513. ;
  514. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  515. $(ProductSoftwareName)
  516. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  517. Debug-Output "ShellCode error"
  518. goto ShellCodeError
  519. endif
  520. set RegistryErrorIndex = $($R0)
  521. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  522. goto fatalregistry
  523. endif
  524. goto end
  525. ;-----------------------------------------------
  526. ; Upgrade Software section
  527. ;-----------------------------------------------
  528. UpgradeSoftware = +
  529. ; Upgrade software component
  530. ;
  531. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  532. Ifstr $(KeyProduct) != $(KeyNull)
  533. install "Install-Update"
  534. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  535. goto fatal
  536. endif
  537. ; Upgrade the version number
  538. ;
  539. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  540. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  541. ;
  542. ; do nothing for update
  543. ;
  544. CloseRegKey $(KeyProduct)
  545. else
  546. ;
  547. ; Cannot Open software key, goto ERROR
  548. ;
  549. goto fatalregistry
  550. endif
  551. goto end
  552. ;
  553. ; End of Upgrade Software
  554. ;
  555. ;
  556. ; Escape hatches
  557. ;
  558. successful = +
  559. goto end
  560. ;
  561. ; warning display
  562. ;
  563. warning = +
  564. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  565. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  566. goto ShellCodeError
  567. endif
  568. ifstr(i) $($R1) == "OK"
  569. goto $(to)
  570. else-ifstr(i) $($R1) == "CANCEL"
  571. goto $(from)
  572. else
  573. ; Debug-Msg "Error Error Bad DLGEVENT"
  574. goto "end"
  575. endif
  576. ;
  577. ; non fatal error display
  578. ;
  579. nonfatal = +
  580. ifstr(i) $(Error) == ""
  581. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  582. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  583. goto ShellCodeError
  584. endif
  585. set Error = $($R0)
  586. endif
  587. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  588. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  589. goto ShellCodeError
  590. endif
  591. ifstr(i) $($R1) == "OK"
  592. goto $(from)
  593. else
  594. goto "end"
  595. endif
  596. ;
  597. ; Registry is broken
  598. ;
  599. fatalregistry = +
  600. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  601. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  602. goto ShellCodeError
  603. endif
  604. set Error = $($R0)
  605. goto fatal
  606. ;
  607. ; fatal error display
  608. ;
  609. fatal = +
  610. ifstr(i) $(Error) == ""
  611. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  612. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  613. goto ShellCodeError
  614. endif
  615. set Error = $($R0)
  616. endif
  617. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  618. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  619. goto ShellCodeError
  620. endif
  621. goto setfailed
  622. ;
  623. ; Shelling error
  624. ;
  625. ShellCodeError = +
  626. set DlgType = "MessageBox"
  627. set STF_MB_TITLE = "Error: "$(FunctionTitle)
  628. set STF_MB_TEXT = "Shell Code Error"
  629. set STF_MB_TYPE = 1
  630. set STF_MB_ICON = 3
  631. set STF_MB_DEF = 1
  632. ui start "Error Message"
  633. goto setfailed
  634. setfailed = +
  635. set CommonStatus = STATUS_FAILED
  636. ;
  637. ; If OEM_ABANDON_ON, we need to clean up the registry
  638. ;
  639. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  640. set OEM_ABANDON_ON = FALSE
  641. goto removeadapter
  642. endif
  643. goto end
  644. end = +
  645. goto term
  646. term = +
  647. Return $(CommonStatus)
  648. ;***************************************************************
  649. ; INSTALL SECTIONS
  650. ;***************************************************************
  651. [Install-Option]
  652. set STF_VITAL = ""
  653. ifstr(i) $(AddCopy) == "YES"
  654. ;
  655. ; Add the files to the copy list
  656. ;
  657. ; BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  658. ; the other INF files
  659. ;
  660. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  661. endif
  662. ifstr(i) $(DoCopy) == "YES"
  663. ;
  664. ; Copy files in the copy list
  665. ;
  666. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  667. CopyFilesInCopyList
  668. endif
  669. ifstr(i) $(DoConfig) == "YES"
  670. ;
  671. ; Add product to registry
  672. ;
  673. ;
  674. ; Finish up
  675. endif
  676. Exit
  677. [Install-Update]
  678. set STF_VITAL = ""
  679. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  680. ;set STF_VERSION = "YES"
  681. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  682. exit
  683.