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.

517 lines
17 KiB

  1. [Identification]
  2. OptionType = NetTransport
  3. [LanguagesSupported]
  4. ENG
  5. [Options]
  6. ATMARPS
  7. [OptionsTextENG]
  8. ATMARPS = "IP over ATM (RFC 1577) ARP Server"
  9. [FileConstants]
  10. UtilityInf = "UTILITY.INF"
  11. subroutineinf = "SUBROUTN.INF"
  12. SoftwareType = "transport"
  13. Exit_Code = 0
  14. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  15. Manufacturer = "Microsoft"
  16. ProductMajorVersion = "1"
  17. ProductMinorVersion = "0"
  18. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  19. ProductSoftwareName = "AtmArpS"
  20. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\atmarps.sys"
  21. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  22. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductSoftwareName)"\Parameters"
  23. ServiceKeyName = $(!NTN_ServiceBase)"\"$(ProductSoftwareName)
  24. LinkageKeyName = $(!NTN_ServiceBase)"\"$(ProductSoftwareName)"\Linkage"
  25. ; type = Name,Class
  26. NetRuleSoftwareType = "AtmArpS ipatmserver"
  27. ; Class = new class name {existing class name | basic no|yes }
  28. NetRuleSoftwareClass = {"ipatmserver basic"}
  29. ; Use = Service | Transport | driver | adapter, yes|no, yes|no
  30. NetRuleSoftwareUse = $(SoftwareType)" no yes"
  31. ; BindForm = ObjectName yes|no yes|no container|simple|stream
  32. NetRuleSoftwareBindForm = """AtmArpS"" yes no container"
  33. [GeneralConstants]
  34. from = ""
  35. to = ""
  36. ExitCodeOk = 0
  37. ExitCodeCancel = 1
  38. ExitCodeFatal = 2
  39. KeyNull = ""
  40. MAXIMUM_ALLOWED = 33554432
  41. RegistryErrorIndex = NO_ERROR
  42. KeyProduct = ""
  43. KeyParameters = ""
  44. TRUE = 1
  45. FALSE = 0
  46. NoTitle = 0
  47. ExitState = "Active"
  48. OldVersionExisted = $(FALSE)
  49. DriverPath = $(!STF_NTPATH)\drivers
  50. [date]
  51. Now = {} ? $(!LIBHANDLE) GetSystemDate
  52. [platform]
  53. STF_PLATFORM = "" ? $(!LIBHANDLE) GetPlatform
  54. [Identify]
  55. read-syms Identification
  56. set Status = STATUS_SUCCESSFUL
  57. set Identifier = $(OptionType)
  58. set Media = #("Source Media Descriptions", 1, 1)
  59. Return $(Status) $(Identifier) $(Media)
  60. [ReturnOptions]
  61. set Status = STATUS_FAILED
  62. set OptionList = {}
  63. set OptionTextList = {}
  64. set LanguageList = ^(LanguagesSupported, 1)
  65. Ifcontains(i) $($0) in $(LanguageList)
  66. goto returnoptions
  67. else
  68. set Status = STATUS_NOLANGUAGE
  69. goto finish_ReturnOptions
  70. endif
  71. returnoptions = +
  72. set OptionList = ^(Options, 1)
  73. set OptionTextList = ^(OptionsText$($0), 1)
  74. set Status = STATUS_SUCCESSFUL
  75. finish_ReturnOptions = +
  76. Return $(Status) $(OptionList) $(OptionTextList)
  77. [InstallOption]
  78. set !DebugOutputControl = 1
  79. set Option = $($1)
  80. set SrcDir = $($2)
  81. set AddCopy = $($3)
  82. set DoCopy = $($4)
  83. set DoConfig = $($5)
  84. set LanguageList = ^(LanguagesSupported, 1)
  85. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  86. Return STATUS_NOLANGUAGE
  87. endif
  88. Debug-Output "OEMSETUP.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  89. Debug-Output "OEMSETUP.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  90. set-subst LF = "\n"
  91. read-syms GeneralConstants
  92. read-syms FileConstants
  93. read-syms DialogConstants$(!STF_LANGUAGE)
  94. ifstr(i) $(!NTN_Origination) == "NCPA"
  95. set Continue = $(OK)
  96. endif
  97. read-syms FileConstants$(!STF_LANGUAGE)
  98. detect date
  99. detect platform
  100. set-title $(FunctionTitle)
  101. set to = Begin
  102. set from = Begin
  103. set CommonStatus = STATUS_SUCCESSFUL
  104. EndWait
  105. Begin = +
  106. Ifstr(i) $(!NTN_InstallMode) == deinstall
  107. set StartLabel = removeadapter
  108. else-Ifstr(i) $(!NTN_InstallMode) == Update
  109. set StartLabel = UpgradeSoftware
  110. else-Ifstr(i) $(!NTN_InstallMode) == bind
  111. set StartLabel = bindingadapter
  112. else-Ifstr(i) $(!NTN_InstallMode) == configure
  113. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  114. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  115. Debug-Output "OEMSETUP.INF: ShellCode error: cannot get an error string."
  116. goto ShellCodeError
  117. endif
  118. set Error = $($R0)
  119. set from = end
  120. set to = end
  121. goto nonfatalinfo
  122. else
  123. set StartLabel = installadapter
  124. endif
  125. set RadioDefault = 2
  126. set RadioIn = {$(RadioDefault)}
  127. set from = $(fatal)
  128. set to = $(fatal)
  129. goto $(StartLabel)
  130. installadapter = +
  131. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  132. Ifstr $(KeyProduct) != $(KeyNull)
  133. CloseRegKey $(KeyProduct)
  134. Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  135. $(ProductVersion)
  136. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  137. Debug-Output "ShellCode error: cannot get an error string."
  138. goto ShellCodeError
  139. endif
  140. goto end
  141. endif
  142. CloseRegKey $(KeyProduct)
  143. goto installproduct
  144. installproduct = +
  145. StartWait
  146. ifint $(OldVersionExisted) == $(FALSE)
  147. Ifstr(i) $(DoCopy) == "YES"
  148. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  149. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  150. Goto ShellCodeError
  151. Else-Ifstr(i) $($R0) == STATUS_FAILED
  152. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  153. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  154. goto ShellCodeError
  155. endif
  156. set Error = $($R0)
  157. Goto fatal
  158. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  159. Goto successful
  160. Endif
  161. Set SrcDir = $($R1)
  162. Endif
  163. Shell "" StripTrailSlash $(SrcDir)
  164. set PlatformDir = $($R0)"\"$(STF_PLATFORM)
  165. set InfDir = $($R0)"\"
  166. install "Install-Option"
  167. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  168. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  169. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  170. goto ShellCodeError
  171. endif
  172. set Error = $($R0)
  173. goto fatal
  174. endif
  175. set OEM_ABANDON_ON = TRUE
  176. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  177. $(ProductSoftwareName), +
  178. $(ProductSoftwareName), +
  179. $(ProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +
  180. $(ProductSoftwareImagePath), "kernel", "PNP_TDI", {}, "",+
  181. $(NetEventDLL)
  182. set RegistryErrorIndex = $($R0)
  183. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  184. EndWait
  185. CloseRegKey $($R1)
  186. CloseRegKey $($R2)
  187. CloseRegKey $($R3)
  188. CloseRegKey $($R4)
  189. CloseRegKey $($R5)
  190. goto fatalRegistry
  191. endif
  192. Set SoftProductKey = $($R1)
  193. Set SoftNetRuleKey = $($R2)
  194. Set SoftServiceKey = $($R3)
  195. set SoftParameterKey = $($R4)
  196. Set SoftLinkageKey = $($R5)
  197. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  198. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  199. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  200. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  201. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  202. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  203. {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  204. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  205. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  206. set RegistryErrorIndex = $($R0)
  207. Ifstr $(RegistryErrorIndex) != NO_ERROR
  208. CloseRegKey $(SoftProductKey)
  209. CloseRegKey $(SoftNetRuleKey)
  210. CloseRegKey $(SoftServiceKey)
  211. CloseRegKey $(SoftParameterKey)
  212. CloseRegKey $(SoftLinkageKey)
  213. goto fatalRegistry
  214. endif
  215. ; Setup the bindings net rules
  216. set NewValueList = {{type ,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)}, +
  217. {use ,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  218. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  219. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  220. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  221. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  222. set RegistryErrorIndex = $($R0)
  223. Ifstr $(RegistryErrorIndex) != NO_ERROR
  224. CloseRegKey $(SoftProductKey)
  225. CloseRegKey $(SoftNetRuleKey)
  226. CloseRegKey $(SoftServiceKey)
  227. CloseRegKey $(SoftParameterKey)
  228. CloseRegKey $(SoftLinkageKey)
  229. goto fatalRegistry
  230. endif
  231. CloseRegKey $(SoftProductKey)
  232. CloseRegKey $(SoftNetRuleKey)
  233. CloseRegKey $(SoftServiceKey)
  234. CloseRegKey $(SoftParameterKey)
  235. CloseRegKey $(SoftLinkageKey)
  236. endif
  237. goto successful
  238. bindingadapter =+
  239. ; Set the DependOnService Key
  240. Set RegKey = $(!NTN_ServiceBase)"\AtmArpS"
  241. OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) AtmArpKey
  242. ifstr(i) $(AtmArpKey) != ""
  243. SetRegValue $(AtmArpKey) {"DependOnService",$(NoTitle),$(!REG_VT_MULTI_SZ),{"Tcpip","ATMCallManager"}}
  244. CloseRegKey $(AtmArpKey)
  245. else
  246. Debug-Output "failed to open AtmArp key"
  247. endif
  248. OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  249. ifstr(i) $(LinkageKey) != ""
  250. GetRegValue $(LinkageKey) "Bind" BindList
  251. Debug-Output "BindList: "$(BindList)
  252. Set Binding = *($(BindList),4)
  253. Debug-Output "Binding: "$(Binding)
  254. CloseRegKey $(LinkageKey)
  255. else
  256. Debug-Output "failed to open linkage for adapter"
  257. goto fatalregistry
  258. endif
  259. set CardList = {}
  260. set CreateCardList = {}
  261. ForListDo $(Binding)
  262. Split-String $($), "\", BindInfo
  263. QueryListSize BindListSize $(BindInfo)
  264. set CardName = *($(BindInfo),$(BindListSize))
  265. Debug-Output "Cardname: "$(CardName)
  266. ifstr(i) $(CardList) == {}
  267. set CardList = {$(CardName)}
  268. else
  269. set CardList = >($(CardList),$(CardName))
  270. endif
  271. EndForListDo
  272. Debug-Output "Cardlist: "$(CardList)
  273. ForListDo $(CardList)
  274. Debug-Output "ATMARPS: processing "$($)
  275. Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\AtmArpS"
  276. Debug-Output "about to open "$(RegKey)
  277. OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ArpParamsKey
  278. ifstr(i) $(ArpParamsKey) == ""
  279. Debug-Output "ATMARPS: creating ArpParamsKey key under the adapter"
  280. CreateRegKey $(!REG_H_LOCAL) {$(RegKey),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ArpParamsKey
  281. else
  282. Debug-Output "ATMARPS: Have processed "$($)" already"
  283. CloseRegKey $(ArpParamsKey)
  284. goto continueCardList
  285. endif
  286. ifstr(i) $(ArpParamsKey) == ""
  287. Debug-Output "ATMARPS: Failed to open/create the ArpParamsKey key under the adapter"
  288. goto fatalRegistry
  289. endif
  290. SetRegValue $(ArpParamsKey) {"MulticastAddresses",$(NoTitle),$(!REG_VT_MULTI_SZ),{"224.0.0.0-239.255.255.255","255.255.255.255-255.255.255.255"}}
  291. CloseRegKey $(ArpParamsKey)
  292. continueCardList = +
  293. EndForListDo
  294. goto successful
  295. removeadapter = +
  296. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  297. $(ProductSoftwareName)
  298. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  299. Debug-Output "ShellCode error"
  300. goto ShellCodeError
  301. endif
  302. set RegistryErrorIndex = $($R0)
  303. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  304. goto fatalregistry
  305. endif
  306. goto end
  307. UpgradeSoftware = +
  308. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  309. Ifstr $(KeyProduct) != $(KeyNull)
  310. install "Install-Update"
  311. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  312. goto fatal
  313. endif
  314. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  315. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  316. SetRegValue $(KeyProduct) {"Description",$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)}
  317. SetRegValue $(KeyProduct) {"Title",$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)}
  318. CloseRegKey $(KeyProduct)
  319. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(MAXIMUM_ALLOWED) ServiceKey
  320. ifstr(i) $(ServiceKey) != ""
  321. SetRegValue $(ServiceKey) {"DisplayName",$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDisplayName)}
  322. CloseRegKey $(ServiceKey)
  323. endif
  324. else
  325. goto fatalregistry
  326. endif
  327. goto end
  328. successful = +
  329. goto end
  330. warning = +
  331. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  332. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  333. goto ShellCodeError
  334. endif
  335. ifstr(i) $($R1) == "OK"
  336. goto $(to)
  337. else-ifstr(i) $($R1) == "CANCEL"
  338. goto $(from)
  339. else
  340. goto "end"
  341. endif
  342. nonfatalinfo = +
  343. Set CommonStatus = STATUS_USERCANCEL
  344. Set Severity = STATUS
  345. goto nonfatalmsg
  346. nonfatal = +
  347. Set Severity = NONFATAL
  348. goto nonfatalmsg
  349. nonfatalmsg = +
  350. ifstr(i) $(Error) == ""
  351. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  352. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  353. goto ShellCodeError
  354. endif
  355. set Error = $($R0)
  356. endif
  357. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  358. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359. goto ShellCodeError
  360. endif
  361. ifstr(i) $($R1) == "OK"
  362. goto $(from)
  363. else
  364. goto "end"
  365. endif
  366. fatalregistry = +
  367. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  368. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  369. goto ShellCodeError
  370. endif
  371. set Error = $($R0)
  372. goto fatal
  373. fatal = +
  374. ifstr(i) $(Error) == ""
  375. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  376. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  377. goto ShellCodeError
  378. endif
  379. set Error = $($R0)
  380. endif
  381. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  382. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  383. goto ShellCodeError
  384. endif
  385. goto setfailed
  386. ShellCodeError = +
  387. set DlgType = "MessageBox"
  388. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  389. set STF_MB_TEXT = $(ShellCodeErrorText)
  390. set STF_MB_TYPE = 1
  391. set STF_MB_ICON = 3
  392. set STF_MB_DEF = 1
  393. ui start "Error Message"
  394. goto setfailed
  395. setfailed = +
  396. set CommonStatus = STATUS_FAILED
  397. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  398. set OEM_ABANDON_ON = FALSE
  399. goto removeadapter
  400. endif
  401. goto end
  402. end = +
  403. goto term
  404. term = +
  405. Return $(CommonStatus)
  406. [StripTrailSlash]
  407. Split-String $($0) "\" InList
  408. QueryListSize InListSize, $(InList)
  409. Ifint $(InListSize) <= 1
  410. Return $($0)
  411. Endif
  412. Set NewString = ""
  413. ForListDo $(InList)
  414. ifint $(#) < $(InListSize)
  415. Set NewString = $(NewString)$($)
  416. else-ifstr $($) != "\"
  417. Set NewString = $(NewString)$($)
  418. endif
  419. EndForListDo
  420. Return $(NewString)
  421. [Install-Option]
  422. set STF_VITAL = ""
  423. ifstr(i) $(AddCopy) == "YES"
  424. AddSectionFilesToCopyList Files-Platform-Drivers $(PlatformDir) $(!STF_WINDOWSSYSPATH)\drivers
  425. AddSectionFilesToCopyList Files-Platform-Utils $(PlatformDir) $(!STF_WINDOWSSYSPATH)
  426. endif
  427. ifstr(i) $(DoCopy) == "YES"
  428. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  429. CopyFilesInCopyList
  430. endif
  431. ifstr(i) $(DoConfig) == "YES"
  432. endif
  433. Exit
  434. [Install-Update]
  435. set STF_VITAL = ""
  436. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  437. AddSectionFilesToCopyList Files-Platform-Drivers $(PlatformDir) $(!STF_WINDOWSSYSPATH)\drivers
  438. AddSectionFilesToCopyList Files-Platform-Utils $(PlatformDir) $(!STF_WINDOWSSYSPATH)
  439. AddSectionFilesToCopyList Files-Inf $(InfDir) $(!STF_WINDOWSSYSPATH)
  440. exit
  441. [Source Media Descriptions]
  442. 1 = "Microsoft ATM Installation Disk"
  443. [ProductType]
  444. STF_PRODUCT = Winnt
  445. [Files-Inf]
  446. 1, OEMSETUP.INF, SIZE=999, RENAME=$(!UG_Filename)
  447. [Files-Platform-Drivers]
  448. 1, ATMARPS.SYS , SIZE=999
  449. [Files-Platform-Utils]
  450. [FileConstantsENG]
  451. ProCaption = "Windows NT Setup"
  452. ProCancel = "Cancel"
  453. ProCancelMsg = "Windows NT Networking is not correctly installed. "+
  454. "Are you sure you want to cancel copying files?"
  455. ProCancelCap = "Network Setup Message"
  456. ProText1 = "Copying:"
  457. ProText2 = "To:"
  458. FunctionTitle = "IP over ATM (RFC 1577) Server"
  459. ProductSoftwareDescription = "IP over ATM Server"
  460. ProductSoftwareDisplayName = "IP over ATM Server"
  461. ProductSoftwareTitle = "IP over ATM Server"
  462. ShellCodeErrorTitle = "Error: "$(FunctionTitle)
  463. ShellCodeErrorText = "Shell Code Error."
  464. [DialogConstantsENG]
  465. Help = "&Help"
  466. Exit = "Cancel"
  467. OK = "OK"
  468. HelpContext = ""
  469. Continue = "Continue"
  470. Cancel = "Cancel"