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.

1340 lines
40 KiB

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