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.

2564 lines
100 KiB

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with. The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  8. ;
  9. ; Types specific to networking:
  10. ;
  11. ; NetAdapter, a netcard / adapter combination or just a netcard
  12. ; NetDriver, just a netcard driver
  13. ; NetTransport, a complete NDIS-compliant TDI transport stack
  14. ; NetService, an NT networking service
  15. ; NetWork, a complete network ensemble.
  16. ; NetProvider a complete network which supports NT MPR protocol
  17. ;-----------------------------------------------------------------------
  18. [Identification]
  19. OptionType = NetAdapter
  20. ;-----------------------------------------------------------------------
  21. ; PlatformsSupported
  22. ; ------------------
  23. ; This identifies the platforms supported by the adapter card.
  24. ; Possible types are:
  25. ;
  26. ; ISA, EISA and MCA
  27. ;-----------------------------------------------------------------------
  28. [PlatformsSupported]
  29. ISA
  30. EISA
  31. "Jazz-Internal Bus"
  32. PCI
  33. MCA
  34. ;-----------------------------------------------------------------------
  35. ; LANGUAGES SUPPORTED
  36. ; -------------------
  37. ;
  38. ; The languages supported by the OEM INF, For every language supported
  39. ; we need to have a separate text section for every displayable text
  40. ; section.
  41. ;
  42. ;-----------------------------------------------------------------------
  43. [LanguagesSupported]
  44. ENG
  45. ;-----------------------------------------------------------------------
  46. ; OPTION LIST
  47. ; -----------
  48. ; This section lists the OEM Option key names. These keys are locale
  49. ; independent and used to represent the option in a locale independent
  50. ; manner.
  51. ;
  52. ;-----------------------------------------------------------------------
  53. [Options]
  54. DigiBoardCX
  55. DigiBoardXem
  56. DigiBoard8r
  57. IBM8r
  58. DigiBoard8i
  59. DigiBoard16i
  60. DigiBoard2Port
  61. DigiBoard4Port
  62. DigiBoard8Port
  63. DigiBoard4e
  64. DigiBoard8e
  65. DigiBoard16e
  66. DigiBoardEPC
  67. StarGateClusStar
  68. [OptionsMCA]
  69. DigiBoardCX
  70. DigiBoardXem
  71. DigiBoard8r
  72. DigiBoard4i
  73. DigiBoard8i
  74. DigiBoard16i
  75. DigiBoard2Port
  76. DigiBoard4Port
  77. DigiBoard8Port
  78. DigiBoardEPC
  79. StarGateClusStar
  80. [AdapterInfo]
  81. ; Title Hardware Hardware Hardware Manufacturer FEP Bios EISA
  82. ; Name Driver Type Display Name Name Name ID
  83. ; -------- -------- -------- -------- ------------ ------ ------ ------
  84. DigiBoardCX = "C/X", ntcx, ntcx, 3, "Digi", cxfep.bin cxbios.bin {84240}
  85. DigiBoardXem = "PC/Xem", ntxem, ntxem, 2, "Digi", sxfep.bin sxbios.bin {149776}
  86. DigiBoard8r = "AccelePort 8", nt8r, ntxem, 7, "Digi", sxfep.bin sxbios.bin {0}
  87. IBM8r = "8-Port Async, EIA-232 (ISA)", nt8r, ntxem, 13, "IBM", sxfep.bin sxbios.bin {0}
  88. DigiBoard8i = "PC/8i", nt8i, ntxall, 1, "Digi", xacook.bin xabios.bin {0}
  89. DigiBoard16i = "PC/16i", nt16i, ntxall, 9, "Digi", xacook.bin xabios.bin {0}
  90. DigiBoard2Port = "PC/2e (8K)", 2Port, ntxall, 4, "Digi", xacook.bin xabios.bin {0}
  91. DigiBoard4Port = "PC/4e (8K)", 4Port, ntxall, 6, "Digi", xacook.bin xabios.bin {0}
  92. DigiBoard8Port = "PC/8e (8K)", 8Port, ntxall, 7, "Digi", xacook.bin xabios.bin {0}
  93. DigiBoard4e = "PC/4e", nt4e, ntxall, 5, "Digi", xacook.bin xabios.bin {0}
  94. DigiBoard8e = "PC/8e", nt8e, ntxall, 0, "Digi", xacook.bin xabios.bin {0}
  95. DigiBoard16e = "PC/16e", nt16e, ntxall, 8, "Digi", xacook.bin xabios.bin {0}
  96. DigiBoardEPC = "EPC", ntepc, ntepc, 11, "Digi", fxfep.bin fxbios.bin {215312}
  97. StarGateClusStar = "ClusStar", ntcx, ntcx, 12, "Digi/StarGate", cxfep.bin cxbios.bin {84240}
  98. [AdapterInfoMCA]
  99. ; Title Hardware Hardware Hardware Manufacturer FEP Bios MCA POS MCA POS MCA POS
  100. ; Name Driver Type Display Name Name Name ID Byte 1 Byte 2
  101. ; -------- -------- -------- -------- ------------ ------ ------ ------- ------- -------
  102. DigiBoardCX = "MC C/X", ntcx, ntcx, 3, "Digi", cxfep.bin cxbios.bin {28652,28648}, {236,232}, {111,111}
  103. DigiBoardXem = "MC/Xem", ntxem, ntxem, 2, "Digi", sxfep.bin sxbios.bin {32668}, {156}, {127}
  104. DigiBoard8r = "MC AccelePort 8", nt8r, ntxem, 7, "Digi", sxfep.bin sxbios.bin {28647}, {231}, {111}
  105. DigiBoard4i = "MC/4i", nt4i, ntxall, 10, "Digi", xacook.bin xabios.bin {32666,32665}, {154,153}, {127,127}
  106. DigiBoard8i = "MC/8i", nt8i, ntxall, 1, "Digi", xacook.bin xabios.bin {32666,32665}, {154,153}, {127,127}
  107. DigiBoard16i = "MC/16i", nt16i, ntxall, 9, "Digi", xacook.bin xabios.bin {32667}, {155}, {127}
  108. DigiBoard2Port = "MC/2e (8K)", 2Port, ntxall, 4, "Digi", xacook.bin xabios.bin {28647}, {231}, {111}
  109. DigiBoard4Port = "MC/4e (8K)", 4Port, ntxall, 6, "Digi", xacook.bin xabios.bin {28647}, {231}, {111}
  110. DigiBoard8Port = "MC/8e (8K)", 8Port, ntxall, 7, "Digi", xacook.bin xabios.bin {28647}, {231}, {111}
  111. DigiBoardEPC = "MC EPC", ntepc, ntepc, 11, "Digi", fxfep.bin fxbios.bin {32669}, {157}, {127}
  112. StarGateClusStar = "MC ClusStar", ntcx, ntcx, 12, "Digi/StarGate", cxfep.bin cxbios.bin {28652,28648}, {236,232}, {111,111}
  113. [FileConstants]
  114. ;
  115. ; Misc. variables
  116. ;
  117. ExitState = "Active"
  118. OldVersionExisted = $(FALSE)
  119. HdwDriverComponentExists = $(FALSE)
  120. DriverPath = $(!STF_NTPATH)"\drivers"
  121. ;
  122. ; File names, etc.
  123. ;
  124. UtilityInf = "UTILITY.INF"
  125. subroutninf = "SUBROUTN.INF"
  126. ParamInf = "NCPARAM.INF"
  127. HandleNull = ""
  128. DGCONFIG_HANDLE = $(HandleNull)
  129. ;
  130. ; Adapter information
  131. ;
  132. AdapterList = ^(AdapterInfo$(BusType),0)
  133. AdapterTitleList = ^(AdapterInfo$(BusType), 1)
  134. AdapterHardwareNameList = ^(AdapterInfo$(BusType), 2)
  135. AdapterHardwareDriverList = ^(AdapterInfo$(BusType), 3)
  136. AdapterHardwareTypeList = ^(AdapterInfo$(BusType), 4)
  137. ManufacturerDisplayNameList = ^(AdapterInfo$(BusType), 5)
  138. AdapterFepList = ^(AdapterInfo$(BusType), 6)
  139. AdapterBiosList = ^(AdapterInfo$(BusType), 7)
  140. AdapterHardwareAdapterIDList = ^(AdapterInfo$(BusType), 8)
  141. AdapterIDByte1List = ^(AdapterInfo$(BusType), 9)
  142. AdapterIDByte2List = ^(AdapterInfo$(BusType), 10)
  143. AdapterTitle = *($(AdapterTitleList), ~($(AdapterList), $(Option)))
  144. AdapterHardwareName = *($(AdapterHardwareNameList), ~($(AdapterList), $(Option)))
  145. AdapterHardwareDriver = *($(AdapterHardwareDriverList), ~($(AdapterList), $(Option)))
  146. AdapterHardwareType = *($(AdapterHardwareTypeList), ~($(AdapterList), $(Option)))
  147. AdapterHardwareAdapterID = *($(AdapterHardwareAdapterIDList), ~($(AdapterList), $(Option)))
  148. AdapterIDByte1 = *($(AdapterIDByte1List), ~($(AdapterList), $(Option)))
  149. AdapterIDByte2 = *($(AdapterIDByte2List), ~($(AdapterList), $(Option)))
  150. AdapterRule = *($(AdapterHardwareDriverList), ~($(AdapterList), $(Option)))
  151. ManufacturerDisplayName = *($(ManufacturerDisplayNameList), ~($(AdapterList), $(Option)))
  152. AdapterFepImage = *($(AdapterFepList), ~($(AdapterList), $(Option)))
  153. AdapterBiosImage = *($(AdapterBiosList), ~($(AdapterList), $(Option)))
  154. AdapterServiceName = ""
  155. AdapterName = ""
  156. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  157. ;
  158. ; EventLog Message File
  159. ;
  160. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  161. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  162. ;
  163. ; Product Info
  164. ;
  165. Manufacturer = "DigiBoard"
  166. ProductMajorVersion = "4"
  167. ProductMinorVersion = "0"
  168. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  169. ;
  170. ; Software
  171. ;
  172. SoftwareType = "driver"
  173. ProductSoftwareName = "DigiFEP5"
  174. ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\digifep5.sys"
  175. NetRuleSoftwareType = "digiFEP5Sys serialDriver digiFEP5Driver"
  176. NetRuleSoftwareUse = $(SoftwareType)
  177. NetRuleSoftwareBindForm = """DigiFEP5Driver"" yes no container"
  178. NetRuleSoftwareClass = {"serialDriver basic","digiFEP5Driver basic"}
  179. NetRuleSoftwareHiddenDriver = 1
  180. ;
  181. ; Hardware Dependent Software
  182. ;
  183. ProductMajorVersionHdwDriver = "4"
  184. ProductMinorVersionHdwDriver = "0"
  185. ProductVersionHdwDriver = $(ProductMajorVersionHdwDriver)"."$(ProductMinorVersionHdwDriver)
  186. ProductSoftwareNameHdwDriver = $(AdapterHardwareDriver)
  187. ProductSoftwareImagePathHdwDriver = "%SystemRoot%\System32\drivers\"$(AdapterHardwareDriver)".sys"
  188. NetRuleSoftwareTypeHdwDriver = $(AdapterHardwareDriver)"sys "$(AdapterHardwareDriver)"Driver"
  189. NetRuleSoftwareUseHdwDriver = $(SoftwareType)
  190. NetRuleSoftwareBindFormHdwDriver = """"$(AdapterHardwareDriver)"Driver"" yes no container"
  191. NetRuleSoftwareClassHdwDriver = {$(AdapterHardwareDriver)"Driver basic"}
  192. NetRuleSoftwareHiddenHdwDriver = 1
  193. ;
  194. ; Hardware
  195. ;
  196. NetRuleHardwareType = $(AdapterRule)" "$(AdapterRule)"Adapter"
  197. NetRuleHardwareBindForm = " yes yes container"
  198. NetRuleHardwareClass = {$(AdapterHardwareDriver)"Adapter basic"}
  199. ProductHardwareName = $(AdapterHardwareDriver)
  200. AdapterParameters = {}
  201. ; Registry Key
  202. ;
  203. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  204. ProductKeyNameHdwDriver = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareNameHdwDriver)"\CurrentVersion"
  205. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  206. [GeneralConstants]
  207. ;
  208. ; Return codes; Exit_Code is set to one of these
  209. ;
  210. ExitCodeOk = 0
  211. ExitCodeCancel = 1
  212. ExitCodeFatal = 2
  213. KeyNull = ""
  214. MAXIMUM_ALLOWED = 33554432
  215. RegistryErrorIndex = NO_ERROR
  216. KeyProduct = ""
  217. KeyParameters = ""
  218. TRUE = 1
  219. FALSE = 0
  220. NoTitle = 0
  221. fRemoveDigi = TRUE
  222. [DebugOptions]
  223. ;
  224. ; Debugging variables
  225. ;
  226. TraceConfig = 0
  227. [UiVars]
  228. ;
  229. ; Program flow control variables.
  230. ;
  231. from = ""
  232. to = ""
  233. !STF_NTDRIVE = ""
  234. !STF_NTPATH = ""
  235. !STF_WINDOWSPATH = "" ? $(!LIBHANDLE) GetWindowsNtDir
  236. !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  237. !STF_FLOPPYLIST = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
  238. !STF_UNUSEDDRIVES = {} ? $(!LIBHANDLE) GetUnusedDrives
  239. !STF_LANGUAGE = "ENG"
  240. VolumeList = {} ? $(!LIBHANDLE) GetHardDriveLetters
  241. VolumeFreeList = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  242. VolumeFSList = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  243. DestVolume = ""
  244. MinHelpID = 25000
  245. MaxHelpID = 25999
  246. [date]
  247. ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  248. ; Minute, Second }
  249. Now = {} ? $(!LIBHANDLE) GetSystemDate
  250. ;---------------------------------------------------------------------------
  251. ; 1. Identify
  252. ;
  253. ; DESCRIPTION: To verify that this INF deals with the same type of options
  254. ; as we are choosing currently.
  255. ;
  256. ; INPUT: None
  257. ;
  258. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  259. ; $($R1): Option Type (COMPUTER ...)
  260. ; $($R2): Diskette description
  261. ;---------------------------------------------------------------------------
  262. [Identify]
  263. read-syms Identification
  264. set Status = STATUS_SUCCESSFUL
  265. set Identifier = $(OptionType)
  266. set Media = #("Source Media Descriptions", 1, 1)
  267. Return $(Status) $(Identifier) $(Media)
  268. ;------------------------------------------------------------------------
  269. ; 2. ReturnOptions:
  270. ;
  271. ; DESCRIPTION: To return the option list supported by this INF and the
  272. ; localised text list representing the options.
  273. ;
  274. ;
  275. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  276. ; $($1): Bus Type
  277. ;
  278. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  279. ; STATUS_NOLANGUAGE
  280. ; STATUS_FAILED
  281. ; STATUS_NOTSUPPORTED
  282. ;
  283. ; $($R1): Option List
  284. ; $($R2): Option Text List
  285. ;------------------------------------------------------------------------
  286. [ReturnOptions]
  287. ;
  288. ;
  289. set Status = STATUS_FAILED
  290. set OptionList = {}
  291. set OptionTextList = {}
  292. ;
  293. ; Check if the language requested is supported
  294. ;
  295. set LanguageList = ^(LanguagesSupported, 1)
  296. Ifcontains(i) $($0) in $(LanguageList)
  297. ;
  298. ; Check if the platforms requested is supported
  299. ;
  300. ifstr(i) $($1) == ""
  301. goto returnoptions
  302. endif
  303. set PlatformList = ^(PlatformsSupported, 1)
  304. Ifcontains(i) $($1) in $(PlatformList)
  305. goto returnoptions
  306. else
  307. set Status = STATUS_NOTSUPPORTED
  308. goto finish_ReturnOptions
  309. endif
  310. Else
  311. set Status = STATUS_NOLANGUAGE
  312. goto finish_ReturnOptions
  313. Endif
  314. ;
  315. ; form a list of all the options and another of the text representing
  316. ;
  317. returnoptions = +
  318. ifstr(i) $($1) == "MCA"
  319. set OptionList = ^(OptionsMCA, 1)
  320. set OptionTextList = ^(OptionsTextMCA$($0), 1)
  321. else
  322. set OptionList = ^(Options, 1)
  323. set OptionTextList = ^(OptionsText$($0), 1)
  324. endif
  325. set Status = STATUS_SUCCESSFUL
  326. finish_ReturnOptions = +
  327. Return $(Status) $(OptionList) $(OptionTextList)
  328. [Shell Commands]
  329. set-title "Serial Setup"
  330. set-subst LF = "\n"
  331. set Exit_Code = $(ExitCodeOk)
  332. Debug-Output "OEMNADDS.INF: STF_CWDDIR is "$(!STF_CWDDIR)
  333. Debug-Output "OEMNADDS.INF: STF_RANFROM is "$(!STF_RANFROM)
  334. ifstr(i) $(!STF_RANFROM) != ""
  335. ifstr(i) $(!STF_RANFROM) != $(!STF_CWDDIR)"SERIAL\"
  336. set !STF_SRCDIR = $(!STF_RANFROM)
  337. endif
  338. endif
  339. LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  340. shell "" InstallOption ENG DigiBoard $(!STF_SRCDIR)
  341. FreeLibrary $(!LIBHANDLE)
  342. set Status = $($R0)
  343. Return $(Status)
  344. ;------------------------------------------------------------------------
  345. ;
  346. ; InstallOption:
  347. ;
  348. ; This section is shelled to by main installation processing
  349. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  350. ;
  351. ;
  352. ; FUNCTION: To copy files representing Options
  353. ; To configure the installed option
  354. ; To update the registry for the installed option
  355. ;
  356. ; INPUT: $($0): Language to use
  357. ; $($1): OptionID to install
  358. ; $($2): SourceDirectory
  359. ; $($3): AddCopy (YES | NO)
  360. ; $($4): DoCopy (YES | NO)
  361. ; $($5): DoConfig (YES | NO)
  362. ;
  363. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  364. ; STATUS_NOLANGUAGE |
  365. ; STATUS_USERCANCEL |
  366. ; STATUS_FAILED
  367. ;
  368. ;------------------------------------------------------------------------
  369. [InstallOption]
  370. read-syms DebugOptions
  371. Debug-Output "OEMNADDS.INF: In [InstallOption] section"
  372. Debug-Output "OEMNADDS.INF: TraceConfig = "$(TraceConfig)
  373. ;
  374. ; Set default values for
  375. ;
  376. set Status = STATUS_FAILED
  377. ;
  378. ; extract parameters
  379. ;
  380. set Option = $($1)
  381. set SrcDir = $($2)
  382. set AddCopy = $($3)
  383. set DoCopy = $($4)
  384. set DoConfig = $($5)
  385. set !SourceDir = $($2)
  386. ifstr(i) $(!STF_BUSTYPE) == "MCA"
  387. set BusType = "MCA"
  388. else
  389. set BusType = ""
  390. endif
  391. read-syms GeneralConstants
  392. read-syms FileConstants
  393. Debug-Output "OEMNADDS.INF: Language = "$($0)
  394. Debug-Output "OEMNADDS.INF: OptionID = "$($1)
  395. Debug-Output "OEMNADDS.INF: SourceDirectory = "$($2)
  396. Debug-Output "OEMNADDS.INF: AddCopy = "$(AddCopy)
  397. Debug-Output "OEMNADDS.INF: DoCopy = "$(DoCopy)
  398. Debug-Output "OEMNADDS.INF: DoConfig = "$(DoConfig)
  399. Debug-Output "OEMNADDS.INF: BusType = "$(BusType)
  400. ; shell "" DebugExternalGlobals
  401. set LanguageList = ^(LanguagesSupported, 1)
  402. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  403. Debug-Output "OEMNADDS.INF: returning STATUS_NO_LANGUAGE"
  404. return STATUS_NOLANGUAGE
  405. Endif
  406. set-subst LF = "\n"
  407. Debug-Output "OEMNADDS.INF: ManufacturerDisplayName = "$(ManufacturerDisplayName)
  408. Debug-Output "OEMNADDS.INF: AdapterTitle = "$(AdapterTitle)
  409. Debug-Output "OEMNADDS.INF: AdapterHardwareName = "$(AdapterHardwareName)
  410. Debug-Output "OEMNADDS.INF: AdapterHardwareDriver = "$(AdapterHardwareDriver)
  411. read-syms BindingInfo-DigiFEP5
  412. set NetRuleSoftwareBindable = $(BindingInfo)
  413. read-syms BindingInfo-$(AdapterHardwareDriver)
  414. set NetRuleSoftwareBindableHdwDriver = $(BindingInfo)
  415. read-syms DialogConstants$(!STF_LANGUAGE)
  416. ifstr(i) $(!NTN_Origination) == "NCPA"
  417. set Continue = "OK"
  418. endif
  419. read-syms FileConstants$(!STF_LANGUAGE)
  420. detect date
  421. set-title $(FunctionTitle)
  422. set to = Begin
  423. set from = Begin
  424. ;
  425. ; Assume all is well.
  426. ;
  427. set CommonStatus = STATUS_SUCCESSFUL
  428. EndWait
  429. ;
  430. ; Set up the operation-mode-based variables and gaily welcome
  431. ; the user. If the "install mode" variable is improperly set,
  432. ; assume this is a new installation.
  433. ;
  434. ; Debug-Output "OEMNADDS.INF: [InstallOption]:Begin"
  435. Begin = +
  436. Ifstr(i) $(!NTN_InstallMode) == deinstall
  437. set StartLabel = removeadapter
  438. else-Ifstr(i) $(!NTN_InstallMode) == Update
  439. set StartLabel = UpgradeSoftware
  440. else-Ifstr(i) $(!NTN_InstallMode) == bind
  441. set StartLabel = bindingadapter
  442. else-Ifstr(i) $(!NTN_InstallMode) == configure
  443. set StartLabel = getAdapterSettings
  444. ;
  445. ; You cannot config the software component
  446. ;
  447. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  448. Debug-Output "Cannot configure the DigiBoard FEP 5 driver software."
  449. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  450. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  451. Debug-Output "ShellCode error: cannot get an error string."
  452. goto ShellCodeError
  453. endif
  454. set Error = $($R0)
  455. set from = end
  456. set to = end
  457. goto nonfatalinfo
  458. endif
  459. Ifstr(i) $(ProductKeyNameHdwDriver) == $(!NTN_RegBase)
  460. Debug-Output "This should not have happened! Cannot configure the "$(AdapterHardwareName)" driver software."
  461. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  462. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  463. Debug-Output "ShellCode error: cannot get an error string."
  464. goto ShellCodeError
  465. endif
  466. set Error = $($R0)
  467. set from = end
  468. set to = end
  469. goto nonfatalinfo
  470. endif
  471. ;
  472. ; If we get to this point, then we can be sure that we are being
  473. ; asked to configure the adapter.
  474. ;
  475. Debug-Output "We need to determine how to find out which adapter"
  476. Debug-Output " we should be configuring!!!!!!"
  477. set from = writeparameters
  478. Debug-Output "setting from = "$(from)
  479. else
  480. ;
  481. ; Assume we are installing
  482. ;
  483. set StartLabel = installadapter
  484. set OEM_ABANDON_OPTIONS = {}
  485. set OEM_ABANDON_SOFTWARE = FALSE
  486. set OEM_ABANDON_ON = TRUE
  487. endif
  488. ; Debug-Output "OEMNADDS.INF: =================================================="
  489. ; Debug-Output "OEMNADDS.INF: STF_CWDIR is: "$(!STF_CWDIR)
  490. ; Debug-Output "OEMNADDS.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  491. Debug-Output "OEMNADDS.INF: Option is: "$(Option)
  492. ; Debug-Output "OEMNADDS.INF: !STF_NCDETECT is: "$(!STF_NCDETECT)
  493. ; Debug-Output "OEMNADDS.INF: !STF_NCOPTION is: "$(!STF_NCOPTION)
  494. ; Debug-Output "OEMNADDS.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  495. ; Debug-Output "OEMNADDS.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  496. ; Debug-Output "OEMNADDS.INF: =================================================="
  497. set to = $(fatal)
  498. Goto $(StartLabel)
  499. ;-----------------------------------------------
  500. ; Installation Section
  501. ;-----------------------------------------------
  502. installadapter = +
  503. Debug-Output "******************Entering installadapter******************"
  504. ;
  505. ; First, check whether the same version of the software exists
  506. ;
  507. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  508. Ifstr $(KeyProduct) != $(KeyNull)
  509. ;
  510. ; Same version of DigiFEP5 already exists on the local machine
  511. ; Popup the dialog and ask the user whether he wants to continue
  512. ;
  513. CloseRegKey $(KeyProduct)
  514. ifstr(i) $(!NTN_RegBase) == $(ProductKeyName)
  515. ;
  516. ; Don't allow multiple installs of the same software again
  517. ;
  518. Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  519. $(ProductVersion)
  520. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  521. Debug-Output "ShellCode error: Don't allow installation of software."
  522. goto ShellCodeError
  523. endif
  524. goto end
  525. else
  526. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameHdwDriver) +
  527. $(MAXIMUM_ALLOWED) KeyProductHdwDriver
  528. Ifstr $(KeyProductHdwDriver) != $(KeyNull)
  529. ;
  530. ; Add a new adapter card?
  531. ;
  532. CloseRegKey $(KeyProductHdwDriver)
  533. Shell $(UtilityInf), CardExistedDlg
  534. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  535. Debug-Output "ShellCode error: --One adapter all ready exists, install another-- FAILED."
  536. goto ShellCodeError
  537. endif
  538. ifstr(i) $($R1) != "OK"
  539. goto end
  540. endif
  541. set HdwDriverComponentExists = $(TRUE)
  542. EndIf ; end Ifstr $(KeyProductHdwDriver) != $(KeyNull)
  543. set OldVersionExisted = $(TRUE)
  544. endif
  545. endif
  546. goto skipoptions
  547. skipoptions = +
  548. Debug-Output "******************Entering skipoptions******************"
  549. ifint $(HdwDriverComponentExists) == $(TRUE)
  550. ifstr(i) $(!NTN_InstallMode) == configure
  551. ;
  552. ; The user just wants to configure an existing adapter
  553. ;
  554. goto getAdapterSettings
  555. endif
  556. endif
  557. StartWait
  558. ifint $(HdwDriverComponentExists) == $(FALSE)
  559. ;
  560. ; A version of the software does not exist yet in the registry.
  561. ;
  562. ifstr(i) $(!NTN_InstallMode) == "install"
  563. shell $(UtilityInf) AssignAdapterNumber
  564. set AdapterName = $(ProductHardwareName)$($R1)
  565. Ifstr(i) $(DoCopy) == "YES"
  566. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  567. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  568. Debug-Output"Shell code error: DoAskSource"
  569. Goto ShellCodeError
  570. Else-Ifstr(i) $($R0) == STATUS_FAILED
  571. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  572. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  573. goto ShellCodeError
  574. endif
  575. set Error = $($R0)
  576. Goto fatal
  577. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  578. set CommonStatus = STATUS_USERCANCEL
  579. Goto successful
  580. Endif
  581. Set SrcDir = $($R1)
  582. ;
  583. ; We need to check an make sure they didn't put a backslash
  584. ; on the end of the path. If so, remove it.
  585. ;
  586. Split-String $(SrcDir) "\" JunkList
  587. QueryListSize JunkSize $(JunkList)
  588. Set JunkItem = *($(JunkList),$(JunkSize))
  589. set JunkItem2 = "foo"
  590. ifstr $(JunkItem2)$(JunkItem)$(JunkItem2) != $(JunkItem2)"\"$(JunkItem2)
  591. Debug-Output "In ifstr"
  592. set SrcDir = $(SrcDir)"\"
  593. endif
  594. Debug-Output "Reassigning SourceDirectory = "$(SrcDir)
  595. Endif
  596. install "Install-Option"
  597. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  598. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  599. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  600. goto ShellCodeError
  601. endif
  602. set Error = $($R0)
  603. goto fatal
  604. endif
  605. endif
  606. endif
  607. set from = addDigiFEP5Component
  608. goto getAdapterSettings
  609. addDigiFEP5Component = +
  610. Debug-Output "******************Entering addDigiFEP5Component******************"
  611. Ifint $(OldVersionExisted) == $(TRUE)
  612. ; The DigiFEP5 driver is all ready installed.
  613. goto addHdwDriverComponent
  614. Endif
  615. Debug-Output "OEMNADDS.INF: Adding DigiFEP5Component"
  616. ;
  617. ; Install the primary digiFEP5 driver
  618. ;
  619. set DigiSpecificString = $(ProductSoftwareName)
  620. set TypeofService = "kernelautostart"
  621. set ServiceOrderGroup = "Extended base"
  622. set Dependencies = {}
  623. set ObjectName = ""
  624. set TypeSupported = "7"
  625. set EventLogLocation = "System"
  626. set ErrorControlValue = 1
  627. Debug-Output "OEMNADDS.INF: [InstallOption]:skipoptions: About to call AddSoftwareComponent"
  628. Debug-Output "OEMNADID.INF: Paramters passed in:"
  629. Debug-Output "OEMNADDS.INF: Manufacturer = "$(Manufacturer)
  630. Debug-Output "OEMNADDS.INF: Product = "$(ProductSoftwareName)
  631. Debug-Output "OEMNADDS.INF: Service = "$(ProductSoftwareName)
  632. Debug-Output "OEMNADDS.INF: Display name = "$(ProductSoftwareTitle)
  633. Debug-Output "OEMNADDS.INF: INFfile = "$(STF_CONTEXTINFNAME)
  634. Debug-Output "OEMNADDS.INF: ImagePath = "$(ProductSoftwareImagePath)
  635. Debug-Output "OEMNADDS.INF: Type of software = "$(TypeofService)
  636. Debug-Output "OEMNADDS.INF: Service Order group = "$(ServiceOrderGroup)
  637. Debug-Output "OEMNADDS.INF: Dependencies = "$(Dependencies)
  638. Debug-Output "OEMNADDS.INF: ObjectName = "$(ObjectName)
  639. Debug-Output "OEMNADDS.INF: EventMessageFile = "$(IoLogMsgDLL)";"$(ProductSoftwareImagePath)
  640. Debug-Output "OEMNADDS.INF: TypeSupported = "$(TypeSupported)
  641. Debug-Output "OEMNADDS.INF: Event log location = "$(EventLogLocation)
  642. Debug-Output "OEMNADDS.INF: Error control value = "$(ErrorControlValue)
  643. Shell $(UtilityInf), AddSoftwareComponent, +
  644. $(Manufacturer), +
  645. $(ProductSoftwareName), +
  646. $(ProductSoftwareName), +
  647. $(ProductSoftwareTitle), +
  648. $(STF_CONTEXTINFNAME), +
  649. $(ProductSoftwareImagePath), +
  650. $(TypeofService), +
  651. $(ServiceOrderGroup), +
  652. $(Dependencies), +
  653. $(ObjectName), +
  654. $(IoLogMsgDLL)";"$(ProductSoftwareImagePath), +
  655. $(TypeSupported), +
  656. $(EventLogLocation), +
  657. $(ErrorControlValue)
  658. ;
  659. ; Return values from AddSoftwareComponent
  660. ;
  661. ; $($R0) = error code or zero if no error
  662. ; $($R1) = Registry key variable for
  663. ; SOFTWARE\Manufacturer\Product\Version key
  664. ; $($R2) = Registry key variable for
  665. ; SOFTWARE\...\NetRules
  666. ; $($R3) = Registry key handle for Services key
  667. ; $($R4) = "Parameters" key handle for Services area
  668. ; $($R5) = "Linkage" key handle for Services area
  669. ;
  670. Set OEM_ABANDON_SOFTWARE = TRUE
  671. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  672. Debug-Output "ShellCode error: Add software component FAILED!"
  673. goto ShellCodeError
  674. endif
  675. set RegistryErrorIndex = $($R0)
  676. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  677. EndWait
  678. Debug-Output "Registry error: add software components"
  679. CloseRegKey $($R1)
  680. CloseRegKey $($R2)
  681. CloseRegKey $($R3)
  682. CloseRegKey $($R4)
  683. CloseRegKey $($R5)
  684. goto fatalregistry
  685. endif
  686. Set SoftProductKey = $($R1)
  687. Set SoftNetRuleKey = $($R2)
  688. Set SoftServiceKey = $($R3)
  689. Set SoftParameterKey = $($R4)
  690. Set SoftLinkageKey = $($R5)
  691. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  692. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  693. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  694. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  695. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  696. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  697. {hidden,$(NoTitle),$(!REG_VT_DWORD),$(NetRuleSoftwareHiddenDriver)}, +
  698. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  699. ;
  700. ; Add the proper values to the
  701. ; SOFTWARE\DigiBoard\DigiFEP5\CurrentVersion key.
  702. ;
  703. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  704. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  705. Debug-Output "ShellCode error: AddValueList FAILED! --"$(SoftProductKey)
  706. goto ShellCodeError
  707. endif
  708. set RegistryErrorIndex = $($R0)
  709. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  710. EndWait
  711. Debug-Output "Registry error: add value list."
  712. CloseRegKey $(SoftProductKey)
  713. CloseRegKey $(SoftNetRuleKey)
  714. CloseRegKey $(SoftServiceKey)
  715. CloseRegKey $(SoftParameterKey)
  716. CloseRegKey $(SoftLinkageKey)
  717. goto fatalregistry
  718. endif
  719. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  720. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  721. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  722. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  723. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  724. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  725. ;
  726. ; Add the proper values to the
  727. ; SOFTWARE\DigiBoard\DigiFEP5\CurrentVersion\NetRules key.
  728. ;
  729. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  730. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  731. Debug-Output "ShellCode error: AddValueList FAILED! --"$(SoftNetRuleKey)
  732. goto ShellCodeError
  733. endif
  734. set RegistryErrorIndex = $($R0)
  735. FlushRegKey $(SoftProductKey)
  736. FlushRegKey $(SoftNetRuleKey)
  737. FlushRegKey $(SoftServiceKey)
  738. FlushRegKey $(SoftParameterKey)
  739. FlushRegKey $(SoftLinkageKey)
  740. CloseRegKey $(SoftProductKey)
  741. CloseRegKey $(SoftNetRuleKey)
  742. CloseRegKey $(SoftServiceKey)
  743. CloseRegKey $(SoftParameterKey)
  744. CloseRegKey $(SoftLinkageKey)
  745. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  746. EndWait
  747. Debug-Output "Registry error: add value list."
  748. goto fatalregistry
  749. endif
  750. goto addHdwDriverComponent
  751. addHdwDriverComponent = +
  752. Debug-Output "******************Entering addHdwDriverComponent******************"
  753. set DigiSpecificString = $(AdapterHardwareName)
  754. Ifint $(HdwDriverComponentExists) == $(TRUE)
  755. goto addAdapterComponent
  756. Endif
  757. Debug-Output "OEMNADDS.INF: Adding HdwDriverComponent"
  758. ;
  759. ; Install the Hardware dependent driver
  760. ;
  761. set TypeofService = "kernelautostart"
  762. set ServiceOrderGroup = "Extended base"
  763. set Dependencies = {}
  764. set ObjectName = ""
  765. set TypeSupported = "7"
  766. set EventLogLocation = "System"
  767. set ErrorControlValue = 1
  768. ; Debug-Output "OEMNADDS.INF: [InstallOption]:skipoptions: About to call AddSoftwareComponent"
  769. ; Debug-Output "OEMNADID.INF: Paramters passed in:"
  770. ; Debug-Output "OEMNADDS.INF: Manufacturer = "$(Manufacturer)
  771. ; Debug-Output "OEMNADDS.INF: Product = "$(ProductSoftwareNameHdwDriver)
  772. ; Debug-Output "OEMNADDS.INF: Service = "$(ProductSoftwareNameHdwDriver)
  773. ; Debug-Output "OEMNADDS.INF: Display name = "$(ProductSoftwareTitleHdwDriver)
  774. ; Debug-Output "OEMNADDS.INF: INFfile = "$(STF_CONTEXTINFNAME)
  775. ; Debug-Output "OEMNADDS.INF: ImagePath = "$(ProductSoftwareImagePathHdwDriver)
  776. ; Debug-Output "OEMNADDS.INF: Type of software = "$(TypeofService)
  777. ; Debug-Output "OEMNADDS.INF: Service Order group = "$(ServiceOrderGroup)
  778. ; Debug-Output "OEMNADDS.INF: Dependencies = "$(Dependencies)
  779. ; Debug-Output "OEMNADDS.INF: ObjectName = "$(ObjectName)
  780. ; Debug-Output "OEMNADDS.INF: EventMessageFile = "$(IoLogMsgDLL)";"$(ProductSoftwareImagePath)
  781. ; Debug-Output "OEMNADDS.INF: TypeSupported = "$(TypeSupported)
  782. ; Debug-Output "OEMNADDS.INF: Event log location = "$(EventLogLocation)
  783. ; Debug-Output "OEMNADDS.INF: Error control value = "$(ErrorControlValue)
  784. Shell $(UtilityInf), AddSoftwareComponent, +
  785. $(Manufacturer), +
  786. $(ProductSoftwareNameHdwDriver), +
  787. $(ProductSoftwareNameHdwDriver), +
  788. $(ProductSoftwareTitleHdwDriver), +
  789. $(STF_CONTEXTINFNAME), +
  790. $(ProductSoftwareImagePathHdwDriver), +
  791. $(TypeofService), +
  792. $(ServiceOrderGroup), +
  793. $(Dependencies), +
  794. $(ObjectName), +
  795. $(IoLogMsgDLL)";"$(ProductSoftwareImagePathHdwDriver), +
  796. $(TypeSupported), +
  797. $(EventLogLocation), +
  798. $(ErrorControlValue)
  799. ;
  800. ; Return values from AddSoftwareComponent
  801. ;
  802. ; $($R0) = error code or zero if no error
  803. ; $($R1) = Registry key variable for
  804. ; SOFTWARE\Manufacturer\Product\Version key
  805. ; $($R2) = Registry key variable for
  806. ; SOFTWARE\...\NetRules
  807. ; $($R3) = Registry key handle for Services key
  808. ; $($R4) = "Parameters" key handle for Services area
  809. ; $($R5) = "Linkage" key handle for Services area
  810. ;
  811. Set OEM_ABANDON_SOFTWARE = TRUE
  812. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  813. Debug-Output "ShellCode error: AddSoftwareComponent FAILED! -- "$(ProductSoftwareNameHdwDriver)
  814. goto ShellCodeError
  815. endif
  816. set RegistryErrorIndex = $($R0)
  817. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  818. EndWait
  819. Debug-Output "Registry error: add software components"
  820. CloseRegKey $($R1)
  821. CloseRegKey $($R2)
  822. CloseRegKey $($R3)
  823. CloseRegKey $($R4)
  824. CloseRegKey $($R5)
  825. goto fatalregistry
  826. endif
  827. Set SoftProductKey = $($R1)
  828. Set SoftNetRuleKey = $($R2)
  829. Set SoftServiceKey = $($R3)
  830. Set SoftParameterKey = $($R4)
  831. Set SoftLinkageKey = $($R5)
  832. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  833. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersionHdwDriver)},+
  834. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersionHdwDriver)},+
  835. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitleHdwDriver)},+
  836. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescriptionHdwDriver)},+
  837. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareNameHdwDriver)},+
  838. {hidden,$(NoTitle),$(!REG_VT_DWORD),$(NetRuleSoftwareHiddenHdwDriver)}, +
  839. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  840. ;
  841. ; Add the proper values to the
  842. ; SOFTWARE\DigiBoard\<HdwDriver>\CurrentVersion key.
  843. ;
  844. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  845. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  846. Debug-Output "ShellCode error: AddValueList FAILED! -- "$(SoftProductKey)
  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 $(SoftProductKey)
  854. CloseRegKey $(SoftNetRuleKey)
  855. CloseRegKey $(SoftServiceKey)
  856. CloseRegKey $(SoftParameterKey)
  857. CloseRegKey $(SoftLinkageKey)
  858. goto fatalregistry
  859. endif
  860. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareTypeHdwDriver)},+
  861. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUseHdwDriver)}, +
  862. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindFormHdwDriver)}, +
  863. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClassHdwDriver)}, +
  864. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindableHdwDriver)}, +
  865. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  866. ;
  867. ; Add the proper values to the
  868. ; SOFTWARE\DigiBoard\<HdwDriver>\CurrentVersion\NetRules key.
  869. ;
  870. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  871. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  872. Debug-Output "ShellCode error. AddValueList FAILED! -- "$(SoftNetRuleKey)
  873. goto ShellCodeError
  874. endif
  875. set RegistryErrorIndex = $($R0)
  876. FlushRegKey $(SoftProductKey)
  877. FlushRegKey $(SoftNetRuleKey)
  878. FlushRegKey $(SoftServiceKey)
  879. FlushRegKey $(SoftParameterKey)
  880. FlushRegKey $(SoftLinkageKey)
  881. CloseRegKey $(SoftProductKey)
  882. CloseRegKey $(SoftNetRuleKey)
  883. CloseRegKey $(SoftServiceKey)
  884. CloseRegKey $(SoftParameterKey)
  885. CloseRegKey $(SoftLinkageKey)
  886. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  887. EndWait
  888. Debug-Output "Registry error: add value list."
  889. goto fatalregistry
  890. endif
  891. addAdapterComponent = +
  892. Debug-Output "******************Entering addAdapterComponent******************"
  893. ;
  894. ; Install Adapter specific information
  895. ;
  896. Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName), +
  897. $(STF_CONTEXTINFNAME), $(ProductKeyNameHdwDriver)
  898. ifint $($R4) != -1
  899. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  900. endif
  901. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  902. Debug-Output "Cannot add hardware component!"
  903. goto ShellCodeError
  904. endif
  905. set RegistryErrorIndex = $($R0)
  906. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  907. EndWait
  908. Debug-Output "Registry error: add hardware component"
  909. Debug-Output $(RegistryErrorIndex)
  910. CloseRegKey $($R1)
  911. CloseRegKey $($R2)
  912. CloseRegKey $($R3)
  913. goto fatalregistry
  914. endif
  915. set KeyParameters = $($R3)
  916. set KeyAdapterRules = $($R2)
  917. set AdapterNumber = $($R4)
  918. set AdapterServiceName = $($R5)
  919. set AdapterName = $(AdapterServiceName)
  920. set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  921. {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  922. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  923. {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  924. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  925. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  926. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  927. Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  928. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  929. Debug-Output "ShellCode error: AddValueList FAILED -- "$($R1)
  930. goto ShellCodeError
  931. endif
  932. ; Increment the reference count in the DigiFEP5 software component
  933. shell $(UtilityInf) IncrementRefCount $(ProductKeyName)
  934. set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  935. set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  936. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  937. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  938. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  939. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  940. Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  941. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  942. Debug-Output "ShellCode error."
  943. goto ShellCodeError
  944. endif
  945. set RegistryErrorIndex = $($R0)
  946. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  947. EndWait
  948. Debug-Output "Resgitry error: add value list."
  949. CloseRegKey $(KeyParameters)
  950. CloseRegKey $(KeyAdapterRules)
  951. goto fatalregistry
  952. endif
  953. FlushRegKey $(KeyParameters)
  954. FlushRegKey $(KeyAdapterRules)
  955. CloseRegKey $(KeyParameters)
  956. CloseRegKey $(KeyAdapterRules)
  957. goto writeparameters
  958. ;
  959. ; Put up the adapter configuration dialog if necessary.
  960. ;
  961. configureadapter = +
  962. Debug-Output "******************Entering configureadapter******************"
  963. ; Shell "" DebugConfiguration "before displaying dialog"
  964. QueryListSize IRQRangeListSize $(IRQRangeList)
  965. QueryListSize MemoryRangeListSize $(MemoryRangeList)
  966. QueryListSize IORangeListSize $(IORangeList)
  967. QueryListSize PortNameListSize $(PortNameList)
  968. ;
  969. ; Call our custom DLL for more configuration
  970. ;
  971. Debug-Output "AdapterName = "$(AdapterName)
  972. Debug-Output "ProductHardwareDescription = "$(ProductHardwareDescription)
  973. Debug-Output "ConfigurationTitle = "$(ConfigurationTitle)
  974. LibraryProcedure Result, $(DGCONFIG_HANDLE), +
  975. DGConfigEntryPoint, $(!STF_HWND), +
  976. $(AdapterHardwareType), +
  977. $(ConfigurationTitle), +
  978. $(IRQRangeList), +
  979. $(IRQRangeListSize), +
  980. $(IRQDefault), +
  981. $(MemoryRangeList), +
  982. $(MemoryRangeListSize), +
  983. $(MemoryDefault), +
  984. $(IORangeList), +
  985. $(IORangeListSize), +
  986. $(IODefault), +
  987. $(CtrlList), +
  988. $(AdapterName), +
  989. $(ProductHardwareDescription)
  990. ; LibraryProcedure Result2, $(DGCONFIG_HANDLE), DumpList, $(Result)
  991. set AdapterParameters = $(Result)
  992. ;-------------------------------------------------------------------------------------
  993. ;
  994. ; set LineList = *($(AdapterParameters),4)
  995. ;
  996. ; Debug-Output "*************************** Running through passed back configuration ****************************"
  997. ;
  998. ; ForListDo $(LineList)
  999. ; set LineObject = $($)
  1000. ; Debug-Output "LineObject = "
  1001. ; LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(LineObject)
  1002. ;
  1003. ; set LineName = *($(LineObject),1)
  1004. ; Debug-Output "LineName = "$(LineName)
  1005. ;
  1006. ; set LineSpeed = *($(LineObject),2)
  1007. ; Debug-Output "LineSpeed = "$(LineSpeed)
  1008. ;
  1009. ; set ConcList = *($(LineObject),3)
  1010. ; Debug-Output "ConcList = "
  1011. ; LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(ConcList)
  1012. ;
  1013. ; ForListDo $(ConcList)
  1014. ; set ConcObject = $($)
  1015. ; set ConcName = *($(ConcObject),1)
  1016. ; set ConcDisplayName = *($(ConcObject),2)
  1017. ; set ConcSpeed = *($(ConcObject),3)
  1018. ; set ChildConcList = *($(ConcObject),4)
  1019. ; set PortList = *($(ConcObject),5)
  1020. ; Debug-Output " ConcName = "$(ConcName)
  1021. ; Debug-Output " ConcDisplayName = "$(ConcDisplayName)
  1022. ; Debug-Output " ConcSpeed = "$(ConcSpeed)
  1023. ; Debug-Output "ChildConcList = "
  1024. ; LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(ChildConcList)
  1025. ; Debug-Output "PortList = "
  1026. ; LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(PortList)
  1027. ;
  1028. ; ForListDo $(ChildConcList)
  1029. ; set ChildConcObject = $($)
  1030. ; set ChildConcName = *($(ChildConcObject),1)
  1031. ; set ChildConcDisplayName = *($(ChildConcObject),2)
  1032. ; set ChildConcSpeed = *($(ChildConcObject),3)
  1033. ; set JunkConcList = *($(ChildConcObject),4)
  1034. ; set ChildPortList = *($(ChildConcObject),5)
  1035. ;
  1036. ; Debug-Output " ChildConcObject = "
  1037. ; LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(ChildConcObject)
  1038. ;
  1039. ;
  1040. ; Debug-Output " ChildConcName = "$(ChildConcName)
  1041. ; Debug-Output " ChildConcDisplayName = "$(ChildConcDisplayName)
  1042. ; Debug-Output " ChildConcSpeed = "$(ChildConcSpeed)
  1043. ; Debug-Output " JunkConcList = "
  1044. ; LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(JunkConcList)
  1045. ; Debug-Output "ChildPortList = "
  1046. ; LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(ChildPortList)
  1047. ;
  1048. ; ForListDo $(ChildPortList)
  1049. ; set PortObject = $($)
  1050. ; set PortName = *($(PortObject),1)
  1051. ; set PortDosDevices = *($(PortObject),2)
  1052. ;
  1053. ; Debug-Output " "$(PortName)" -> "$(PortDosDevices)
  1054. ; EndForListDo
  1055. ;
  1056. ; EndForListDo
  1057. ;
  1058. ; ForListDo $(PortList)
  1059. ; set PortObject = $($)
  1060. ; set PortName = *($(PortObject),1)
  1061. ; set PortDosDevices = *($(PortObject),2)
  1062. ;
  1063. ; Debug-Output " "$(PortName)" -> "$(PortDosDevices)
  1064. ; EndForListDo
  1065. ; EndForListDo
  1066. ; EndForListDo
  1067. ;
  1068. ;
  1069. ;
  1070. ;
  1071. ; set CommonStatus = STATUS_USERCANCEL
  1072. ; goto successful
  1073. ;
  1074. ;-------------------------------------------------------------------------------------
  1075. Ifstr $(Result) == "{}"
  1076. ; The user cancelled the configuration request.
  1077. set CommonStatus = STATUS_USERCANCEL
  1078. goto successful
  1079. Endif
  1080. read-syms UpdatingConfiguration$(!STF_LANGUAGE)
  1081. shell $(subroutninf) PushBillBoard NETSTATUSDLG $(UpdatingConfiguration)
  1082. ; Go back to where we came from
  1083. Debug-Output "jumping to "$(from)
  1084. goto $(from)
  1085. getAdapterSettings = +
  1086. Debug-Output "******************Entering getAdapterSettings******************"
  1087. ;
  1088. ; Read the registry to determine what the current adapter settings
  1089. ; are.
  1090. ;
  1091. Debug-Output "from value = "$(from)
  1092. set CtrlList = {}
  1093. LoadLibrary "x" $(!STF_CWDDIR)dgconfig.dll DGCONFIG_HANDLE
  1094. read-syms AdapterSettings-$(AdapterHardwareName)
  1095. ; Look for the service name
  1096. Ifstr $(!NTN_RegBase) != $(KeyNull)
  1097. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) SoftwareKey
  1098. Ifstr $(SoftwareKey) == $(KeyNull)
  1099. Debug-Output "Unable to open "$(!NTN_RegBase)" key!!!!"
  1100. goto getAdapterSettingsExit
  1101. Else
  1102. GetRegValue $(SoftwareKey), "ServiceName", ServiceNameList
  1103. set AdapterServiceName = *($(ServiceNameList),4)
  1104. set AdapterName = $(AdapterServiceName)
  1105. CloseRegKey $(SoftwareKey)
  1106. Endif
  1107. Endif
  1108. Debug-Output "AdapterServiceName = "$(AdapterServiceName)
  1109. Debug-Output "AdapterName = "$(AdapterName)
  1110. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(AdapterServiceName) $(MAXIMUM_ALLOWED) BaseKey
  1111. Ifstr $(BaseKey) == $(KeyNull)
  1112. Debug-Output "Error opening BaseKey "$(!NTN_ServiceBase)"\"$(AdapterServiceName)
  1113. CloseRegKey $(BaseKey)
  1114. goto fatalregistry
  1115. Endif
  1116. ; Set the BusTypeNum default to ISA
  1117. set BusTypeNum = 1
  1118. set ParametersKey = $(KeyNull)
  1119. OpenRegKey $(BaseKey) "" "Parameters" $(MAXIMUM_ALLOWED) ParametersKey
  1120. Ifstr $(ParametersKey) == $(KeyNull)
  1121. Debug-Output "Assuming Parameters key does not exist!!!"
  1122. ifstr(i) $(BusType) == "MCA"
  1123. ;
  1124. ; Look for a MCA controller.
  1125. ;
  1126. ForListDo $(AdapterHardwareAdapterID)
  1127. Debug-Output "Calling MCAFindBus, "*($(AdapterIDByte1),$(#))", "*($(AdapterIDByte2),$(#))
  1128. Shell $(UtilityInf), MCAFindBus, *($(AdapterIDByte1),$(#)), *($(AdapterIDByte2),$(#))
  1129. Debug-Output "MCAFindBus returned "$($R1)
  1130. set CardInfo = {}
  1131. ifstr(i) $($R1) != {}
  1132. set CardInfo = $($R1)
  1133. Debug-Output "MCA controller found!"
  1134. Debug-Output "CardInfo = "$(CardInfo)
  1135. ;--------------------------------------------------------------------------
  1136. ForListDo $(CardInfo)
  1137. Debug-Output "Current CardInfo Entry = "$($)
  1138. set TmpBusNumber = *($($), 1)
  1139. set SlotNumber = *($($), 2)
  1140. set MCAPosId = *($($), 3)
  1141. Debug-Output "Calling DoesControllerExist:"
  1142. Debug-Output " AdapterHardwareName = "$(AdapterHardwareName)
  1143. Debug-Output " BusNumber = "$(TmpBusNumber)
  1144. Debug-Output " Slot # = "$(SlotNumber)
  1145. Debug-Output " MCAPosId = "$(MCAPosId)
  1146. Debug-Output " DGCONFIG_HANDLE = "$(DGCONFIG_HANDLE)
  1147. LibraryProcedure Result, $(DGCONFIG_HANDLE), +
  1148. DoesControllerExist, $(AdapterHardwareName), +
  1149. $(TmpBusNumber), +
  1150. $(SlotNumber)
  1151. Debug-Output "DoesControllerExist return: "$(Result)
  1152. ifstr(i) $(Result) == "FALSE"
  1153. Debug-Output "Before resetting IORangeList for MCA: "$(IORangeList)
  1154. set IORangeList = {Slot$(SlotNumber)}
  1155. set IODefault = 0
  1156. Debug-Output "After resetting IORangeList for MCA: "$(IORangeList)
  1157. Debug-Output "Before resetting MemoryRangeList for MCA: "$(MemoryRangeList)
  1158. set MemoryDefault = 0
  1159. set MemoryRangeList = {Slot$(SlotNumber)}
  1160. Debug-Output "After resetting MemoryRangeList for MCA: "$(MemoryRangeList)
  1161. ; Reset the BusTypeNum to MCA
  1162. set BusTypeNum = 3
  1163. goto getAdapterSettingsExit
  1164. endif
  1165. EndForListDo
  1166. ;--------------------------------------------------------------------------
  1167. endif
  1168. EndForListDo
  1169. ;DH if no new MCA cards found, report error (instead of falling through to ISA install)
  1170. Debug-Output "No new MCA cards found!"
  1171. else
  1172. ;
  1173. ; Look for an EISA controller.
  1174. ;
  1175. ForListDo $(AdapterHardwareAdapterID)
  1176. ifint $($) != 0
  1177. Debug-Output "Calling EISAFindBus, "$($)
  1178. Shell $(UtilityInf), EISAFindBus, $($)
  1179. set CardInfo = {}
  1180. ifstr(i) $($R1) != {}
  1181. set CardInfo = $($R1)
  1182. Debug-Output "EISA controller found!"
  1183. Debug-Output "CardInfo = "$(CardInfo)
  1184. ForListDo $(CardInfo)
  1185. Debug-Output "Current CardInfo Entry = "$($)
  1186. set TmpBusNumber = *($($), 1)
  1187. ;
  1188. ; Convert slot number to IOBaseAddress
  1189. ;
  1190. set SlotNumber = *($($), 2)
  1191. set-mul NewIOBaseAddress = $(SlotNumber), 4096
  1192. set-add NewIOBaseAddress = $(NewIOBaseAddress), 5
  1193. set-dectohex NewIOBaseAddress = $(NewIOBaseAddress)
  1194. Debug-Output "Calling DoesControllerExist:"
  1195. Debug-Output " AdapterHardwareName = "$(AdapterHardwareName)
  1196. Debug-Output " BusNumber = "$(TmpBusNumber)
  1197. Debug-Output " NewIOBaseAddress = "$(NewIOBaseAddress)
  1198. Debug-Output " DGCONFIG_HANDLE = "$(DGCONFIG_HANDLE)
  1199. LibraryProcedure Result, $(DGCONFIG_HANDLE), +
  1200. DoesControllerExist, $(AdapterHardwareName), +
  1201. $(TmpBusNumber), +
  1202. $(NewIOBaseAddress)
  1203. Debug-Output "DoesControllerExist return: "$(Result)
  1204. ifstr(i) $(Result) == "FALSE"
  1205. Debug-Output "Before resetting IORangeList for EISA: "$(IORangeList)
  1206. set IORangeList = {$(NewIOBaseAddress)}
  1207. set IODefault = 0
  1208. Debug-Output "After resetting IORangeList for EISA: "$(IORangeList)
  1209. ; Reset the BusTypeNum default to EISA
  1210. set BusTypeNum = 2
  1211. goto getAdapterSettingsExit
  1212. endif
  1213. EndForListDo
  1214. endif
  1215. endif
  1216. EndForListDo
  1217. endif
  1218. CloseRegKey $(BaseKey)
  1219. goto configureadapter
  1220. Endif
  1221. Debug-Output "Reading Parameters Key for current configuration"
  1222. GetRegValue $(ParametersKey) "BusType" BusTypeNum
  1223. set BusTypeNum = *($(BusTypeNum),4)
  1224. GetRegValue $(ParametersKey) "MemoryMappedBaseAddress" MemoryMappedValueList
  1225. GetRegValue $(ParametersKey) "InterruptNumber" IRQValueList
  1226. GetRegValue $(ParametersKey) "IOBaseAddress" IOBaseValueList
  1227. ifstr(i) $(BusType) != "MCA"
  1228. set-dectohex TmpHex = *($(MemoryMappedValueList),4)
  1229. Debug-Output "Current MemoryMappedBaseAddress = "$(TmpHex)
  1230. ForListDo $(MemoryRangeList)
  1231. Ifstr(i) $(TmpHex) == "0x"$($)
  1232. set-sub MemoryDefault = $(#),1
  1233. Endif
  1234. EndForListDo
  1235. else
  1236. GetRegValue $(ParametersKey) "MCAPosId" MCAPosId
  1237. GetRegValue $(ParametersKey) "SlotNumber" SlotNumber
  1238. set MCAPosId = *($(MCAPosId),4)
  1239. set SlotNumber = *($(SlotNumber),4)
  1240. Debug-Output "MCAPosId read from registry = "$(MCAPosId)
  1241. Debug-Output "SlotNumber read from registry = "$(SlotNumber)
  1242. set MemoryDefault = 0
  1243. set MemoryRangeList = {Slot$(SlotNumber)}
  1244. endif
  1245. ;
  1246. ; For now, we don't support IRQ's, so don't do anything special for them.
  1247. ;
  1248. ; ifstr(i) $(BusType) != "MCA"
  1249. set-dectohex TmpHex = *($(IRQValueList),4)
  1250. Debug-Output "Current InterruptNumber = "$(TmpHex)
  1251. ForListDo $(IRQRangeList)
  1252. Ifstr(i) $(TmpHex) == "0x"$($)
  1253. set-sub IRQDefault = $(#),1
  1254. Endif
  1255. EndForListDo
  1256. ; else
  1257. ; set IRQRangeList = {$(SlotNumber)}
  1258. ; set IRQDefault = 0
  1259. ; endif
  1260. ifstr(i) $(BusType) != "MCA"
  1261. set IOFound = $(FALSE)
  1262. set-dectohex TmpHex = *($(IOBaseValueList),4)
  1263. Debug-Output "Current IOBaseAddress = "$(TmpHex)
  1264. ForListDo $(IORangeList)
  1265. Ifstr(i) $(TmpHex) == "0x"$($)
  1266. set-sub IODefault = $(#),1
  1267. set IOFound = $(TRUE)
  1268. Endif
  1269. EndForListDo
  1270. ifint $(IOFound) == $(FALSE)
  1271. ;
  1272. ; The controller is probably an EISA
  1273. ;
  1274. set IORangeList = {$(TmpHex)}
  1275. set IODefault = 0
  1276. ;DH next statement is probably redundant now
  1277. set BusTypeNum = 2
  1278. endif
  1279. else
  1280. set IORangeList = {Slot$(SlotNumber)}
  1281. set IODefault = 0
  1282. endif
  1283. set LineList = {}
  1284. ForListDo {"1","2"}
  1285. set CurrentLine = "Line"$($)
  1286. Ifint $(TraceConfig) == 1
  1287. Debug-Output "CurrentLine = "$(CurrentLine)
  1288. Endif
  1289. OpenRegKey $(ParametersKey) "" $(CurrentLine) $(MAXIMUM_ALLOWED) LineKey
  1290. Ifstr $(LineKey) != $(KeyNull)
  1291. GetRegValue $(LineKey) "LineSpeed" TmpLineSpeed
  1292. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1293. Debug-Output "No LineSpeed entry exists, defaulting to 14!"
  1294. set LineSpeed = 14
  1295. Else
  1296. set LineSpeed = *($(TmpLineSpeed),4)
  1297. Endif
  1298. set ConcList = {}
  1299. ForListDo {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"}
  1300. set CurrentConc = "Concentrator"$($)
  1301. Ifint $(TraceConfig) == 1
  1302. Debug-Output "CurrentConc = "$(CurrentConc)
  1303. Endif
  1304. OpenRegKey $(LineKey) "" $(CurrentConc) $(MAXIMUM_ALLOWED) ConcKey
  1305. Ifstr $(ConcKey) != $(KeyNull)
  1306. ; Look for Port Keys and Conc values
  1307. set PortNameList = {}
  1308. set CurrentPort = ""
  1309. set PortName = {}
  1310. GetRegValue $(ConcKey) "ConcDisplayName" ConcDisplayName
  1311. Ifint $(TraceConfig) == 1
  1312. Debug-Output "ConcDisplayName = "*($(ConcDisplayName),4)
  1313. Endif
  1314. GetRegValue $(ConcKey) "LineSpeed" TmpConcSpeed
  1315. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1316. Debug-Output "No LineSpeed entry exists for conc, defaulting to 14!"
  1317. set ConcSpeed = 14
  1318. Else
  1319. set ConcSpeed = *($(TmpConcSpeed),4)
  1320. Endif
  1321. set ChildConcList = {}
  1322. ForListDo {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"}
  1323. set CurrentChildConc = "Concentrator"$($)
  1324. Ifint $(TraceConfig) == 1
  1325. Debug-Output "CurrentChildConc = "$(CurrentChildConc)
  1326. Endif
  1327. OpenRegKey $(ConcKey) "" $(CurrentChildConc) $(MAXIMUM_ALLOWED) ChildConcKey
  1328. Ifstr $(ChildConcKey) != $(KeyNull)
  1329. GetRegValue $(ChildConcKey) "ConcDisplayName" ChildConcDisplayName
  1330. Ifint $(TraceConfig) == 1
  1331. Debug-Output "ChildConcDisplayName = "*($(ChildConcDisplayName),4)
  1332. Endif
  1333. GetRegValue $(ChildConcKey) "LineSpeed" TmpChildConcSpeed
  1334. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1335. Debug-Output "No LineSpeed entry exists for Childconc, defaulting to 14!"
  1336. set ChildConcSpeed = 14
  1337. Else
  1338. set ChildConcSpeed = *($(TmpChildConcSpeed),4)
  1339. Endif
  1340. ForListDo {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"}
  1341. set CurrentPort = "Port"$($)
  1342. Ifint $(TraceConfig) == 1
  1343. Debug-Output "CurrentPort = "$(CurrentPort)
  1344. Endif
  1345. OpenRegKey $(ChildConcKey) "" $(CurrentPort) $(MAXIMUM_ALLOWED) PortKey
  1346. Ifstr $(PortKey) != $(KeyNull)
  1347. ; Look for Port values
  1348. GetRegValue $(PortKey) "DosDevices" PortName
  1349. Ifstr $(PortNameList) == $(KeyNull)
  1350. set PortNameList = *($(PortName),4)
  1351. Else
  1352. set PortNameList = >($(PortNameList), >($(CurrentPort),*($(PortName),4)))
  1353. Endif
  1354. Ifint $(TraceConfig) == 1
  1355. Debug-Output $(CurrentPort)"->"*($(PortName),4)
  1356. Endif
  1357. CloseRegKey $(PortKey)
  1358. EndIf
  1359. EndForListDo
  1360. Ifint $(TraceConfig) == 1
  1361. Debug-Output "PortNameList = "
  1362. LibraryProcedure Result2, $(DGCONFIG_HANDLE), DumpList, $(PortNameList)
  1363. Endif
  1364. set CurrentChildConc = >($(CurrentChildConc), *($(ChildConcDisplayName),4))
  1365. set CurrentChildConc = >($(CurrentChildConc), $(ChildConcSpeed))
  1366. set CurrentChildConc = >($(CurrentChildConc), {})
  1367. set CurrentChildConc = >($(CurrentChildConc), $(PortNameList))
  1368. Ifint $(TraceConfig) == 1
  1369. Debug-Output "CurrentChildConc = "
  1370. LibraryProcedure Result2, $(DGCONFIG_HANDLE), DumpList, $(CurrentChildConc)
  1371. Endif
  1372. set ChildConcList = >($(ChildConcList),$(CurrentChildConc))
  1373. Ifint $(TraceConfig) == 1
  1374. Debug-Output "ChildConcList = "
  1375. LibraryProcedure Result2, $(DGCONFIG_HANDLE), DumpList, $(ChildConcList)
  1376. Endif
  1377. EndIf
  1378. EndForListDo
  1379. set PortNameList = {}
  1380. ForListDo {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"}
  1381. set CurrentPort = "Port"$($)
  1382. Ifint $(TraceConfig) == 1
  1383. Debug-Output "CurrentPort = "$(CurrentPort)
  1384. Endif
  1385. OpenRegKey $(ConcKey) "" $(CurrentPort) $(MAXIMUM_ALLOWED) PortKey
  1386. Ifstr $(PortKey) != $(KeyNull)
  1387. ; Look for Port values
  1388. GetRegValue $(PortKey) "DosDevices" PortName
  1389. Ifstr $(PortNameList) == $(KeyNull)
  1390. set PortNameList = *($(PortName),4)
  1391. Else
  1392. set PortNameList = >($(PortNameList), >($(CurrentPort),*($(PortName),4)))
  1393. Endif
  1394. Ifint $(TraceConfig) == 1
  1395. Debug-Output $(CurrentPort)"->"*($(PortName),4)
  1396. Endif
  1397. CloseRegKey $(PortKey)
  1398. EndIf
  1399. EndForListDo
  1400. CloseRegKey $(ConcKey)
  1401. Ifint $(TraceConfig) == 1
  1402. Debug-Output "PortNameList = "
  1403. LibraryProcedure Result2, $(DGCONFIG_HANDLE), DumpList, $(PortNameList)
  1404. Endif
  1405. set CurrentConc = >($(CurrentConc), *($(ConcDisplayName),4))
  1406. set CurrentConc = >($(CurrentConc), $(ConcSpeed))
  1407. set CurrentConc = >($(CurrentConc), $(ChildConcList))
  1408. set CurrentConc = >($(CurrentConc), $(PortNameList))
  1409. Ifint $(TraceConfig) == 1
  1410. Debug-Output "CurrentConc = "
  1411. LibraryProcedure Result2, $(DGCONFIG_HANDLE), DumpList, $(CurrentConc)
  1412. Endif
  1413. set ConcList = >($(ConcList),$(CurrentConc))
  1414. EndIf
  1415. EndForListDo
  1416. CloseRegKey $(LineKey)
  1417. Ifint $(TraceConfig) == 1
  1418. Debug-Output "LineList = "$(LineList)
  1419. Debug-Output "CurrentLine = "$(CurrentLine)
  1420. Debug-Output "ConcList = "$(ConcList)
  1421. Endif
  1422. set CurrentLine = >($(CurrentLine), $(LineSpeed))
  1423. set TmpLine = >($(CurrentLine),$(ConcList))
  1424. Ifint $(TraceConfig) == 1
  1425. Debug-Output "TmpLine = "$(TmpLine)
  1426. Endif
  1427. set LineList = >($(LineList),$(TmpLine))
  1428. Endif
  1429. Ifint $(TraceConfig) == 1
  1430. Debug-Output "LineList = "
  1431. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(LineList)
  1432. Endif
  1433. set CtrlList = $(LineList)
  1434. EndForListDo
  1435. Ifint $(TraceConfig) == 1
  1436. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(CtrlList)
  1437. Endif
  1438. CloseRegKey $(ParametersKey)
  1439. CloseRegKey $(BaseKey)
  1440. getAdapterSettingsExit = +
  1441. goto configureadapter
  1442. writeparameters = +
  1443. Debug-Output "******************Entering writeparameters******************"
  1444. StartWait
  1445. Debug-Output "Trying to open: "$(!NTN_ServiceBase)"\"$(AdapterServiceName)
  1446. Debug-Output "AdapterParameters = "
  1447. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(AdapterParameters)
  1448. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(AdapterServiceName) $(MAXIMUM_ALLOWED) BaseKey
  1449. Ifstr $(BaseKey) == $(KeyNull)
  1450. Debug-Output "Error opening BaseKey "$(!NTN_ServiceBase)"\"$(AdapterServiceName)
  1451. CloseRegKey $(BaseKey)
  1452. goto fatal
  1453. Endif
  1454. OpenRegKey $(BaseKey) "" "Parameters" $(MAXIMUM_ALLOWED) ParametersKey
  1455. Ifstr $(ParametersKey) == $(KeyNull)
  1456. Debug-Output "Assuming Parameters key does not exist!!!"
  1457. CloseRegKey $(BaseKey)
  1458. goto fatal
  1459. Endif
  1460. ; Debug-Output "AdapterParameters parsed: "
  1461. set MemoryAddress = *($(AdapterParameters),1)
  1462. set InterruptNumber = *($(AdapterParameters),2)
  1463. set IOBaseAddress = *($(AdapterParameters),3)
  1464. set HdwDeviceName = "\Device\"$(AdapterHardwareDriver)
  1465. Debug-Output "MemoryAddress = "$(MemoryAddress)
  1466. Debug-Output "InterruptNumber = "$(InterruptNumber)
  1467. Debug-Output "IOBaseAddress = "$(IOBaseAddress)
  1468. Debug-Output "HdwDeviceName = "$(HdwDeviceName)
  1469. Debug-Output "FEPImage = "$(AdapterFepImage)
  1470. Debug-Output "BiosImage = "$(AdapterBiosImage)
  1471. SetRegValue $(ParametersKey) {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemoryAddress)}
  1472. SetRegValue $(ParametersKey) {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddress)}
  1473. SetRegValue $(ParametersKey) {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)}
  1474. SetRegValue $(ParametersKey) {HdwDeviceName,$(NoTitle),$(!REG_VT_SZ),$(HdwDeviceName)}
  1475. SetRegValue $(ParametersKey) {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)}
  1476. SetRegValue $(ParametersKey) {FEPImagePath,$(NoTitle),$(!REG_VT_SZ),$(AdapterFepImage)}
  1477. SetRegValue $(ParametersKey) {BiosImagePath,$(NoTitle),$(!REG_VT_SZ),$(AdapterBiosImage)}
  1478. ifstr(i) $(BusType) == "MCA"
  1479. Debug-Output "MCAPosId = "$(MCAPosId)
  1480. Debug-Output "SlotNumber = "$(SlotNumber)
  1481. SetRegValue $(ParametersKey) {MCAPosId,$(NoTitle),$(!REG_VT_DWORD),$(MCAPosId)}
  1482. SetRegValue $(ParametersKey) {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNumber)}
  1483. endif
  1484. set LineList = *($(AdapterParameters),4)
  1485. Ifint $(TraceConfig) == 1
  1486. Debug-Output "LineList = "
  1487. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(LineList)
  1488. Endif
  1489. ForListDo $(LineList)
  1490. set LineObject = $($)
  1491. Ifint $(TraceConfig) == 1
  1492. Debug-Output "LineObject = "
  1493. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(LineObject)
  1494. Endif
  1495. set LineName = *($(LineObject),1)
  1496. Ifint $(TraceConfig) == 1
  1497. Debug-Output "LineName = "
  1498. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(LineName)
  1499. Endif
  1500. DeleteRegTree $(ParametersKey) $(LineName)
  1501. set LineSpeed = *($(LineObject),2)
  1502. Ifint $(TraceConfig) == 1
  1503. Debug-Output "LineSpeed = "$(LineSpeed)
  1504. Endif
  1505. set ConcList = *($(LineObject),3)
  1506. Ifint $(TraceConfig) == 1
  1507. Debug-Output "ConcList = "
  1508. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(ConcList)
  1509. Endif
  1510. Ifstr $(ConcList) != "{}"
  1511. shell "" ExCreateRegKey $(ParametersKey) $(LineName)
  1512. Ifstr(i) $($R0) != NO_ERROR
  1513. Debug-Output "Error creating registry key!"
  1514. set KeyHandle = $($R1)
  1515. CloseRegKey $(BaseKey)
  1516. goto fatal
  1517. Endif
  1518. set LineKey = $($R1)
  1519. SetRegValue $(LineKey) {LineSpeed,$(NoTitle),$(!REG_VT_DWORD),$(LineSpeed)}
  1520. Endif
  1521. ForListDo $(ConcList)
  1522. set ConcObject = $($)
  1523. set ConcName = *($(ConcObject),1)
  1524. set ConcDisplayName = *($(ConcObject),2)
  1525. set ConcSpeed = *($(ConcObject),3)
  1526. set ChildConcList = *($(ConcObject),4)
  1527. set PortList = *($(ConcObject),5)
  1528. Ifint $(TraceConfig) == 1
  1529. Debug-Output " "$(ConcName)
  1530. Debug-Output " "$(PortList)
  1531. Endif
  1532. shell "" ExCreateRegKey $(LineKey) $(ConcName)
  1533. Ifstr(i) $($R0) != NO_ERROR
  1534. Debug-Output "Error creating registry key!"
  1535. set KeyHandle = $($R1)
  1536. CloseRegKey $(LineKey)
  1537. goto fatal
  1538. Endif
  1539. set ConcKey = $($R1)
  1540. SetRegValue $(ConcKey) {ConcDisplayName,$(NoTitle),$(!REG_VT_SZ),$(ConcDisplayName)}
  1541. SetRegValue $(ConcKey) {LineSpeed,$(NoTitle),$(!REG_VT_DWORD),$(ConcSpeed)}
  1542. ForListDo $(ChildConcList)
  1543. set ChildConcObject = $($)
  1544. set ChildConcName = *($(ChildConcObject),1)
  1545. set ChildConcDisplayName = *($(ChildConcObject),2)
  1546. set ChildConcSpeed = *($(ChildConcObject),3)
  1547. set JunkConcList = *($(ChildConcObject),4)
  1548. set ChildPortList = *($(ChildConcObject),5)
  1549. Ifint $(TraceConfig) == 1
  1550. Debug-Output " ChildConcObject = "
  1551. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(ChildConcObject)
  1552. Debug-Output " ChildConcName = "$(ChildConcName)
  1553. Debug-Output " ChildConcDisplayName = "$(ChildConcDisplayName)
  1554. Debug-Output " ChildConcSpeed = "$(ChildConcSpeed)
  1555. Debug-Output " JunkConcList = "
  1556. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(JunkConcList)
  1557. Debug-Output "ChildPortList = "
  1558. LibraryProcedure Result, $(DGCONFIG_HANDLE), DumpList, $(ChildPortList)
  1559. Endif
  1560. shell "" ExCreateRegKey $(ConcKey) $(ChildConcName)
  1561. Ifstr(i) $($R0) != NO_ERROR
  1562. Debug-Output "Error creating registry key!"
  1563. set KeyHandle = $($R1)
  1564. CloseRegKey $(LineKey)
  1565. goto fatal
  1566. Endif
  1567. set ChildConcKey = $($R1)
  1568. SetRegValue $(ChildConcKey) {ConcDisplayName,$(NoTitle),$(!REG_VT_SZ),$(ChildConcDisplayName)}
  1569. SetRegValue $(ChildConcKey) {LineSpeed,$(NoTitle),$(!REG_VT_DWORD),$(ChildConcSpeed)}
  1570. ForListDo $(ChildPortList)
  1571. set PortObject = $($)
  1572. set PortName = *($(PortObject),1)
  1573. set PortDosDevices = *($(PortObject),2)
  1574. Ifint $(TraceConfig) == 1
  1575. Debug-Output " "$(PortName)" -> "$(PortDosDevices)
  1576. Endif
  1577. shell "" ExCreateRegKey $(ChildConcKey) $(PortName)
  1578. Ifstr(i) $($R0) != NO_ERROR
  1579. Debug-Output "Error creating registry key!"
  1580. set KeyHandle = $($R1)
  1581. CloseRegKey $(LineKey)
  1582. goto fatal
  1583. Endif
  1584. set PortKey = $($R1)
  1585. SetRegValue $(PortKey) {DosDevices,$(NoTitle),$(!REG_VT_SZ),$(PortDosDevices)}
  1586. EndForListDo
  1587. EndForListDo
  1588. ForListDo $(PortList)
  1589. set PortObject = $($)
  1590. set PortName = *($(PortObject),1)
  1591. set PortDosDevices = *($(PortObject),2)
  1592. Ifint $(TraceConfig) == 1
  1593. Debug-Output " "$(PortName)" -> "$(PortDosDevices)
  1594. Endif
  1595. shell "" ExCreateRegKey $(ConcKey) $(PortName)
  1596. Ifstr(i) $($R0) != NO_ERROR
  1597. Debug-Output "Error creating registry key!"
  1598. set KeyHandle = $($R1)
  1599. CloseRegKey $(LineKey)
  1600. goto fatal
  1601. Endif
  1602. set PortKey = $($R1)
  1603. SetRegValue $(PortKey) {DosDevices,$(NoTitle),$(!REG_VT_SZ),$(PortDosDevices)}
  1604. EndForListDo
  1605. EndForListDo
  1606. EndForListDo
  1607. EndWait
  1608. goto successful
  1609. bindingadapter = +
  1610. Debug-Output "******************Entering bindingadapter******************"
  1611. LoadLibrary "x" $(!STF_CWDDIR)dgconfig.dll DGCONFIG_HANDLE
  1612. set Error = "Binding: Sorry, not yet implemented."
  1613. goto fatal
  1614. removeadapter = +
  1615. read-syms DebugOptions
  1616. Debug-Output "******************Entering removeadapter******************"
  1617. Debug-Output "OEMNADDS.INF: removeadapter"
  1618. Debug-Output "OEMNADDS.INF: Removing Hardware Components"
  1619. Debug-Output "OEMNADDS.INF: ProductKeyName = "$(ProductKeyName)
  1620. Debug-Output "OEMNADDS.INF: ProductSoftwareName = "$(ProductSoftwareName)
  1621. Debug-Output "OEMNADDS.INF: ProductSoftwareNameHdwDriver = "$(ProductSoftwareNameHdwDriver)
  1622. Debug-Output "OEMNADDS.INF: NTN_RegBase = "$(!NTN_RegBase)
  1623. ifstr(i) $(fRemoveDigi) == FALSE
  1624. install RemoveFiles
  1625. goto removeadapterExit
  1626. endif
  1627. LoadLibrary "x" $(!STF_CWDDIR)dgconfig.dll DGCONFIG_HANDLE
  1628. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1629. $(ProductSoftwareNameHdwDriver), $(!NTN_RegBase)
  1630. Debug-Output "OEMNADDS.INF: RemoveHardwareComponent return value = "$($R0)
  1631. Ifstr(i) $($R0) != NO_ERROR
  1632. Debug-Output "OEMNADDS.INF: RemoveHardwareComponent != NO_ERROR"
  1633. Endif
  1634. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1635. Debug-Output "ShellCode error"
  1636. goto ShellCodeError
  1637. endif
  1638. set RegistryErrorIndex = $($R0)
  1639. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1640. Debug-Output "fatal registry error"
  1641. goto fatalregistry
  1642. endif
  1643. ; Deinstall the primary DigiFEP5 driver, if reference count
  1644. ; goes to zero.
  1645. shell $(UtilityInf), DecrementRefCount, $(ProductKeyName)
  1646. Debug-Output "OEMNADDS.INF: DecrementRefCount return value = "$($R0)
  1647. Ifstr(i) $($R0) != NO_ERROR
  1648. Debug-Output "OEMNADDS.INF: DecrementRefCount != NO_ERROR"
  1649. Endif
  1650. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1651. $(ProductSoftwareName), TRUE
  1652. Debug-Output "RemoveSoftwareComponent return value = "$($R0)
  1653. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1654. Debug-Output "ShellCode error"
  1655. goto ShellCodeError
  1656. endif
  1657. set RegistryErrorIndex = $($R0)
  1658. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1659. Ifstr(i) $(RegistryErrorIndex) != REF_COUNT_NOT_ZERO
  1660. goto fatalregistry
  1661. endif
  1662. endif
  1663. install RemoveFiles
  1664. removeadapterExit = +
  1665. Debug-Output "OEMNADDS.INF: Exiting removeadapter"
  1666. goto end
  1667. UpgradeSoftware = +
  1668. Debug-Output "******************Entering UpgradeSoftware******************"
  1669. Debug-Output " ProductKeyName = "$(ProductKeyName)
  1670. Debug-Output " NTN_RegBase = "$(!NTN_RegBase)
  1671. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1672. Ifstr $(KeyProduct) != $(KeyNull)
  1673. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1674. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1675. CloseRegKey $(KeyProduct)
  1676. endif
  1677. set NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  1678. OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(MAXIMUM_ALLOWED) IE_KeyNetcards
  1679. ifstr(i) $(IE_KeyNetcards) != ""
  1680. EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  1681. ForListDo $(IE_KeyNameList)
  1682. OpenRegKey $(IE_KeyNetcards) "" *($($),1) +
  1683. $(MAXIMUM_ALLOWED) NetworkCardKey
  1684. Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1685. ;
  1686. ; Okay, we need see if this is a controller we support
  1687. ;
  1688. GetRegValue $(NetworkCardKey),"Manufacturer", ManufacturerInfo
  1689. set ManufacturerName = *($(ManufacturerInfo), 4)
  1690. Debug-Output " Manufacturer = "$(ManufacturerName)
  1691. Ifstr $(ManufacturerName) != $(Manufacturer)
  1692. ; Not ours, so skip to next
  1693. goto nextnetcard
  1694. endif
  1695. ;
  1696. ; We need to determine if this is an option we are interested
  1697. ; in updating.
  1698. ;
  1699. GetRegValue $(NetworkCardKey),"ProductName", ProductNameInfo
  1700. set ProductName = *($(ProductNameInfo), 4)
  1701. Debug-Output " ProductName = "$(ProductName)
  1702. ifcontains(i) $(ProductName) not-in $(AdapterHardwareDriverList)
  1703. goto nextnetcard
  1704. endif
  1705. ;
  1706. ; Now we need to go through our entire list and determine
  1707. ; what adapter we are suppose to update. I have to do this
  1708. ; because I only get an update on a driver bases it appears.
  1709. ;
  1710. GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1711. set ServiceName = *($(ServiceNameInfo), 4)
  1712. Debug-Output " ServiceName = "$(ServiceName)
  1713. OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1714. $(MAXIMUM_ALLOWED) NetRuleKey
  1715. Ifstr $(NetRuleKey) != $(KeyNull)
  1716. GetRegValue $(NetRuleKey),"InfOption", InfOptionInfo
  1717. set InfOption = *($(InfOptionInfo), 4)
  1718. ;
  1719. ; Now, we reset the Option to match and re-init our variables
  1720. ;
  1721. set Option = $(InfOption)
  1722. read-syms FileConstants
  1723. endif
  1724. CloseRegKey $(NetRules)
  1725. CloseRegKey $(NetworkCardKey)
  1726. endif
  1727. install "Install-Upgrade"
  1728. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1729. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  1730. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1731. goto ShellCodeError
  1732. endif
  1733. set Error = $($R0)
  1734. goto fatal
  1735. endif
  1736. OpenRegKey $(!REG_H_LOCAL) "" +
  1737. $(!NTN_ServiceBase)"\"$(ServiceName) +
  1738. $(MAXIMUM_ALLOWED) ServiceKey
  1739. Ifstr $(ServiceKey) != $(KeyNull)
  1740. Debug-Output " Opened service key "$(ServiceName)" successfully"
  1741. OpenRegKey $(ServiceKey) "" "Parameters" +
  1742. $(MAXIMUM_ALLOWED) ParametersKey
  1743. Ifstr $(ParametersKey) != $(KeyNull)
  1744. SetRegValue $(ParametersKey) {FEPImagePath,$(NoTitle),$(!REG_VT_SZ),$(AdapterFepImage)}
  1745. SetRegValue $(ParametersKey) {BiosImagePath,$(NoTitle),$(!REG_VT_SZ),$(AdapterBiosImage)}
  1746. CloseRegKey $(ParametersKey)
  1747. else
  1748. goto fatalregistry
  1749. Endif
  1750. CloseRegKey $(ServiceKey)
  1751. else
  1752. goto fatalregistry
  1753. endif
  1754. nextnetcard = +
  1755. EndForListDo
  1756. endif
  1757. ;
  1758. ; Enumerate all netcards installed of this type and update them
  1759. ;
  1760. set iSearch = 1
  1761. nextncu = +
  1762. Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  1763. set KeyNetcard = $($R0)
  1764. set iSearch = $($R1)
  1765. Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  1766. Ifstr $(KeyNetcard) != $(KeyNull)
  1767. Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  1768. SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  1769. CloseRegKey $(KeyNetcard)
  1770. goto nextncu
  1771. Endif
  1772. goto end
  1773. successful = +
  1774. Debug-Output "******************Entering successful******************"
  1775. goto end
  1776. abandon = +
  1777. Debug-Output "******************Entering abandon******************"
  1778. ForListDo $(OEM_ABANDON_OPTIONS)
  1779. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1780. $(ProductSoftwareName), $($)
  1781. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1782. Debug-Output "ShellCode error"
  1783. goto ShellCodeError
  1784. endif
  1785. set RegistryErrorIndex = $($R0)
  1786. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1787. goto fatalregistry
  1788. endif
  1789. EndForListDo
  1790. Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1791. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1792. $(ProductSoftwareName), FALSE
  1793. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1794. Debug-Output "ShellCode error"
  1795. goto ShellCodeError
  1796. endif
  1797. set RegistryErrorIndex = $($R0)
  1798. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1799. goto fatalregistry
  1800. endif
  1801. endif
  1802. goto end
  1803. warning = +
  1804. Debug-Output "******************Entering warning******************"
  1805. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1806. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1807. goto ShellCodeError
  1808. endif
  1809. ifstr(i) $($R1) == "OK"
  1810. goto $(to)
  1811. else-ifstr(i) $($R1) == "CANCEL"
  1812. goto $(from)
  1813. else
  1814. goto "end"
  1815. endif
  1816. nonfatalinfo = +
  1817. Debug-Output "******************Entering nonfatalinfo******************"
  1818. Set CommonStatus = STATUS_USERCANCEL
  1819. Set Severity = STATUS
  1820. goto nonfatalmsg
  1821. nonfatal = +
  1822. Debug-Output "******************Entering nonfatal******************"
  1823. Set Severity = NONFATAL
  1824. goto nonfatalmsg
  1825. nonfatalmsg = +
  1826. Debug-Output "******************Entering nonfatalmsg******************"
  1827. ifstr(i) $(Error) == ""
  1828. Set Severity = NONFATAL
  1829. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1830. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1831. goto ShellCodeError
  1832. endif
  1833. set Error = $($R0)
  1834. endif
  1835. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1836. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1837. goto ShellCodeError
  1838. endif
  1839. ifstr(i) $($R1) == "OK"
  1840. goto $(from)
  1841. else
  1842. goto "end"
  1843. endif
  1844. fatalregistry = +
  1845. Debug-Output "******************Entering fatalregistry******************"
  1846. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1847. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1848. Debug-Output "fatalregistry: shell to find RegistryErrorString failed."
  1849. goto ShellCodeError
  1850. endif
  1851. set Error = $($R0)" - service "$(DigiSpecificString)"."
  1852. ifstr(i) $(fRemoveDigi) == TRUE
  1853. read-syms AbortMessage$(!STF_LANGUAGE)
  1854. set Error = $(Error)$(!LF)$(!LF)$(AbortText)
  1855. endif
  1856. goto fatal
  1857. fataldetect = +
  1858. Debug-Output "******************Entering fataldetect******************"
  1859. Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1860. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1861. Debug-Output "ShellCode error: cannot get an error string."
  1862. goto ShellCodeError
  1863. endif
  1864. set Error = $($R0)
  1865. Goto fatal
  1866. fatal = +
  1867. Debug-Output "******************Entering fatal******************"
  1868. Debug-Output "OEMNADDS.INF: ---- fatal called"
  1869. Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1870. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1871. Debug-Output "fatal: shell to SetupMessage failed."
  1872. goto ShellCodeError
  1873. endif
  1874. goto setfailed
  1875. ShellCodeError = +
  1876. Debug-Output "******************Entering ShellCodeError******************"
  1877. set DlgType = "MessageBox"
  1878. set STF_MB_TITLE = "Error: "$(FunctionTitle)
  1879. set STF_MB_TEXT = "Shell Code Error"
  1880. set STF_MB_TYPE = 1
  1881. set STF_MB_ICON = 3
  1882. set STF_MB_DEF = 1
  1883. ui start "Error Message"
  1884. goto setfailed
  1885. setfailed = +
  1886. Debug-Output "******************Entering setfailed******************"
  1887. set CommonStatus = STATUS_FAILED
  1888. ifstr(i) $(fRemoveDigi) == TRUE
  1889. set fRemoveDigi = FALSE
  1890. goto removeadapter
  1891. endif
  1892. goto end
  1893. end = +
  1894. Debug-Output "******************Entering end******************"
  1895. goto term
  1896. term = +
  1897. ifstr(i) $(DGCONFIG_HANDLE) != $(HandleNull)
  1898. FreeLibrary $(DGCONFIG_HANDLE)
  1899. endif
  1900. Debug-Output "******************Entering term -- GoodBye!!!******************"
  1901. Return $(CommonStatus)
  1902. [RemoveFiles]
  1903. Debug-Output "******************Entering [RemoveFiles]******************"
  1904. set RemoveList = {}
  1905. set RenameList = {}
  1906. ;
  1907. ; First determine if the hardware component has be completely
  1908. ; uninstalled. If it has, then we add the components to our
  1909. ; rename list.
  1910. ;
  1911. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameHdwDriver) +
  1912. $(MAXIMUM_ALLOWED) KeyProductHdwDriver
  1913. ifstr $(KeyProductHdwDriver) == $(KeyNull)
  1914. CloseRegKey $(KeyProductHdwDriver)
  1915. set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\drivers\"$(AdapterHardwareDriver)".sys")
  1916. set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\drivers\"$(AdapterFepImage))
  1917. set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\drivers\"$(AdapterBiosImage))
  1918. endif
  1919. ;
  1920. ; Determine if the DigiFEP5 component has been completely
  1921. ; uninstalled. If it has, then we add the components to our
  1922. ; rename list, and add the config stuff to our remove list.
  1923. ;
  1924. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) +
  1925. $(MAXIMUM_ALLOWED) KeyProduct
  1926. ifstr $(KeyProduct) == $(KeyNull)
  1927. CloseRegKey $(KeyProduct)
  1928. set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\drivers\"$(ProductSoftwareName)".sys")
  1929. set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\dgconfig.dll")
  1930. set RemoveList = >($(RemoveList), $(!STF_WINDOWSSYSPATH)"\dgconfig.hlp")
  1931. endif
  1932. Debug-Output "RemoveList = "$(RemoveList)
  1933. Debug-Output "RenameList = "$(RenameList)
  1934. ForListDo $(RemoveList)
  1935. Debug-Output "Removing "$($)
  1936. LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  1937. Debug-Output "Status is "$(Status)
  1938. EndForListDo
  1939. ForListDo $(RenameList)
  1940. Debug-Output "RenameList entry = "$($)
  1941. Split-String $($) "\" FilePath
  1942. QueryListSize PathLen $(FilePath)
  1943. Split-String *($(FilePath),$(PathLen)) "." FullFileName
  1944. Set FileName = *($(FullFileName),1)
  1945. Debug-Output "FileName is "$(FileName)
  1946. LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1947. Debug-Output "CheckFile Status = "$(STATUS)
  1948. ifstr(i) $(STATUS) == YES
  1949. LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1950. Debug-Output "Delfile Status = "$(STATUS)
  1951. LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $($)
  1952. Debug-Output "Delfile Status = "$(STATUS)
  1953. endif
  1954. ifstr(i) $(fRemoveDigi) == TRUE
  1955. Debug-Output "Renaming from "$($)
  1956. Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1957. LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1958. Debug-Output "Status is "$(Status1)
  1959. AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1960. endif
  1961. EndForListDo
  1962. exit
  1963. ;*************************************************************************
  1964. ;
  1965. ; SECTION: ExCreateRegKey
  1966. ;
  1967. ; PURPOSE: Opens and creates registry keys
  1968. ;
  1969. ; ARGUMENTS: $0 Open handle to registry key in which to create new key
  1970. ; $1 Registry path to create
  1971. ;
  1972. ; RETURNS: $R0 error code or zero if no error
  1973. ; $R1 Registry key handle of the newly created path
  1974. ;
  1975. ; REFERENCES: none
  1976. ;
  1977. ; MODIFIES: none
  1978. ;
  1979. ;*************************************************************************
  1980. [ExCreateRegKey]
  1981. Debug-Output "******************Entering [ExCreateRegKey]******************"
  1982. set ECR_Result = NO_ERROR
  1983. set ECR_BaseKeyHandle = $($0)
  1984. set ECR_NewPath = $($1)
  1985. set KeyNull = ""
  1986. set MAXIMUM_ALLOWED = 33554432
  1987. Debug-Output "ExCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1988. Debug-Output " ECR_NewPath = "$(ECR_NewPath)
  1989. Debug-Output " MAXIMUM_ALLOWED = "$(MAXIMUM_ALLOWED)
  1990. Debug-Output " KeyNull = "$(KeyNull)
  1991. OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1992. ECR_BaseKey
  1993. Debug-Output "ECR_BaseKey = "$(ECR_BaseKey)
  1994. Debug-Output " OpenRegKey returned "$($R0)
  1995. Ifstr $(ECR_BaseKey) == $(KeyNull)
  1996. Debug-Output "ECR_BaseKey == KeyNull"
  1997. Else
  1998. ; The key all ready exists.
  1999. Debug-Output "ECR_BaseKey != KeyNull"
  2000. set ECR_KeyHandle = $(ECR_BaseKey)
  2001. goto ECR_Return
  2002. Endif
  2003. set ECR_TmpPath = ""
  2004. Split-String $(ECR_NewPath) "\" ECR_PList
  2005. Debug-Output "ECR_PList = "$(ECR_PList)
  2006. ForListDo $(ECR_PList)
  2007. Ifstr(i) $($) != "\"
  2008. Ifint $(#) == 1
  2009. set ECR_TmpPath = $($)
  2010. Else
  2011. set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  2012. Endif
  2013. Debug-Output "Determining if "$(ECR_TmpPath)" exists"
  2014. OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  2015. Ifstr $(ECR_BaseKey) == $(KeyNull)
  2016. Debug-Output "Creating "$(ECR_TmpPath)
  2017. CreateRegKey $(ECR_BaseKeyHandle) {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  2018. Ifstr(i) $(ECR_KeyHandle) == $(KeyNull)
  2019. set ECR_Result = $($R0)
  2020. goto ECR_Return
  2021. Endif
  2022. Endif
  2023. Endif
  2024. EndForListDo
  2025. ECR_Return = +
  2026. return $(ECR_Result) $(ECR_KeyHandle)
  2027. [DebugExternalGlobals]
  2028. Set InfName = "OEMNADDS.INF"
  2029. Debug-Output $(InfName)" NTN_Origination = "$(!NTN_Origination)
  2030. Debug-Output $(InfName)" NTN_InstallMode = "$(!NTN_InstallMode)
  2031. Debug-Output $(InfName)" NTN_RegBase = "$(!NTN_RegBase)
  2032. Debug-Output $(InfName)" NTN_SoftwareBase = "$(!NTN_SoftwareBase)
  2033. Debug-Output $(InfName)" NTN_ServiceBase = "$(!NTN_ServiceBase)
  2034. Debug-Output $(InfName)" STF_NTPATH = "$(!STF_NTPATH)
  2035. Debug-Output $(InfName)" STF_NTWINDOWSSYSPATH = "$(!STF_WINDOWSSYSPATH)
  2036. Debug-Output $(InfName)" STF_CWDIR = "$(!STF_CWDIR)
  2037. Debug-Output $(InfName)" STF_LANGUAGE = "$(!STF_LANGUAGE)
  2038. Debug-Output $(InfName)" STF_NCDETECT = "$(!STF_NCDETECT)
  2039. Debug-Output $(InfName)" STF_NCOPTION = "$(!STF_NCOPTION)
  2040. Debug-Output $(InfName)" STF_NCDETCARD = "$(!STF_NCDETCARD)
  2041. Debug-Output $(InfName)" STF_NCDETINFO = "$(!STF_NCDETINFO)
  2042. Debug-Output $(InfName)" STF_INSTALL_MODE = "$(!STF_INSTALL_MODE)
  2043. Debug-Output $(InfName)" STF_CONTEXTINFNAME = "$(!STF_CONTEXTINFNAME)
  2044. return
  2045. [DebugConfiguration]
  2046. Set InfName = "OEMNADDS.INF"
  2047. Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  2048. Debug-Output $(InfName)" IRQ_Level is "$(!p:IRQ_Level)
  2049. Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  2050. Debug-Output $(InfName)" TransceiverValue is "$(!p:TransceiverValue)
  2051. Debug-Output $(InfName)" MemBaseAddrDec is "$(!p:MemBaseAddrDec)
  2052. Debug-Output $(InfName)" MappedValue is "$(!p:MappedValue)
  2053. return
  2054. ;
  2055. ; The AdapterSettings-<Hardware dependent modules> section has
  2056. ; the following entries with there corresponding definitions:
  2057. ;
  2058. ; IRQRangeList -
  2059. ; MemoryRangeList -
  2060. ; IORangeList -
  2061. ;
  2062. [AdapterSettings-ntcx]
  2063. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2064. IRQRangeList = {$(IRQDisableLabel)}
  2065. MemoryRangeList = {"C0000","C8000","D0000","D8000","E0000","E8000"}
  2066. IORangeList = {"108","118","128","208","228","308","328"}
  2067. IRQDefault = 0
  2068. MemoryDefault = 2
  2069. IODefault = 6
  2070. [AdapterSettings-ntepc]
  2071. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2072. IRQRangeList = {$(IRQDisableLabel)}
  2073. MemoryRangeList = {"C0000","C8000","D0000","D8000","E0000","E8000"}
  2074. IORangeList = {"108","118","128","208","228","308","328"}
  2075. IRQDefault = 0
  2076. MemoryDefault = 2
  2077. IODefault = 6
  2078. [AdapterSettings-ntxem]
  2079. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2080. IRQRangeList = {$(IRQDisableLabel)}
  2081. MemoryRangeList = {"C0000","C8000","D0000","D8000","E0000","E8000"}
  2082. IORangeList = {"104","114","124","204","224","304","324"}
  2083. IRQDefault = 0
  2084. MemoryDefault = 2
  2085. IODefault = 6
  2086. [AdapterSettings-nt8r]
  2087. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2088. IRQRangeList = {$(IRQDisableLabel)}
  2089. MemoryRangeList = {"C0000","C8000","D0000","D8000","E0000","E8000"}
  2090. IORangeList = {"104","114","124","204","224","304","324"}
  2091. IRQDefault = 0
  2092. MemoryDefault = 2
  2093. IODefault = 6
  2094. [AdapterSettings-nt4i]
  2095. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2096. IRQRangeList = {$(IRQDisableLabel)}
  2097. MemoryRangeList = {"C0000","D0000","E0000"}
  2098. IORangeList = {"100","110","120","200","220","300","320"}
  2099. IRQDefault = 0
  2100. MemoryDefault = 1
  2101. IODefault = 6
  2102. [AdapterSettings-nt8i]
  2103. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2104. IRQRangeList = {$(IRQDisableLabel)}
  2105. MemoryRangeList = {"C0000","D0000","E0000"}
  2106. IORangeList = {"100","110","120","200","220","300","320"}
  2107. IRQDefault = 0
  2108. MemoryDefault = 1
  2109. IODefault = 6
  2110. [AdapterSettings-nt16i]
  2111. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2112. IRQRangeList = {$(IRQDisableLabel)}
  2113. MemoryRangeList = {"C0000","D0000","E0000"}
  2114. IORangeList = {"100","110","120","200","220","300","320"}
  2115. IRQDefault = 0
  2116. MemoryDefault = 1
  2117. IODefault = 6
  2118. [AdapterSettings-nt16e]
  2119. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2120. IRQRangeList = {$(IRQDisableLabel)}
  2121. MemoryRangeList = {"C0000","D0000","E0000", }
  2122. IORangeList = {"100","110","120","200","220","300","320"}
  2123. IRQDefault = 0
  2124. MemoryDefault = 1
  2125. IODefault = 6
  2126. [AdapterSettings-nt8e]
  2127. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2128. IRQRangeList = {$(IRQDisableLabel)}
  2129. MemoryRangeList = {"C0000","D0000","E0000", }
  2130. IORangeList = {"100","110","120","200","220","300","320"}
  2131. IRQDefault = 0
  2132. MemoryDefault = 1
  2133. IODefault = 6
  2134. [AdapterSettings-nt4e]
  2135. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2136. IRQRangeList = {$(IRQDisableLabel)}
  2137. MemoryRangeList = {"C0000","D0000","E0000", }
  2138. IORangeList = {"100","110","120","200","220","300","320"}
  2139. IRQDefault = 0
  2140. MemoryDefault = 1
  2141. IODefault = 6
  2142. [AdapterSettings-2Port]
  2143. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2144. IRQRangeList = {$(IRQDisableLabel)}
  2145. MemoryRangeList = {"C0000","C2000","C4000","C6000","C8000", "CA000", "CC000", "CE000", +
  2146. "D0000","D2000","D4000","D6000","D8000", "DA000", "DC000", "DE000", +
  2147. "E0000","E2000","E4000","E6000","E8000", "EA000", "EC000", "EE000" }
  2148. IORangeList = {"100","110","120","200","220","300","320"}
  2149. IRQDefault = 0
  2150. MemoryDefault = 8
  2151. IODefault = 6
  2152. [AdapterSettings-4Port]
  2153. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2154. IRQRangeList = {$(IRQDisableLabel)}
  2155. MemoryRangeList = {"C0000","C2000","C4000","C6000","C8000", "CA000", "CC000", "CE000", +
  2156. "D0000","D2000","D4000","D6000","D8000", "DA000", "DC000", "DE000", +
  2157. "E0000","E2000","E4000","E6000","E8000", "EA000", "EC000", "EE000" }
  2158. IORangeList = {"100","110","120","200","220","300","320"}
  2159. IRQDefault = 0
  2160. MemoryDefault = 8
  2161. IODefault = 6
  2162. [AdapterSettings-8Port]
  2163. ;IRQRangeList = {"3","5","7","10","11","12","15","Disabled"}
  2164. IRQRangeList = {$(IRQDisableLabel)}
  2165. MemoryRangeList = {"C0000","C2000","C4000","C6000","C8000", "CA000", "CC000", "CE000", +
  2166. "D0000","D2000","D4000","D6000","D8000", "DA000", "DC000", "DE000", +
  2167. "E0000","E2000","E4000","E6000","E8000", "EA000", "EC000", "EE000" }
  2168. IORangeList = {"100","110","120","200","220","300","320"}
  2169. IRQDefault = 0
  2170. MemoryDefault = 8
  2171. IODefault = 6
  2172. [BindingInfo-DigiFEP5]
  2173. BindingInfo = {+
  2174. "digiFEP5Driver ntepcDriver non exclusive 100", +
  2175. "digiFEP5Driver ntcxDriver non exclusive 100", +
  2176. "digiFEP5Driver ntxemDriver non exclusive 100", +
  2177. "digiFEP5Driver ntxallDriver non exclusive 100" +
  2178. }
  2179. [BindingInfo-ntxem]
  2180. BindingInfo = {+
  2181. $(AdapterHardwareDriver)"Driver "$(AdapterHardwareDriver)"Adapter non exclusive 100", +
  2182. }
  2183. [BindingInfo-ntcx]
  2184. BindingInfo = {+
  2185. $(AdapterHardwareDriver)"Driver "$(AdapterHardwareDriver)"Adapter non exclusive 100", +
  2186. }
  2187. [BindingInfo-ntepc]
  2188. BindingInfo = {+
  2189. $(AdapterHardwareDriver)"Driver "$(AdapterHardwareDriver)"Adapter non exclusive 100", +
  2190. }
  2191. [BindingInfo-ntxall]
  2192. BindingInfo = {+
  2193. $(AdapterHardwareDriver)"Driver "$(AdapterHardwareDriver)"Adapter non exclusive 100" +
  2194. }
  2195. [InstallResources]
  2196. set STF_VITAL = ""
  2197. Debug-Output "OEMNADDS.INF: [InstallResources]"
  2198. AddSectionFilesToCopyList Files-Resource $(!SourceDir) $(!STF_WINDOWSSYSPATH)
  2199. CopyFilesInCopyList
  2200. Debug-Output "OEMNADDS.INF: [InstallResources] - Exiting"
  2201. exit
  2202. [Install-Option]
  2203. Debug-Output "********************* Inside Install-Option *************************"
  2204. Debug-Output " AddCopy = "$(AddCopy)
  2205. Debug-Output " DoCopy = "$(DoCopy)
  2206. Debug-Output " DoConfig = "$(DoConfig)
  2207. Debug-Output " NTN_InstallPhase = "$(!NTN_InstallPhase)
  2208. set STF_VITAL = ""
  2209. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  2210. ifstr(i) $(AddCopy) == "YES"
  2211. ; AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2212. AddSectionFilesToCopyList Files-Resource $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2213. AddSectionFilesToCopyList Files-DigiFEP5 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2214. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2215. LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\images\fxfep.bin
  2216. ifstr(i) $(FilePresent) != "YES"
  2217. LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\images\fxfep.bi_
  2218. ifstr(i) $(FilePresent) != "YES"
  2219. Debug-Output "Retrieving images from "$(SrcDir)
  2220. AddSectionFilesToCopyList Files-$(Option)-images $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2221. else
  2222. Debug-Output "Retrieving images from "$(SrcDir)"..\images"
  2223. AddSectionFilesToCopyList Files-$(Option)-images $(SrcDir)..\images $(!STF_WINDOWSSYSPATH)\drivers
  2224. endif
  2225. else
  2226. Debug-Output "Retrieving images from "$(SrcDir)"..\images"
  2227. AddSectionFilesToCopyList Files-$(Option)-images $(SrcDir)..\images $(!STF_WINDOWSSYSPATH)\drivers
  2228. endif
  2229. endif
  2230. ifstr(i) $(DoCopy) == "YES"
  2231. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  2232. CopyFilesInCopyList
  2233. else
  2234. ; get minimum needed files for configuration
  2235. LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\dgconfig.DLL $(!STF_WINDOWSSYSPATH)\dgconfig.DLL
  2236. LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\dgconfig.CNT $(!STF_WINDOWSSYSPATH)\dgconfig.CNT
  2237. LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\dgconfig.HLP $(!STF_WINDOWSSYSPATH)\dgconfig.HLP
  2238. endif
  2239. ifstr(i) $(DoConfig) == "YES"
  2240. endif
  2241. Exit
  2242. [Install-Upgrade]
  2243. Debug-Output "********************* Inside Install-Upgrade *************************"
  2244. Debug-Output " AddCopy = "$(AddCopy)
  2245. Debug-Output " DoCopy = "$(DoCopy)
  2246. Debug-Output " DoConfig = "$(DoConfig)
  2247. Debug-Output " NTN_InstallPhase = "$(!NTN_InstallPhase)
  2248. set STF_VITAL = ""
  2249. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  2250. ; AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2251. AddSectionFilesToCopyList Files-Resource $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2252. AddSectionFilesToCopyList Files-DigiFEP5 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2253. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2254. LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\images\fxfep.bin
  2255. ifstr(i) $(FilePresent) != "YES"
  2256. LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\images\fxfep.bi_
  2257. ifstr(i) $(FilePresent) != "YES"
  2258. Debug-Output "Retrieving images from "$(SrcDir)
  2259. AddSectionFilesToCopyList Files-$(Option)-images $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2260. else
  2261. Debug-Output "Retrieving images from "$(SrcDir)"..\images"
  2262. AddSectionFilesToCopyList Files-$(Option)-images $(SrcDir)..\images $(!STF_WINDOWSSYSPATH)\drivers
  2263. endif
  2264. else
  2265. Debug-Output "Retrieving images from "$(SrcDir)"..\images"
  2266. AddSectionFilesToCopyList Files-$(Option)-images $(SrcDir)..\images $(!STF_WINDOWSSYSPATH)\drivers
  2267. endif
  2268. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  2269. CopyFilesInCopyList
  2270. Exit