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.

1367 lines
41 KiB

  1. ;***********************************************************************
  2. ;
  3. ; OEMNADIN.INF
  4. ;
  5. ; INTEL Ether Express 16 LAN card and driver 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 Elink II 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. ; terryk 24-Aug-1992 Changed it to OEMNADN2.inf
  16. ; terryk 04-Jan-1992 Changed it to OEMNADIN.inf
  17. ;
  18. ;***********************************************************************
  19. ;-----------------------------------------------------------------------
  20. ; OPTION TYPE
  21. ; -----------
  22. ; This identifies the Option type we are dealing with. The different
  23. ; possible types are:
  24. ;
  25. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  26. ;
  27. ; Types specific to networking:
  28. ;
  29. ; NetAdapter, a netcard / adapter combination or just a netcard
  30. ; NetDriver, just a netcard driver
  31. ; NetTransport, a complete NDIS-compliant TDI transport stack
  32. ; NetService, an NT networking service
  33. ; NetWork, a complete network ensemble.
  34. ; NetProvider a complete network which supports NT MPR protocol
  35. ;-----------------------------------------------------------------------
  36. [Identification]
  37. OptionType = NetAdapter
  38. ;-----------------------------------------------------------------------
  39. ; PlatformsSupported
  40. ; ------------------
  41. ; This identifies the platforms supported by the adapter card.
  42. ; Possible types are:
  43. ;
  44. ; ISA, EISA and MCA
  45. ;-----------------------------------------------------------------------
  46. [PlatformsSupported]
  47. ISA
  48. EISA
  49. "Jazz-Internal Bus"
  50. ;-----------------------------------------------------------------------
  51. ; OPTION LIST
  52. ; -----------
  53. ; This section lists the OEM Option key names. These keys are locale
  54. ; independent and used to represent the option in a locale independent
  55. ; manner.
  56. ;
  57. ;-----------------------------------------------------------------------
  58. [Options]
  59. EE16
  60. ;***********************************************************************
  61. ; CONSTANTS FOR USING DIALOGS
  62. ;***********************************************************************
  63. [FileConstants]
  64. ;
  65. ; "AllowEarly": if set to 1, the value "Early" appears in the
  66. ; "I/O Channel Ready" list box. Default value is zero.
  67. ;
  68. AllowEarly = 0
  69. ;
  70. ;
  71. ; File names, etc.
  72. ;
  73. UtilityInf = "UTILITY.INF"
  74. ParamInf = "NCPARAM.INF"
  75. subroutineinf = "SUBROUTN.INF"
  76. SoftwareType = "driver"
  77. Exit_Code = 0
  78. ;ShellCode = 0
  79. ;
  80. ; EventLog Message File
  81. ;
  82. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  83. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  84. ; Product Info
  85. ;
  86. Manufacturer = "Microsoft"
  87. ProductMajorVersion = "4"
  88. ProductMinorVersion = "0"
  89. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  90. ;
  91. ; Software
  92. ;
  93. ProductSoftwareName = "EE16"
  94. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ee16.sys"
  95. NetRuleSoftwareType = "ee16Sys ndisDriver ee16Driver"
  96. NetRuleSoftwareUse = $(SoftwareType)
  97. NetRuleSoftwareBindForm = """Ee16Sys"" yes no container"
  98. NetRuleSoftwareClass = {"ee16Driver basic"}
  99. NetRuleSoftwareBindable = {"ee16Driver ee16Adapter non exclusive 100"} ;
  100. ; Hardware
  101. ;
  102. ProductHardwareName = "EE16"
  103. NetRuleHardwareType = "ee16 ee16Adapter"
  104. NetRuleHardwareBindForm = " yes yes container"
  105. NetRuleHardwareClass = {"ee16Adapter basic"}
  106. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  107. ;
  108. ; Registry Key
  109. ;
  110. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  111. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  112. ;
  113. ; Transceiver Constants
  114. ;
  115. Transceiver1 = "Thick Net (AUI/DIX)"
  116. Transceiver2 = "Thin Net (BNC/COAX)"
  117. Transceiver3 = "Twisted-Pair (TPE)"
  118. [GeneralConstants]
  119. ;
  120. ; Program flow control variables.
  121. ;
  122. from = ""
  123. to = ""
  124. ;
  125. ; Return codes; Exit_Code is set to one of these
  126. ;
  127. ExitCodeOk = 0
  128. ExitCodeCancel = 1
  129. ExitCodeFatal = 2
  130. KeyNull = ""
  131. MAXIMUM_ALLOWED = 33554432
  132. RegistryErrorIndex = NO_ERROR
  133. KeyProduct = ""
  134. KeyParameters = ""
  135. TRUE = 1
  136. FALSE = 0
  137. NoTitle = 0
  138. ExitState = "Active"
  139. OldVersionExisted = $(FALSE)
  140. DriverPath = $(!STF_NTPATH)\drivers
  141. [date]
  142. ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  143. ; Minute, Second }
  144. Now = {} ? $(!LIBHANDLE) GetSystemDate
  145. ;---------------------------------------------------------------------------
  146. ; 1. Identify
  147. ;
  148. ; DESCRIPTION: To verify that this INF deals with the same type of options
  149. ; as we are choosing currently.
  150. ;
  151. ; INPUT: None
  152. ;
  153. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  154. ; $($R1): Option Type (COMPUTER ...)
  155. ; $($R2): Diskette description
  156. ;---------------------------------------------------------------------------
  157. [Identify]
  158. ;
  159. ;
  160. read-syms Identification
  161. set Status = STATUS_SUCCESSFUL
  162. set Identifier = $(OptionType)
  163. set Media = #("Source Media Descriptions", 1, 1)
  164. Return $(Status) $(Identifier) $(Media)
  165. ;------------------------------------------------------------------------
  166. ; 2. ReturnOptions:
  167. ;
  168. ; DESCRIPTION: To return the option list supported by this INF and the
  169. ; localised text list representing the options.
  170. ;
  171. ;
  172. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  173. ;
  174. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  175. ; STATUS_NOLANGUAGE
  176. ; STATUS_FAILED
  177. ; STATUS_NOTSUPPORTED
  178. ;
  179. ; $($R1): Option List
  180. ; $($R2): Option Text List
  181. ;------------------------------------------------------------------------
  182. [ReturnOptions]
  183. ;
  184. ;
  185. set Status = STATUS_FAILED
  186. set OptionList = {}
  187. set OptionTextList = {}
  188. ;
  189. ; Check if the language requested is supported
  190. ;
  191. set LanguageList = ^(LanguagesSupported, 1)
  192. Ifcontains(i) $($0) in $(LanguageList)
  193. ;
  194. ; Check if the platforms requested is supported
  195. ;
  196. ifstr(i) $($1) == ""
  197. goto returnoptions
  198. endif
  199. set PlatformList = ^(PlatformsSupported, 1)
  200. Ifcontains(i) $($1) in $(PlatformList)
  201. goto returnoptions
  202. else
  203. set Status = STATUS_NOTSUPPORTED
  204. goto finish_ReturnOptions
  205. endif
  206. else
  207. set Status = STATUS_NOLANGUAGE
  208. goto finish_ReturnOptions
  209. endif
  210. ;
  211. ; form a list of all the options and another of the text representing
  212. ;
  213. returnoptions = +
  214. set OptionList = ^(Options, 1)
  215. set OptionTextList = ^(OptionsText$($0), 1)
  216. set Status = STATUS_SUCCESSFUL
  217. finish_ReturnOptions = +
  218. Return $(Status) $(OptionList) $(OptionTextList)
  219. ;----------InstallOption-------------------------------------------------
  220. ;
  221. ; InstallOption:
  222. ;
  223. ; This section is shelled to by main installation processing
  224. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  225. ;
  226. ;
  227. ; FUNCTION: To copy files representing Options
  228. ; To configure the installed option
  229. ; To update the registry for the installed option
  230. ;
  231. ; INPUT: $($0): Language to use
  232. ; $($1): OptionID to install
  233. ; $($2): SourceDirectory
  234. ; $($3): AddCopy (YES | NO)
  235. ; $($4): DoCopy (YES | NO)
  236. ; $($5): DoConfig (YES | NO)
  237. ;
  238. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  239. ; STATUS_NOLANGUAGE |
  240. ; STATUS_USERCANCEL |
  241. ; STATUS_FAILED
  242. ;
  243. ;------------------------------------------------------------------------
  244. [InstallOption]
  245. ;
  246. ; extract parameters
  247. ;
  248. set Option = $($1)
  249. set SrcDir = $($2)
  250. set AddCopy = $($3)
  251. set DoCopy = $($4)
  252. set DoConfig = $($5)
  253. ;
  254. ; Check if the language requested is supported
  255. ;
  256. set LanguageList = ^(LanguagesSupported, 1)
  257. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  258. Return STATUS_NOLANGUAGE
  259. endif
  260. ; define all the constants
  261. set-subst LF = "\n"
  262. read-syms GeneralConstants
  263. read-syms FileConstants
  264. read-syms DialogConstants$(!STF_LANGUAGE)
  265. ifstr(i) $(!NTN_Origination) == "NCPA"
  266. set Continue = $(OK)
  267. endif
  268. read-syms FileConstants$(!STF_LANGUAGE)
  269. detect date
  270. set-title $(FunctionTitle)
  271. set to = Begin
  272. set from = Begin
  273. ;
  274. ; Assume all is well.
  275. ;
  276. set CommonStatus = STATUS_SUCCESSFUL
  277. EndWait
  278. ;
  279. ; Set up the operation-mode-based variables and gaily welcome
  280. ; the user. If the "install mode" variable is improperly set,
  281. ; assume this is a new installation.
  282. ;
  283. Begin = +
  284. set ActivateDetection = FALSE
  285. Ifstr(i) $(!NTN_InstallMode) == deinstall
  286. set StartLabel = removeadapter
  287. else-Ifstr(i) $(!NTN_InstallMode) == Update
  288. set StartLabel = UpgradeSoftware
  289. else-Ifstr(i) $(!NTN_InstallMode) == bind
  290. set StartLabel = bindingadapter
  291. else-Ifstr(i) $(!NTN_InstallMode) == configure
  292. set CommonStatus = STATUS_REBOOT
  293. set ActivateDetection = TRUE
  294. set StartLabel = configureadapter
  295. ;
  296. ; You cannot config the software component
  297. ;
  298. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  299. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  300. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  301. Debug-Output "ShellCode error: cannot get an error string."
  302. goto ShellCodeError
  303. endif
  304. set Error = $($R0)
  305. set from = end
  306. set to = end
  307. goto nonfatalinfo
  308. endif
  309. else
  310. set StartLabel = installadapter
  311. set OEM_ABANDON_OPTIONS = {}
  312. set OEM_ABANDON_SOFTWARE = FALSE
  313. set OEM_ABANDON_ON = TRUE
  314. set ActivateDetection = TRUE
  315. endif
  316. ;===================================================
  317. ; Netcard Detection logic
  318. ;
  319. ; Initialize use of netcard detection;
  320. ;
  321. ; BUGBUG: is this OK? Should NCPASHEL.INF turn it on?
  322. ; No, I think the NCPA should turn it on,
  323. ; in NCPDINST.CXX.
  324. ;
  325. ; Construct require global parameter variables
  326. ;
  327. Debug-Output "OEMNADIN.INF: =================================================="
  328. Debug-Output "OEMNADIN.INF: STF_CWDIR is: "$(!STF_CWDIR)
  329. Debug-Output "OEMNADIN.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  330. Debug-Output "OEMNADIN.INF: Option is: "$(Option)
  331. Debug-Output "OEMNADIN.INF: !STF_NCDETECT is: "$(!STF_NCDETECT)
  332. Debug-Output "OEMNADIN.INF: !STF_NCOPTION is: "$(!STF_NCOPTION)
  333. Debug-Output "OEMNADIN.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  334. Debug-Output "OEMNADIN.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  335. Debug-Output "OEMNADIN.INF: =================================================="
  336. Set DetectedCard = FALSE
  337. Ifstr(i) $(ActivateDetection) != TRUE
  338. Goto skipdetection
  339. Endif
  340. ;
  341. ; Set !STF_NC_PARAMS and !STF_NC_PNAMES by calling
  342. ; PARAM.INF!Param_BuildTypeLists.
  343. ; Pass it a list of the form:
  344. ;
  345. ; { { <param name>,
  346. ; <name of choice list var>,
  347. ; <name of default var> },
  348. ; ...
  349. ; }
  350. ;
  351. Set TypeList = {{IRQ,IRQList,IRQValue},+
  352. {IOADDR, IOBaseAddrDecList, IOBaseAddrValue},+
  353. {IOCHANNELREADY, IOReadyList_ignore, IOReady},+
  354. {TRANSCEIVER, TransceiverList_ignore, Transceiver}+
  355. }
  356. Debug-Output "OEMNADIN.INF: Calling Param_BuildTypeLists"
  357. Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  358. Set Status = $($R0)
  359. ifstr(i) $(Status) != STATUS_SUCCESSFUL
  360. Goto fataldetect
  361. Endif
  362. Debug-Output "OEMNADIN.INF: Calling Param_SetDefaults"
  363. Shell $(ParamInf) Param_SetDefaults {}
  364. ; Default to Late and Thin
  365. set IOReady = 2
  366. set Transceiver = 2
  367. ; Establish presentation versions of choice lists.
  368. Shell $(ParamInf) HexListFromDecList $(IOBaseAddrDecList)
  369. Set IOBaseAddrHexList = $($R0)
  370. ; Since we have IRQ higher than 9, sort the IRQ list.
  371. Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  372. Set IRQList = $($R0)
  373. ; If this is a detected card, set the flag.
  374. Ifstr(i) $(!STF_NCDETECT) == YES
  375. Ifstr(i) $(!STF_NCOPTION) == $(Option)
  376. Set DetectedCard = TRUE
  377. Debug-Output "OEMNADIN.INF: Setting DetectedCard to TRUE"
  378. Endif
  379. Endif
  380. ;
  381. ; End Netcard Detection logic
  382. ;===================================================
  383. skipdetection =+
  384. set from = $(fatal)
  385. set to = $(fatal)
  386. goto $(StartLabel)
  387. ;-----------------------------------------------
  388. ; Installation Section
  389. ;-----------------------------------------------
  390. installadapter = +
  391. ;
  392. ; First, check whether the same version of the software exists
  393. ;
  394. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  395. Ifstr $(KeyProduct) != $(KeyNull)
  396. ;
  397. ; Same version already existed in the local machine
  398. ; Popup the dialog and ask the user whether he wants to continue
  399. ;
  400. CloseRegKey $(KeyProduct)
  401. ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  402. ;
  403. ; Cannot Install the same software again
  404. ;
  405. Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  406. $(ProductVersion)
  407. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408. Debug-Output "ShellCode error: cannot get an error string."
  409. goto ShellCodeError
  410. endif
  411. goto end
  412. else
  413. ;
  414. ; Add a new adapter card?
  415. ;
  416. Shell $(UtilityInf), CardExistedDlg
  417. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  418. Debug-Output "ShellCode error: cannot get an error string."
  419. goto ShellCodeError
  420. endif
  421. ifstr(i) $($R1) != "OK"
  422. set CommonStatus = STATUS_USERCANCEL
  423. goto end
  424. endif
  425. set OldVersionExisted = $(TRUE)
  426. endif
  427. endif
  428. ;===================================================
  429. ; Netcard Detection logic
  430. ;
  431. ; If this is a detected card, query its parameters
  432. ; and merge them into the default list.
  433. ;
  434. Ifstr(i) $(DetectedCard) != TRUE
  435. Goto adaptersetup
  436. Endif
  437. ;
  438. ; Get the detected parameters
  439. ;
  440. StartWait
  441. Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  442. EndWait
  443. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  444. Goto adaptersetup
  445. Endif
  446. ;
  447. ; Merge the detected values in.
  448. ;
  449. Set DetectedParams = $($R1)
  450. Debug-Output "OEMNADIN.INF: Calling Param_SetDefaults to merge detected params"
  451. Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  452. ;
  453. ; End Netcard Detection logic
  454. ;===================================================
  455. goto adaptersetup
  456. ;-----------------------------------------------
  457. ; Configuration Section
  458. ;-----------------------------------------------
  459. ;
  460. ; Get the current values of all the parameters
  461. ;
  462. configureadapter = +
  463. Ifstr $(KeyProduct) == $(KeyNull)
  464. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  465. Ifstr $(KeyProduct) == $(KeyNull)
  466. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  467. Debug-Output "Cannot find component product key"
  468. goto fatalregistry
  469. Endif
  470. Endif
  471. ;
  472. ; Get the other parameters; they're attached to the service parameters key
  473. ;
  474. Debug-Output "INF: Shelling to FindService"
  475. Shell $(UtilityInf) FindService, $(KeyProduct)
  476. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  477. Debug-Output "INF: FindService shell failure"
  478. Goto ShellCodeError
  479. Endif
  480. Ifstr(i) $($R0) != NO_ERROR
  481. Debug-Output "INF: FindService Shell error: "$($R0)
  482. Goto fatalregistry
  483. endif
  484. set KeyParameters = $($R2)
  485. ;
  486. ; We don't need the services key, so close it.
  487. ;
  488. CloseRegKey $($R1)
  489. Ifstr $(KeyParameters) == $(KeyNull)
  490. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  491. Debug-Output "Cannot find component service"
  492. goto fatalregistry
  493. endif
  494. set OldVersionExisted = $(TRUE)
  495. set ValueName = ""
  496. set ValueData = ""
  497. set ValueStr = ""
  498. set ValueList = {}
  499. ;
  500. ; Get the old values
  501. ;
  502. EnumRegValue $(KeyParameters) ValueList
  503. ForListDo $(ValueList)
  504. set ValueItem = $($)
  505. set ValueName = *($(ValueItem),1)
  506. set ValueData = *($(ValueItem),4)
  507. Ifstr(i) $(ValueName) == "InterruptNumber"
  508. set IRQValue = $(ValueData)
  509. else-ifstr(i) $(ValueName) == "IoBaseAddress"
  510. set IOBaseAddrValue = $(ValueData)
  511. else-ifstr(i) $(ValueName) == "IoChannelReady"
  512. set IOReady = $(ValueData)
  513. else-ifstr(i) $(ValueName) == "Transceiver"
  514. set Transceiver = $(ValueData)
  515. else-ifstr(i) $(ValueName) == "BusType"
  516. set BusInterfaceType = $(ValueData)
  517. else-ifstr(i) $(ValueName) == "BusNumber"
  518. set BusNumber = $(ValueData)
  519. endif
  520. EndForListDo
  521. ifstr(i) $(IRQValue) == ""
  522. set IRQValue = *($(IRQList), 2)
  523. endif
  524. ifstr(i) $(IOBaseAddrValue) == ""
  525. set IOBaseAddrValue = *($(IOBaseAddrDecList), 1)
  526. endif
  527. ifstr(i) $(Transceiver) == $(Transceiver1)
  528. set Transceiver = 1
  529. else-ifstr(i) $(Transceiver) == $(Transceiver2)
  530. set Transceiver = 2
  531. else-ifstr(i) $(Transceiver) == $(Transceiver3)
  532. set Transceiver = 3
  533. endif
  534. adaptersetup =+
  535. ;===================================================
  536. ; Netcard Detection logic
  537. ;
  538. ; Check that this card's parameters can be
  539. ; fully detected.
  540. ;
  541. Shell $(ParamInf) Param_ParameterConfidence
  542. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  543. Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  544. Goto adapteroptions
  545. Endif
  546. ;
  547. ; If this is a detected card and we're in EXPRESS mode,
  548. ; see if the parameters as they currently exist are
  549. ; verifiably correct.
  550. ;
  551. Ifstr(i) $(DetectedCard) == TRUE
  552. Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  553. ; use the STF_NCDETINFO information
  554. set BusInterfaceType = *($(!STF_NCDETINFO),5)
  555. set BusNumber = *($(!STF_NCDETINFO),6)
  556. Goto adapterverify
  557. Endif
  558. Endif
  559. ;
  560. ; End Netcard Detection logic
  561. ;===================================================
  562. goto adapteroptions
  563. ;
  564. ; Let the user bang on the options until satisfied.
  565. ;
  566. adapteroptions = +
  567. ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  568. ifstr(i) $(!AutoNetInterfaceType) != ""
  569. set BusInterfaceType = $(!AutoNetInterfaceType)
  570. else
  571. set BusInterfaceType = 1 ;ISA
  572. endif
  573. ifstr(i) $(!AutoNetBusNumber) != ""
  574. set BusNumber = $(!AutoNetBusNumber)
  575. else
  576. set BusNumber = 0
  577. endif
  578. goto adapterverify
  579. endif
  580. ;
  581. ; If the Registry is set to "Early", force "AllowEarly" to 1.
  582. ;
  583. Ifint $(IOReady) == 1
  584. Set AllowEarly = 1
  585. Endif
  586. set from = adapteroptions
  587. set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),+
  588. $(IOBaseAddrValue)))
  589. set IOReadyValue = *($(IOReadyList), $(IOReady))
  590. set TransceiverValue = *($(TransceiverList), $(Transceiver))
  591. ;
  592. ; Instantiate the list used to fill the "Early,Late,Never" listbox.
  593. ;
  594. Ifint $(AllowEarly) == 0
  595. Set IOReadyListDisplay = $(IOReadyListShort)
  596. Else
  597. Set IOReadyListDisplay = $(IOReadyList)
  598. Endif
  599. read-syms FileDependentDlg$(!STF_LANGUAGE)
  600. ui start "InputDlg"
  601. ifstr(i) $(DLGEVENT) == "CONTINUE"
  602. set IRQValue = $(Combo1Out)
  603. set IOBaseAddress = $(Combo2Out)
  604. set IOReady = ~($(IOReadyList),$(Combo3Out))
  605. set Transceiver = ~($(TransceiverList),$(Combo4Out))
  606. ;
  607. ; If they've chosen "Early", give the warning.
  608. ;
  609. Ifint $(IOReady) == 1
  610. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(EarlyWarning)
  611. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  612. goto ShellCodeError
  613. Endif
  614. Ifstr(i) $($R1) == "CANCEL"
  615. goto adapteroptions
  616. Endif
  617. Endif
  618. ui pop 1
  619. else-ifstr(i) $(DLGEVENT) == "BACK"
  620. set CommonStatus = STATUS_USERCANCEL
  621. Debug-Output "Action: exit. Bye."
  622. ui pop 1
  623. goto end
  624. else
  625. ;
  626. ; Unknow command
  627. ;
  628. ui pop 1
  629. Debug-Output "Action: unknown. Bye."
  630. goto end
  631. endif
  632. set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  633. $(IOBaseAddress)))
  634. ifstr(i) $(!STF_NCDETINFO) == {}
  635. ; not detect. popup dialog.
  636. Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwareDescription) $(BusInterfaceType) $(BusNumber)
  637. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  638. Debug-Output "ShellCode error."
  639. goto ShellCodeError
  640. endif
  641. set BusInterfaceType = $($R1)
  642. set BusNumber = $($R2)
  643. else
  644. ; use the STF_NCDETINFO information
  645. set BusInterfaceType = *($(!STF_NCDETINFO),5)
  646. set BusNumber = *($(!STF_NCDETINFO),6)
  647. endif
  648. adapterverify =+
  649. ;===================================================
  650. ; Netcard Detection logic
  651. ;
  652. ; If this is a detected card, attempt to validate the options
  653. ;
  654. Ifstr(i) $(DetectedCard) != TRUE
  655. Goto skipoptions
  656. Endif
  657. Debug-Output "OEMNADIN.INF: Calling Param_VerifyCard"
  658. Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  659. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  660. Debug-Output "OEMNADIN.INF: Param_VerifyCard succeeded"
  661. Goto skipoptions
  662. Endif
  663. ;
  664. ; Give the user a chance to retry or force the options given.
  665. ;
  666. Set from = adapteroptions
  667. Set to = skipoptions
  668. Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  669. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  670. Debug-Output "ShellCode error: cannot get an error string."
  671. goto ShellCodeError
  672. endif
  673. set Error = $($R0)
  674. Goto Warning
  675. ;
  676. ; End Netcard Detection logic
  677. ;===================================================
  678. skipoptions =+
  679. ;
  680. ; If installing, go create the necessary keys;
  681. ; if configuring, they're already open.
  682. ;
  683. ifint $(OldVersionExisted) == $(TRUE)
  684. ifstr(i) $(!NTN_InstallMode) == configure
  685. goto writeparameters
  686. endif
  687. endif
  688. StartWait
  689. ;
  690. ; Add Software Component
  691. ;
  692. ifint $(OldVersionExisted) == $(FALSE)
  693. ifstr(i) $(!NTN_InstallMode) == "install"
  694. Ifstr(i) $(DoCopy) == "YES"
  695. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  696. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  697. Goto ShellCodeError
  698. Else-Ifstr(i) $($R0) == STATUS_FAILED
  699. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  700. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  701. goto ShellCodeError
  702. endif
  703. set Error = $($R0)
  704. Goto fatal
  705. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  706. Goto successful
  707. Endif
  708. Set SrcDir = $($R1)
  709. Endif
  710. install "Install-Option"
  711. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  712. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  713. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  714. goto ShellCodeError
  715. endif
  716. set Error = $($R0)
  717. goto fatal
  718. endif
  719. endif
  720. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  721. $(ProductSoftwareName), +
  722. $(ProductSoftwareName), +
  723. $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  724. $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  725. $(NetEventDLL)
  726. Set OEM_ABANDON_SOFTWARE = TRUE
  727. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  728. Debug-Output "ShellCode error"
  729. goto ShellCodeError
  730. endif
  731. ;
  732. ; At this point:
  733. ; $R1 contains the product version key handle;
  734. ; $R2 contains the NetRules subkey handle;
  735. ; $R3 contains the new Services key handle; and
  736. ; $R4 contains the Parameters key
  737. ; $R5 contains the Linkage Key
  738. ;
  739. set RegistryErrorIndex = $($R0)
  740. set KeyProduct = $($R1)
  741. Set SoftNetRulesKey = $($R2)
  742. CloseRegKey $($R3)
  743. CloseRegKey $($R4)
  744. CloseRegKey $($R5)
  745. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  746. EndWait
  747. Debug-Output "Registry error: add software components"
  748. CloseRegKey $(KeyProduct)
  749. CloseRegKey $(SoftNetRulesKey)
  750. goto fatalregistry
  751. endif
  752. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  753. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  754. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  755. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  756. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  757. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  758. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  759. Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  760. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  761. Debug-Output "ShellCode error."
  762. goto ShellCodeError
  763. endif
  764. set RegistryErrorIndex = $($R0)
  765. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  766. EndWait
  767. Debug-Output "Registry error: add value list."
  768. CloseRegKey $(KeyProduct)
  769. CloseRegKey $(SoftNetRulesKey)
  770. goto fatalregistry
  771. endif
  772. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  773. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  774. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  775. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  776. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  777. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  778. Shell $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  779. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  780. Debug-Output "ShellCode error."
  781. goto ShellCodeError
  782. endif
  783. set RegistryErrorIndex = $($R0)
  784. CloseRegKey $(KeyProduct)
  785. CloseRegKey $(SoftNetRulesKey)
  786. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  787. EndWait
  788. Debug-Output "Resgitry error: add value list."
  789. goto fatalregistry
  790. endif
  791. endif
  792. ;
  793. ; Create the HARDWARE\Netcard region and its corresponding service
  794. ;
  795. Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  796. ifint $($R4) != -1
  797. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  798. endif
  799. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  800. Debug-Output "Cannot add hardware component"
  801. goto ShellCodeError
  802. endif
  803. set RegistryErrorIndex = $($R0)
  804. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  805. EndWait
  806. Debug-Output "Registry error: add hardware component"
  807. CloseRegKey $($R1)
  808. CloseRegKey $($R2)
  809. CloseRegKey $($R3)
  810. goto fatalregistry
  811. endif
  812. ;
  813. ; At this point:
  814. ; $R1 Registry key variable for HARDWARE\Netcard\(n)
  815. ; $R2 Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  816. ; $R3 Registry key handle for <service>\Parameters key
  817. ; $R4 Adapter number assigned to adapter
  818. ; $R5 Service name generated by combining svc name with adapter number
  819. ;
  820. set KeyParameters = $($R3)
  821. set KeyAdapterRules = $($R2)
  822. set AdapterNumber = $($R4)
  823. set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  824. {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  825. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  826. {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  827. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  828. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  829. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  830. Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  831. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  832. Debug-Output "ShellCode error"
  833. goto ShellCodeError
  834. endif
  835. CloseRegKey $($R1)
  836. set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  837. set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  838. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  839. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  840. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  841. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  842. Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  843. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  844. Debug-Output "ShellCode error."
  845. goto ShellCodeError
  846. endif
  847. set RegistryErrorIndex = $($R0)
  848. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  849. EndWait
  850. Debug-Output "Resgitry error: add value list."
  851. CloseRegKey $(KeyParameters)
  852. CloseRegKey $(KeyAdapterRules)
  853. goto fatalregistry
  854. endif
  855. CloseRegKey $(KeyAdapterRules)
  856. goto writeparameters
  857. ;
  858. ; REQUIRED: $(KeyParameters) contains service Parameters key handle
  859. ;
  860. writeparameters = +
  861. ;
  862. ; Add the rest of the parameters to the Services area
  863. ;
  864. ifint $(Transceiver) == 1
  865. set Transceiver = $(Transceiver1)
  866. else-ifint $(Transceiver) == 2
  867. set Transceiver = $(Transceiver2)
  868. else-ifint $(Transceiver) == 3
  869. set Transceiver = $(Transceiver3)
  870. endif
  871. set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  872. {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  873. {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  874. {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  875. {IoChannelReady,$(NoTitle),$(!REG_VT_DWORD),$(IOReady)},+
  876. {Transceiver,$(NoTitle),$(!REG_VT_SZ),$(Transceiver)},+
  877. {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  878. Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  879. ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  880. Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  881. endif
  882. CloseRegKey $(KeyParameters)
  883. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  884. Debug-Output "ShellCode error."
  885. goto ShellCodeError
  886. endif
  887. set RegistryErrorIndex = $($R0)
  888. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  889. Debug-Output "Registry error: Add value list"
  890. goto fatalregistry
  891. endif
  892. EndWait
  893. goto successful
  894. ;-----------------------------------------------
  895. ; Binding section
  896. ;-----------------------------------------------
  897. bindingadapter =+
  898. set Error = "Binding: Sorry, not yet implemented."
  899. goto fatal
  900. ;-----------------------------------------------
  901. ; Removeadapter section
  902. ;-----------------------------------------------
  903. removeadapter = +
  904. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  905. ; Remove Software Component
  906. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  907. $(ProductSoftwareName)
  908. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  909. Debug-Output "ShellCode error"
  910. goto ShellCodeError
  911. endif
  912. set RegistryErrorIndex = $($R0)
  913. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  914. goto fatalregistry
  915. endif
  916. else
  917. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  918. $(ProductSoftwareName), $(!NTN_RegBase)
  919. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  920. Debug-Output "ShellCode error"
  921. goto ShellCodeError
  922. endif
  923. set RegistryErrorIndex = $($R0)
  924. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  925. goto fatalregistry
  926. endif
  927. endif
  928. goto end
  929. ;-----------------------------------------------
  930. ; Upgrade Software section
  931. ;-----------------------------------------------
  932. UpgradeSoftware = +
  933. ; Upgrade software component
  934. ;
  935. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  936. Ifstr $(KeyProduct) != $(KeyNull)
  937. install "Install-Update"
  938. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  939. goto fatal
  940. endif
  941. ; Upgrade the version number
  942. ;
  943. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  944. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  945. ;
  946. ; do nothing for update
  947. ;
  948. CloseRegKey $(KeyProduct)
  949. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Linkage" $(MAXIMUM_ALLOWED) LinkageKey
  950. ifstr(i) $(LinkageKey) != ""
  951. GetRegValue $(LinkageKey) Bind BindInfo
  952. ForListDo *($(BindInfo),4)
  953. Split-String $($) "\" CardInfo
  954. QueryListSize CardPos $(CardInfo)
  955. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(CardInfo),$(CardPos))"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
  956. ifstr $(ParamKey) != ""
  957. GetRegValue $(ParamKey) "Transceiver" TransceiverInfo
  958. ifint *($(TransceiverInfo ),4) == "1"
  959. SetRegValue $(ParamKey) {Transceiver,$(NoTitle),$(!REG_VT_SZ),$(Transceiver1)}
  960. else-ifstr(i) *($(TransceiverInfo ),4) == "Think Net (AUI/DIX)"
  961. SetRegValue $(ParamKey) {Transceiver,$(NoTitle),$(!REG_VT_SZ),$(Transceiver1)}
  962. else-ifint *($(TransceiverInfo ),4) == "2"
  963. SetRegValue $(ParamKey) {Transceiver,$(NoTitle),$(!REG_VT_SZ),$(Transceiver2)}
  964. else-ifint *($(TransceiverInfo ),4) == "3"
  965. SetRegValue $(ParamKey) {Transceiver,$(NoTitle),$(!REG_VT_SZ),$(Transceiver3)}
  966. endif
  967. CloseRegKey $(ParamKey)
  968. endif
  969. EndForListDo
  970. CloseRegKey $(LinkageKey)
  971. endif
  972. else
  973. ;
  974. ; Cannot Open software key, goto ERROR
  975. ;
  976. goto fatalregistry
  977. endif
  978. ;
  979. ; Enumerate all netcards installed of this type and update them
  980. ;
  981. set iSearch = 1
  982. nextnetcard = +
  983. Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  984. set KeyNetcard = $($R0)
  985. set iSearch = $($R1)
  986. Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  987. Ifstr $(KeyNetcard) != $(KeyNull)
  988. Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  989. SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  990. CloseRegKey $(KeyNetcard)
  991. goto nextnetcard
  992. Endif
  993. goto end
  994. ;
  995. ; End of Upgrade Software
  996. ;
  997. ;
  998. ; Escape hatches
  999. ;
  1000. successful = +
  1001. goto end
  1002. abandon = +
  1003. ForListDo $(OEM_ABANDON_OPTIONS)
  1004. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1005. $(ProductSoftwareName), $($)
  1006. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1007. Debug-Output "ShellCode error"
  1008. goto ShellCodeError
  1009. endif
  1010. set RegistryErrorIndex = $($R0)
  1011. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1012. goto fatalregistry
  1013. endif
  1014. EndForListDo
  1015. Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1016. ; Remove Software Component
  1017. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1018. $(ProductSoftwareName), FALSE
  1019. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1020. Debug-Output "ShellCode error"
  1021. goto ShellCodeError
  1022. endif
  1023. set RegistryErrorIndex = $($R0)
  1024. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1025. goto fatalregistry
  1026. endif
  1027. endif
  1028. goto end
  1029. ;
  1030. ; warning display
  1031. ;
  1032. warning = +
  1033. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1034. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1035. goto ShellCodeError
  1036. endif
  1037. ifstr(i) $($R1) == "OK"
  1038. goto $(to)
  1039. else-ifstr(i) $($R1) == "CANCEL"
  1040. goto $(from)
  1041. else
  1042. ; Debug-Msg "Error Error Bad DLGEVENT"
  1043. goto "end"
  1044. endif
  1045. ;
  1046. ; non fatal error display
  1047. ;
  1048. nonfatalinfo = +
  1049. Set CommonStatus = STATUS_USERCANCEL
  1050. Set Severity = STATUS
  1051. goto nonfatalmsg
  1052. nonfatal = +
  1053. Set Severity = NONFATAL
  1054. goto nonfatalmsg
  1055. nonfatalmsg = +
  1056. ifstr(i) $(Error) == ""
  1057. Set Severity = NONFATAL
  1058. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1059. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1060. goto ShellCodeError
  1061. endif
  1062. set Error = $($R0)
  1063. endif
  1064. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1065. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1066. goto ShellCodeError
  1067. endif
  1068. ifstr(i) $($R1) == "OK"
  1069. goto $(from)
  1070. else
  1071. goto "end"
  1072. endif
  1073. ;
  1074. ; Registry is broken
  1075. ;
  1076. fatalregistry = +
  1077. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1078. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1079. goto ShellCodeError
  1080. endif
  1081. set Error = $($R0)
  1082. goto fatal
  1083. fataldetect = +
  1084. Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1085. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1086. Debug-Output "ShellCode error: cannot get an error string."
  1087. goto ShellCodeError
  1088. endif
  1089. set Error = $($R0)
  1090. Goto fatal
  1091. ;
  1092. ; fatal error display
  1093. ;
  1094. fatal = +
  1095. ifstr(i) $(Error) == ""
  1096. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1097. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1098. goto ShellCodeError
  1099. endif
  1100. set Error = $($R0)
  1101. endif
  1102. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1103. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1104. goto ShellCodeError
  1105. endif
  1106. goto setfailed
  1107. ;
  1108. ; Shelling error
  1109. ;
  1110. ShellCodeError = +
  1111. set DlgType = "MessageBox"
  1112. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1113. set STF_MB_TEXT = $(ShellCodeErrorText)
  1114. set STF_MB_TYPE = 1
  1115. set STF_MB_ICON = 3
  1116. set STF_MB_DEF = 1
  1117. ui start "Error Message"
  1118. goto setfailed
  1119. setfailed = +
  1120. set CommonStatus = STATUS_FAILED
  1121. ;
  1122. ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1123. ;
  1124. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1125. set OEM_ABANDON_ON = FALSE
  1126. goto abandon
  1127. endif
  1128. goto end
  1129. end = +
  1130. goto term
  1131. term = +
  1132. Return $(CommonStatus)
  1133. ;***************************************************************
  1134. ; INSTALL SECTIONS
  1135. ;***************************************************************
  1136. [Install-Option]
  1137. set STF_VITAL = ""
  1138. ifstr(i) $(AddCopy) == "YES"
  1139. ;
  1140. ; Add the files to the copy list
  1141. ;
  1142. ; BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1143. ; the other INF files
  1144. ;
  1145. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1146. endif
  1147. ifstr(i) $(DoCopy) == "YES"
  1148. ;
  1149. ; Copy files in the copy list
  1150. ;
  1151. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1152. CopyFilesInCopyList
  1153. endif
  1154. ifstr(i) $(DoConfig) == "YES"
  1155. ;
  1156. ; Add product to registry
  1157. ;
  1158. ;
  1159. ; Finish up
  1160. endif
  1161. Exit
  1162. [Install-Update]
  1163. set STF_VITAL = ""
  1164. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1165. ;set STF_VERSION = "YES"
  1166. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1167. CopyFilesInCopyList
  1168. exit