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.

717 lines
20 KiB

  1. ;***********************************************************************
  2. ;
  3. ; OEMNSVSP.INF
  4. ;
  5. ; Simple TCP/IP Services
  6. ;
  7. ; History:
  8. ; terryk 10-10-1993 Created
  9. ;***********************************************************************
  10. ;-----------------------------------------------------------------------
  11. ; OPTION TYPE
  12. ; -----------
  13. ; This identifies the Option type we are dealing with. The different
  14. ; possible types are:
  15. ;
  16. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  17. ;
  18. ; Types specific to networking:
  19. ;
  20. ; NetAdapter, a netcard / adapter combination or just a netcard
  21. ; NetDriver, just a netcard driver
  22. ; NetTransport, a complete NDIS-compliant TDI transport stack
  23. ; NetService, an NT networking service
  24. ; NetWork, a complete network ensemble.
  25. ; NetProvider a complete network which supports NT MPR protocol
  26. ;-----------------------------------------------------------------------
  27. [Identification]
  28. OptionType = NetService
  29. ;-----------------------------------------------------------------------
  30. ; OPTION LIST
  31. ; -----------
  32. ; This section lists the OEM Option key names. These keys are locale
  33. ; independent and used to represent the option in a locale independent
  34. ; manner.
  35. ;
  36. ;-----------------------------------------------------------------------
  37. [Options]
  38. STCPIP
  39. ;***********************************************************************
  40. ; CONSTANTS FOR USING DIALOGS
  41. ;***********************************************************************
  42. [FileConstants]
  43. ;
  44. ; Product Info
  45. ;
  46. Manufacturer = "Microsoft"
  47. ProductMajorVersion = "4"
  48. ProductMinorVersion = "0"
  49. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  50. ProductOpSupport = 132 ; 0x0084 ; Display,Removable,NOT Properties,Not Updatable
  51. ;================================================================
  52. ; TCP/IP: Service and Driver
  53. ;
  54. ;================================================================
  55. ; TCP Software data: this is the WIN32 Service. It
  56. ; automatically loads the TCPIP.SYS driver.
  57. ;
  58. ProductSTCPIPName = "SimpTcp"
  59. ProductSTCPIPImagePath = "%SystemRoot%\system32\tcpsvcs.exe"
  60. ProductSTCPIPSvcType = "autoserviceshare"
  61. ;
  62. ; Registry Key Names
  63. ;
  64. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  65. [GeneralConstants]
  66. ;
  67. ; File names, etc.
  68. ;
  69. UtilityInf = "UTILITY.INF"
  70. subroutineinf = "SUBROUTN.INF"
  71. Exit_Code = 0
  72. ;ShellCode = 0
  73. BillboardVisible = 0
  74. ;
  75. ; Program flow control variables.
  76. ;
  77. from = ""
  78. to = ""
  79. ;
  80. ; Return codes; Exit_Code is set to one of these
  81. ;
  82. ExitCodeOk = 0
  83. ExitCodeCancel = 1
  84. ExitCodeFatal = 2
  85. KeyNull = ""
  86. MAXIMUM_ALLOWED = 33554432
  87. SERVICE_NO_CHANGE = 4294967295
  88. RegistryErrorIndex = NO_ERROR
  89. KeyProduct = ""
  90. KeyParameters = ""
  91. TRUE = 1
  92. FALSE = 0
  93. NoTitle = 0
  94. ExitState = "Active"
  95. OldVersionExisted = $(FALSE)
  96. [date]
  97. ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  98. ; Minute, Second }
  99. Now = {} ? $(!LIBHANDLE) GetSystemDate
  100. ;---------------------------------------------------------------------------
  101. ; 1. Identify
  102. ;
  103. ; DESCRIPTION: To verify that this INF deals with the same type of options
  104. ; as we are choosing currently.
  105. ;
  106. ; INPUT: None
  107. ;
  108. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  109. ; $($R1): Option Type (COMPUTER ...)
  110. ; $($R2): Diskette description
  111. ;---------------------------------------------------------------------------
  112. [Identify]
  113. ;
  114. ;
  115. read-syms Identification
  116. set Status = STATUS_SUCCESSFUL
  117. set Identifier = $(OptionType)
  118. set Media = #("Source Media Descriptions", 1, 1)
  119. Return $(Status) $(Identifier) $(Media)
  120. ;------------------------------------------------------------------------
  121. ; 2. ReturnOptions:
  122. ;
  123. ; DESCRIPTION: To return the option list supported by this INF and the
  124. ; localised text list representing the options.
  125. ;
  126. ;
  127. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  128. ;
  129. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  130. ; STATUS_NOLANGUAGE
  131. ; STATUS_FAILED
  132. ;
  133. ; $($R1): Option List
  134. ; $($R2): Option Text List
  135. ;------------------------------------------------------------------------
  136. [ReturnOptions]
  137. ;
  138. ;
  139. set Status = STATUS_FAILED
  140. set OptionList = {}
  141. set OptionTextList = {}
  142. ;
  143. ; Check if the language requested is supported
  144. ;
  145. set LanguageList = ^(LanguagesSupported, 1)
  146. Ifcontains(i) $($0) in $(LanguageList)
  147. goto returnoptions
  148. else
  149. set Status = STATUS_NOLANGUAGE
  150. goto finish_ReturnOptions
  151. endif
  152. ;
  153. ; form a list of all the options and another of the text representing
  154. ;
  155. returnoptions = +
  156. set OptionList = ^(Options, 1)
  157. set OptionTextList = ^(OptionsText$($0), 1)
  158. set Status = STATUS_SUCCESSFUL
  159. finish_ReturnOptions = +
  160. Return $(Status) $(OptionList) $(OptionTextList)
  161. ;----------InstallOption-------------------------------------------------
  162. ;
  163. ; InstallOption:
  164. ;
  165. ; This section is shelled to by main installation processing
  166. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  167. ;
  168. ;
  169. ; FUNCTION: To copy files representing Options
  170. ; To configure the installed option
  171. ; To update the registry for the installed option
  172. ;
  173. ; INPUT: $($0): Language to use
  174. ; $($1): OptionID to install
  175. ; $($2): SourceDirectory
  176. ; $($3): AddCopy (YES | NO)
  177. ; $($4): DoCopy (YES | NO)
  178. ; $($5): DoConfig (YES | NO)
  179. ;
  180. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  181. ; STATUS_NOLANGUAGE |
  182. ; STATUS_USERCANCEL |
  183. ; STATUS_FAILED
  184. ;
  185. ;------------------------------------------------------------------------
  186. [InstallOption]
  187. ;
  188. ; extract parameters
  189. ;
  190. set Option = $($1)
  191. set SrcDir = $($2)
  192. set AddCopy = $($3)
  193. set DoCopy = $($4)
  194. set DoConfig = $($5)
  195. ;
  196. ; Check if the language requested is supported
  197. ;
  198. set LanguageList = ^(LanguagesSupported, 1)
  199. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  200. Return STATUS_NOLANGUAGE
  201. endif
  202. Debug-Output "OEMNSVCU.INF: STF_CWDIR is: "$(!STF_CWDIR)
  203. Debug-Output "OEMNSVCU.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  204. ; define all the constants
  205. set-subst LF = "\n"
  206. read-syms GeneralConstants
  207. read-syms FileConstants
  208. read-syms DialogConstants$(!STF_LANGUAGE)
  209. ifstr(i) $(!NTN_Origination) == "NCPA"
  210. set Continue = $(OK)
  211. endif
  212. read-syms FileConstants$(!STF_LANGUAGE)
  213. detect date
  214. set-title $(FunctionTitle)
  215. set to = Begin
  216. set from = Begin
  217. ;
  218. ; Assume all is well.
  219. ;
  220. set CommonStatus = STATUS_SUCCESSFUL
  221. EndWait
  222. ;
  223. ; Set up the operation-mode-based variables and gaily welcome
  224. ; the user. If the "install mode" variable is improperly set,
  225. ; assume this is a new installation.
  226. ;
  227. Begin = +
  228. Ifstr(i) $(!NTN_InstallMode) == deinstall
  229. set OEM_ABANDON_SOFTWARE = {"STCPIP"}
  230. set StartLabel = removeadapter
  231. else-Ifstr(i) $(!NTN_InstallMode) == Update
  232. set StartLabel = UpgradeSoftware
  233. else-Ifstr(i) $(!NTN_InstallMode) == configure
  234. set StartLabel = configureadapter
  235. ;
  236. ; You cannot config the software component
  237. ;
  238. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  239. Debug-Output "Cannot configure the software."
  240. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  241. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  242. Debug-Output "ShellCode error: cannot get an error string."
  243. goto ShellCodeError
  244. endif
  245. set Error = $($R0)
  246. set from = end
  247. set to = end
  248. goto nonfatalinfo
  249. endif
  250. else-Ifstr(i) $(!NTN_InstallMode) == bind
  251. set StartLabel = bindingadapter
  252. else
  253. set StartLabel = installadapter
  254. set OEM_ABANDON_SOFTWARE = {}
  255. set OEM_ABANDON_OPTIONS = {}
  256. endif
  257. set from = $(fatal)
  258. set to = $(fatal)
  259. goto $(StartLabel)
  260. ;-----------------------------------------------
  261. ; Installation Section
  262. ;-----------------------------------------------
  263. installadapter = +
  264. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  265. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  266. Goto ShellCodeError
  267. Else-Ifstr(i) $($R0) == STATUS_FAILED
  268. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  269. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  270. goto ShellCodeError
  271. endif
  272. set Error = $($R0)
  273. Goto fatal
  274. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  275. Goto successful
  276. Endif
  277. Set SrcDir = $($R1)
  278. ifstr(i) $(!NTN_InstallMode) == "install"
  279. Debug-Output "OEMNSVCU.INF: installadapter: installing [Install-Option]"
  280. install "Install-Option"
  281. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  282. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  283. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  284. goto ShellCodeError
  285. endif
  286. set Error = $($R0)
  287. goto fatal
  288. endif
  289. endif
  290. set OEM_ABANDON_ON = TRUE
  291. StartWait
  292. set ThisOption = STCPIP
  293. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  294. $(Product$(ThisOption)Name),+
  295. $(Product$(ThisOption)Name),+
  296. $(Product$(ThisOption)DisplayName),+
  297. $(STF_CONTEXTINFNAME),+
  298. $(Product$(ThisOption)ImagePath),+
  299. $(Product$(ThisOption)SvcType), "",+
  300. {"Afd","+TDI"}, "", "%systemroot%\system32\simptcp.dll"
  301. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  302. Debug-Output "OEMNSVSP.INF: ShellCode error"
  303. goto ShellCodeError
  304. endif
  305. set RegistryErrorIndex = $($R0)
  306. CloseRegKey $($R3)
  307. CloseRegKey $($R5)
  308. set STParamKey = $($R4)
  309. set STVerKey = $($R1)
  310. set STRulesKey = $($R2)
  311. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  312. EndWait
  313. Debug-Output "OEMNSVSP.INF: Registry error creating Simple TCP/IP service"
  314. CloseRegKey $(STParamKey)
  315. CloseRegKey $(STVerKey)
  316. CloseRegKey $(STRulesKey)
  317. goto fatalregistry
  318. endif
  319. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),"Transport"},+
  320. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  321. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  322. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  323. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  324. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  325. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  326. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  327. Shell $(UtilityInf), AddValueList, $(STVerKey), $(NewValueList)
  328. CloseRegKey $(STVerKey)
  329. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  330. Debug-Output "OEMNSVSP.INF: ShellCode error, add value list"
  331. CloseRegKey $(STParamKey)
  332. goto ShellCodeError
  333. endif
  334. set RegistryErrorIndex = $($R0)
  335. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  336. EndWait
  337. Debug-Output "OEMNSVSP.INF: Registry error: add value list."
  338. CloseRegKey $(STParamKey)
  339. CloseRegKey $(STRulesKey)
  340. goto fatalregistry
  341. Endif
  342. set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  343. Shell $(UtilityInf), AddValueList, $(STRulesKey), $(NewValueList)
  344. CloseRegKey $(STRulesKey)
  345. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  346. Debug-Output "OEMNSVSP.INF: ShellCode error, add value list"
  347. CloseRegKey $(STParamKey)
  348. goto ShellCodeError
  349. endif
  350. set RegistryErrorIndex = $($R0)
  351. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  352. EndWait
  353. Debug-Output "OEMNSVSP.INF: Registry error: add value list."
  354. CloseRegKey $(STParamKey)
  355. goto fatalregistry
  356. Endif
  357. set NewValueList = {+
  358. {EnableMultipleThreads,$(NoTitle),$(!REG_VT_DWORD),1},+
  359. {EnableTcpEcho,$(NoTitle),$(!REG_VT_DWORD),1},+
  360. {EnableUdpEcho,$(NoTitle),$(!REG_VT_DWORD),1},+
  361. {EnableTcpDiscard,$(NoTitle),$(!REG_VT_DWORD),1},+
  362. {EnableUdpDiscard,$(NoTitle),$(!REG_VT_DWORD),1},+
  363. {EnableTcpChargen,$(NoTitle),$(!REG_VT_DWORD),1},+
  364. {EnableUdpChargen,$(NoTitle),$(!REG_VT_DWORD),1},+
  365. {EnableTcpDaytime,$(NoTitle),$(!REG_VT_DWORD),1},+
  366. {EnableUdpDaytime,$(NoTitle),$(!REG_VT_DWORD),1},+
  367. {EnableTcpQotd,$(NoTitle),$(!REG_VT_DWORD),1},+
  368. {EnableUdpQotd,$(NoTitle),$(!REG_VT_DWORD),1},+
  369. {QotdFileName,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\system32\drivers\etc\quotes"},+
  370. {MaxTcpClients,$(NoTitle),$(!REG_VT_DWORD),16},+
  371. {MaxIdleTicks,$(NoTitle),$(!REG_VT_DWORD),600000},+
  372. {SelectTimeout,$(NoTitle),$(!REG_VT_DWORD),300},+
  373. {IoBufferSize,$(NoTitle),$(!REG_VT_DWORD),8192}}
  374. Shell $(UtilityInf), AddValueList, $(STParamKey), $(NewValueList)
  375. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  376. Debug-Output "OEMNSVSP.INF: ShellCode error, add value list"
  377. CloseRegKey $(STParamKey)
  378. goto ShellCodeError
  379. endif
  380. CloseRegKey $(STParamKey)
  381. set RegistryErrorIndex = $($R0)
  382. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  383. EndWait
  384. Debug-Output "OEMNSVSP.INF: Registry error: add value list."
  385. goto fatalregistry
  386. Endif
  387. EndWait
  388. ;
  389. ; Set our master component for auto-self-removal
  390. ;
  391. Shell $(UtilityInf) SetMasterComponent Microsoft Tcpip $(STF_CONTEXTINFNAME) STCPIP
  392. goto successful
  393. ;-----------------------------------------------
  394. ; Configuration Section
  395. ;-----------------------------------------------
  396. configureadapter = +
  397. goto end
  398. ;-----------------------------------------------
  399. ; Binding section
  400. ;-----------------------------------------------
  401. bindingadapter =+
  402. goto end
  403. ;-----------------------------------------------
  404. ; Removeadapter section
  405. ;
  406. ;
  407. ; Removal errors are ignored, since we want to
  408. ; try to remove as much as possible.
  409. ;-----------------------------------------------
  410. removeadapter = +
  411. ForListDo $(OEM_ABANDON_SOFTWARE)
  412. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(Product$($)Name)
  413. EndForListDo
  414. goto end
  415. ;-----------------------------------------------
  416. ; Upgrade Software section
  417. ;-----------------------------------------------
  418. UpgradeSoftware = +
  419. ; Upgrade software component
  420. ;
  421. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  422. Ifstr $(KeyProduct) != $(KeyNull)
  423. install "Install-Update"
  424. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  425. goto fatal
  426. endif
  427. ; Upgrade the version number
  428. ;
  429. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  430. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  431. ;
  432. ; Update description and op support
  433. ;
  434. SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(Option)Description)}
  435. SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  436. ;
  437. ; do nothing for update
  438. ;
  439. CloseRegKey $(KeyProduct)
  440. else
  441. ;
  442. ; Cannot Open software key, goto ERROR
  443. ;
  444. goto fatalregistry
  445. endif
  446. goto end
  447. ;
  448. ; End of Upgrade Software
  449. ;
  450. ;
  451. ; Escape hatches
  452. ;
  453. successful = +
  454. goto end
  455. ;
  456. ; info display
  457. ;
  458. infomsg =+
  459. read-syms InfoDlg
  460. ui start "Warning"
  461. set CommonStatus = STATUS_USERCANCEL
  462. goto end
  463. ;
  464. ; warning display
  465. ;
  466. warning = +
  467. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  468. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  469. goto ShellCodeError
  470. endif
  471. ifstr(i) $($R1) == "OK"
  472. goto $(to)
  473. else-ifstr(i) $($R1) == "CANCEL"
  474. goto $(from)
  475. else
  476. ; Debug-Msg "Error Error Bad DLGEVENT"
  477. goto "end"
  478. endif
  479. ;
  480. ; non fatal error display
  481. ;
  482. nonfatalinfo = +
  483. Set CommonStatus = STATUS_USERCANCEL
  484. Set Severity = STATUS
  485. goto nonfatalmsg
  486. nonfatal = +
  487. Set Severity = NONFATAL
  488. goto nonfatalmsg
  489. nonfatalmsg = +
  490. ifstr(i) $(Error) == ""
  491. Set Severity = NONFATAL
  492. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  493. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  494. goto ShellCodeError
  495. endif
  496. set Error = $($R0)
  497. endif
  498. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  499. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  500. goto ShellCodeError
  501. endif
  502. ifstr(i) $($R1) == "OK"
  503. goto $(from)
  504. else
  505. goto "end"
  506. endif
  507. ;
  508. ; Registry is broken
  509. ;
  510. fatalregistry = +
  511. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  512. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  513. goto ShellCodeError
  514. endif
  515. set Error = $($R0)
  516. goto fatal
  517. ;
  518. ; fatal error display
  519. ;
  520. fatal = +
  521. ifstr(i) $(Error) == ""
  522. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  523. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  524. goto ShellCodeError
  525. endif
  526. set Error = $($R0)
  527. endif
  528. Ifint $(BillboardVisible) != 0
  529. Shell "subroutn.inf" PopBillboard
  530. Set BillboardVisible = 0
  531. Endif
  532. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  533. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  534. goto ShellCodeError
  535. endif
  536. goto setfailed
  537. ;
  538. ; Shelling error
  539. ;
  540. ShellCodeError = +
  541. set DlgType = "MessageBox"
  542. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  543. set STF_MB_TEXT = $(ShellCodeErrorText)
  544. set STF_MB_TYPE = 1
  545. set STF_MB_ICON = 3
  546. set STF_MB_DEF = 1
  547. ui start "Error Message"
  548. goto setfailed
  549. setfailed = +
  550. set CommonStatus = STATUS_FAILED
  551. ;
  552. ; If OEM_ABANDON_ON, we need to clean up the registry
  553. ;
  554. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  555. set OEM_ABANDON_ON = FALSE
  556. goto removeadapter
  557. endif
  558. goto end
  559. end = +
  560. goto term
  561. term = +
  562. Return $(CommonStatus)
  563. ;***************************************************************
  564. ; Get File Size SECTIONS
  565. ;***************************************************************
  566. [GetFilesSize]
  567. set FileSizeList = >(^(Files-STCPIP,3),*(^(Files-ETC,3),1))
  568. set TotalSize = 0
  569. ForListDo $(FileSizeList)
  570. Split-String $($) "=" SplitString
  571. set Size = *($(SplitString),3)
  572. set-add TotalSize = $(TotalSize) $(Size)
  573. EndForListDo
  574. set-div SizeInK = $(TotalSize) 1024
  575. ifint $(SizeInK) == 0
  576. set SizeInK = 1
  577. endif
  578. return $(SizeInK)
  579. ;***************************************************************
  580. ; INSTALL SECTIONS
  581. ;***************************************************************
  582. [Install-Option]
  583. set STF_VITAL = ""
  584. ifstr(i) $(AddCopy) == "YES"
  585. ;
  586. ; Add the files to the copy list
  587. ;
  588. AddSectionFilesToCopyList Files-STCPIP $(SrcDir) $(!STF_WINDOWSSYSPATH)
  589. AddSectionFilesToCopyList Files-ETC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  590. endif
  591. ifstr(i) $(DoCopy) == "YES"
  592. ;
  593. ; Copy files in the copy list
  594. ;
  595. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  596. CopyFilesInCopyList
  597. endif
  598. ifstr(i) $(DoConfig) == "YES"
  599. ;
  600. ; Add product to registry
  601. ;
  602. ;
  603. ; Finish up
  604. endif
  605. Exit
  606. [Install-Update]
  607. set STF_VITAL = ""
  608. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  609. ;set STF_VERSION = "YES"
  610. AddSectionFilesToCopyList Files-STCPIP $(SrcDir) $(!STF_WINDOWSSYSPATH)
  611. AddSectionFilesToCopyList Files-ETC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  612. Exit