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.

669 lines
20 KiB

  1. ;-----------------------------------------------------------------
  2. ; Copyright(c) 1992-93 Microsoft Corporation
  3. ;
  4. ; SETUP INF FILE for the LT200 LocalTalk Adapter
  5. ;
  6. ; Author: KrishG
  7. ;
  8. ;
  9. ;-----------------------------------------------------------------
  10. [Identification]
  11. OptionType = NetAdapter
  12. [PlatformsSupported]
  13. ISA
  14. EISA
  15. "Jazz-Internal Bus"
  16. [Options]
  17. LT200
  18. [IOBaseAddrChoices]
  19. IOBase_1 = "0x200",512
  20. IOBase_2 = "0x240",576
  21. IOBase_3 = "0x260",608
  22. IOBase_4 = "0x2A0",672
  23. IOBase_5 = "0x300",768
  24. IOBase_6 = "0x320",800
  25. IOBase_7 = "0x330",816
  26. IOBase_8 = "0x340",832
  27. IOBase_9 = "0x350",848
  28. [FileConstants]
  29. UtilInf = "UTILITY.INF"
  30. SubInf = "SUBROUTN.INF"
  31. SoftwareType = "driver"
  32. Manufacturer = "Microsoft"
  33. ProductMajorVersion = "4"
  34. ProductMinorVersion = "0"
  35. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  36. ProductSoftwareName = "lt200"
  37. ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\lt200.sys"
  38. NetRuleSoftwareType = "Lt200Sys ltkndisDriver lt200Driver"
  39. NetRuleSoftwareUse = $(SoftwareType)
  40. NetRuleSoftwareBindForm = """Lt200Sys"" yes no container"
  41. NetRuleSoftwareClass = {"lt200Driver basic","ltkndisDriver basic yes"}
  42. NetRuleSoftwareBindable = {"lt200Driver lt200Adapter non exclusive 100",+
  43. "ltkndisDriver lt200Driver non non 100"}
  44. ProductEventDll = "%SystemRoot%\System32\netevent.dll"
  45. ProductHardwareName = "lt200"
  46. NetRuleHardwareType = "lt200 lt200Adapter"
  47. NetRuleHardwareBindForm = " yes yes container"
  48. NetRuleHardwareClass = {"lt200Adapter basic"}
  49. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  50. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  51. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  52. CardKey = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  53. ProductInfName = "oemnadlt.inf"
  54. [GeneralConstants]
  55. KeyNull = ""
  56. MAXIMUM_ALLOWED = 33554432
  57. RegistryErrorIndex = NO_ERROR
  58. KeyProduct = ""
  59. KeyParameters = ""
  60. TRUE = 1
  61. FALSE = 0
  62. NoTitle = 0
  63. ; !DebugOutputControl = 0
  64. [date]
  65. Now = {} ? $(!LIBHANDLE) GetSystemDate
  66. [Identify]
  67. read-syms Identification
  68. set Status = STATUS_SUCCESSFUL
  69. set Identifier = $(OptionType)
  70. set Media = #("Source Media Descriptions", 1, 1)
  71. Return $(Status) $(Identifier) $(Media)
  72. [ReturnOptions]
  73. set Status = STATUS_FAILED
  74. set OptionList = {}
  75. set OptionTextList = {}
  76. ;
  77. ; Check if the language requested is supported
  78. ;
  79. set LanguageList = ^(LanguagesSupported, 1)
  80. Ifcontains(i) $($0) in $(LanguageList)
  81. ;
  82. ; Check if the platforms requested is supported
  83. ;
  84. ifstr(i) $($1) == ""
  85. goto returnoptions
  86. endif
  87. set PlatformList = ^(PlatformsSupported, 1)
  88. Ifcontains(i) $($1) in $(PlatformList)
  89. goto returnoptions
  90. else
  91. set Status = STATUS_NOTSUPPORTED
  92. goto finish_ReturnOptions
  93. endif
  94. else
  95. set Status = STATUS_NOLANGUAGE
  96. goto finish_ReturnOptions
  97. endif
  98. ;
  99. ; form a list of all the options and another of the text representing
  100. ;
  101. returnoptions = +
  102. set OptionList = ^(Options, 1)
  103. set OptionTextList = ^(OptionsText$($0), 1)
  104. set Status = STATUS_SUCCESSFUL
  105. finish_ReturnOptions = +
  106. Return $(Status) $(OptionList) $(OptionTextList)
  107. [InstallOption]
  108. set Status = STATUS_FAILED
  109. set Option = $($1)
  110. set SrcDir = $($2)
  111. Set AddCopy = $($3)
  112. Set DoCopy = $($4)
  113. Set DoConfig = $($5)
  114. set LanguageList = ^(LanguagesSupported, 1)
  115. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  116. return STATUS_NOLANGUAGE
  117. EndIf
  118. StartWait
  119. set-subst LF = "\n"
  120. set-subst CR = "\r"
  121. read-syms GeneralConstants
  122. read-syms FileConstants
  123. read-syms DialogConstants$(!STF_LANGUAGE)
  124. read-syms FileConstants$(!STF_LANGUAGE)
  125. detect date
  126. set-title $(FunctionTitle)
  127. set CommonStatus = STATUS_SUCCESSFUL
  128. EndWait
  129. Begin = +
  130. Ifstr(i) $(!NTN_InstallMode) == deinstall
  131. set StartLabel = removeadapter
  132. Set RemoveonError = FALSE
  133. else-Ifstr(i) $(!NTN_InstallMode) == Update
  134. set StartLabel = UpgradeSoftware
  135. else-Ifstr(i) $(!NTN_InstallMode) == bind
  136. set StartLabel = bindingadapter
  137. else-Ifstr(i) $(!NTN_InstallMode) == configure
  138. set StartLabel = configureadapter
  139. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  140. Debug-Output "Cannot configure the localtalk driver software."
  141. Shell $(UtilInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  142. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  143. goto ShellCodeError
  144. endif
  145. set Error = $($R0)
  146. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Error)
  147. goto usercancel
  148. endif
  149. else
  150. set StartLabel = installadapter
  151. set REMOVE_SOFTWARE = TRUE
  152. set REMOVE_HARDWARE = {}
  153. Set RemoveOnError = TRUE
  154. endif
  155. goto $(StartLabel)
  156. ;------------------------------------------------------------------------------
  157. installadapter = +
  158. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  159. Ifstr $(KeyProduct) != $(KeyNull)
  160. GetRegValue $(KeyProduct) $(MajorVersion) VersionInfo
  161. set VersionMajor = *($(VersionInfo), 4)
  162. GetRegValue $(KeyProduct) $(MinorVersion) VersionInfo
  163. set VersionMinor = *($(VersionInfo), 4)
  164. set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  165. ifstr(i) $(ProductVersion) == $(InstalledVersion)
  166. read-syms MiscErrorString1$(!STF_LANGUAGE)
  167. Set Text = $(Version)$(ProductVersion)
  168. Shell $(SubInf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)$(ErrorString)
  169. goto end
  170. EndIf
  171. EndIf
  172. ifstr(i) $(!NTN_InstallMode) == "install"
  173. Ifstr(i) $(!DoCopy) == "YES"
  174. Shell $(UtilInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  175. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  176. Goto ShellCodeError
  177. Else-Ifstr(i) $($R0) == STATUS_FAILED
  178. Shell $(UtilInf) RegistryErrorString "ASK_SOURCE_FAIL"
  179. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  180. goto ShellCodeError
  181. endif
  182. set Error = $($R0)
  183. Goto end
  184. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  185. Goto usercancel
  186. Endif
  187. Set SrcDir = $($R1)
  188. Endif
  189. Endif
  190. install "Install-Initial"
  191. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  192. Set CommonStatus = STATUS_USERCANCEL
  193. goto end
  194. Endif
  195. adapteroptions = +
  196. set IOBaseAddrValue = *($(IOBaseAddrList), 8)
  197. read-syms FileDependentDlg$(!STF_LANGUAGE)
  198. ui start "InputDlg"
  199. ifstr(i) $(DLGEVENT) == "CONTINUE"
  200. set IOBaseAddrIndex = $(Combo1Out)
  201. ui pop 1
  202. else-ifstr(i) $(DLGEVENT) == "EXIT"
  203. set CommonStatus = STATUS_USERCANCEL
  204. ui pop 1
  205. goto usercancel
  206. else
  207. set CommonStatus = STATUS_USERCANCEL
  208. ui pop 1
  209. goto usercancel
  210. endif
  211. installproduct = +
  212. Set FLibraryErrCtl = 1
  213. Shell $(UtilInf), AddSoftwareComponent, +
  214. $(Manufacturer),+
  215. $(ProductSoftwareName), +
  216. $(ProductSoftwareName), +
  217. $(ProductSoftwareName), +
  218. $(ProductInfName), +
  219. $(ProductSoftwareImagePath),+
  220. "kernel", "NDIS", {}, "", $(ProductEventDll)
  221. ifint $($ShellCode) != 0
  222. goto ShellCodeError
  223. endif
  224. set RegistryErrorIndex = $($R0)
  225. set KeyProduct = $($R1)
  226. Set SoftNetRulesKey = $($R2)
  227. CloseRegKey $($R3)
  228. CloseRegKey $($R4)
  229. CloseRegKey $($R5)
  230. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  231. CloseRegKey $(KeyProduct)
  232. CloseRegKey $(SoftNetRulesKey)
  233. goto fatalregistry
  234. endif
  235. set NewValueList = +
  236. {{SoftwareType,0,$(!REG_VT_SZ),$(SoftwareType)},+
  237. {MajorVersion,0,$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  238. {MinorVersion,0,$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  239. {Title,0,$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  240. {Description,0,$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  241. {PathName,0,$(!REG_VT_SZ),$(!STF_WINDOWSSYSPATH)},+
  242. {ServiceName,0,$(!REG_VT_SZ),$(ProductSoftwareName)},+
  243. {InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
  244. Shell $(UtilInf), AddValueList, $(KeyProduct), $(NewValueList)
  245. ifint $($ShellCode) != 0
  246. goto ShellCodeError
  247. endif
  248. set RegistryErrorIndex = $($R0)
  249. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  250. CloseRegKey $(KeyProduct)
  251. CloseRegKey $(SoftNetRulesKey)
  252. goto fatalregistry
  253. endif
  254. set NewValueList = +
  255. {{type,0,$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  256. {use,0,$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  257. {bindform,0,$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  258. {class,0,$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  259. {bindable,0,$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  260. {InfOption,0,$(!REG_VT_SZ),$(Option)}, +
  261. {Infname ,0,$(!REG_VT_SZ),$(ProductInfName)}}
  262. Shell $(UtilInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  263. ifint $($ShellCode) != 0
  264. goto ShellCodeError
  265. endif
  266. set RegistryErrorIndex = $($R0)
  267. CloseRegKey $(KeyProduct)
  268. CloseRegKey $(SoftNetRulesKey)
  269. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  270. Debug-Output "Resgitry error: add value list."
  271. goto fatalregistry
  272. endif
  273. Shell $(UtilInf), AddHardwareComponent, $(ProductHardwareName),$(ProductInfName),$(ProductKeyName)
  274. ifint $($R4) != -1
  275. Set REMOVE_HARDWARE = >($(REMOVE_HARDWARE), $(CardKey)"\"$($R4))
  276. endif
  277. ifint $($ShellCode) != 0
  278. goto ShellCodeError
  279. endif
  280. set RegistryErrorIndex = $($R0)
  281. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  282. EndWait
  283. CloseRegKey $($R1)
  284. CloseRegKey $($R2)
  285. CloseRegKey $($R3)
  286. goto fatalregistry
  287. Endif
  288. set KeyParameters = $($R3)
  289. set KeyAdapterRules = $($R2)
  290. set AdapterNumber = $($R4)
  291. set NewValueList = {{Manufacturer,0,$(!REG_VT_SZ),$(Manufacturer)},+
  292. {Title,0,$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  293. {Description,0,$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  294. {ProductName,0,$(!REG_VT_SZ),$(ProductHardwareName)},+
  295. {ServiceName,0,$(!REG_VT_SZ),$($R5)},+
  296. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  297. {InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
  298. Shell $(UtilInf), AddValueList, $($R1), $(NewValueList)
  299. ifint $($ShellCode) != 0
  300. goto ShellCodeError
  301. endif
  302. CloseRegKey $($R1)
  303. set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  304. set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  305. set NewValueList = +
  306. {{type,0,$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  307. {bindform,0,$(!REG_VT_SZ),$(TempBindForm)}, +
  308. {class,0,$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  309. {InfOption,0,$(!REG_VT_SZ),$(Option)}, +
  310. {Infname ,0,$(!REG_VT_SZ),$(ProductInfName)}}
  311. Shell $(UtilInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  312. ifint $($ShellCode) != 0
  313. goto ShellCodeError
  314. endif
  315. set RegistryErrorIndex = $($R0)
  316. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  317. CloseRegKey $(KeyParameters)
  318. CloseRegKey $(KeyAdapterRules)
  319. goto fatalregistry
  320. endif
  321. CloseRegKey $(KeyAdapterRules)
  322. goto writeparameters
  323. configureadapter = +
  324. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  325. Ifstr $(KeyProduct) == $(KeyNull)
  326. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  327. goto fatalregistry
  328. Endif
  329. Shell $(UtilInf) FindService, $(KeyProduct)
  330. Ifint $($ShellCode) != 0
  331. Goto ShellCodeError
  332. Endif
  333. Ifstr(i) $($R0) != NO_ERROR
  334. Goto fatalregistry
  335. endif
  336. set KeyParameters = $($R2)
  337. CloseRegKey $($R1)
  338. Ifstr $(KeyParameters) == $(KeyNull)
  339. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  340. goto fatalregistry
  341. endif
  342. set ValueName = ""
  343. set ValueData = ""
  344. set ValueStr = ""
  345. set ValueList = {}
  346. EnumRegValue $(KeyParameters) ValueList
  347. ForListDo $(ValueList)
  348. set ValueItem = $($)
  349. set ValueName = *($(ValueItem),1)
  350. set ValueData = *($(ValueItem),4)
  351. ifstr(i) $(ValueName) == "IOBaseAddress"
  352. set IOBaseAddrIndex = $(ValueData)
  353. endif
  354. EndForListDo
  355. set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  356. ifstr(i) $(IOBaseAddrValue) == ""
  357. set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  358. endif
  359. cfgoptions = +
  360. ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  361. ifstr(i) $(!AutoNetInterfaceType) != ""
  362. set BusType = $(!AutoNetInterfaceType)
  363. else
  364. set BusType = 1 ;ISA
  365. endif
  366. ifstr(i) $(!AutoNetBusNumber) != ""
  367. set BusNumber = $(!AutoNetBusNumber)
  368. else
  369. set BusNumber = 0
  370. endif
  371. goto writeparameters_1
  372. endif
  373. read-syms FileDependentDlg$(!STF_LANGUAGE)
  374. ui start "InputDlg"
  375. ifstr(i) $(DLGEVENT) == "CONTINUE"
  376. set CommonStatus = STATUS_REBOOT
  377. set IOBaseAddrIndex = $(Combo1Out)
  378. ui pop 1
  379. else-ifstr(i) $(DLGEVENT) == "EXIT"
  380. ui pop 1
  381. goto usercancel
  382. else
  383. ui pop 1
  384. goto usercancel
  385. endif
  386. ;------------------------------------------------------------------
  387. writeparameters = +
  388. Shell $(UtilInf),GetBusTypeDialog,$(ProductHardwareDescription) "1" "0"
  389. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  390. Debug-Output "ShellCode error."
  391. goto ShellCodeError
  392. endif
  393. set BusType = $($R1)
  394. set BusNumber = $($R2)
  395. writeparameters_1 = +
  396. set IOBaseAddrValue = *($(IOBaseAddrValues), +
  397. ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  398. set NewValueList = {{MediaType,0,$(!REG_VT_DWORD),5},+
  399. {InterruptNumber,0,$(!REG_VT_DWORD),0},+
  400. {BusType,0,$(!REG_VT_DWORD),$(BusType)},+
  401. {BusNumber,0,$(!REG_VT_DWORD),$(BusNumber)},+
  402. {IOBaseAddress,0,$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  403. Shell $(UtilInf), AddValueList, $(KeyParameters), $(NewValueList)
  404. ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  405. Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  406. endif
  407. CloseRegKey $(KeyParameters)
  408. ifint $($ShellCode) != 0
  409. Debug-Output "ShellCode error."
  410. goto ShellCodeError
  411. endif
  412. set RegistryErrorIndex = $($R0)
  413. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  414. Debug-Output "Registry error: Add value list"
  415. goto fatalregistry
  416. endif
  417. goto end
  418. removeadapter = +
  419. Set FLibraryErrCtl = 1
  420. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  421. Shell $(UtilInf), RemoveSoftwareComponent, $(Manufacturer),+
  422. $(ProductSoftwareName)
  423. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  424. goto ShellCodeError
  425. endif
  426. set RegistryErrorIndex = $($R0)
  427. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  428. goto fatalregistry
  429. endif
  430. else
  431. Debug-Output "Registry Base = "$(!NTN_RegBase)
  432. Debug-Output "Product Name = "$(ProductSoftwareName)
  433. Shell $(UtilInf), RemoveHardwareComponent, $(Manufacturer),+
  434. $(ProductSoftwareName), +
  435. $(!NTN_RegBase)
  436. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  437. Debug-Output "ShellCode error"
  438. goto ShellCodeError
  439. endif
  440. set RegistryErrorIndex = $($R0)
  441. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  442. goto fatalregistry
  443. endif
  444. endif
  445. goto end
  446. UpgradeSoftware = +
  447. ; Upgrade software component
  448. ;
  449. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  450. Ifstr $(KeyProduct) != $(KeyNull)
  451. install "Install-Update"
  452. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  453. goto fatal
  454. endif
  455. ; Upgrade the version number
  456. ;
  457. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  458. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  459. ;
  460. ; do nothing for update
  461. ;
  462. CloseRegKey $(KeyProduct)
  463. else
  464. ;
  465. ; Cannot Open software key, goto ERROR
  466. ;
  467. goto fatalregistry
  468. endif
  469. ;
  470. ; Enumerate all netcards installed of this type and update them
  471. ;
  472. set iSearch = 1
  473. nextnetcard = +
  474. Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  475. set KeyNetcard = $($R0)
  476. set iSearch = $($R1)
  477. Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  478. Ifstr $(KeyNetcard) != $(KeyNull)
  479. Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  480. SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  481. CloseRegKey $(KeyNetcard)
  482. goto nextnetcard
  483. Endif
  484. goto end
  485. abandon = +
  486. ForListDo $(REMOVE_HARDWARE)
  487. Shell $(UtilInf), RemoveHardwareComponent, $(Manufacturer), +
  488. $(ProductSoftwareName), +
  489. $($)
  490. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  491. goto ShellCodeError
  492. endif
  493. set RegistryErrorIndex = $($R0)
  494. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  495. goto fatalregistry
  496. endif
  497. EndForListDo
  498. Ifstr(i) $(REMOVE_SOFTWARE) == TRUE
  499. Shell $(UtilInf), RemoveSoftwareComponent, $(Manufacturer), +
  500. $(ProductSoftwareName), FALSE
  501. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  502. goto ShellCodeError
  503. endif
  504. set RegistryErrorIndex = $($R0)
  505. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  506. goto fatalregistry
  507. endif
  508. endif
  509. goto end
  510. fatalregistry = +
  511. Shell $(UtilInf) RegistryErrorString $(RegistryErrorIndex)
  512. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  513. goto ShellCodeError
  514. endif
  515. set Error = $($R0)
  516. goto fatal
  517. fatal = +
  518. ifstr(i) $(!NTN_InstallMode) == install
  519. read-syms MiscErrorString3$(!STF_LANGUAGE)
  520. Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(ErrorString)$(Error)
  521. Else
  522. Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  523. EndIf
  524. ifint $($ShellCode) != 0
  525. goto ShellCodeError
  526. endif
  527. goto setfailed
  528. ShellCodeError = +
  529. read-syms ShellingError$(!STF_LANGUAGE)
  530. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  531. goto setfailed
  532. setfailed = +
  533. set CommonStatus = STATUS_FAILED
  534. ifstr(i) $(RemoveOnError) == TRUE
  535. Set RemoveOnError = FALSE
  536. goto abandon
  537. else
  538. goto end
  539. EndIf
  540. end = +
  541. Return $(CommonStatus)
  542. usercancel = +
  543. Set CommonStatus = STATUS_USERCANCEL
  544. Return $(CommonStatus)
  545. [Install-Update]
  546. set STF_VITAL = ""
  547. AddSectionFilesToCopyList Files-LT200 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  548. Exit
  549. [Install-Initial]
  550. set STF_VITAL = ""
  551. AddSectionFilesToCopyList Files-LT200 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  552. CopyFilesInCopyList
  553. Exit