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.

1348 lines
39 KiB

  1. ;***********************************************************************
  2. ;
  3. ; OEMNADXN.INF
  4. ;
  5. ; UB 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 ub 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. ; LANGUAGES SUPPORTED
  50. ; -------------------
  51. ;
  52. ; The languages supported by the OEM INF, For every language supported
  53. ; we need to have a separate text section for every displayable text
  54. ; section.
  55. ;
  56. ;-----------------------------------------------------------------------
  57. [LanguagesSupported]
  58. ENG
  59. ;-----------------------------------------------------------------------
  60. ; OPTION LIST
  61. ; -----------
  62. ; This section lists the OEM Option key names. These keys are locale
  63. ; independent and used to represent the option in a locale independent
  64. ; manner.
  65. ;
  66. ;-----------------------------------------------------------------------
  67. [Options]
  68. UBPCXNS
  69. UBPCEOTPXNS
  70. ;-----------------------------------------------------------------------
  71. ; OPTION TEXT SECTION
  72. ; -------------------
  73. ; These are text strings used to identify the option to the user. There
  74. ; are separate sections for each language supported. The format of the
  75. ; section name is "OptionsText" concatenated with the Language represented
  76. ; by the section.
  77. ;
  78. ;-----------------------------------------------------------------------
  79. [OptionsTextENG]
  80. UBPCXNS = "UB Ethernet NIUpc Adapter [XNS]"
  81. UBPCEOTPXNS = "UB Ethernet NIUpc/EOTP Adapter [XNS]"
  82. ;***********************************************************************
  83. ; CONSTANTS FOR USING DIALOGS
  84. ;***********************************************************************
  85. [IRQChoicesUBPCXNS]
  86. IRQ_0 = "2",2
  87. IRQ_1 = "3",3
  88. IRQ_2 = "4",4
  89. IRQ_3 = "5",5
  90. [IRQChoicesUBPCEOTPXNS]
  91. IRQ_0 = "2",2
  92. IRQ_1 = "3",3
  93. IRQ_2 = "4",4
  94. IRQ_3 = "5",5
  95. IRQ_4 = "7",7
  96. IRQ_5 = "12",12
  97. [IOBaseAddrChoices]
  98. IOBase_1 = "0x350",848
  99. IOBase_2 = "0x358",856
  100. IOBase_3 = "0x360",864
  101. IOBase_4 = "0x368",872
  102. [MemMappedWndBaseAddrChoicesUBPCXNS]
  103. Add_1 = "0x80000",524288
  104. Add_2 = "0x88000",557056
  105. Add_3 = "0x90000",589824
  106. Add_4 = "0x98000",622592
  107. Add_5 = "0xA0000",655360
  108. Add_6 = "0xA8000",688128
  109. Add_7 = "0xB0000",720896
  110. Add_8 = "0xB8000",753664
  111. Add_9 = "0xC0000",786432
  112. Add_10 = "0xC8000",819200
  113. Add_11 = "0xD0000",851968
  114. Add_12 = "0xD8000",884736
  115. Add_13 = "0xE0000",917504
  116. Add_14 = "0xE8000",950272
  117. [MemMappedWndBaseAddrChoicesUBPCEOTPXNS]
  118. Add_2 = "0xC8000",819200
  119. Add_4 = "0xD8000",884736
  120. [FileConstants]
  121. ;
  122. ; File names, etc.
  123. ;
  124. UtilityInf = "UTILITY.INF"
  125. subroutineinf = "SUBROUTN.INF"
  126. SoftwareType = "driver"
  127. Exit_Code = 0
  128. ;ShellCode = 0
  129. ;
  130. ; EventLog Message File
  131. ;
  132. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  133. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  134. ;
  135. ; Product Info
  136. ;
  137. Manufacturer = "Microsoft"
  138. ProductMajorVersion = "4"
  139. ProductMinorVersion = "0"
  140. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  141. ;
  142. ; Software
  143. ;
  144. ProductSoftwareName = "Xns"
  145. ProductSoftwareTitle = "UB Monolithic Transport and Driver"
  146. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\xns.sys"
  147. NetRuleSoftwareType = "ubStack netBiosTransport ubXnsDriver"
  148. NetRuleSoftwareUse = $(SoftwareType)
  149. NetRuleSoftwareBindForm = """XNS"" yes no container"
  150. NetRuleSoftwareClass = {"ubXnsDriver basic"}
  151. NetRuleSoftwareBindable = {"ubXnsDriver ubAdapter exclusive exclusive 200"}
  152. ;
  153. ; Hardware
  154. ;
  155. ProductHardwareName = "UB"
  156. ProductHardwareUBPCXNSTitle = "Ungermann-Bass Ethernet NIUpc Adapter"
  157. ProductHardwareUBPCEOTPXNSTitle = "Ungermann-Bass Ethernet NIUpc/EOTP Adapter"
  158. NetRuleHardwareType = "ub ubAdapter"
  159. NetRuleHardwareBindForm = " yes yes container"
  160. NetRuleHardwareClass = {"ubAdapter basic"}
  161. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  162. ;
  163. ; Registry Key
  164. ;
  165. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  166. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  167. [GeneralConstants]
  168. ;
  169. ; Program flow control variables.
  170. ;
  171. from = ""
  172. to = ""
  173. ;
  174. ; Return codes; Exit_Code is set to one of these
  175. ;
  176. ExitCodeOk = 0
  177. ExitCodeCancel = 1
  178. ExitCodeFatal = 2
  179. KeyNull = ""
  180. MAXIMUM_ALLOWED = 33554432
  181. RegistryErrorIndex = NO_ERROR
  182. KeyProduct = ""
  183. KeyParameters = ""
  184. TRUE = 1
  185. FALSE = 0
  186. NoTitle = 0
  187. ExitState = "Active"
  188. OldVersionExisted = $(FALSE)
  189. DriverPath = $(!STF_NTPATH)\drivers
  190. ;***********************************************************************
  191. ; Language-Dependent Dialog Constants
  192. ;***********************************************************************
  193. [SizeENG]
  194. size_1 = 1, "Small"
  195. size_2 = 2, "Big"
  196. [FileConstantsENG]
  197. ;
  198. ; Variables to support thermometer gauge and error dialogs
  199. ;
  200. ProCaption = "Windows NT Setup"
  201. ProCancel = "Cancel"
  202. ProCancelMsg = "Windows NT Networking is not correctly installed. "+
  203. "Are you sure you want to cancel copying files?"
  204. ProCancelCap = "Network Setup Message"
  205. ProText1 = "Copying:"
  206. ProText2 = "To:"
  207. ;
  208. ; Product Info
  209. ;
  210. FunctionTitle = "Ungermann-Bass Adapter Card Setup"
  211. ;
  212. ; Software
  213. ;
  214. ProductSoftwareDescription = "UB Monolithic Transport and Driver"
  215. ;
  216. ; Hardware
  217. ;
  218. ProductHardwareUBPCXNSDescription = "Ungermann-Bass Ethernet NIUpc Adapter"
  219. ProductHardwareUBPCEOTPXNSDescription = "Ungermann-Bass Ethernet NIUpc/EOTP Adapter"
  220. IRQList = ^(IRQChoices$(Option), 1)
  221. IRQValues = ^(IRQChoices$(Option), 2)
  222. IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  223. IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  224. MemMappedWndAddrList = ^(MemMappedWndBaseAddrChoices$(Option), 1)
  225. MemMappedWndAddrValues = ^(MemMappedWndBaseAddrChoices$(Option), 2)
  226. SizeList = ^(Size$(!NTN_LANGUAGE), 1 )
  227. SizeValue = ^(Size$(!NTN_LNAGUAGE), 2 )
  228. [DialogConstantsENG]
  229. ;
  230. ; Common button names, etc.
  231. ;
  232. Help = "&Help"
  233. Exit = "Cancel"
  234. OK = "OK"
  235. HelpContext = ""
  236. Continue = "Continue"
  237. Cancel = "Cancel"
  238. [date]
  239. ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  240. ; Minute, Second }
  241. Now = {} ? $(!LIBHANDLE) GetSystemDate
  242. ;-----------------------------------------------
  243. ; Input DIALOGS
  244. ;-----------------------------------------------
  245. [FileDependentDlgENG]
  246. DlgType = "RadioCombination"
  247. DlgTemplate = "UB"
  248. Caption = $(FunctionTitle)
  249. Label1 = "&Interrupt Number:"
  250. Label2 = "I/O &Port Address:"
  251. RadioBox = "Size:"
  252. Radio1 = "&Small"
  253. Radio2 = "&Big"
  254. Label3 = "&Memory Address:"
  255. Label4 = "&Net Number:"
  256. Combo1List = $(IRQList)
  257. Combo1Out = $(IRQValue)
  258. Combo2List = $(IOBaseAddrList)
  259. Combo2Out = $(IOBaseAddrValue)
  260. Combo3List = $(MemMappedWndAddrList)
  261. Combo3Out = $(MemMappedWndAddrValue)
  262. ComboListItemsIn = {Combo1List, Combo2List, Combo3List}
  263. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  264. EditTextLim = ""
  265. CBOptionsGreyed = {}
  266. HelpContext = $(!IDH_DB_OEMNADUB_INS)
  267. ;---------------------------------------------------------------------------
  268. ; 1. Identify
  269. ;
  270. ; DESCRIPTION: To verify that this INF deals with the same type of options
  271. ; as we are choosing currently.
  272. ;
  273. ; INPUT: None
  274. ;
  275. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  276. ; $($R1): Option Type (COMPUTER ...)
  277. ; $($R2): Diskette description
  278. ;---------------------------------------------------------------------------
  279. [Identify]
  280. ;
  281. ;
  282. read-syms Identification
  283. set Status = STATUS_SUCCESSFUL
  284. set Identifier = $(OptionType)
  285. set Media = #("Source Media Descriptions", 1, 1)
  286. Return $(Status) $(Identifier) $(Media)
  287. ;------------------------------------------------------------------------
  288. ; 2. ReturnOptions:
  289. ;
  290. ; DESCRIPTION: To return the option list supported by this INF and the
  291. ; localised text list representing the options.
  292. ;
  293. ;
  294. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  295. ;
  296. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  297. ; STATUS_NOLANGUAGE
  298. ; STATUS_FAILED
  299. ; STATUS_NOTSUPPORTED
  300. ;
  301. ; $($R1): Option List
  302. ; $($R2): Option Text List
  303. ;------------------------------------------------------------------------
  304. [ReturnOptions]
  305. ;
  306. ;
  307. set Status = STATUS_FAILED
  308. set OptionList = {}
  309. set OptionTextList = {}
  310. ;
  311. ; Check if the language requested is supported
  312. ;
  313. set LanguageList = ^(LanguagesSupported, 1)
  314. Ifcontains(i) $($0) in $(LanguageList)
  315. ;
  316. ; Check if the platforms requested is supported
  317. ;
  318. ifstr(i) $($1) == ""
  319. goto returnoptions
  320. endif
  321. set PlatformList = ^(PlatformsSupported, 1)
  322. Ifcontains(i) $($1) in $(PlatformList)
  323. goto returnoptions
  324. else
  325. set Status = STATUS_NOTSUPPORTED
  326. goto finish_ReturnOptions
  327. endif
  328. else
  329. set Status = STATUS_NOLANGUAGE
  330. goto finish_ReturnOptions
  331. endif
  332. ;
  333. ; form a list of all the options and another of the text representing
  334. ;
  335. returnoptions = +
  336. set OptionList = ^(Options, 1)
  337. set OptionTextList = ^(OptionsText$($0), 1)
  338. set Status = STATUS_SUCCESSFUL
  339. finish_ReturnOptions = +
  340. Return $(Status) $(OptionList) $(OptionTextList)
  341. ;----------InstallOption-------------------------------------------------
  342. ;
  343. ; InstallOption:
  344. ;
  345. ; This section is shelled to by main installation processing
  346. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  347. ;
  348. ;
  349. ; FUNCTION: To copy files representing Options
  350. ; To configure the installed option
  351. ; To update the registry for the installed option
  352. ;
  353. ; INPUT: $($0): Language to use
  354. ; $($1): OptionID to install
  355. ; $($2): SourceDirectory
  356. ; $($3): AddCopy (YES | NO)
  357. ; $($4): DoCopy (YES | NO)
  358. ; $($5): DoConfig (YES | NO)
  359. ;
  360. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  361. ; STATUS_NOLANGUAGE |
  362. ; STATUS_USERCANCEL |
  363. ; STATUS_FAILED
  364. ;
  365. ;------------------------------------------------------------------------
  366. [InstallOption]
  367. ;
  368. ; extract parameters
  369. ;
  370. set Option = $($1)
  371. set SrcDir = $($2)
  372. set AddCopy = $($3)
  373. set DoCopy = $($4)
  374. set DoConfig = $($5)
  375. ;
  376. ; Check if the language requested is supported
  377. ;
  378. set LanguageList = ^(LanguagesSupported, 1)
  379. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  380. Return STATUS_NOLANGUAGE
  381. endif
  382. Debug-Output "OEMNADXN.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  383. Debug-Output "OEMNADXN.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  384. ; define all the constants
  385. set-subst LF = "\n"
  386. read-syms GeneralConstants
  387. read-syms FileConstants
  388. read-syms DialogConstants$(!STF_LANGUAGE)
  389. ifstr(i) $(!NTN_Origination) == "NCPA"
  390. set Continue = $(OK)
  391. endif
  392. read-syms FileConstants$(!STF_LANGUAGE)
  393. detect date
  394. set-title $(FunctionTitle)
  395. set to = Begin
  396. set from = Begin
  397. ;
  398. ; Assume all is well.
  399. ;
  400. set CommonStatus = STATUS_SUCCESSFUL
  401. EndWait
  402. ;
  403. ; Set up the operation-mode-based variables and gaily welcome
  404. ; the user. If the "install mode" variable is improperly set,
  405. ; assume this is a new installation.
  406. ;
  407. Begin = +
  408. Ifstr(i) $(!NTN_InstallMode) == deinstall
  409. set StartLabel = removeadapter
  410. else-Ifstr(i) $(!NTN_InstallMode) == Update
  411. set StartLabel = UpgradeSoftware
  412. else-Ifstr(i) $(!NTN_InstallMode) == bind
  413. set StartLabel = bindingadapter
  414. else-Ifstr(i) $(!NTN_InstallMode) == configure
  415. set CommonStatus = STATUS_REBOOT
  416. set StartLabel = configureadapter
  417. ;
  418. ; You cannot config the software component
  419. ;
  420. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  421. Debug-Output "OEMNADXN.INF: Cannot configure the driver software."
  422. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  423. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  424. Debug-Output "OEMNADXN.INF: ShellCode error: cannot get an error string."
  425. goto ShellCodeError
  426. endif
  427. set Error = $($R0)
  428. set from = end
  429. set to = end
  430. goto nonfatalinfo
  431. endif
  432. else
  433. set StartLabel = installadapter
  434. set OEM_ABANDON_OPTIONS = {}
  435. set OEM_ABANDON_SOFTWARE = FALSE
  436. set OEM_ABANDON_ON = TRUE
  437. endif
  438. ; set the default values
  439. ; IRQ level = 5
  440. set IRQValue = *($(IRQList), 4)
  441. ; IoBaseAddress = 0x368
  442. set IOBaseAddrValue = *($(IOBaseAddrList), 4)
  443. ; Size = Small
  444. set RadioIn = {1}
  445. ; Net Number = 1
  446. set EditTextIn = "1"
  447. ; default mamory mapped window address is 884736 (0xd800)
  448. set MemMappedWndAddrValue = *($(MemMappedWndAddrList),~($(MemMappedWndAddrValues),884736))
  449. set EditTextIn = "1"
  450. set from = $(fatal)
  451. set to = $(fatal)
  452. goto $(StartLabel)
  453. ;-----------------------------------------------
  454. ; Installation Section
  455. ;-----------------------------------------------
  456. installadapter = +
  457. ;
  458. ; First, check whether the same version of the software exists
  459. ;
  460. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  461. Ifstr $(KeyProduct) != $(KeyNull)
  462. ;
  463. ; Same version already existed in the local machine
  464. ; Popup the dialog and ask the user whether he wants to continue
  465. ;
  466. CloseRegKey $(KeyProduct)
  467. ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  468. ;
  469. ; Cannot Install the same software again
  470. ;
  471. Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  472. $(ProductVersion)
  473. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474. Debug-Output "OEMNADXN.INF: ShellCode error: cannot get an error string."
  475. goto ShellCodeError
  476. endif
  477. goto end
  478. else
  479. ;
  480. ; Add a new adapter card?
  481. ;
  482. Shell $(UtilityInf), CardExistedDlg
  483. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  484. Debug-Output "OEMNADXN.INF: ShellCode error: cannot get an error string."
  485. goto ShellCodeError
  486. endif
  487. ifstr(i) $($R1) != "OK"
  488. set CommonStatus = STATUS_USERCANCEL
  489. goto end
  490. endif
  491. set OldVersionExisted = $(TRUE)
  492. endif
  493. Endif
  494. Goto adapteroptions
  495. ;-----------------------------------------------
  496. ; Configuration Section
  497. ;-----------------------------------------------
  498. ;
  499. ; Get the current values of all the parameters
  500. ;
  501. configureadapter = +
  502. Ifstr(i) $(KeyProduct) == $(KeyNull)
  503. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  504. Ifstr $(KeyProduct) == $(KeyNull)
  505. Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  506. Debug-Output "OEMNADXN.INF: Cannot find component product key"
  507. Goto fatalregistry
  508. Endif
  509. Endif
  510. ;
  511. ; Get the other parameters; they're attached to the service parameters key
  512. ;
  513. Debug-Output "OEMNADXN.INF: INF: Shelling to FindService"
  514. Shell $(UtilityInf) FindService, $(KeyProduct)
  515. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  516. Debug-Output "OEMNADXN.INF: INF: FindService shell failure"
  517. Goto ShellCodeError
  518. Endif
  519. Ifstr(i) $($R0) != NO_ERROR
  520. Debug-Output "OEMNADXN.INF: INF: FindService Shell error: "$($R0)
  521. Goto fatalregistry
  522. endif
  523. set KeyParameters = $($R2)
  524. ;
  525. ; We don't need the services key, so close it.
  526. ;
  527. CloseRegKey $($R1)
  528. Ifstr $(KeyParameters) == $(KeyNull)
  529. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  530. Debug-Output "OEMNADXN.INF: Cannot find component service"
  531. goto fatalregistry
  532. endif
  533. set OldVersionExisted = $(TRUE )
  534. set ValueName = ""
  535. set ValueData = ""
  536. set ValueStr = ""
  537. set ValueList = {}
  538. ;
  539. ; Get the old values
  540. ;
  541. EnumRegValue $(KeyParameters) ValueList
  542. ForListDo $(ValueList)
  543. set ValueItem = $($)
  544. set ValueName = *($(ValueItem),1)
  545. set ValueData = *($(ValueItem),4)
  546. Ifstr(i) $(ValueName) == "InterruptNumber"
  547. set IRQValueIndex = $(ValueData)
  548. else-ifstr(i) $(ValueName) == "IoBaseAddress"
  549. set IOBaseAddrIndex = $(ValueData)
  550. else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
  551. set MemMappedWndAddrIndex = $(ValueData)
  552. else-ifstr(i) $(ValueName) == "NetNumber"
  553. set NetNumber = $(ValueData)
  554. else-ifstr(i) $(ValueName) == "Size"
  555. set Size = $(ValueData)
  556. else-ifstr(i) $(ValueName) == "BusType"
  557. set BusInterfaceType = $(ValueData)
  558. else-ifstr(i) $(ValueName) == "BusNumber"
  559. set BusNumber = $(ValueData)
  560. endif
  561. EndForListDo
  562. set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  563. ifstr(i) $(IRQValue) == ""
  564. set IRQValue = *($(IRQList), 4)
  565. endif
  566. ifint $(Size) == 0
  567. set Size = 1
  568. else
  569. set Size = 2
  570. endif
  571. set RadioIn = {$(Size)}
  572. set IOBaseAddrValue = *($(IOBaseAddrList), +
  573. ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  574. ifstr(i) $(IOBaseAddrValue) == ""
  575. set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  576. endif
  577. set MemMappedWndAddrValue = *($(MemMappedWndAddrList), +
  578. ~($(MemMappedWndAddrValues),$(MemMappedWndAddrIndex)))
  579. ifstr(i) $(MemMappedWndAddrValue) == ""
  580. set MemMappedWndAddrValue = *($(MemMappedWndAddrList),~($(MemMappedWndAddrValue),884736))
  581. endif
  582. ifstr(i) $(NetNumber) == $(KeyNull)
  583. set EditTextIn = "1"
  584. else
  585. set EditTextIn = $(NetNumber)
  586. endif
  587. ;
  588. ; Let the user bang on the options until satisfied.
  589. ;
  590. adapteroptions = +
  591. set from = adapteroptions
  592. read-syms FileDependentDlg$(!STF_LANGUAGE)
  593. ui start "InputDlg"
  594. ifstr(i) $(DLGEVENT) == "CONTINUE"
  595. set IRQValueIndex = $(Combo1Out)
  596. set IOBaseAddrIndex = $(Combo2Out)
  597. set Size = *($(RadioOut),1)
  598. ifint $(Size) == 1
  599. set Size = 0
  600. else
  601. set Size = 1
  602. endif
  603. set MemMappedWndAddrIndex = $(Combo3Out)
  604. set NetNumber = *($(EditTextOut), 1)
  605. ui pop 1
  606. else-ifstr(i) $(DLGEVENT) == "BACK"
  607. set CommonStatus = STATUS_USERCANCEL
  608. Debug-Output "OEMNADXN.INF: Action: exit. Bye."
  609. ui pop 1
  610. goto end
  611. else
  612. ;
  613. ; Unknown command
  614. ;
  615. ui pop 1
  616. Debug-Output "OEMNADXN.INF: Action: unknown. Bye."
  617. goto end
  618. endif
  619. ;
  620. ; If installing, go create the necessary keys;
  621. ; if configuring, they're already open.
  622. ;
  623. ifstr(i) $(!STF_NCDETINFO) == {}
  624. ; not detect. popup dialog.
  625. Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  626. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  627. Debug-Output "ShellCode error."
  628. goto ShellCodeError
  629. endif
  630. set BusInterfaceType = $($R1)
  631. set BusNumber = $($R2)
  632. else
  633. ; use the STF_NCDETINFO information
  634. set BusInterfaceType = *($(!STF_NCDETINFO),5)
  635. set BusNumber = *($(!STF_NCDETINFO),6)
  636. endif
  637. nextstep = +
  638. ifint $(OldVersionExisted) == $(TRUE)
  639. ifstr(i) $(!NTN_InstallMode) == configure
  640. goto writeparameters
  641. endif
  642. endif
  643. StartWait
  644. ; *****************************************************************
  645. ; New Product Installation
  646. ; *****************************************************************
  647. ;
  648. ; Add Software Component
  649. ;
  650. Ifint $(OldVersionExisted) != $(FALSE)
  651. Goto installhardware
  652. Endif
  653. ifstr(i) $(!NTN_InstallMode) == "install"
  654. Ifstr(i) $(DoCopy) == "YES"
  655. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  656. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  657. Goto ShellCodeError
  658. Else-Ifstr(i) $($R0) == STATUS_FAILED
  659. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  660. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  661. goto ShellCodeError
  662. endif
  663. set Error = $($R0)
  664. Goto fatal
  665. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  666. Goto successful
  667. Endif
  668. Set SrcDir = $($R1)
  669. Endif
  670. install "Install-Option"
  671. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  672. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  673. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  674. goto ShellCodeError
  675. endif
  676. set Error = $($R0)
  677. goto fatal
  678. endif
  679. endif
  680. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  681. $(ProductSoftwareName), +
  682. $(ProductSoftwareName), +
  683. $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  684. $(ProductSoftwareImagePath), "kernel", "TDI", {}, "",+
  685. $(IoLogMsgDLL), ""
  686. Set OEM_ABANDON_SOFTWARE = TRUE
  687. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  688. Debug-Output "OEMNADXN.INF: ShellCode error"
  689. goto ShellCodeError
  690. endif
  691. set RegistryErrorIndex = $($R0)
  692. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  693. EndWait
  694. Debug-Output "OEMNADXN.INF: Registry error: add software components"
  695. CloseRegKey $($R1)
  696. CloseRegKey $($R2)
  697. CloseRegKey $($R3)
  698. CloseRegKey $($R4)
  699. CloseRegKey $($R5)
  700. goto fatalregistry
  701. endif
  702. ;
  703. ; At this point:
  704. ; $R1 contains the product version key handle;
  705. ; $R2 contains the NetRules subkey handle;
  706. ; $R3 contains the new Services key handle; and
  707. ; $R4 contains the Parameters key
  708. ; $R5 contains the Linkage Key
  709. ;
  710. Set SoftProductKey = $($R1)
  711. Set SoftNetRuleKey = $($R2)
  712. Set SoftServiceKey = $($R3)
  713. Set SoftParameterKey = $($R4)
  714. Set SoftLinkageKey = $($R5)
  715. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  716. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  717. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  718. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  719. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  720. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  721. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  722. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  723. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  724. Debug-Output "OEMNADXN.INF: ShellCode error."
  725. goto ShellCodeError
  726. endif
  727. set RegistryErrorIndex = $($R0)
  728. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  729. EndWait
  730. Debug-Output "OEMNADXN.INF: Registry error: add value list for software product."
  731. CloseRegKey $(SoftProductKey)
  732. CloseRegKey $(SoftNetRuleKey)
  733. CloseRegKey $(SoftServiceKey)
  734. CloseRegKey $(SoftParameterKey)
  735. CloseRegKey $(SoftLinkageKey)
  736. goto fatalregistry
  737. endif
  738. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  739. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  740. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  741. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  742. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  743. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  744. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  745. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  746. Debug-Output "OEMNADXN.INF: ShellCode error."
  747. goto ShellCodeError
  748. endif
  749. set RegistryErrorIndex = $($R0)
  750. ;
  751. ; Add the NetBIOS provider flag to the XNS\Parameters key
  752. ;
  753. Set NewValueList = {{NbProvider,$(NoTitle),$(!REG_VT_SZ),"_xns"}}
  754. Shell $(UtilityInf), AddValueList, $(SoftParameterKey), $(NewValueList)
  755. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  756. Debug-Output "OEMNADXN.INF: ShellCode error."
  757. goto ShellCodeError
  758. Endif
  759. CloseRegKey $(SoftProductKey)
  760. CloseRegKey $(SoftNetRuleKey)
  761. CloseRegKey $(SoftServiceKey)
  762. CloseRegKey $(SoftParameterKey)
  763. CloseRegKey $(SoftLinkageKey)
  764. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  765. EndWait
  766. Debug-Output "OEMNADXN.INF: Registry error: add value list."
  767. goto fatalregistry
  768. endif
  769. ;
  770. ; Create the HARDWARE\Netcard region and its corresponding service
  771. ;
  772. installhardware =+
  773. Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  774. ifint $($R4) != -1
  775. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  776. endif
  777. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  778. Debug-Output "OEMNADXN.INF: Cannot add hardware component"
  779. goto ShellCodeError
  780. endif
  781. set RegistryErrorIndex = $($R0)
  782. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  783. EndWait
  784. Debug-Output "OEMNADXN.INF: Registry error: add hardware component"
  785. CloseRegKey $($R1)
  786. CloseRegKey $($R2)
  787. CloseRegKey $($R3)
  788. goto fatalregistry
  789. endif
  790. ;
  791. ; At this point:
  792. ; $R1 Registry key variable for HARDWARE\Netcard\(n)
  793. ; $R2 Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  794. ; $R3 Registry key handle for <service>\Parameters key
  795. ; $R4 Adapter number assigned to adapter
  796. ; $R5 Service name generated by combining svc name with adapter number
  797. ;
  798. set KeyProduct = $($R1)
  799. set KeyAdapterRules = $($R2)
  800. set KeyParameters = $($R3)
  801. set AdapterNumber = $($R4)
  802. set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  803. {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  804. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  805. {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  806. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  807. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  808. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  809. Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  810. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  811. Debug-Output "OEMNADXN.INF: ShellCode error"
  812. goto ShellCodeError
  813. endif
  814. CloseRegKey $(KeyProduct)
  815. Set KeyProduct = ""
  816. set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  817. set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  818. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  819. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  820. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  821. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  822. Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  823. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  824. Debug-Output "OEMNADXN.INF: ShellCode error."
  825. goto ShellCodeError
  826. endif
  827. CloseRegKey $(KeyAdapterRules)
  828. Set RegistryErrorIndex = $($R0)
  829. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  830. EndWait
  831. Debug-Output "OEMNADXN.INF: Registry error: add value list."
  832. CloseRegKey $(KeyParameters)
  833. goto fatalregistry
  834. Endif
  835. ;
  836. ; BUGBUG: Alter Netbios\Currentversion:Review=1 if present. This causes OEMNSVNB.INF to
  837. ; start reviewing bindings. MS Campus special.
  838. ;
  839. Debug-Output "OEMNADXN.INF: Attempt to open Netbios key..."
  840. OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Netbios\CurrentVersion" $(MAXIMUM_ALLOWED) NetbiosKey
  841. Ifstr(i) $(NetbiosKey) != $(KeyNull)
  842. Set NewValueList = {{Review, $(NoTitle), $(!REG_VT_DWORD), 1}}
  843. Shell $(UtilityInf), AddValueList, $(NetbiosKey), $(NewValueList)
  844. Debug-Output "OEMNADXN.INF: Netbios changed to review bindings"
  845. CloseRegKey $(NetbiosKey)
  846. Endif
  847. ;
  848. ; REQUIRED: $(KeyParameters) contains service Parameters key handle
  849. ;
  850. writeparameters = +
  851. ;
  852. ; Add the rest of the parameters to the Services area
  853. ;
  854. Ifstr(i) $(KeyParameters) == $(KeyNull)
  855. Debug-Output "OEMNADXN.INF: *** KeyParameters is NULL at writeparameters"
  856. Endif
  857. set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  858. set IOBaseAddrValue = *($(IOBaseAddrValues), +
  859. ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  860. set MemMappedWndAddrValue = *($(MemMappedWndAddrValues), +
  861. ~($(MemMappedWndAddrList),$(MemMappedWndAddrIndex)))
  862. ifstr(i) $(Option) == "UBPCXNS"
  863. set CardType = "1"
  864. else-ifstr(i) $(Option) == "UBPCEOTPXNS"
  865. set CardType = "2"
  866. else
  867. set CardType = "3"
  868. endif
  869. set NewValueList = {+
  870. {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  871. {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  872. {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  873. {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
  874. {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  875. {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  876. {NetNumber,$(NoTitle),$(!REG_VT_DWORD),$(NetNumber)},+
  877. {Size,$(NoTitle),$(!REG_VT_DWORD),$(Size)},+
  878. {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemMappedWndAddrValue)}}
  879. Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  880. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  881. Debug-Output "OEMNADXN.INF: ShellCode error."
  882. goto ShellCodeError
  883. endif
  884. Set RegistryErrorIndex = $($R0)
  885. CloseRegKey $(KeyParameters)
  886. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  887. Debug-Output "OEMNADXN.INF: Registry error: Add value list"
  888. goto fatalregistry
  889. Endif
  890. EndWait
  891. goto successful
  892. ;-----------------------------------------------
  893. ; Binding section
  894. ;-----------------------------------------------
  895. bindingadapter =+
  896. set Error = "Binding: Sorry, not yet implemented."
  897. goto fatal
  898. ;-----------------------------------------------
  899. ; Removeadapter section
  900. ;-----------------------------------------------
  901. removeadapter = +
  902. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  903. ; Remove RPC protocol string
  904. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_xns"
  905. ;Ifstr(i) $($0) != NO_ERROR
  906. ; Debug-Output "OEMNADXN.INF: ERROR deleting RPC protocol data"
  907. ;Endif
  908. ; Remove Software Component
  909. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  910. $(ProductSoftwareName)
  911. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  912. Debug-Output "OEMNADXN.INF: ShellCode error"
  913. goto ShellCodeError
  914. endif
  915. set RegistryErrorIndex = $($R0)
  916. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  917. goto fatalregistry
  918. endif
  919. else
  920. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  921. $(ProductSoftwareName), $(!NTN_RegBase)
  922. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  923. Debug-Output "OEMNADXN.INF: ShellCode error"
  924. goto ShellCodeError
  925. endif
  926. set RegistryErrorIndex = $($R0)
  927. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  928. goto fatalregistry
  929. endif
  930. endif
  931. goto end
  932. ;-----------------------------------------------
  933. ; Upgrade Software section
  934. ;-----------------------------------------------
  935. UpgradeSoftware = +
  936. ; Upgrade software component
  937. ;
  938. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  939. Ifstr $(KeyProduct) != $(KeyNull)
  940. install "Install-Update"
  941. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  942. goto fatal
  943. endif
  944. ; Upgrade the version number
  945. ;
  946. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  947. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  948. ;
  949. ; do nothing for update
  950. ;
  951. CloseRegKey $(KeyProduct)
  952. else
  953. ;
  954. ; Cannot Open software key, goto ERROR
  955. ;
  956. goto fatalregistry
  957. endif
  958. ;
  959. ; Enumerate all netcards installed of this type and update them
  960. ;
  961. set iSearch = 1
  962. nextnetcard = +
  963. Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  964. set KeyNetcard = $($R0)
  965. set iSearch = $($R1)
  966. Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  967. Ifstr $(KeyNetcard) != $(KeyNull)
  968. Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  969. SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  970. CloseRegKey $(KeyNetcard)
  971. goto nextnetcard
  972. Endif
  973. goto end
  974. ;
  975. ; End of Upgrade Software
  976. ;
  977. ;
  978. ; Escape hatches
  979. ;
  980. successful = +
  981. goto end
  982. abandon = +
  983. ForListDo $(OEM_ABANDON_OPTIONS)
  984. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  985. $(ProductSoftwareName), $($)
  986. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  987. Debug-Output "OEMNADXN.INF: ShellCode error"
  988. goto ShellCodeError
  989. endif
  990. set RegistryErrorIndex = $($R0)
  991. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  992. goto fatalregistry
  993. endif
  994. EndForListDo
  995. Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  996. ; Remove Software Component
  997. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  998. $(ProductSoftwareName), FALSE
  999. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1000. Debug-Output "OEMNADXN.INF: ShellCode error"
  1001. goto ShellCodeError
  1002. endif
  1003. set RegistryErrorIndex = $($R0)
  1004. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1005. goto fatalregistry
  1006. endif
  1007. endif
  1008. goto end
  1009. ;
  1010. ; warning display
  1011. ;
  1012. warning = +
  1013. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1014. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1015. goto ShellCodeError
  1016. endif
  1017. ifstr(i) $($R1) == "OK"
  1018. goto $(to)
  1019. else-ifstr(i) $($R1) == "CANCEL"
  1020. goto $(from)
  1021. else
  1022. ; Debug-Msg "Error Error Bad DLGEVENT"
  1023. goto "end"
  1024. endif
  1025. ;
  1026. ; non fatal error display
  1027. ;
  1028. nonfatalinfo = +
  1029. Set CommonStatus = STATUS_USERCANCEL
  1030. Set Severity = STATUS
  1031. goto nonfatalmsg
  1032. nonfatal = +
  1033. Set Severity = NONFATAL
  1034. goto nonfatalmsg
  1035. nonfatalmsg = +
  1036. ifstr(i) $(Error) == ""
  1037. Set Severity = NONFATAL
  1038. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1039. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1040. goto ShellCodeError
  1041. endif
  1042. set Error = $($R0)
  1043. endif
  1044. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1045. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1046. goto ShellCodeError
  1047. endif
  1048. ifstr(i) $($R1) == "OK"
  1049. goto $(from)
  1050. else
  1051. goto "end"
  1052. endif
  1053. ;
  1054. ; Registry is broken
  1055. ;
  1056. fatalregistry = +
  1057. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1058. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1059. goto ShellCodeError
  1060. endif
  1061. set Error = $($R0)
  1062. goto fatal
  1063. ;
  1064. ; fatal error display
  1065. ;
  1066. fatal = +
  1067. ifstr(i) $(Error) == ""
  1068. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1069. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1070. goto ShellCodeError
  1071. endif
  1072. set Error = $($R0)
  1073. endif
  1074. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1075. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1076. goto ShellCodeError
  1077. endif
  1078. goto setfailed
  1079. ;
  1080. ; Shelling error
  1081. ;
  1082. ShellCodeError = +
  1083. set DlgType = "MessageBox"
  1084. set STF_MB_TITLE = "Error: "$(FunctionTitle)
  1085. set STF_MB_TEXT = "Shell Code Error"
  1086. set STF_MB_TYPE = 1
  1087. set STF_MB_ICON = 3
  1088. set STF_MB_DEF = 1
  1089. ui start "Error Message"
  1090. goto setfailed
  1091. setfailed = +
  1092. set CommonStatus = STATUS_FAILED
  1093. ;
  1094. ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1095. ;
  1096. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1097. set OEM_ABANDON_ON = FALSE
  1098. goto abandon
  1099. endif
  1100. goto end
  1101. end = +
  1102. goto term
  1103. term = +
  1104. Return $(CommonStatus)
  1105. ;***************************************************************
  1106. ; INSTALL SECTIONS
  1107. ;***************************************************************
  1108. [Install-Option]
  1109. set STF_VITAL = ""
  1110. ifstr(i) $(AddCopy) == "YES"
  1111. ;
  1112. ; Add the files to the copy list
  1113. ;
  1114. ; BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1115. ; the other INF files
  1116. ;
  1117. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1118. AddSectionFilesToCopyList Files-exmb $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1119. endif
  1120. Debug-Output "OEMNADXN.INF: [Install-Option] DoCopy = "$(DoCopy)
  1121. ifstr(i) $(DoCopy) == "YES"
  1122. ;
  1123. ; Copy files in the copy list
  1124. ;
  1125. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1126. CopyFilesInCopyList
  1127. endif
  1128. ifstr(i) $(DoConfig) == "YES"
  1129. ;
  1130. ; Add product to registry
  1131. ;
  1132. ;
  1133. ; Finish up
  1134. endif
  1135. Exit
  1136. [Install-Update]
  1137. set STF_VITAL = ""
  1138. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1139. ;set STF_VERSION = "YES"
  1140. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1141. AddSectionFilesToCopyList Files-exmb $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1142. exit