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.

1867 lines
77 KiB

  1. [Identification]
  2. OptionType = NetTransport
  3. [Options]
  4. TC
  5. [FileConstants]
  6. Manufacturer = "Microsoft"
  7. ProductMajorVersion = "4"
  8. ProductMinorVersion = "0"
  9. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  10. NetBTEventDLL = "%SystemRoot%\System32\netevent.dll"
  11. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  12. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  13. Sockmaxlength = 16
  14. Sockminlength = 16
  15. ProductDHCPName = "DHCP"
  16. ProductDHCPImagePath = "%SystemRoot%\System32\services.exe"
  17. ProductDHCPSvcType = "autoserviceshare"
  18. ProductNETBTName = "NetBT"
  19. ProductNETBTImagePath = "%SystemRoot%\System32\drivers\netbt.sys"
  20. ProductNETBTSvcType = "kernel"
  21. NetRuleNETBTType = "netbt netBiosTransport netbtTransport"
  22. NetRuleNETBTClass = {"netbtTransport netBiosTransport"}
  23. NetRuleNETBTUse = $(SoftwareType)" none none"
  24. NetRuleNETBTBindForm = """NetBT"" yes yes simple"
  25. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  26. ; LmHosts
  27. ProductLMHOSTSName = "LmHosts"
  28. ProductLMHOSTSImagePath = "%SystemRoot%\System32\services.exe"
  29. ProductTCName = "Tcpip"
  30. ProviderName = $(ProductTCName)
  31. Winsock20Provider = "%SystemRoot%\System32\rnr20.dll"
  32. Winsock11Provider = "%SystemRoot%\System32\wsock32.dll"
  33. ProductProviderGUID = "{22059d40-7e9e-11cf-ae5a-00aa00a7112b}"
  34. ProductProviderNameSpaces = 12 ;NS_DNS
  35. ; LDAP provider variables
  36. LDAPWinsock20Provider = "%SystemRoot%\System32\winrnr.dll"
  37. LDAPProviderNameSpaces = 32
  38. LDAPProviderGUID = "{3b2637ee-e580-11cf-a555-00c04fd8d4ac}"
  39. ProductTCImagePath = "\SystemRoot\System32\drivers\tcpip.sys"
  40. ProductTCWshDllPath = "%SystemRoot%\System32\wshtcpip.dll"
  41. ProductTCSvcType = "kernel"
  42. NetRuleTCType = "tcpip tcpipTransport"
  43. NetRuleTCUse = $(SoftwareType)" none none"
  44. NetRuleTCBindForm = """Tcpip"" yes yes container"
  45. NetRuleTCBindable = {"tcpipService tcpipTransport non exclusive 100","tcpipTransport ndisDriver non non 100"}
  46. NetRuleTCClass = {"tcpipTransport basic","tcpipService basic yes"}
  47. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  48. ProductTCKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductTCName)"\CurrentVersion"
  49. TCNetRuleKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\Tcpip\CurrentVersion\NetRules"
  50. NetBTNetRuleKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NetBT\CurrentVersion\NetRules"
  51. OldProductKeyName = $(!NTN_ServiceBase)"\Tcpip\Parameters"
  52. LinkageKeyName = $(!NTN_ServiceBase)"\Tcpip\Linkage"
  53. ParametersKeyName = $(!NTN_ServiceBase)"\Tcpip\Parameters"
  54. ServiceTCKeyName = $(!NTN_ServiceBase)"\Tcpip"
  55. ServiceKeyName = $(!NTN_ServiceBase)
  56. NetBTLinkageKeyName = $(!NTN_ServiceBase)"\NetBT\Linkage"
  57. AdaptersKeyName = $(!NTN_ServiceBase)"\NetBT\Adapters"
  58. PerformanceName = $(!NTN_ServiceBase)"\NetBT\Performance"
  59. NetBTParamKeyName = $(!NTN_ServiceBase)"\NetBT\Parameters"
  60. DosDevices = "SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices"
  61. [GeneralConstants]
  62. UtilityInf = "UTILITY.INF"
  63. subroutineinf = "SUBROUTN.INF"
  64. IPINFOINF = "ipinfo.inf"
  65. SoftwareType = "transport"
  66. Exit_Code = 0
  67. BillboardVisible = 0
  68. from = ""
  69. to = ""
  70. ExitCodeOk = 0
  71. ExitCodeCancel = 1
  72. ExitCodeFatal = 2
  73. KeyNull = ""
  74. MAXIMUM_ALLOWED = 33554432
  75. SERVICE_NO_CHANGE = 4294967295
  76. RegistryErrorIndex = NO_ERROR
  77. KeyProduct = ""
  78. KeyParameters = ""
  79. TRUE = 1
  80. FALSE = 0
  81. NoTitle = 0
  82. ExitState = "Active"
  83. OldVersionExisted = $(FALSE)
  84. DriverPath = $(!STF_NTPATH)\drivers
  85. [date]
  86. Now = {} ? $(!LIBHANDLE) GetSystemDate
  87. [Identify]
  88. read-syms Identification
  89. set Status = STATUS_SUCCESSFUL
  90. set Identifier = $(OptionType)
  91. set Media = #("Source Media Descriptions", 1, 1)
  92. Return $(Status) $(Identifier) $(Media)
  93. [ReturnOptions]
  94. set Status = STATUS_FAILED
  95. set OptionList = {}
  96. set OptionTextList = {}
  97. set LanguageList = ^(LanguagesSupported, 1)
  98. Ifcontains(i) $($0) in $(LanguageList)
  99. goto returnoptions
  100. else
  101. set Status = STATUS_NOLANGUAGE
  102. goto finish_ReturnOptions
  103. endif
  104. returnoptions = +
  105. set OptionList = ^(Options, 1)
  106. set OptionTextList = ^(OptionsText$($0), 1)
  107. set Status = STATUS_SUCCESSFUL
  108. finish_ReturnOptions = +
  109. Return $(Status) $(OptionList) $(OptionTextList)
  110. [InstallOption]
  111. set Option = $($1)
  112. set SrcDir = $($2)
  113. set AddCopy = $($3)
  114. set DoCopy = $($4)
  115. set DoConfig = $($5)
  116. set InstallFromRas = $($6)
  117. set EnableDHCPFlag = $($7)
  118. set InstallList = $($8)
  119. ifstr(i) $(EnableDHCPFlag) == ""
  120. set EnableDHCPFlag = 0
  121. endif
  122. ifstr(i) $(InstallList) == ""
  123. set InstallList = {"1","1","0","0","0","0","0","0"}
  124. endif
  125. set LanguageList = ^(LanguagesSupported, 1)
  126. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  127. Return STATUS_NOLANGUAGE
  128. endif
  129. Debug-Output "OEMNXPTC.INF: STF_CWDIR is: "$(!STF_CWDIR)
  130. Debug-Output "OEMNXPTC.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  131. set-subst LF = "\n"
  132. read-syms GeneralConstants
  133. read-syms FileConstants
  134. read-syms DialogConstants$(!STF_LANGUAGE)
  135. LoadLibrary "x" $(!STF_CWDDIR)\tcpcfg.dll !TCPCFG_HANDLE
  136. ifstr(i) $(!NTN_Origination) == "NCPA"
  137. set Continue = $(OK)
  138. endif
  139. read-syms FileConstants$(!STF_LANGUAGE)
  140. detect date
  141. set-title $(FunctionTitle)
  142. set to = Begin
  143. set from = Begin
  144. set CommonStatus = STATUS_SUCCESSFUL
  145. EndWait
  146. Begin = +
  147. Ifstr(i) $(!NTN_InstallMode) == deinstall
  148. set StartLabel = removeadapter
  149. set OEM_ABANDON_OPTIONS = {+
  150. $(ProductDHCPName),+
  151. $(ProductLMHOSTSName)}
  152. set OEM_ABANDON_SOFTWARE = {+
  153. $(ProductTCName),+
  154. $(ProductNETBTName)}
  155. else-Ifstr(i) $(!NTN_InstallMode) == Update
  156. set StartLabel = UpgradeSoftware
  157. else-Ifstr(i) $(!NTN_InstallMode) == configure
  158. set IPAddressList = {}
  159. set SubnetMaskList = {}
  160. set StartLabel = configureadapter
  161. else-Ifstr(i) $(!NTN_InstallMode) == bind
  162. set StartLabel = bindingadapter
  163. else
  164. set StartLabel = installadapter
  165. set OEM_ABANDON_SOFTWARE = {}
  166. set OEM_ABANDON_OPTIONS = {}
  167. endif
  168. set from = $(fatal)
  169. set to = $(fatal)
  170. goto $(StartLabel)
  171. installadapter = +
  172. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  173. Debug-Output "OEMNXPTC.INF: Back from opening key for the product"
  174. ;
  175. ;----- If the key is already there, then tell the user that the
  176. ; product is already installed.
  177. ;
  178. Ifstr $(KeyProduct) != $(KeyNull)
  179. CloseRegKey $(KeyProduct)
  180. Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  181. $(ProductVersion)
  182. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  183. Debug-Output "OEMNXPTC.INF: ShellCode error: cannot get an error string."
  184. goto ShellCodeError
  185. endif
  186. set CommonStatus = STATUS_USERCANCEL
  187. goto end
  188. endif
  189. Shell "" GetFilesSize
  190. set SizeList = $($R0)
  191. set OptionFileList = { "oemnsvcu.inf"}
  192. set TcpOptionList = { "TCPIPCU"}
  193. ForListDo $(OptionFileList)
  194. Shell $($) GetFilesSize
  195. ifstr(i) $($R0) == ""
  196. set Size = "0"
  197. else
  198. set Size = $($R0)
  199. endif
  200. set SizeList = $(SizeList)"@"$(Size)
  201. EndForListDo
  202. set ErrorCode = "0"
  203. set fCancel = 1
  204. set AllInstalledFlag = "0"
  205. ; always install the simple utilities
  206. set InstallList = "1"
  207. ; ask the user for DHCP or static IP address
  208. Ifstr(i) $(!STF_GUI_UNATTENDED) == YES
  209. OpenRegKey $(!REG_H_LOCAL) "" "System\Setup" $(MAXIMUM_ALLOWED) KeySetup
  210. ifstr(i) $(KeySetup) != ""
  211. DeleteRegTree $(KeySetup) "Tcpip"
  212. CreateRegKey $(KeySetup) {"Tcpip",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyTcpip
  213. ifstr(i) $(KeyTcpip) != ""
  214. SetRegValue $(KeyTcpip) {"GuiUnattended",$(NoTitle),$(!REG_VT_SZ),$(!STF_GUI_UNATTENDED)}
  215. SetRegValue $(KeyTcpip) {"Unattended",$(NoTitle),$(!REG_VT_SZ),$(!STF_UNATTENDED)}
  216. SetRegValue $(KeyTcpip) {"UnattendedSection",$(NoTitle),$(!REG_VT_SZ),$(!STF_UNATTENDED_SECTION)}
  217. CloseRegKey $(KeyTcpip)
  218. endif
  219. CloseRegKey $(KeySetup)
  220. endif
  221. else-ifstr(i) $(InstallFromRas) == "YES"
  222. else
  223. read-syms DHCPDialog
  224. ui start "Warning"
  225. ifstr(i) $(DLGEVENT) == "YES"
  226. set EnableDHCPFlag = "1"
  227. else
  228. set EnableDHCPFlag = "0"
  229. endif
  230. endif
  231. Ifcontains(i) "1" in $(InstallList)
  232. ifstr(i) $(!NTN_InstallMode) == "install"
  233. Ifstr(i) $(DoCopy) == "YES"
  234. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  235. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  236. Goto ShellCodeError
  237. Else-Ifstr(i) $($R0) == STATUS_FAILED
  238. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  239. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  240. goto ShellCodeError
  241. endif
  242. set Error = $($R0)
  243. Goto fatal
  244. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  245. Goto successful
  246. Endif
  247. Set SrcDir = $($R1)
  248. Endif
  249. EndIf
  250. Endif
  251. ;
  252. ; install common utilities(ftp, rcp)
  253. ;
  254. Shell "oemnsvcu.inf" "InstallOption" +
  255. $(!STF_LANGUAGE) "TCPIPCU" +
  256. $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  257. ;
  258. ; Do DHCP stuff
  259. ;
  260. ifstr(i) $(!NTN_InstallMode) == "install"
  261. Debug-Output "OEMNXPTC.INF: installadapter: installing [Install-Option]"
  262. install "Install-Option"
  263. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  264. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  265. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  266. goto ShellCodeError
  267. endif
  268. set Error = $($R0)
  269. goto fatal
  270. endif
  271. endif
  272. set OEM_ABANDON_ON = TRUE
  273. read-syms Billboard1$(!STF_LANGUAGE)
  274. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  275. Set BillboardVisible = 1
  276. set DoTC = FALSE
  277. Set DoLMHOSTS = FALSE
  278. Set DoNbt = FALSE
  279. Set DoAFD = FALSE
  280. Set DoDHCP = FALSE
  281. Ifstr(i) $(Option) == TC
  282. set DoTC = TRUE
  283. Set DoLMHOSTS = TRUE
  284. Set DoNbt = TRUE
  285. Set DoAFD = TRUE
  286. Set DoDHCP = TRUE
  287. Else
  288. Debug-Output "OEMNXPTC.INF: Unrecognized option"
  289. Endif
  290. StartWait
  291. Ifstr(i) $(DoLMHOSTS) == TRUE
  292. ;
  293. ; Install LmHosts registry
  294. ;
  295. Debug-Output "OEMNXPTC.INF: Install LmHosts registry"
  296. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductLMHOSTSName))
  297. Shell $(UtilityInf), CreateService, $(ProductLMHOSTSName), +
  298. $(ProductLMHOSTSDisplayName), $(ProductLMHOSTSImagePath), +
  299. "autoserviceshare", "", {"+NetworkProvider"}, "LocalSystem",+
  300. $(NetEventDLL)
  301. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  302. Debug-Output "OEMNXPTC.INF: ShellCode error"
  303. goto ShellCodeError
  304. endif
  305. set RegistryErrorIndex = $($R0)
  306. CloseRegKey $($R1)
  307. CloseRegKey $($R2)
  308. CloseRegKey $($R3)
  309. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  310. EndWait
  311. Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  312. goto fatalregistry
  313. endif
  314. endif
  315. ifstr(i) $(DoDHCP) == TRUE
  316. Set ThisOption = DHCP
  317. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(Product$(ThisOption)Name))
  318. Debug-Output "OEMNXPTC.INF: installing DHCP..."
  319. ifint $(EnableDHCPFlag) == 0
  320. set ProductDHCPSvcType = serviceshare
  321. endif
  322. Shell $(UtilityInf), CreateService, $(Product$(ThisOption)Name),+
  323. $(Product$(ThisOption)DisplayName),+
  324. $(Product$(ThisOption)ImagePath),+
  325. $(Product$(ThisOption)SvcType), "TDI", {"Tcpip","Afd","NetBT"}, "",+
  326. "%SystemRoot%\System32\dhcpcsvc.dll", 7, "", "", "",+
  327. "%SystemRoot%\System32\kernel32.dll"
  328. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  329. Debug-Output "OEMNXPTC.INF: ShellCode error"
  330. goto ShellCodeError
  331. endif
  332. set RegistryErrorIndex = $($R0)
  333. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  334. EndWait
  335. Debug-Output "OEMNXPTC.INF: Registry error: Create Service components"
  336. CloseRegKey $($R1)
  337. CloseRegKey $($R2)
  338. CloseRegKey $($R3)
  339. goto fatalregistry
  340. endif
  341. CloseRegKey $($R1)
  342. Set DhcpParameterKey = $($R2)
  343. CloseRegKey $($R3)
  344. CreateRegKey $(DhcpParameterKey) {"Options",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyOptions
  345. ;
  346. ; Key 1
  347. ;
  348. CreateRegKey $(KeyOptions) {"1",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key1
  349. Shell $(UtilityInf) AddValueList, $(Key1),+
  350. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\?\Parameters\Tcpip\DhcpSubnetMaskOpt"},+
  351. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_MULTI_SZ)}}
  352. CloseRegKey $(Key1)
  353. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  354. Debug-Output "OEMNXPTC.INF: ShellCode error"
  355. goto ShellCodeError
  356. endif
  357. ;
  358. ; Key 3
  359. ;
  360. CreateRegKey $(KeyOptions) {"3",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key3
  361. Shell $(UtilityInf) AddValueList, $(Key3),+
  362. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\?\Parameters\Tcpip\DhcpDefaultGateway"},+
  363. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_MULTI_SZ)}}
  364. CloseRegKey $(Key3)
  365. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  366. Debug-Output "OEMNXPTC.INF: ShellCode error"
  367. goto ShellCodeError
  368. endif
  369. ;
  370. ; Key 6
  371. ;
  372. CreateRegKey $(KeyOptions) {"6",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key6
  373. Shell $(UtilityInf) AddValueList, $(Key6),+
  374. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\Tcpip\Parameters\DhcpNameServer"},+
  375. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  376. CloseRegKey $(Key6)
  377. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  378. Debug-Output "OEMNXPTC.INF: ShellCode error"
  379. goto ShellCodeError
  380. endif
  381. ;
  382. ; Key 15
  383. ;
  384. CreateRegKey $(KeyOptions) {"15",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key15
  385. Shell $(UtilityInf) AddValueList, $(Key15),+
  386. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\Tcpip\Parameters\DhcpDomain"},+
  387. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  388. CloseRegKey $(Key15)
  389. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  390. Debug-Output "OEMNXPTC.INF: ShellCode error"
  391. goto ShellCodeError
  392. endif
  393. ;
  394. ; Key 44
  395. ;
  396. CreateRegKey $(KeyOptions) {"44",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key44
  397. Shell $(UtilityInf) AddValueList, $(Key44),+
  398. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\NetBT\Adapters\?\DhcpNameServer"},+
  399. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  400. CloseRegKey $(Key44)
  401. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  402. Debug-Output "OEMNXPTC.INF: ShellCode error"
  403. goto ShellCodeError
  404. endif
  405. ;
  406. ; Key 46
  407. ;
  408. CreateRegKey $(KeyOptions) {"46",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key46
  409. Shell $(UtilityInf) AddValueList, $(Key46),+
  410. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\NetBT\Parameters\DhcpNodeType"},+
  411. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_DWORD)}}
  412. CloseRegKey $(Key46)
  413. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  414. Debug-Output "OEMNXPTC.INF: ShellCode error"
  415. goto ShellCodeError
  416. endif
  417. ;
  418. ; Key 47
  419. ;
  420. CreateRegKey $(KeyOptions) {"47",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key47
  421. Shell $(UtilityInf) AddValueList, $(Key47),+
  422. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\NetBT\Parameters\DhcpScopeID"},+
  423. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  424. CloseRegKey $(Key47)
  425. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  426. Debug-Output "OEMNXPTC.INF: ShellCode error"
  427. goto ShellCodeError
  428. endif
  429. set RegistryErrorIndex = $($R0)
  430. CloseRegKey $(KeyOptions)
  431. CloseRegKey $(DhcpParameterKey)
  432. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  433. EndWait
  434. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  435. goto fatalregistry
  436. endif
  437. endif
  438. ifstr(i) $(DoTC) == TRUE
  439. set ThisOption = "TC"
  440. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductTCName))
  441. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  442. $(Product$(ThisOption)Name),+
  443. $(Product$(ThisOption)Name),+
  444. $(Product$(ThisOption)DisplayName), $(STF_CONTEXTINFNAME),+
  445. $(Product$(ThisOption)ImagePath),+
  446. $(Product$(ThisOption)SvcType),+
  447. "PNP_TDI", {}, "", $(NetEventDLL)
  448. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  449. Debug-Output "OEMNXPTC.INF: ShellCode error, add software component"
  450. goto ShellCodeError
  451. endif
  452. set RegistryErrorIndex = $($R0)
  453. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  454. EndWait
  455. Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  456. CloseRegKey $($R1)
  457. CloseRegKey $($R2)
  458. CloseRegKey $($R3)
  459. CloseRegKey $($R4)
  460. CloseRegKey $($R5)
  461. goto fatalregistry
  462. endif
  463. Set TcpVersKeyHandle = $($R1)
  464. Set TcpRulesKeyHandle = $($R2)
  465. Set TcpSvcKeyHandle = $($R3)
  466. Set TcpParmKeyHandle = $($R4)
  467. Set TcpLinkageHandle = $($R5)
  468. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  469. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  470. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  471. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  472. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  473. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  474. {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  475. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  476. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  477. Shell $(UtilityInf), AddValueList, $(TcpVersKeyHandle), $(NewValueList)
  478. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  479. Debug-Output "OEMNXPTC.INF: ShellCode error, add value list"
  480. goto ShellCodeError
  481. endif
  482. set RegistryErrorIndex = $($R0)
  483. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  484. EndWait
  485. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  486. CloseRegKey $(TcpVersKeyHandle)
  487. CloseRegKey $(TcpRulesKeyHandle)
  488. CloseRegKey $(TcpSvcKeyHandle)
  489. CloseRegKey $(TcpParmKeyHandle)
  490. CloseRegkey $(TcpLinkageHandle)
  491. goto fatalregistry
  492. Endif
  493. ;
  494. ; add new PersistentRoutes Key
  495. ;
  496. CreateRegKey $(TcpParmKeyHandle) {"PersistentRoutes",$(NoTitle),GenericClass} "" +
  497. $(MAXIMUM_ALLOWED) "" KeyPersistentRoutes
  498. CloseRegKey $(KeyPersistentRoutes)
  499. CreateRegKey $(TcpSvcKeyHandle) {"Performance",$(NoTitle),GenericClass} "" +
  500. $(MAXIMUM_ALLOWED) "" KeyPerformance
  501. set NewValueList = {{Library,$(NoTitle),$(!REG_VT_SZ),"Perfctrs.dll"},+
  502. {Open,$(NoTitle),$(!REG_VT_SZ),"OpenTcpIpPerformanceData"},+
  503. {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectTcpIpPerformanceData"},+
  504. {Close,$(NoTitle),$(!REG_VT_SZ),"CloseTcpIpPerformanceData"}}
  505. Shell $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  506. set RegistryErrorIndex = $($R0)
  507. CloseRegKey $(KeyPerformance)
  508. Ifstr $(RegistryErrorIndex) != NO_ERROR
  509. EndWait
  510. Debug-Output "OEMNXPTC.INF: Registry error: add performance info."
  511. CloseRegKey $(TcpVersKeyHandle)
  512. CloseRegKey $(TcpRulesKeyHandle)
  513. CloseRegKey $(TcpSvcKeyHandle)
  514. CloseRegKey $(TcpParmKeyHandle)
  515. CloseRegkey $(TcpLinkageHandle)
  516. goto fatalregistry
  517. Endif
  518. CreateRegKey $(TcpSvcKeyHandle) {"ServiceProvider",$(NoTitle),GenericClass} "" +
  519. $(MAXIMUM_ALLOWED) "" KeyNetworkProvider
  520. set NewValueList = {{Class,$(NoTitle),$(!REG_VT_DWORD),8},+
  521. {DnsPriority,$(NoTitle),$(!REG_VT_DWORD),2000},+
  522. {HostsPriority,$(NoTitle),$(!REG_VT_DWORD),500},+
  523. {LocalPriority,$(NoTitle),$(!REG_VT_DWORD),499},+
  524. {ProviderPath,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(Winsock11Provider)},+
  525. {NetbtPriority,$(NoTitle),$(!REG_VT_DWORD),2001}}
  526. Shell $(UtilityInf), AddValueList, $(KeyNetworkProvider), $(NewValueList)
  527. set RegistryErrorIndex = $($R0)
  528. CloseRegKey $(KeyNetworkProvider)
  529. Ifstr $(RegistryErrorIndex) != NO_ERROR
  530. EndWait
  531. Debug-Output "OEMNXPTC.INF: Registry error: add performance info."
  532. CloseRegKey $(TcpVersKeyHandle)
  533. CloseRegKey $(TcpRulesKeyHandle)
  534. CloseRegKey $(TcpSvcKeyHandle)
  535. CloseRegKey $(TcpParmKeyHandle)
  536. CloseRegkey $(TcpLinkageHandle)
  537. goto fatalregistry
  538. Endif
  539. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  540. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  541. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  542. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Bindable)},+
  543. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)},+
  544. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  545. Shell $(UtilityInf), AddValueList, $(TcpRulesKeyHandle), $(NewValueList)
  546. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  547. Debug-Output "OEMNXPTC.INF: ShellCode error."
  548. goto ShellCodeError
  549. endif
  550. set RegistryErrorIndex = $($R0)
  551. CloseRegKey $(TcpVersKeyHandle)
  552. CloseRegKey $(TcpRulesKeyHandle)
  553. LibraryProcedure ResultHostname $(!TCPCFG_HANDLE), ConvertHostname $(!STF_COMPUTERNAME)
  554. set NewValueList = {{EnableDHCP,$(NoTitle),$(!REG_VT_DWORD),$(EnableDHCPFlag)},+
  555. {DataBasePath,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\System32\drivers\etc"},+
  556. {Domain,$(NoTitle),$(!REG_VT_SZ),""},+
  557. {Hostname,$(NoTitle),$(!REG_VT_SZ),$(ResultHostname)},+
  558. {NameServer,$(NoTitle),$(!REG_VT_SZ),""},+
  559. {ForwardBroadcasts,$(NoTitle),$(!REG_VT_DWORD),0},+
  560. {IPEnableRouter,$(NoTitle),$(!REG_VT_DWORD),0},+
  561. {SearchList,$(NoTitle),$(!REG_VT_SZ),""}}
  562. Shell $(UtilityInf), AddValueList, $(TcpParmKeyHandle), $(NewValueList)
  563. CloseRegKey $(TcpParmKeyHandle)
  564. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  565. CloseRegKey $(TcpLinkageHandle)
  566. CloseRegKey $(TcpSvcKeyHandle)
  567. EndWait
  568. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  569. goto fatalregistry
  570. endif
  571. Shell $(UtilityInf) AddRpcProtocol "ncacn_ip_tcp" "rpclt1.dll" "rpclt1.dll"
  572. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  573. Debug-Output "OEMNXPTC.INF: ShellCode error adding RPC procotol"
  574. goto ShellCodeError
  575. Endif
  576. Set RegistryErrorIndex = $($R0)
  577. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  578. Debug-Output "OEMNXPTC.INF: ERROR adding RPC protocol data"
  579. EndWait
  580. goto fatalregistry
  581. Endif
  582. Shell $(UtilityInf) AddRpcProtocol "ncadg_ip_udp" "rpclt1.dll" "rpclt1.dll"
  583. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  584. Debug-Output "OEMNXPTC.INF: ShellCode error adding RPC procotol"
  585. goto ShellCodeError
  586. Endif
  587. Set RegistryErrorIndex = $($R0)
  588. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  589. Debug-Output "OEMNXPTC.INF: ERROR adding RPC protocol data"
  590. EndWait
  591. goto fatalregistry
  592. Endif
  593. Shell $(UtilityInf) AddMixRpcProtocol "Netbios" "tcpip" "ncacn_nb_tcp" "rpclt1.dll" "rpclt1.dll"
  594. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  595. Debug-Output "OEMNXPTC.INF: ShellCode error adding RPC procotol (2)"
  596. goto ShellCodeError
  597. endif
  598. Set RegistryErrorIndex = $($R0)
  599. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  600. Debug-Output "OEMNXPTC.INF: ERROR adding RPC protocol data (2)"
  601. EndWait
  602. goto fatalregistry
  603. Endif
  604. Shell $(UtilityInf), AddWinsockInfo, +
  605. $(Product$(ThisOption)Name), +
  606. $(Product$(ThisOption)WshDllPath), +
  607. $(Sockmaxlength),$(Sockminlength)
  608. set RegistryErrorIndex = $($R0)
  609. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  610. Debug-Output "OEMNXPTC.INF: Registry error: Add Winsock Info."
  611. Endif
  612. endif
  613. Ifstr(i) $(DoNbt) == TRUE
  614. Set ThisOption = NETBT
  615. Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  616. Debug-Output "OEMNXPTC.INF: installing NETBT..."
  617. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  618. $(Product$(ThisOption)Name),+
  619. $(Product$(ThisOption)Name),+
  620. $(Product$(ThisOption)DisplayName), $(STF_CONTEXTINFNAME),+
  621. $(Product$(ThisOption)ImagePath), $(Product$(ThisOption)SvcType), "PNP_TDI", {"Tcpip"}, "", $(NetBTEventDLL)
  622. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  623. Debug-Output "OEMNXPTC.INF: ShellCode error"
  624. goto ShellCodeError
  625. endif
  626. set RegistryErrorIndex = $($R0)
  627. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  628. EndWait
  629. Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  630. CloseRegKey $($R1)
  631. CloseRegKey $($R2)
  632. CloseRegKey $($R3)
  633. CloseRegKey $($R4)
  634. CloseRegKey $($R5)
  635. goto fatalregistry
  636. endif
  637. Set NBTProductKey = $($R1)
  638. Set NBTNetRuleKey = $($R2)
  639. Set NBTServiceKey = $($R3)
  640. Set NBTParameterKey = $($R4)
  641. Set NBTLinkageKey = $($R5)
  642. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  643. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  644. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  645. {Hidden,0,$(!REG_VT_DWORD),1},+
  646. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  647. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  648. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  649. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  650. ;
  651. ; Hack. Remove review binding for netbt and let
  652. ; tcp handle it.
  653. ;
  654. ;{Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  655. Shell $(UtilityInf), AddValueList, $(NBTProductKey), $(NewValueList)
  656. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  657. Debug-Output "OEMNXPTC.INF: ShellCode error."
  658. goto ShellCodeError
  659. endif
  660. set RegistryErrorIndex = $($R0)
  661. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  662. EndWait
  663. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  664. CloseRegKey $(NBTProductKey)
  665. CloseRegKey $(NBTNetRuleKey)
  666. CloseRegKey $(NBTServiceKey)
  667. CloseRegKey $(NBTParameterKey)
  668. CloseRegKey $(NBTLinkageKey)
  669. goto fatalregistry
  670. endif
  671. set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"Tcpip"}}}
  672. Shell $(UtilityInf), AddValueList, $(NBTLinkageKey), $(NewValueList)
  673. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  674. Debug-Output "OEMNXPTC.INF: ShellCode error."
  675. goto ShellCodeError
  676. endif
  677. set RegistryErrorIndex = $($R0)
  678. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  679. EndWait
  680. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  681. CloseRegKey $(NBTProductKey)
  682. CloseRegKey $(NBTNetRuleKey)
  683. CloseRegKey $(NBTServiceKey)
  684. CloseRegKey $(NBTParameterKey)
  685. CloseRegKey $(NBTLinkageKey)
  686. goto fatalregistry
  687. endif
  688. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  689. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  690. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  691. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)},+
  692. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  693. Shell $(UtilityInf), AddValueList, $(NBTNetRuleKey), $(NewValueList)
  694. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  695. Debug-Output "OEMNXPTC.INF: ShellCode error."
  696. goto ShellCodeError
  697. endif
  698. set RegistryErrorIndex = $($R0)
  699. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  700. EndWait
  701. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  702. CloseRegKey $(NBTProductKey)
  703. CloseRegKey $(NBTNetRuleKey)
  704. CloseRegKey $(NBTServiceKey)
  705. CloseRegKey $(NBTParameterKey)
  706. CloseRegKey $(NBTLinkageKey)
  707. goto fatalregistry
  708. endif
  709. Set NewValueList = {{NbProvider,$(NoTitle),$(!REG_VT_SZ),"_tcp"},+
  710. {NameServerPort,$(NoTitle),$(!REG_VT_DWORD),137},+
  711. {EnableLMHOSTS,$(NoTitle),$(!REG_VT_DWORD),1},+
  712. {EnableProxy,$(NoTitle),$(!REG_VT_DWORD),0},+
  713. {EnableDNS,$(NoTitle),$(!REG_VT_DWORD),0},+
  714. {CacheTimeout,$(NoTitle),$(!REG_VT_DWORD),600000},+
  715. {BcastNameQueryCount,$(NoTitle),$(!REG_VT_DWORD),3},+
  716. {BcastQueryTimeout,$(NoTitle),$(!REG_VT_DWORD),750},+
  717. {NameSrvQueryCount,$(NoTitle),$(!REG_VT_DWORD),3},+
  718. {NameSrvQueryTimeout,$(NoTitle),$(!REG_VT_DWORD),1500},+
  719. {Size/Small/Medium/Large,$(NoTitle),$(!REG_VT_DWORD),1},+
  720. {SessionKeepAlive,$(NoTitle),$(!REG_VT_DWORD),3600000},+
  721. {ScopeID,$(NoTitle),$(!REG_VT_SZ),""},+
  722. {TransportBindName,$(NoTitle),$(!REG_VT_SZ),"\Device\"},+
  723. }
  724. Shell $(UtilityInf), AddValueList, $(NBTParameterKey), $(NewValueList)
  725. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  726. Debug-Output "OEMNXPTC.INF: ShellCode error."
  727. goto ShellCodeError
  728. Endif
  729. set RegistryErrorIndex = $($R0)
  730. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  731. EndWait
  732. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  733. CloseRegKey $(NBTProductKey)
  734. CloseRegKey $(NBTNetRuleKey)
  735. CloseRegKey $(NBTServiceKey)
  736. CloseRegKey $(NBTParameterKey)
  737. CloseRegKey $(NBTLinkageKey)
  738. goto fatalregistry
  739. endif
  740. CreateRegKey $(NBTServiceKey) {"Adapters",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" AdaptersKey
  741. CloseRegKey $(AdaptersKey)
  742. set RegistryErrorIndex = $($R0)
  743. CloseRegKey $(NBTProductKey)
  744. CloseRegKey $(NBTNetRuleKey)
  745. CloseRegKey $(NBTServiceKey)
  746. CloseRegKey $(NBTParameterKey)
  747. CloseRegKey $(NBTLinkageKey)
  748. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  749. EndWait
  750. Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  751. goto fatalregistry
  752. endif
  753. Endif
  754. Ifstr(i) $(DoAFD) == TRUE
  755. Shell $(UtilityInf) AddAFD
  756. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Afd" $(MAXIMUM_ALLOWED) AfdKey
  757. ifstr(i) $(AfdKey) != ""
  758. GetRegValue $(AfdKey) "DependOnGroup" GroupList
  759. debug-output "DependOnGroup:"$(GroupList)
  760. set GroupValues = *($(GroupList),4)
  761. debug-output "DependOnGroup:"$(GroupValues)
  762. set NewGroupValues = {}
  763. ForListDo $(GroupValues)
  764. ifstr(i) $($) != "TDI"
  765. ifstr(i) $(NewGroupValues) == {}
  766. Set NewGroupValues = {$($)}
  767. else
  768. Set NewGroupValues = >($(NewGroupValues), $($))
  769. endif
  770. endif
  771. EndForListDo
  772. SetRegValue $(AfdKey) {"DependOnGroup",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NewGroupValues)}
  773. CloseRegKey $(AfdKey)
  774. endif
  775. Endif
  776. ;
  777. ; Add Name Space Provider
  778. ;
  779. Shell $(UtilityInf), AddNameSpaceProvider, +
  780. $(ProviderDisplayName), +
  781. $(Winsock20Provider), +
  782. $(ProductProviderNameSpaces), +
  783. FALSE, +
  784. $(ProductProviderGUID)
  785. set RegistryErrorIndex = $($R0)
  786. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  787. EndWait
  788. Debug-Output "OEMNXPTC.INF: Registry error: add name space provider"
  789. goto fatalregistry
  790. endif
  791. ;
  792. ; Add LDAP Namespace provider
  793. ;
  794. Shell $(UtilityInf), AddNameSpaceProvider, +
  795. $(LDAPProviderDisplayName), +
  796. $(LDAPWinsock20Provider), +
  797. $(LDAPProviderNameSpaces), +
  798. FALSE, +
  799. $(LDAPProviderGUID)
  800. set RegistryErrorIndex = $($R0)
  801. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  802. EndWait
  803. Debug-Output "OEMNXPTC.INF: Registry error: add name space provider"
  804. goto fatalregistry
  805. endif
  806. Shell $(UtilityInf), AddServiceProvider, $(ProviderName), +
  807. $(Winsock11Provider), $(ProviderDisplayName), 8
  808. set RegistryErrorIndex = $($R0)
  809. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  810. EndWait
  811. Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  812. goto fatalregistry
  813. endif
  814. ;
  815. ; Display rebind ras message
  816. ;
  817. ifstr(i) $(!STF_GUI_UNATTENDED) != YES
  818. ifstr(i) $(InstallFromRas) != "YES"
  819. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\RASMan" $(MAXIMUM_ALLOWED) RASKey
  820. ifstr(i) $(RASKey) != ""
  821. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(RASRebindError)
  822. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  823. goto ShellCodeError
  824. endif
  825. CloseRegKey $(RASKey)
  826. ifstr(i) $($R1) == "OK"
  827. set SaveNTN_InstallMode = $(!NTN_InstallMode)
  828. set !NTN_InstallMode = configure
  829. ; now invoke RAS setup to do the right thing
  830. Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  831. set !NTN_InstallMode = $(SaveNTN_InstallMode)
  832. endif
  833. endif
  834. endif
  835. endif
  836. Ifint $(BillboardVisible) != 0
  837. Shell "subroutn.inf" PopBillboard
  838. Set BillboardVisible = 0
  839. Endif
  840. EndWait
  841. goto successful
  842. configureadapter = +
  843. ifstr(i) $(Option) == "TC"
  844. OpenRegKey $(!REG_H_LOCAL) "" $(ParametersKeyName) $(MAXIMUM_ALLOWED) ParametersKey
  845. GetRegValue $(ParametersKey) "EnableDHCP" EnableDHCPInfo
  846. Set FirstTimeBinding = 0
  847. set EnableDHCPFlag = 0
  848. ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  849. Set FirstTimeBinding = 1
  850. set EnableDHCPFlag = *($(EnableDHCPInfo),4)
  851. DeleteRegValue $(ParametersKey) "EnableDHCP"
  852. ifint $(FirstTimeBinding) == 1
  853. ifint $(EnableDHCPFlag) == 0
  854. Shell $(IPINFOINF), GetIPInfo
  855. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  856. Else
  857. set DefaultGateway = $($R0)
  858. set IPAddressList = $($R1)
  859. set SubnetMaskList = $($R2)
  860. Endif
  861. endif
  862. endif
  863. EndIf
  864. CloseRegKey $(ParametersKey)
  865. OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  866. GetRegValue $(LinkageKey) "Bind" BindList
  867. ifstr(i) $(BindList) == {}
  868. Set BindList = ""
  869. endif
  870. ifstr(i) $(BindList) == ""
  871. ;
  872. ; disable dhcp
  873. ;
  874. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceStart "DHCP", 4
  875. debug-output "OEMNXPTC.INF: no binding info; warning user"
  876. read-syms InfoDlgCantConfigure
  877. goto infomsg
  878. endif
  879. set OldVersionExisted = $(TRUE )
  880. set CardList = ""
  881. set CardCount = 0
  882. ForListDo *($(BindList),4)
  883. Split-String $($), "\", BindInfo
  884. QueryListSize BindListSize $(BindInfo)
  885. set CardName = *($(BindInfo),$(BindListSize))
  886. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(BindInfo),$(BindListSize)) $(MAXIMUM_ALLOWED) CardServiceKey
  887. ifstr(i) $(CardServiceKey) != ""
  888. CloseRegKey $(CardServiceKey)
  889. set-add CardCount = $(CardCount),1
  890. ifstr $(CardList) == ""
  891. set CardList = {$(CardName)}
  892. else
  893. set CardList = >($(CardList),$(CardName))
  894. endif
  895. endif
  896. EndForListDo
  897. debug-output $(CardList)
  898. set OldCardList = $(CardList)
  899. set CardList = ""
  900. set CardServiceKey = ""
  901. set CardCount = 1
  902. ForListDo $(OldCardList)
  903. ifstr(i) $(CardServiceKey) == ""
  904. ifstr $(CardList) == ""
  905. set CardList = $($)
  906. else
  907. set CardList = $(CardList)"@"$($)
  908. endif
  909. debug-output "Doing:"$($)
  910. debug-output $(CardList)
  911. set DefaultIPAddress = *($(IPAddressList),$(CardCount))
  912. set DefaultSubnetMask = *($(SubnetMaskList),$(CardCount))
  913. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($)"\Parameters" $(MAXIMUM_ALLOWED) ServiceParamKey
  914. ifstr(i) $(ServiceParamKey) != ""
  915. OpenRegKey $(ServiceParamKey) "" "Tcpip" $(MAXIMUM_ALLOWED) TCPIPKey
  916. GetRegValue $(ParametersKey) "AutoIPAddress" AutoIPInfo
  917. set AutoIPFlag = *($(AutoIPInfo),4)
  918. set EnableDHCPForThisAdapter = $(EnableDHCPFlag)
  919. ifint $(AutoIPFlag) == 1
  920. set EnableDHCPForThisAdapter = 0
  921. endif
  922. ;
  923. ; Open create a new key
  924. ;
  925. ifstr(i) $(TCPIPKey) == ""
  926. CreateRegKey $(ServiceParamKey) {"Tcpip",$(NoTitle),GenericClass} "" +
  927. $(MAXIMUM_ALLOWED) "" TCPIPKey
  928. debug-output "set Parameters"
  929. debug-output "EnableDHCPFlag:"$(EnableDHCPForThisAdapter)
  930. set NewValueList = {{EnableDHCP,$(NoTitle),$(!REG_VT_DWORD),$(EnableDHCPForThisAdapter)},+
  931. {UseZeroBroadcast,$(NoTitle),$(!REG_VT_DWORD),0},+
  932. {LLInterface,$(NoTitle),$(!REG_VT_SZ),""}}
  933. Shell $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  934. ifstr(i) $(TCPIPKey) != ""
  935. debug-output $(RegistryErrorIndex)
  936. ifint $(EnableDHCPForThisAdapter) == 1
  937. set NewValueList = {{IPAddress,$(NoTitle),$(!REG_VT_MULTI_SZ),{"0.0.0.0"}},+
  938. {DefaultGateway,$(NoTitle),$(!REG_VT_MULTI_SZ),{}},+
  939. {SubnetMask,$(NoTitle),$(!REG_VT_MULTI_SZ),{"0.0.0.0"}}}
  940. Shell $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  941. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  942. Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  943. goto ShellCodeError
  944. endif
  945. else
  946. ifstr(i) $(DefaultIPAddress) != ""
  947. set IPAddressInfo = {}
  948. GetRegValue $(TCPIPKey) "IPAddress" IPAddressInfo
  949. set IPAddress = *($(IPAddressInfo), 4)
  950. ifstr(i) $(IPAddress) == ""
  951. set NewValueList = {{IPAddress,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(DefaultIPAddress)}}}
  952. Shell $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  953. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  954. Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  955. goto ShellCodeError
  956. endif
  957. endif
  958. endif
  959. ifstr(i) $(DefaultSubnetMask) != ""
  960. set SubnetMasInfo = {}
  961. GetRegValue $(TCPIPKey) "SubnetMask" SubnetMaskInfo
  962. set SubnetMask = *($(SubnetMaskInfo), 4)
  963. ifstr(i) $(SubnetMask) == ""
  964. set NewValueList = {{SubnetMask,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(DefaultSubnetMask)}}}
  965. Shell $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  966. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  967. Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  968. goto ShellCodeError
  969. endif
  970. endif
  971. endif
  972. ifstr(i) $(DefaultGateway) != ""
  973. GetRegValue $(TCPIPKey) "DefaultGateway" GatewayInfo
  974. set Gateway = *($(GatewayInfo), 4)
  975. ifstr(i) $(Gateway) == ""
  976. set NewValueList = {{DefaultGateway,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(DefaultGateway)}}}
  977. Shell $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  978. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  979. Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  980. goto ShellCodeError
  981. endif
  982. endif
  983. endif
  984. endif
  985. endif
  986. endif
  987. CloseRegKey $(TCPIPKey)
  988. endif
  989. CloseRegKey $(ServiceParamKey)
  990. set-add CardCount = $(CardCount),1
  991. Endif
  992. EndForListDo
  993. ifstr(i) $(CardList) != ""
  994. ifstr(i) $(!NTN_InstallMode) == bind
  995. set FLibraryErrCtl = 1
  996. LibraryProcedure ResultList, $(!TCPCFG_HANDLE), TcpCfgCheck
  997. set FLibraryErrCtl = 0
  998. Set Result = *($(ResultList),1)
  999. ifint $(Result) == 0
  1000. Debug-Output "OEMNXPTC.INF: reconfiguration not required"
  1001. set CommonStatus = STATUS_USERCANCEL
  1002. goto checkBootp
  1003. else
  1004. goto configureTcp
  1005. endif
  1006. ;
  1007. ; see if bootp is installed and needs configuration
  1008. ; Check the key in the registry to see if we are in Unattend mode
  1009. checkBootp =+
  1010. OpenRegKey $(!REG_H_LOCAL) "" "System\Setup\DHCPRelay" $(MAXIMUM_ALLOWED) KeyRelay
  1011. set DHCP_UNATTENDED = ""
  1012. set DHCP_Temp = "NO"
  1013. ifstr(i) $(KeyRelay) != ""
  1014. GetRegValue $(KeyTcpip) "GuiUnattended" DHCP_Temp
  1015. set DHCP_UNATTENDED = *($(DHCP_Temp),4)
  1016. CloseRegKey $(KeyRelay)
  1017. OpenRegKey $(!REG_H_LOCAL) "" "System\Setup" $(MAXIMUM_ALLOWED) KeySetup
  1018. DeleteRegTree $(KeySetup) "DHCPRelay"
  1019. CloseRegKey $(KeySetup)
  1020. endif
  1021. Debug-Output "DHCP_UNATTENDED="$(DHCP_UNATTENDED)
  1022. Ifstr(i) $(DHCP_UNATTENDED) != YES
  1023. set FLibraryErrCtl = 1
  1024. LibraryProcedure ResultList, $(!TCPCFG_HANDLE), TcpBootRelayCfgCheck
  1025. set FLibraryErrCtl = 0
  1026. Set Result = *($(ResultList),1)
  1027. ifint $(Result) == 0
  1028. Debug-Output "OEMNXPTC.INF: bootp configuration not required"
  1029. set CommonStatus = STATUS_USERCANCEL
  1030. goto end
  1031. endif
  1032. endif
  1033. endif
  1034. ; We jump if either bootp needs a DHCP server or 1 of the adapters is not configure for DHCP and is
  1035. ; missing a IP address after an install or the user just wants to configure the adapter
  1036. configureTcp =+
  1037. set FLibraryErrCtl = 1
  1038. OpenRegKey $(!REG_H_LOCAL) "" "System\Setup\Tcpip" $(MAXIMUM_ALLOWED) KeyTcpip
  1039. set Tcpip_GUI_UNATTENDED = "NO"
  1040. set Tcpip_UNATTENDED = ""
  1041. set Tcpip_UNATTENDED_SECTION = ""
  1042. set Tcpip_Temp = ""
  1043. ifstr(i) $(KeyTcpip) != ""
  1044. GetRegValue $(KeyTcpip) "GuiUnattended" Tcpip_Temp
  1045. set Tcpip_GUI_UNATTENDED = *($(Tcpip_Temp),4)
  1046. GetRegValue $(KeyTcpip) "Unattended" Tcpip_Temp
  1047. set Tcpip_UNATTENDED = *($(Tcpip_Temp),4)
  1048. GetRegValue $(KeyTcpip) "UnattendedSection" Tcpip_Temp
  1049. set Tcpip_UNATTENDED_SECTION = *($(Tcpip_Temp), 4)
  1050. CloseRegKey $(KeyTcpip)
  1051. OpenRegKey $(!REG_H_LOCAL) "" "System\Setup" $(MAXIMUM_ALLOWED) KeySetup
  1052. DeleteRegTree $(KeySetup) "Tcpip"
  1053. CloseRegKey $(KeySetup)
  1054. endif
  1055. Debug-Output "Tcpip_GUI_UNATTENDED="$(Tcpip_GUI_UNATTENDED)"Tcpip_UNATTENDED="$(Tcpip_UNATTENDED)"Tcpip_UNATTENDED_SECTION="$(Tcpip_UNATTENDED_SECTION)
  1056. LibraryProcedure ResultList, $(!TCPCFG_HANDLE), CPlTcpip, $(!STF_HWND), $(CardList), $(!STF_COMPUTERNAME), "", $(!STF_PRODUCT), $(Tcpip_GUI_UNATTENDED), $(Tcpip_UNATTENDED), $(Tcpip_UNATTENDED_SECTION)
  1057. set FLibraryErrCtl = 0
  1058. Set Result = *($(ResultList),1)
  1059. ifint $(Result) == 2
  1060. set CommonStatus = STATUS_REBOOT
  1061. else
  1062. set CommonStatus = STATUS_USERCANCEL
  1063. endif
  1064. else
  1065. set CommonStatus = STATUS_USERCANCEL
  1066. endif
  1067. else
  1068. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  1069. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1070. Debug-Output "OEMNXPTC.INF: ShellCode error: cannot get an error string."
  1071. goto ShellCodeError
  1072. endif
  1073. set Error = $($R0)
  1074. set from = end
  1075. set to = end
  1076. goto nonfatalinfo
  1077. endif
  1078. goto end
  1079. bindingadapter =+
  1080. ifstr(i) $(Option) == "TC"
  1081. ;
  1082. ; Set browser and netlogon dependency
  1083. ;
  1084. ForListDo {"Browser","NetLogon"}
  1085. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($) $(MAXIMUM_ALLOWED) ServicesKey
  1086. ifstr(i) $(ServicesKey) != ""
  1087. GetRegValue $(ServicesKey) "DependOnService" ServicesList
  1088. debug-output "DependOnService:"$(ServicesList)
  1089. set ServiceValues = *($(ServicesList),4)
  1090. debug-output "DependOnService:"$(ServiceValues)
  1091. ifstr(i) $(ServiceValues) == {}
  1092. Set ServiceValues = {"LmHosts"}
  1093. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(ServiceValues), "", "", ""
  1094. else-ifstr(i) $(ServiceValues) == ""
  1095. Set ServiceValues = {"LmHosts"}
  1096. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(ServiceValues), "", "", ""
  1097. else-ifcontains(i) "LMHOSTS" in $(ServiceValues)
  1098. ; something wrong...
  1099. else
  1100. ; Add to the dependcy list
  1101. Set ServiceValues = >($(ServiceValues), "LmHosts")
  1102. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(ServiceValues), "", "", ""
  1103. endif
  1104. CloseRegKey $(ServicesKey)
  1105. endif
  1106. EndForListDo
  1107. ;
  1108. ; hack. Always do NetBT binding first
  1109. ;
  1110. debug-output "binding for NetBT"
  1111. OpenRegKey $(!REG_H_LOCAL) "" $(NetBTLinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  1112. GetRegValue $(LinkageKey) "Bind" BindList
  1113. set CombineBindInfo = *($(BindList),4)
  1114. CloseRegKey $(LinkageKey)
  1115. ;
  1116. ; remove rpc stuff if it does not have binding
  1117. ;
  1118. Shell "nbinfo.inf" CheckMixRpcProtocol "NetBT" 5 "tcpip" "ncacn_nb_tcp" "rpclt1.dll" "rpclt1.dll"
  1119. OpenRegKey $(!REG_H_LOCAL) "" $(NetBTLinkageKeyName)"\Disabled" $(MAXIMUM_ALLOWED) LinkageKey
  1120. GetRegValue $(LinkageKey) "Bind" BindList
  1121. ForListDo *($(BindList),4)
  1122. set CombineBindInfo = >($(CombineBindInfo), $($))
  1123. EndForListDo
  1124. CloseRegKey $(LinkageKey)
  1125. OpenRegKey $(!REG_H_LOCAL) "" $(AdaptersKeyName) $(MAXIMUM_ALLOWED) AdaptersKey
  1126. EnumRegKey $(AdaptersKey) AdaptersListInfo
  1127. set AdaptersList = {}
  1128. ForListDo $(AdaptersListInfo)
  1129. ifstr(i) $(AdaptersList) == {}
  1130. set AdaptersList = {*($($),1)}
  1131. else
  1132. set AdaptersList = >($(AdaptersList),*($($),1))
  1133. endif
  1134. EndForListDo
  1135. set CardList = {}
  1136. set CreateCardList = {}
  1137. ForListDo $(CombineBindInfo)
  1138. Split-String $($), "\", BindInfo
  1139. QueryListSize BindListSize $(BindInfo)
  1140. set CardName = *($(BindInfo),$(BindListSize))
  1141. ifstr(i) $(CardList) == {}
  1142. set CardList = {$(CardName)}
  1143. else
  1144. set CardList = >($(CardList),$(CardName))
  1145. endif
  1146. ifContains(i) $(CardName) not-in $(AdaptersList)
  1147. ifstr(i) $(CreateCardList) == {}
  1148. set CreateCardList = {$(CardName)}
  1149. else
  1150. set CreateCardList = >($(CreateCardList),$(CardName))
  1151. endif
  1152. endif
  1153. EndForListDo
  1154. set DeleteCardList = {}
  1155. ForListDo $(AdaptersList)
  1156. ifcontains(i) $($) not-in $(CardList)
  1157. ifstr(i) $(DeleteCardList) == {}
  1158. set DeleteCardList = {$($)}
  1159. else
  1160. set DeleteCardList = >($(DeleteCardList),$($))
  1161. endif
  1162. endif
  1163. EndForListDo
  1164. ForListDo $(CreateCardList)
  1165. CreateRegKey $(AdaptersKey) {$($),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" CardKey
  1166. CloseRegKey $(CardKey)
  1167. EndForListDo
  1168. ForListDo $(DeleteCardList)
  1169. DeleteRegKey $(AdaptersKey) $($)
  1170. EndForListDo
  1171. CloseRegKey $(AdaptersKey)
  1172. ;
  1173. ; binding for TCP
  1174. ;
  1175. debug-output "binding for TC"
  1176. goto configureadapter
  1177. endif
  1178. goto successful
  1179. removeadapter = +
  1180. ;
  1181. ; Remove Related service
  1182. ;
  1183. Shell $(UtilityInf) RemoveDependentComponents Microsoft TCPIP
  1184. Shell $(UtilityInf) RemoveRpcProtocol "ncadg_ip_udp"
  1185. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_ip_tcp"
  1186. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_tcp"
  1187. Shell $(UtilityInf) RemoveServiceProvider $(ProviderName)
  1188. ;
  1189. ; Remove Name Space Provider
  1190. ;
  1191. Shell $(UtilityInf), RemoveNameSpaceProvider, $(ProductProviderGUID)
  1192. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1193. Debug-Output "OEMNXPTC.INF: ShellCode error"
  1194. goto ShellCodeError
  1195. endif
  1196. set RegistryErrorIndex = $($R0)
  1197. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1198. goto fatalregistry
  1199. endif
  1200. ForListDo $(OEM_ABANDON_SOFTWARE)
  1201. ifstr(i) $($) == "Tcpip"
  1202. OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  1203. GetRegValue $(LinkageKey) "Bind" BindList
  1204. ForListDo *($(BindList),4)
  1205. Split-String $($), "\", BindInfo
  1206. QueryListSize BindListSize $(BindInfo)
  1207. set CardName = *($(BindInfo),$(BindListSize))
  1208. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(BindInfo),$(BindListSize))"\Parameters" $(MAXIMUM_ALLOWED) CardParamKey
  1209. ifstr(i) $(CardParamKey) != ""
  1210. DeleteRegTree $(CardParamKey) "Tcpip"
  1211. CloseRegKey $(CardParamKey)
  1212. endif
  1213. EndForListDo
  1214. Shell $(UtilityInf), RemoveWinsockInfo, $(ProductTCName)
  1215. set RegistryErrorIndex = $($R0)
  1216. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1217. Debug-Output "OEMNXPTC.INF: Registry error: remove Winsock Info."
  1218. Endif
  1219. endif
  1220. debug-output "Remove component: "$($)
  1221. ifstr(i) $($) == "Streams"
  1222. Shell $(UtilityInf), RemoveStreams
  1223. else
  1224. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  1225. endif
  1226. EndForListDo
  1227. ForListDo $(OEM_ABANDON_OPTIONS)
  1228. debug-output "Remove component: "$($)
  1229. Ifstr(i) $($) == $(ProductLOOPName)
  1230. Set UseSvcctrl = "NO"
  1231. Else
  1232. Set UseSvcctrl = "YES"
  1233. Endif
  1234. ifstr(i) $($) == $(ProductLMHOSTSName)
  1235. debug-output "Remove "$($)"'s LMHOSTS dependency"
  1236. ForListDo {"Browser","NetLogon"}
  1237. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($) $(MAXIMUM_ALLOWED) ServicesKey
  1238. ifstr(i) $(ServicesKey) != ""
  1239. GetRegValue $(ServicesKey) "DependOnService" ServicesList
  1240. debug-output "DependOnService List:"$(ServicesList)
  1241. set ServiceValues = *($(ServicesList),4)
  1242. debug-output "ServiceValues: "$(ServiceValues)
  1243. ifcontains(i) "LMHOSTS" in $(ServiceValues)
  1244. set NewServiceValues = {}
  1245. ForListDo $(ServiceValues)
  1246. ifstr(i) $($) != "LmHosts"
  1247. set NewServiceValues = >($(NewServiceValues), $($))
  1248. endif
  1249. EndForListDo
  1250. debug-output "Final dependency list for "$($)": "$(NewServiceValues)
  1251. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(NewServiceValues), "", "", ""
  1252. else
  1253. endif
  1254. CloseRegKey $(ServicesKey)
  1255. endif
  1256. EndForListDo
  1257. endif
  1258. Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  1259. EndForListDo
  1260. goto end
  1261. UpgradeSoftware = +
  1262. ; Upgrade software component
  1263. ;
  1264. ; Remove performance key under NetBT
  1265. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\NetBT" $(MAXIMUM_ALLOWED) NBTParent
  1266. ifstr(i) $(NBTParent) != ""
  1267. DeleteRegKey $(NBTParent) "Performance"
  1268. CloseRegKey $(NBTParent)
  1269. endif
  1270. OpenRegKey $(!REG_H_LOCAL) "" $(OldProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1271. Ifstr(i) $(KeyProduct) == $(KeyNull)
  1272. goto end
  1273. endif
  1274. GetRegValue $(KeyProduct) "DefaultGateway" DefaultGatewayList
  1275. set DefaultGatewayValue = *($(DefaultGatewayList),4)
  1276. Ifstr(i) $(DefaultGatewayValue) != $(KeyNull)
  1277. install "Install-Update"
  1278. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1279. goto fatal
  1280. endif
  1281. CloseRegKey $(KeyProduct)
  1282. set FLibraryErrCtl = 1
  1283. ifstr(i) $(!UpgradeEnableDhcp) == ""
  1284. LibraryProcedure ResultList $(!TCPCFG_HANDLE), UpgradeTcpip, $(!STF_HWND) "NO" "YES"
  1285. else
  1286. LibraryProcedure ResultList $(!TCPCFG_HANDLE), UpgradeTcpip, $(!STF_HWND) "YES" $(!UpgradeEnableDhcp)
  1287. endif
  1288. set FLibraryErrCtl = 0
  1289. set UserWantsDHCP = *($(ResultList),2)
  1290. ;
  1291. ; Remember some default setting before we delete them
  1292. ;
  1293. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\Parameters" $(MAXIMUM_ALLOWED) TcpipParamKey
  1294. ifstr(i) $(TcpipParamKey) != ""
  1295. GetRegValue $(TcpipParamKey) "DNSLookupOrder" LookupInfo
  1296. debug-output "LookupOrder:"$(LookupInfo)
  1297. GetRegValue $(TcpipParamKey) "Domain" DomainInfo
  1298. debug-output "Domain:"$(DomainInfo)
  1299. GetRegValue $(TcpipParamKey) "Hostname" HostnameInfo
  1300. debug-output "Hostname:"$(HostnameInfo)
  1301. GetRegValue $(TcpipParamKey) "NameServer" NameServerInfo
  1302. debug-output "NameServer:"$(NameServerInfo)
  1303. GetRegValue $(TcpipParamKey) "SearchList" SearchListInfo
  1304. debug-output "SearchListInfo:"$(SearchListInfo)
  1305. CloseRegKey $(TcpipParamKey)
  1306. endif
  1307. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Nbt\Parameters" $(MAXIMUM_ALLOWED) NbtParamKey
  1308. ifstr(i) $(NbtParamKey) != ""
  1309. GetRegValue $(NbtParamKey) "ScopeID" ScopeIDInfo
  1310. debug-output "ScopeID:"$(ScopeID)
  1311. CloseRegKey $(NbtParamKey)
  1312. endif
  1313. ;
  1314. ; Remove old component
  1315. ;
  1316. set OEM_ABANDON_OPTIONS = {+
  1317. "TcpipSys",+
  1318. "NbtSys",+
  1319. "Telnet",+
  1320. "LMHOSTS",+
  1321. "Telnetsys",+
  1322. "Loop"}
  1323. set OEM_ABANDON_SOFTWARE = {+
  1324. "Tcpip",+
  1325. "Nbt",+
  1326. "Streams"}
  1327. ;
  1328. ; Remove TCP RPC info
  1329. ;
  1330. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_ip_tcp"
  1331. Ifstr(i) $($0) != NO_ERROR
  1332. Debug-Output "OEMNXPTC.INF: ERROR deleting RPC protocol data"
  1333. Endif
  1334. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_tcp"
  1335. Ifstr(i) $($0) != NO_ERROR
  1336. Debug-Output "OEMNXPTC.INF: ERROR deleting RPC protocol data (2)"
  1337. Endif
  1338. ;
  1339. ; Remove software products
  1340. ;
  1341. ForListDo $(OEM_ABANDON_SOFTWARE)
  1342. debug-output "Remove component: "$($)
  1343. ifstr(i) $($) == "Streams"
  1344. Shell $(UtilityInf), RemoveStreams
  1345. else
  1346. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  1347. endif
  1348. ; remove tcpip socket information
  1349. ifstr(i) $($) == "Tcpip"
  1350. Shell $(UtilityInf), RemoveWinsockInfo, $($)
  1351. set RegistryErrorIndex = $($R0)
  1352. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1353. Debug-Output "OEMNXPTC.INF: Registry error: remove Winsock Info."
  1354. Endif
  1355. endif
  1356. EndForListDo
  1357. ;
  1358. ; Remove services; all but LOOP
  1359. ; is real services.
  1360. ;
  1361. ForListDo $(OEM_ABANDON_OPTIONS)
  1362. debug-output "Remove component: "$($)
  1363. Ifstr(i) $($) == "loop"
  1364. Set UseSvcctrl = "NO"
  1365. Else
  1366. Set UseSvcctrl = "YES"
  1367. Endif
  1368. ;
  1369. ; Remove Browser and NetLogon dependency on LMHOSTS
  1370. ;
  1371. ifstr(i) $($) == "lmhosts"
  1372. ;
  1373. ; remove dependency
  1374. ;
  1375. debug-output "Remove "$($)"'s LMHOSTS dependency"
  1376. ForListDo {"Browser","NetLogon"}
  1377. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($) $(MAXIMUM_ALLOWED) ServicesKey
  1378. ifstr(i) $(ServicesKey) != ""
  1379. GetRegValue $(ServicesKey) "DependOnService" ServicesList
  1380. debug-output "DependOnService List:"$(ServicesList)
  1381. set ServiceValues = *($(ServicesList),4)
  1382. debug-output "ServiceValues: "$(ServiceValues)
  1383. ifcontains(i) "LMHOSTS" in $(ServiceValues)
  1384. ; Remove LmHosts from the dependcy list
  1385. set NewServiceValues = {}
  1386. ForListDo $(ServiceValues)
  1387. ifstr(i) $($) != "LmHosts"
  1388. set NewServiceValues = >($(NewServiceValues), $($))
  1389. endif
  1390. EndForListDo
  1391. debug-output "Final dependency list for "$($)": "$(NewServiceValues)
  1392. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(NewServiceValues), "", "", ""
  1393. else
  1394. ; something wrong...
  1395. endif
  1396. CloseRegKey $(ServicesKey)
  1397. endif
  1398. EndForListDo
  1399. endif
  1400. Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  1401. EndForListDo
  1402. ;
  1403. ; Add the new tcpip stack
  1404. ;
  1405. set OldSTFInstallMode = $(!STF_INSTALL_MODE)
  1406. set !STF_INSTALL_MODE = EXPRESS
  1407. set OldInstallMode = $(!NTN_InstallMode)
  1408. set !NTN_InstallMode = install
  1409. Shell "" "InstallOption" $(!STF_LANGUAGE) "TC" $(!STF_SRCDIR) "NO" "NO" "NO"
  1410. set !STF_INSTALL_MODE = $(OldSTFInstallMode)
  1411. set !NTN_InstallMode = $(OldInstallMode)
  1412. ;
  1413. ; Restore the old settings
  1414. ;
  1415. OpenRegKey $(!REG_H_LOCAL) "" $(ParametersKeyName) $(MAXIMUM_ALLOWED) TcpipParamKey
  1416. ifstr(i) $(TcpipParamKey) != ""
  1417. set NewValueList = {$(LookupInfo),$(DomainInfo),$(HostnameInfo),$(NameServerInfo),$(SearchListInfo)}
  1418. Shell $(UtilityInf), AddValueList, $(TcpipParamKey), $(NewValueList)
  1419. SetRegValue $(TcpipParamKey) {"EnableDHCP",$(NoTitle),$(!REG_VT_DWORD),$(UserWantsDHCP)}
  1420. CloseRegKey $(TcpipParamKey)
  1421. endif
  1422. OpenRegKey $(!REG_H_LOCAL) "" $(NetBTParamKeyName) $(MAXIMUM_ALLOWED) NetbtParamKey
  1423. ifstr(i) $(NetbtParamKey) != ""
  1424. Shell $(UtilityInf), AddValueList, $(NetbtParamKey), {$(ScopeIDInfo)}
  1425. CloseRegKey $(NetbtParamKey)
  1426. endif
  1427. else
  1428. ;
  1429. ; Cannot Open software key, Just upgrade the file
  1430. ;
  1431. install "Install-Update"
  1432. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1433. goto fatal
  1434. endif
  1435. CloseRegKey $(KeyProduct)
  1436. ; Upgrade Winsock Mapping
  1437. Shell $(UtilityInf) UpdateWinsockMappings $(ProductTCName) $(ProductTCWshDllPath)
  1438. ifstr(i) $($R0) != NO_ERROR
  1439. goto fatal
  1440. endif
  1441. ;
  1442. ; Make netbt bind to ndis instead of specified netcard
  1443. ;
  1444. OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\NetBT\CurrentControlSet\NetRules" $(MAXIMUM_ALLOWED) NetRulesKey
  1445. ifstr(i) $(NetRulesKey) != ""
  1446. SetRegValue $(NetRulesKey) {"use",$(NoTitle),$(!REG_VT_SZ),"transport yes yes"}
  1447. CloseRegKey $(NetRulesKey)
  1448. endif
  1449. Shell $(UtilityInf) RemoveNetworkProvider $(ProviderName)
  1450. ;OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\DHCP\Parameters\Options\46" $(MAXIMUM_ALLOWED) Key46
  1451. ;ifstr(i) $(Key46) != ""
  1452. ; Shell $(UtilityInf) AddValueList, $(Key46),+
  1453. ; {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\NetBT\Adapters\?\DhcpNodeType"},+
  1454. ; {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_DWORD)}}
  1455. ; CloseRegKey $(Key46)
  1456. ;endif
  1457. ;
  1458. ; Create DHCP option key
  1459. ;
  1460. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\DHCP\Parameters\Options" $(MAXIMUM_ALLOWED) KeyOptions
  1461. ifstr(i) $(KeyOptions) != ""
  1462. ;
  1463. ; Key 1
  1464. ;
  1465. OpenRegKey $(KeyOptions) "" "1" $(MAXIMUM_ALLOWED) Key1
  1466. ifstr(i) $(Key1) == ""
  1467. CreateRegKey $(KeyOptions) {"1",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key1
  1468. Shell $(UtilityInf) AddValueList, $(Key1),+
  1469. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\?\Parameters\Tcpip\DhcpSubnetMaskOpt"},+
  1470. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_MULTI_SZ)}}
  1471. endif
  1472. CloseRegKey $(Key1)
  1473. ;
  1474. ; Key 15
  1475. ;
  1476. OpenRegKey $(KeyOptions) "" "15" $(MAXIMUM_ALLOWED) Key15
  1477. ifstr(i) $(Key15) == ""
  1478. CreateRegKey $(KeyOptions) {"15",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key15
  1479. Shell $(UtilityInf) AddValueList, $(Key15),+
  1480. {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\Tcpip\Parameters\DhcpDomain"},+
  1481. {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  1482. endif
  1483. CloseRegKey $(Key15)
  1484. endif
  1485. ;
  1486. ; Add Name Space Provider
  1487. ; Remove it first since the ImagePath may have changed.
  1488. ;
  1489. Shell $(UtilityInf), RemoveNameSpaceProvider, $(ProductProviderGUID)
  1490. Shell $(UtilityInf), AddNameSpaceProvider, +
  1491. $(ProviderDisplayName), +
  1492. $(Winsock20Provider), +
  1493. $(ProductProviderNameSpaces), +
  1494. FALSE, +
  1495. $(ProductProviderGUID)
  1496. ;
  1497. ; don't worry about errors, since it may have already been installed
  1498. ;
  1499. ;set RegistryErrorIndex = $($R0)
  1500. ;Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1501. ; EndWait
  1502. ; Debug-Output "OEMNXPTC.INF: Registry error: add name space provider"
  1503. ; goto fatalregistry
  1504. ;endif
  1505. ;
  1506. ; Add LDAP Winsock20 Name Space Provider
  1507. ;
  1508. Shell $(UtilityInf), RemoveNameSpaceProvider, $(LDAPProviderGUID)
  1509. Shell $(UtilityInf), AddNameSpaceProvider, +
  1510. $(LDAPProviderDisplayName), +
  1511. $(LDAPWinsock20Provider), +
  1512. $(LDAPProviderNameSpaces), +
  1513. FALSE, +
  1514. $(LDAPProviderGUID)
  1515. ;
  1516. ; don't worry about errors?
  1517. ;
  1518. ;set RegistryErrorIndex = $($R0)
  1519. ;Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1520. ; EndWait
  1521. ; Debug-Output "OEMNXPTC.INF: Registry error: add name space provider"
  1522. ; goto fatalregistry
  1523. ;endif
  1524. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\ServiceProvider" $(MAXIMUM_ALLOWED) ProviderKey
  1525. ifstr(i) $(ProviderKey) == ""
  1526. ;
  1527. ; Add Provider Key if it does not exist
  1528. ;
  1529. Shell $(UtilityInf), AddServiceProvider, $(ProviderName), +
  1530. $(Winsock11Provider), 8
  1531. set RegistryErrorIndex = $($R0)
  1532. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1533. EndWait
  1534. Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  1535. goto fatalregistry
  1536. endif
  1537. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip" $(MAXIMUM_ALLOWED) TcpSvcKeyHandle
  1538. ifstr(i) $(TcpSvcKeyHandle) != ""
  1539. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\ServiceProvider" $(MAXIMUM_ALLOWED) KeyNetworkProvider
  1540. ifstr(i) $(KeyNetworkProvider) == ""
  1541. CreateRegKey $(TcpSvcKeyHandle) {"ServiceProvider",$(NoTitle),GenericClass} "" +
  1542. $(MAXIMUM_ALLOWED) "" KeyNetworkProvider
  1543. endif
  1544. set NewValueList = {{DnsPriority,$(NoTitle),$(!REG_VT_DWORD),2000},+
  1545. {Name,$(NoTitle),$(!REG_SZ),$(ProviderDisplayName)},+
  1546. {HostsPriority,$(NoTitle),$(!REG_VT_DWORD),500},+
  1547. {LocalPriority,$(NoTitle),$(!REG_VT_DWORD),499},+
  1548. {ProviderPath,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(Winsock11Provider)},+
  1549. {NetbtPriority,$(NoTitle),$(!REG_VT_DWORD),2001}}
  1550. Shell $(UtilityInf), AddValueList, $(KeyNetworkProvider), $(NewValueList)
  1551. CloseRegKey $(KeyNetworkProvider)
  1552. CloseRegKey $(TcpSvcKeyHandle)
  1553. endif
  1554. else
  1555. CloseRegKey $(ProviderKey)
  1556. endif
  1557. ;
  1558. ; add new PersistentRoutes Key
  1559. ;
  1560. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\Parameters" $(MAXIMUM_ALLOWED) TcpParmKeyHandle
  1561. ifstr(i) $(TcpParmKeyHandle) != ""
  1562. CreateRegKey $(TcpParmKeyHandle) {"PersistentRoutes",$(NoTitle),GenericClass} "" +
  1563. $(MAXIMUM_ALLOWED) "" KeyPersistentRoutes
  1564. CloseRegKey $(KeyPersistentRoutes)
  1565. CloseRegKey $(TcpParmKeyHandle)
  1566. endif
  1567. endif
  1568. ;
  1569. ; Upgrade the load order group membership
  1570. ;
  1571. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip" $(MAXIMUM_ALLOWED) TcpSvcKeyHandle
  1572. ifstr(i) $(TcpSvcKeyHandle) != $(KeyNull)
  1573. SetRegValue $(TcpSvcKeyHandle) {Group,$(NoTitle),$(!REG_VT_SZ),"PNP_TDI"}
  1574. CloseRegKey $(TcpSvcKeyHandle)
  1575. endif
  1576. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\NetBT" $(MAXIMUM_ALLOWED) NetBTSvcKeyHandle
  1577. ifstr(i) $(NetBTSvcKeyHandle) != $(KeyNull)
  1578. SetRegValue $(NetBTSvcKeyHandle) {Group,$(NoTitle),$(!REG_VT_SZ),"PNP_TDI"}
  1579. CloseRegKey $(NetBTSvcKeyHandle)
  1580. endif
  1581. ;
  1582. ; Update NetRules Keys for Tcpip and NetBT.
  1583. ;
  1584. OpenRegKey $(!REG_H_LOCAL) "" $(TCNetRuleKeyName) $(MAXIMUM_ALLOWED) TCKeyNetRules
  1585. Ifstr $(TCKeyNetRules) != $(KeyNull)
  1586. SetRegValue $(TCKeyNetRules) {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleTCUse)}
  1587. CloseRegKey $(TCKeyNetRules)
  1588. endif
  1589. OpenRegKey $(!REG_H_LOCAL) "" $(NetBTNetRuleKeyName) $(MAXIMUM_ALLOWED) NetBTKeyNetRules
  1590. Ifstr $(NetBTKeyNetRules) != $(KeyNull)
  1591. SetRegValue $(NetBTKeyNetRules) {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNETBTUse)}
  1592. CloseRegKey $(NetBTKeyNetRules)
  1593. endif
  1594. ;
  1595. ; Update description and op support
  1596. ;
  1597. OpenRegKey $(!REG_H_LOCAL) "" $(ProductTCKeyName) $(MAXIMUM_ALLOWED) TCKeyCurrentVersion
  1598. Ifstr $(TCKeyCurrentVersion) != $(KeyNull)
  1599. SetRegValue $(TCKeyCurrentVersion) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductTCDescription)}
  1600. SetRegValue $(TCKeyCurrentVersion) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  1601. CloseRegKey $(TCKeyCurrentVersion)
  1602. endif
  1603. goto end
  1604. successful = +
  1605. goto end
  1606. infomsg =+
  1607. read-syms InfoDlg
  1608. ui start "Warning"
  1609. set CommonStatus = STATUS_USERCANCEL
  1610. goto end
  1611. warning = +
  1612. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1613. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1614. goto ShellCodeError
  1615. endif
  1616. ifstr(i) $($R1) == "OK"
  1617. goto $(to)
  1618. else-ifstr(i) $($R1) == "CANCEL"
  1619. goto $(from)
  1620. else
  1621. goto "end"
  1622. endif
  1623. nonfatalinfo = +
  1624. Set CommonStatus = STATUS_USERCANCEL
  1625. Set Severity = STATUS
  1626. goto nonfatalmsg
  1627. nonfatal = +
  1628. Set Severity = NONFATAL
  1629. goto nonfatalmsg
  1630. nonfatalmsg = +
  1631. ifstr(i) $(Error) == ""
  1632. Set Severity = NONFATAL
  1633. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1634. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1635. goto ShellCodeError
  1636. endif
  1637. set Error = $($R0)
  1638. endif
  1639. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1640. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1641. goto ShellCodeError
  1642. endif
  1643. ifstr(i) $($R1) == "OK"
  1644. goto $(from)
  1645. else
  1646. goto "end"
  1647. endif
  1648. fatalregistry = +
  1649. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1650. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1651. goto ShellCodeError
  1652. endif
  1653. set Error = $($R0)
  1654. goto fatal
  1655. fatal = +
  1656. ifstr(i) $(Error) == ""
  1657. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1658. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1659. goto ShellCodeError
  1660. endif
  1661. set Error = $($R0)
  1662. endif
  1663. Ifint $(BillboardVisible) != 0
  1664. Shell "subroutn.inf" PopBillboard
  1665. Set BillboardVisible = 0
  1666. Endif
  1667. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1668. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1669. goto ShellCodeError
  1670. endif
  1671. goto setfailed
  1672. ShellCodeError = +
  1673. set DlgType = "MessageBox"
  1674. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1675. set STF_MB_TEXT = $(ShellCodeErrorText)
  1676. set STF_MB_TYPE = 1
  1677. set STF_MB_ICON = 3
  1678. set STF_MB_DEF = 1
  1679. ui start "Error Message"
  1680. goto setfailed
  1681. setfailed = +
  1682. set CommonStatus = STATUS_FAILED
  1683. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1684. set OEM_ABANDON_ON = FALSE
  1685. goto removeadapter
  1686. endif
  1687. goto end
  1688. end = +
  1689. freeLibrary $(!TCPCFG_HANDLE)
  1690. goto term
  1691. term = +
  1692. Return $(CommonStatus)
  1693. [CreateEventLog]
  1694. read-syms GeneralConstants
  1695. set NameOfService = $($0)
  1696. set EventFile = $($1)
  1697. set TypeSupported = $($2)
  1698. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\EventLog\System" $(MAXIMUM_ALLOWED) KeyEventLog
  1699. Ifstr $(KeyEventLog) != ""
  1700. OpenRegKey $(KeyEventLog) "" $(NameOfService) $(MAXIMUM_ALLOWED) KeyService
  1701. ifstr(i) $(KeyService) == ""
  1702. CreateRegKey $(KeyEventLog) {$(NameOfService),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyService
  1703. endif
  1704. Ifstr $(KeyService) != ""
  1705. SetRegValue $(KeyService) {EventMessageFile,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(EventFile)}
  1706. SetRegValue $(KeyService) {TypesSupported,$(NoTitle),$(!REG_VT_DWORD),$(TypeSupported)}
  1707. endif
  1708. Endif
  1709. endif
  1710. CreateEventLogEnd = +
  1711. return NO_ERROR
  1712. [GetFilesSize]
  1713. set FileSizeList = >(>(>(^(Files-TC,3),^(Files-TCPIPEXE,3)),^(Files-ETC,3)),^(Files-LMHOST,3))
  1714. set TotalSize = 0
  1715. ForListDo $(FileSizeList)
  1716. ForListDo $($)
  1717. Split-String $($) "=" SplitString
  1718. set Size = *($(SplitString),3)
  1719. set-add TotalSize = $(TotalSize) $(Size)
  1720. EndForListDo
  1721. EndForListDo
  1722. set-div SizeInK = $(TotalSize) 1024
  1723. return $(SizeInK)
  1724. [Install-Option]
  1725. set STF_VITAL = ""
  1726. ifstr(i) $(AddCopy) == "YES"
  1727. AddSectionFilesToCopyList Files-TC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1728. AddSectionFilesToCopyList Files-TCPIPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1729. AddSectionFilesToCopyList Files-ETC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1730. AddSectionFilesToCopyList Files-LMHOST $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1731. endif
  1732. ifstr(i) $(DoCopy) == "YES"
  1733. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1734. Debug-Output "OEMNXPTC.INF: *** CopyFilesInCopyList [2]"
  1735. CopyFilesInCopyList
  1736. endif
  1737. ifstr(i) $(DoConfig) == "YES"
  1738. endif
  1739. Exit
  1740. [Install-Update]
  1741. set STF_VITAL = ""
  1742. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1743. AddSectionFilesToCopyList Files-TC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1744. AddSectionFilesToCopyList Files-TCPIPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1745. AddSectionFilesToCopyList Files-LMHOST $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1746. AddSectionFilesToCopyList Files-ETC-Upgrade $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1747. Exit