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.

1339 lines
39 KiB

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