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.

1346 lines
40 KiB

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