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.

1545 lines
48 KiB

  1. ;***********************************************************************
  2. ;
  3. ; OEMNSVWK.INF
  4. ;
  5. ; Workstation SETUP INF file.
  6. ;
  7. ; History:
  8. ; davidhov 00-Feb-1992 Created
  9. ; terryk 27-Feb-1992 Reorganize section location
  10. ; added comment
  11. ; terryk 03-Mar-1992 Changed to Workstation setup
  12. ; terryk 02-Apr-1992 Code review changed
  13. ; davidhov 03-Apr-1992 Enhanced to use new INF section
  14. ; structure from SunilP, et al.
  15. ;
  16. ;
  17. ;
  18. ; DavidHov 6/11/92 Put OtherDependencies where it belongs
  19. ;***********************************************************************
  20. ;-----------------------------------------------------------------------
  21. ; OPTION TYPE
  22. ; -----------
  23. ; This identifies the Option type we are dealing with. The different
  24. ; possible types are:
  25. ;
  26. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  27. ;
  28. ; Types specific to networking:
  29. ;
  30. ; NetAdapter, a netcard / adapter combination or just a netcard
  31. ; NetDriver, just a netcard driver
  32. ; NetTransport, a complete NDIS-compliant TDI transport stack
  33. ; NetService, an NT networking service
  34. ; NetWork, a complete network ensemble.
  35. ; NetProvider a complete network which supports NT MPR protocol
  36. ;-----------------------------------------------------------------------
  37. [Identification]
  38. OptionType = NetService
  39. ;-----------------------------------------------------------------------
  40. ; OPTION LIST
  41. ; -----------
  42. ; This section lists the OEM Option key names. These keys are locale
  43. ; independent and used to represent the option in a locale independent
  44. ; manner.
  45. ;
  46. ;-----------------------------------------------------------------------
  47. [Options]
  48. WKSTA
  49. ;***********************************************************************
  50. ; CONSTANTS FOR USING DIALOGS
  51. ;***********************************************************************
  52. [FileConstants]
  53. ;
  54. ; File names, etc.
  55. ;
  56. UtilityInf = "UTILITY.INF"
  57. subroutineinf = "SUBROUTN.INF"
  58. SoftwareType = "service"
  59. Exit_Code = 0
  60. ;ShellCode = 0
  61. ;
  62. ; EventLog Message File
  63. ;
  64. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  65. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  66. NetMsgDLL = "%SystemRoot%\System32\NetMsg.dll"
  67. Kernel32DLL = "%SystemRoot%\System32\Kernel32.dll"
  68. ; Product Info
  69. ;
  70. Manufacturer = "Microsoft"
  71. ProductMajorVersion = "4"
  72. ProductMinorVersion = "0"
  73. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  74. ProductOpSupportSERVER = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  75. ProductOpSupportWKSTA = 132 ; 0x0084 ; Display,Removable,NOT Properties,Not Updatable
  76. ;
  77. ; Software
  78. ;
  79. ; Workstation
  80. ProductWKSTAName = "LanmanWorkstation"
  81. ProductWKSTAImagePath = "%SystemRoot%\System32\services.exe"
  82. NetRuleWKSTAType = "wksta lmNetService lanmanWorkstation"
  83. NetRuleWKSTAClass = {"lanmanWorkstation lmNetService"}
  84. NetRuleWKSTAUse = $(SoftwareType)" yes yes"
  85. NetRuleWKSTABindForm = """LanmanWorkstation"" yes yes container"
  86. ; NetLogon
  87. ProductNETLOGONName = "NetLogon"
  88. ProductNETLOGONImagePath = "%SystemRoot%\System32\lsass.exe"
  89. ; Alerter
  90. ProductALERTERName = "Alerter"
  91. ProductALERTERImagePath = "%SystemRoot%\System32\services.exe"
  92. ; Browser
  93. ProductBROWSERName = "Browser"
  94. ProductBROWSERImagePath = "%SystemRoot%\System32\services.exe"
  95. ; Messenger
  96. ProductMESSENGERName = "Messenger"
  97. ProductMESSENGERImagePath = "%SystemRoot%\System32\services.exe"
  98. ; Redirector
  99. ProductRDRName = "mrxsmb"
  100. ProductRDRImagePath = "\SystemRoot\System32\drivers\mrxsmb.sys"
  101. ProductRDRServiceKeyName = $(!NTN_ServiceBase)"\mrxsmb"
  102. ProductRDBSSName = "rdbss"
  103. ProductRDBSSImagePath = "\SystemRoot\System32\drivers\rdbss.sys"
  104. ProductRDBSSServiceKeyName = $(!NTN_ServiceBase)"\rdbss"
  105. ; Provider
  106. ProductProviderImagePath = "%SystemRoot%\System32\ntlanman.dll"
  107. ; Replicator
  108. ProductREPLName = "Replicator"
  109. ProductREPLImagePath = "%SystemRoot%\System32\lmrepl.exe"
  110. ; Multiple Provider Name
  111. ProviderName = $(ProductWKSTAName)
  112. ProviderDeviceName = "LanmanRedirector"
  113. ;
  114. ; Registry Key
  115. ;
  116. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  117. ParamKeyName = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Parameters"
  118. [GeneralConstants]
  119. ;
  120. ; Program flow control variables.
  121. ;
  122. from = ""
  123. to = ""
  124. ;
  125. ; Return codes; Exit_Code is set to one of these
  126. ;
  127. ExitCodeOk = 0
  128. ExitCodeCancel = 1
  129. ExitCodeFatal = 2
  130. KeyNull = ""
  131. MAXIMUM_ALLOWED = 33554432
  132. SERVICE_NO_CHANGE = 4294967295
  133. RegistryErrorIndex = NO_ERROR
  134. KeyProduct = ""
  135. KeyParameters = ""
  136. TRUE = 1
  137. FALSE = 0
  138. NoTitle = 0
  139. ExitState = "Active"
  140. OldVersionExisted = $(FALSE)
  141. DriverPath = $(!STF_NTPATH)\drivers
  142. [date]
  143. ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  144. ; Minute, Second }
  145. Now = {} ? $(!LIBHANDLE) GetSystemDate
  146. [DetectSystemMemory]
  147. SystemMemory = "" ? $(!LIBHANDLE) GetMemorySize
  148. ;---------------------------------------------------------------------------
  149. ; 1. Identify
  150. ;
  151. ; DESCRIPTION: To verify that this INF deals with the same type of options
  152. ; as we are choosing currently.
  153. ;
  154. ; INPUT: None
  155. ;
  156. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  157. ; $($R1): Option Type (COMPUTER ...)
  158. ; $($R2): Diskette description
  159. ;---------------------------------------------------------------------------
  160. [Identify]
  161. ;
  162. ;
  163. read-syms Identification
  164. set Status = STATUS_SUCCESSFUL
  165. set Identifier = $(OptionType)
  166. set Media = #("Source Media Descriptions", 1, 1)
  167. Return $(Status) $(Identifier) $(Media)
  168. ;------------------------------------------------------------------------
  169. ; 2. ReturnOptions:
  170. ;
  171. ; DESCRIPTION: To return the option list supported by this INF and the
  172. ; localised text list representing the options.
  173. ;
  174. ;
  175. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  176. ;
  177. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  178. ; STATUS_NOLANGUAGE
  179. ; STATUS_FAILED
  180. ;
  181. ; $($R1): Option List
  182. ; $($R2): Option Text List
  183. ;------------------------------------------------------------------------
  184. [ReturnOptions]
  185. ;
  186. ;
  187. set Status = STATUS_FAILED
  188. set OptionList = {}
  189. set OptionTextList = {}
  190. ;
  191. ; Check if the language requested is supported
  192. ;
  193. set LanguageList = ^(LanguagesSupported, 1)
  194. Ifcontains(i) $($0) in $(LanguageList)
  195. goto returnoptions
  196. else
  197. set Status = STATUS_NOLANGUAGE
  198. goto finish_ReturnOptions
  199. endif
  200. ;
  201. ; form a list of all the options and another of the text representing
  202. ;
  203. returnoptions = +
  204. set OptionList = ^(Options, 1)
  205. set OptionTextList = ^(OptionsText$($0), 1)
  206. set Status = STATUS_SUCCESSFUL
  207. finish_ReturnOptions = +
  208. Return $(Status) $(OptionList) $(OptionTextList)
  209. ;----------InstallOption-------------------------------------------------
  210. ;
  211. ; InstallOption:
  212. ;
  213. ; This section is shelled to by main installation processing
  214. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  215. ;
  216. ;
  217. ; FUNCTION: To copy files representing Options
  218. ; To configure the installed option
  219. ; To update the registry for the installed option
  220. ;
  221. ; INPUT: $($0): Language to use
  222. ; $($1): OptionID to install
  223. ; $($2): SourceDirectory
  224. ; $($3): AddCopy (YES | NO)
  225. ; $($4): DoCopy (YES | NO)
  226. ; $($5): DoConfig (YES | NO)
  227. ;
  228. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  229. ; STATUS_NOLANGUAGE |
  230. ; STATUS_USERCANCEL |
  231. ; STATUS_FAILED
  232. ;
  233. ;------------------------------------------------------------------------
  234. [InstallOption]
  235. ;
  236. ; extract parameters
  237. ;
  238. set Option = $($1)
  239. set SrcDir = $($2)
  240. set AddCopy = $($3)
  241. set DoCopy = $($4)
  242. set DoConfig = $($5)
  243. ;
  244. ; Check if the language requested is supported
  245. ;
  246. set LanguageList = ^(LanguagesSupported, 1)
  247. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  248. Return STATUS_NOLANGUAGE
  249. endif
  250. Debug-Output "OEMNSVWK.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  251. Debug-Output "OEMNSVWK.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  252. ; define all the constants
  253. set-subst LF = "\n"
  254. read-syms GeneralConstants
  255. read-syms FileConstants
  256. read-syms DialogConstants$(!STF_LANGUAGE)
  257. ifstr(i) $(!NTN_Origination) == "NCPA"
  258. set Continue = $(OK)
  259. endif
  260. read-syms FileConstants$(!STF_LANGUAGE)
  261. detect date
  262. detect DetectSystemMemory
  263. set-title $(FunctionTitle)
  264. set to = Begin
  265. set from = Begin
  266. ;
  267. ; Assume all is well.
  268. ;
  269. set CommonStatus = STATUS_SUCCESSFUL
  270. EndWait
  271. ;
  272. ; Set up the operation-mode-based variables and gaily welcome
  273. ; the user. If the "install mode" variable is improperly set,
  274. ; assume this is a new installation.
  275. ;
  276. Begin = +
  277. Ifstr(i) $(!NTN_InstallMode) == deinstall
  278. ifstr(i) $(!NTN_InfOption) == "BROWSER"
  279. set Error = $(RemoveBrowserError)
  280. set from = end
  281. set to = end
  282. goto nonfatal
  283. endif
  284. set OEM_ABANDON_OPTIONS = {+
  285. $(ProductWKSTAName), +
  286. $(ProductNETLOGONName), +
  287. $(ProductALERTERName), +
  288. $(ProductBROWSERName), +
  289. $(ProductMESSENGERName), +
  290. $(ProductRDRName), +
  291. $(ProductRDBSSName), +
  292. $(ProductREPLName)}
  293. set StartLabel = removeadapter
  294. else-Ifstr(i) $(!NTN_InstallMode) == Update
  295. ifstr(i) $(!NTN_InfOption) == "BROWSER"
  296. set Error = $(UpdateBrowserError)
  297. set from = end
  298. set to = end
  299. goto nonfatal
  300. endif
  301. set StartLabel = UpgradeSoftware
  302. else-Ifstr(i) $(!NTN_InstallMode) == bind
  303. set StartLabel = bindingadapter
  304. else-Ifstr(i) $(!NTN_InstallMode) == configure
  305. ifstr(i) $(!NTN_InfOption) == "BROWSER"
  306. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  307. set from = "end"
  308. set to = "end"
  309. goto ConfigureBrowser
  310. endif
  311. endif
  312. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  313. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  314. Debug-Output "OEMNSVWK.INF: ShellCode error: cannot get an error string."
  315. goto ShellCodeError
  316. endif
  317. set Error = $($R0)
  318. set from = end
  319. set to = end
  320. goto nonfatalinfo
  321. else
  322. set StartLabel = installadapter
  323. set OEM_ABANDON_OPTIONS = {}
  324. endif
  325. set DoWKSTA = FALSE
  326. set DoNETLOGON = FALSE
  327. set DoALERTER = FALSE
  328. set DoMESSENGER = FALSE
  329. set DoRDR = FALSE
  330. set DoREPL = FALSE
  331. set DoBROWSER = FALSE
  332. Ifstr(i) $(Option) == WKSTA
  333. set DoWKSTA = TRUE
  334. set DoNETLOGON = TRUE
  335. set DoALERTER = TRUE
  336. set DoMESSENGER = TRUE
  337. set DoRDR = TRUE
  338. set DoBROWSER = TRUE
  339. set DoREPL = TRUE
  340. Else-ifstr(i) $(Option) == REPL
  341. Set DoREPL = TRUE
  342. Else-ifstr(i) $(Option) == NETLOGON
  343. Set DoNETLOGON = TRUE
  344. Else-ifstr(i) $(Option) == ALERTER
  345. Set DoALERTER = TRUE
  346. Else-ifstr(i) $(Option) == BROWSER
  347. Set DoBROWSER = TRUE
  348. Else-ifstr(i) $(Option) == MESSENGER
  349. Set DoMESSENGER = TRUE
  350. Else-ifstr(i) $(Option) == RDR
  351. Set DoRDR = TRUE
  352. Else
  353. Debug-Output "OEMNXPTC.INF: Unrecognized option"
  354. Endif
  355. set from = $(fatal)
  356. set to = $(fatal)
  357. goto $(StartLabel)
  358. ;-----------------------------------------------
  359. ; Installation Section
  360. ;-----------------------------------------------
  361. installadapter = +
  362. ;
  363. ; First, check whether the same version of the software exists
  364. ;
  365. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  366. Ifstr $(KeyProduct) != $(KeyNull)
  367. ;
  368. ; Same version already existed in the local machine
  369. ; Popup the dialog and ask the user whether he wants to continue
  370. ;
  371. CloseRegKey $(KeyProduct)
  372. Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  373. $(ProductVersion)
  374. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  375. Debug-Output "OEMNSVWK.INF: ShellCode error: cannot get an error string."
  376. goto ShellCodeError
  377. endif
  378. goto end
  379. endif
  380. goto nextstep
  381. ;
  382. ; If installing, go create the necessary keys;
  383. ; if configuring, they're already open.
  384. ;
  385. nextstep = +
  386. StartWait
  387. Ifstr(i) $(!NTN_InstallMode) == install
  388. Ifint $(OldVersionExisted) == $(FALSE)
  389. goto installproduct
  390. endif
  391. endif
  392. goto writeparameters
  393. installproduct = +
  394. ifstr(i) $(!NTN_InstallMode) == "install"
  395. Ifstr(i) $(DoCopy) == "YES"
  396. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  397. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398. Goto ShellCodeError
  399. Else-Ifstr(i) $($R0) == STATUS_FAILED
  400. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  401. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  402. goto ShellCodeError
  403. endif
  404. set Error = $($R0)
  405. Goto fatal
  406. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  407. Goto successful
  408. Endif
  409. Set SrcDir = $($R1)
  410. Endif
  411. install "Install-Option"
  412. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  413. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  414. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  415. goto ShellCodeError
  416. endif
  417. set Error = $($R0)
  418. goto fatal
  419. endif
  420. endif
  421. set OEM_ABANDON_ON = TRUE
  422. ifstr(i) $(DoWKSTA) == TRUE
  423. ;
  424. ; Install Workstation registry
  425. ;
  426. Debug-Output "OEMNSVWK.INF: Install Workstation in registry."
  427. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductWKSTAName))
  428. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  429. $(ProductWKSTAName), +
  430. $(ProductWKSTAName), +
  431. $(ProductWKSTADisplayName), $(STF_CONTEXTINFNAME), +
  432. $(ProductWKSTAImagePath), "autoserviceshare", "NetworkProvider", {}, "",+
  433. $(NetMsgDLL),"","","","workstation"
  434. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  435. Debug-Output "OEMNSVWK.INF: ShellCode error"
  436. goto ShellCodeError
  437. endif
  438. set RegistryErrorIndex = $($R0)
  439. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  440. EndWait
  441. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  442. CloseRegKey $($R1)
  443. CloseRegKey $($R2)
  444. CloseRegKey $($R3)
  445. CloseRegKey $($R4)
  446. CloseRegKey $($R5)
  447. goto fatalregistry
  448. endif
  449. ;
  450. ; At this point:
  451. ; $R1 contains the product version key handle;
  452. ; $R2 contains the NetRules subkey handle;
  453. ; $R3 contains the new Services key handle; and
  454. ; $R4 contains the Parameters key
  455. ;
  456. Set SoftProductKey = $($R1)
  457. Set SoftNetRuleKey = $($R2)
  458. Set SoftServiceKey = $($R3)
  459. Set SoftParameterKey = $($R4)
  460. Set SoftLinkageKey = $($R5)
  461. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  462. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  463. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  464. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductWKSTATitle)},+
  465. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductWKSTADescription)},+
  466. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductWKSTAName)},+
  467. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupportWKSTA)}, +
  468. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  469. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  470. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  471. Debug-Output "OEMNSVWK.INF: ShellCode error."
  472. goto ShellCodeError
  473. endif
  474. set RegistryErrorIndex = $($R0)
  475. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  476. EndWait
  477. Debug-Output "OEMNSVWK.INF: registry error: add value list."
  478. CloseRegKey $(SoftProductKey)
  479. CloseRegKey $(SoftNetRuleKey)
  480. CloseRegKey $(SoftServiceKey)
  481. CloseRegKey $(SoftLinkageKey)
  482. CloseRegKey $(SoftParameterKey)
  483. goto fatalregistry
  484. endif
  485. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleWKSTAType)},+
  486. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleWKSTAClass)}, +
  487. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleWKSTAUse)}, +
  488. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleWKSTABindForm)}, +
  489. {InfOption,$(NoTitle),$(!REG_VT_SZ),WKSTA}}
  490. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  491. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  492. Debug-Output "OEMNSVWK.INF: ShellCode error."
  493. goto ShellCodeError
  494. endif
  495. set RegistryErrorIndex = $($R0)
  496. #if (defined(CAIRO_INF))
  497. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  498. EndWait
  499. Debug-Output "OEMNSVWK.INF: registry error: add value list."
  500. CloseRegKey $(SoftProductKey)
  501. CloseRegKey $(SoftNetRuleKey)
  502. CloseRegKey $(SoftServiceKey)
  503. CloseRegKey $(SoftLinkageKey)
  504. CloseRegKey $(SoftParameterKey)
  505. goto fatalregistry
  506. endif
  507. set WKSTADependList = {"+TDI","Mup"}
  508. set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),$(WKSTADependList)}}
  509. Shell $(UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
  510. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  511. Debug-Output "OEMNSVWK.INF: ShellCode error."
  512. goto ShellCodeError
  513. endif
  514. set RegistryErrorIndex = $($R0)
  515. #endif
  516. CloseRegKey $(SoftProductKey)
  517. CloseRegKey $(SoftNetRuleKey)
  518. CloseRegKey $(SoftServiceKey)
  519. CloseRegKey $(SoftParameterKey)
  520. CloseRegKey $(SoftLinkageKey)
  521. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  522. EndWait
  523. Debug-Output "OEMNSVWK.INF: Registry error: add value list."
  524. goto fatalregistry
  525. endif
  526. endif
  527. ifstr(i) $(DoNETLOGON) == TRUE
  528. ;
  529. ; Install NETLOGON registry
  530. ;
  531. Debug-Output "OEMNSVWK.INF: Install NETLOGON registry."
  532. Debug-Output "OEMNSVWK.INF: Product type is "$(!STF_PRODUCT)
  533. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductNETLOGONName))
  534. ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
  535. Set NL_DependList = {"LanmanWorkstation", "LanmanServer"}
  536. else
  537. Set NL_DependList = {"LanmanWorkstation"}
  538. endif
  539. Shell $(UtilityInf), CreateService, $(ProductNETLOGONName), +
  540. $(ProductNETLOGONDisplayName), $(ProductNETLOGONImagePath), +
  541. "autoserviceshare", "RemoteValidation", $(NL_DependList), +
  542. "", $(NetMsgDLL), "", "", 1, "", $(Kernel32DLL)
  543. ;
  544. ; BUGBUG: Error control value above should be 0, but the service controller
  545. ; will not accept that value yet (SERVICE_ERROR_IGNORE).
  546. ;
  547. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  548. Debug-Output "OEMNSVWK.INF: ShellCode error"
  549. goto ShellCodeError
  550. endif
  551. set RegistryErrorIndex = $($R0)
  552. CloseRegKey $($R1)
  553. CloseRegKey $($R3)
  554. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  555. EndWait
  556. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  557. CloseRegKey $($R2)
  558. goto fatalregistry
  559. endif
  560. set NL_ParmKey = $($R2)
  561. set NewValueList = {{Update,$(NoTitle),$(!REG_VT_SZ),"no"},+
  562. {Scripts,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\system32\repl\import\scripts"},+
  563. {DBFlag,$(NoTitle),$(!REG_VT_SZ),0}}
  564. Shell $(UtilityInf), AddValueList, $(NL_ParmKey), $(NewValueList)
  565. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  566. Debug-Output "OEMNSVWK.INF: ShellCode error."
  567. goto ShellCodeError
  568. endif
  569. set RegistryErrorIndex = $($R0)
  570. CloseRegKey $(NL_ParmKey)
  571. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  572. EndWait
  573. Debug-Output "OEMNSVWK.INF: registry error: add value list."
  574. goto fatalregistry
  575. endif
  576. endif
  577. ifstr(i) $(DoALERTER) == TRUE
  578. ;
  579. ; Install Alerter registry
  580. ;
  581. Debug-Output "OEMNSVWK.INF: Install Alerter registry"
  582. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductALERTERName))
  583. ifstr(i) $(!STF_PRODUCT) == "WINNT"
  584. set StartType = "serviceshare"
  585. else
  586. set StartType = "autoserviceshare"
  587. endif
  588. Shell $(UtilityInf), CreateService, $(ProductALERTERName), +
  589. $(ProductALERTERDisplayName), $(ProductALERTERImagePath), +
  590. $(StartType), "", +
  591. {"LanmanWorkstation"}, "", $(NetMsgDLL)
  592. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  593. Debug-Output "OEMNSVWK.INF: ShellCode error"
  594. goto ShellCodeError
  595. endif
  596. set RegistryErrorIndex = $($R0)
  597. CloseRegKey $($R1)
  598. CloseRegKey $($R3)
  599. set ParametersKey = $($R2)
  600. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  601. EndWait
  602. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  603. goto fatalregistry
  604. endif
  605. ;
  606. ; If LANMan NT, set alerter parameter security to allow
  607. ; server operators to manager alert names
  608. ;
  609. Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
  610. LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), SECUREKEY, $(ParametersKey), 1
  611. endif
  612. set NewValueList = {{AlertNames,$(NoTitle),$(!REG_VT_MULTI_SZ),{}}}
  613. Shell $(UtilityInf), AddValueList, $(ParametersKey), $(NewValueList)
  614. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  615. Debug-Output "OEMNSVWK.INF: ShellCode error"
  616. goto ShellCodeError
  617. endif
  618. CloseRegKey $(ParametersKey)
  619. endif
  620. ifstr(i) $(DoBROWSER) == TRUE
  621. ;
  622. ; Install Browser registry
  623. ;
  624. Debug-Output "OEMNSVWK.INF: Install Browser registry"
  625. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductBROWSERName))
  626. Set BrowServiceType = "serviceshare"
  627. Ifint $(SystemMemory) > 12287
  628. Set BrowServiceType = "autoserviceshare"
  629. Endif
  630. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  631. $(ProductBROWSERName), +
  632. $(ProductBROWSERName), +
  633. $(ProductBROWSERDisplayName), $(STF_CONTEXTINFNAME), +
  634. $(ProductBROWSERImagePath), $(BrowServiceType), "",+
  635. {"LanmanWorkstation","LanmanServer"}, "",+
  636. $(NetEventDLL)
  637. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  638. Debug-Output "OEMNSVWK.INF: ShellCode error"
  639. goto ShellCodeError
  640. endif
  641. set RegistryErrorIndex = $($R0)
  642. CloseRegKey $($R3)
  643. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  644. EndWait
  645. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  646. goto fatalregistry
  647. endif
  648. set BROWSER_ParmKey = $($R4)
  649. set BROWSER_NetRuleKey = $($R2)
  650. set BROWSER_ProductKey = $($R1)
  651. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  652. set ProductOpSupport = $(ProductOpSupportSERVER)
  653. else
  654. set ProductOpSupport = $(ProductOpSupportWKSTA)
  655. endif
  656. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  657. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  658. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  659. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductBROWSERTitle)},+
  660. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductBROWSERDescription)},+
  661. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductBROWSERName)},+
  662. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  663. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  664. Shell $(UtilityInf), AddValueList, $(BROWSER_ProductKey), $(NewValueList)
  665. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  666. Debug-Output "OEMNSVWK.INF: ShellCode error."
  667. goto ShellCodeError
  668. endif
  669. set RegistryErrorIndex = $($R0)
  670. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  671. EndWait
  672. Debug-Output "OEMNSVWK.INF: registry error: add value list."
  673. CloseRegKey $(BROWSER_ProductKey)
  674. CloseRegKey $(BROWSER_NetRuleKey)
  675. CloseRegKey $(BROWSER_ParmKey)
  676. goto fatalregistry
  677. endif
  678. CloseRegKey $(NROWSER_ProductKey)
  679. set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),BROWSER}}
  680. Shell $(UtilityInf), AddValueList, $(BROWSER_NetRuleKey), $(NewValueList)
  681. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  682. Debug-Output "OEMNSVWK.INF: ShellCode error."
  683. goto ShellCodeError
  684. endif
  685. set RegistryErrorIndex = $($R0)
  686. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  687. CloseRegKey $(SoftLinkageKey)
  688. EndWait
  689. Debug-Output "OEMNSVWK.INF: Registry error: add value list."
  690. CloseRegKey $(BROWSER_NetRuleKey)
  691. CloseRegKey $(BROWSER_ParmKey)
  692. goto fatalregistry
  693. endif
  694. CloseRegKey $(BROWSER_NetRuleKey)
  695. Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
  696. Set MaintainServerString = "Yes"
  697. Else
  698. Set MaintainServerString = "Auto"
  699. Endif
  700. set NewValueList = {{MaintainServerList,$(NoTitle),$(!REG_VT_SZ),$(MaintainServerString)},+
  701. {IsDomainMaster,$(NoTitle),$(!REG_VT_SZ),"FALSE"}}
  702. Shell $(UtilityInf), AddValueList, $(BROWSER_ParmKey), $(NewValueList)
  703. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  704. Debug-Output "OEMNSVWK.INF: ShellCode error."
  705. goto ShellCodeError
  706. endif
  707. set RegistryErrorIndex = $($R0)
  708. CloseRegKey $(BROWSER_ParmKey)
  709. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  710. EndWait
  711. Debug-Output "OEMNSVWK.INF: registry error: add value list."
  712. goto fatalregistry
  713. endif
  714. endif
  715. ifstr(i) $(DoMESSENGER) == TRUE
  716. ;
  717. ; Install Messenger registry
  718. ;
  719. Debug-Output "OEMNSVWK.INF: Install Messenger registry"
  720. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductMESSENGERName))
  721. Set MessengerServiceType = "serviceshare"
  722. Ifint $(SystemMemory) > 12287
  723. Set MessengerServiceType = "autoserviceshare"
  724. Endif
  725. Shell $(UtilityInf), CreateService, $(ProductMESSENGERName), +
  726. $(ProductMESSENGERDisplayName), $(ProductMESSENGERImagePath), +
  727. $(MessengerServiceType), "", {"LanmanWorkstation"}, ""
  728. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  729. Debug-Output "OEMNSVWK.INF: ShellCode error"
  730. goto ShellCodeError
  731. endif
  732. set RegistryErrorIndex = $($R0)
  733. CloseRegKey $($R1)
  734. CloseRegKey $($R2)
  735. CloseRegKey $($R3)
  736. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  737. EndWait
  738. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  739. goto fatalregistry
  740. endif
  741. endif
  742. ifstr(i) $(DoRDR) == TRUE
  743. ;
  744. ; Install Rdr registry
  745. ;
  746. Debug-Output "OEMNSVWK.INF: Install Rdr registry"
  747. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductRDRName))
  748. Shell $(UtilityInf), CreateService, $(ProductRDRName), +
  749. $(ProductRDRDisplayName), $(ProductRDRImagePath), +
  750. "system", "Network", {}, "", +
  751. $(NetEventDLL)
  752. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  753. Debug-Output "OEMNSVWK.INF: ShellCode error"
  754. goto ShellCodeError
  755. endif
  756. set RegistryErrorIndex = $($R0)
  757. CloseRegKey $($R1)
  758. CloseRegKey $($R2)
  759. CloseRegKey $($R3)
  760. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  761. EndWait
  762. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  763. goto fatalregistry
  764. endif
  765. ;
  766. ; Install RDBSS
  767. ;
  768. Debug-Output "OEMNSVWK.INF: Install RDBSS registry"
  769. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductRDBSSName))
  770. Shell $(UtilityInf), CreateService, $(ProductRDBSSName), +
  771. $(ProductRDBSSDisplayName), $(ProductRDBSSImagePath), +
  772. "system", "Network", {}, "", +
  773. $(NetEventDLL)
  774. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  775. Debug-Output "OEMNSVWK.INF: ShellCode error"
  776. goto ShellCodeError
  777. endif
  778. set RegistryErrorIndex = $($R0)
  779. CloseRegKey $($R1)
  780. CloseRegKey $($R2)
  781. CloseRegKey $($R3)
  782. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  783. EndWait
  784. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  785. goto fatalregistry
  786. endif
  787. Debug-Output "OEMNSVWK.INF: Add NetworkProvider"
  788. Shell $(UtilityInf), AddNetworkProvider, $(ProviderName), +
  789. $(ProductProviderImagePath), $(ProductProviderName), +
  790. $(ProviderDeviceName)
  791. set RegistryErrorIndex = $($R0)
  792. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  793. EndWait
  794. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  795. goto fatalregistry
  796. endif
  797. endif
  798. Ifstr(i) $(DoREPL) == TRUE
  799. ;
  800. ; Install Replicator as an on-demand service. Create ancillary keys.
  801. ;
  802. Debug-Output "OEMNSVWK.INF: Install Replicator registry"
  803. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductREPLName))
  804. Shell $(UtilityInf), CreateService, $(ProductREPLName), +
  805. $(ProductREPLDisplayName), $(ProductREPLImagePath), +
  806. "service", "",+
  807. {"LanmanWorkstation","LanmanServer"}, "", $(NetMsgDLL), +
  808. "", "Application"
  809. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  810. Debug-Output "OEMNSVWK.INF: ShellCode error; Replicator"
  811. Goto ShellCodeError
  812. Endif
  813. set RegistryErrorIndex = $($R0)
  814. Set RP_SrvKey = $($R1)
  815. Set RP_ParmKey = $($R2)
  816. CloseRegKey $($R3)
  817. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  818. EndWait
  819. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  820. CloseRegKey $(RP_SrvKey)
  821. CloseRegKey $(RP_ParmKey)
  822. goto fatalregistry
  823. endif
  824. ;
  825. ; If LANMan NT, set replication to "Both"; otherwise, "Import".
  826. ;
  827. Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
  828. Set ReplImportControl = 3
  829. Set ReplSecurity = 6
  830. Else
  831. Set ReplImportControl = 2
  832. Set ReplSecurity = 2
  833. Endif
  834. ;
  835. ; Set proper security on the Parameters key
  836. ;
  837. LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), SECUREKEY, $(RP_ParmKey), $(ReplSecurity)
  838. Set NewValueList = {{Replicate,$(NoTitle),$(!REG_VT_DWORD),$(ReplImportControl)},+
  839. {ImportPath,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\System32\Repl\Import"},+
  840. {ExportPath,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\System32\Repl\Export"}}
  841. Shell $(UtilityInf), AddValueList, $(RP_ParmKey), $(NewValueList)
  842. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  843. Debug-Output "OEMNSVWK.INF: ShellCode error."
  844. Goto ShellCodeError
  845. Endif
  846. Set RegistryErrorIndex = $($R0)
  847. CloseRegKey $(RP_ParmKey)
  848. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  849. EndWait
  850. Debug-Output "OEMNSVWK.INF: registry error: add value list."
  851. CloseRegKey $(RP_SrvKey)
  852. goto fatalregistry
  853. Endif
  854. Debug-Output "OEMNSVWK.INF: Create Replicator keys and directories"
  855. CreateRegKey $(RP_SrvKey) {"Exports",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ExportsKey
  856. CreateRegKey $(RP_SrvKey) {"Imports",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ImportsKey
  857. ;
  858. ; Set proper security on the Exports and Imports keys
  859. ;
  860. LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), SECUREKEY, $(ExportsKey), 2
  861. LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), SECUREKEY, $(ImportsKey), 2
  862. CloseRegKey $(ExportsKey)
  863. CloseRegKey $(ImportsKey)
  864. CloseRegKey $(RP_SrvKey)
  865. Install Install-Repl-Dirs
  866. Endif
  867. ;
  868. ; End of Replicator installation
  869. ;
  870. Goto writeparameters
  871. writeparameters = +
  872. EndWait
  873. goto successful
  874. ;-----------------------------------------------
  875. ; Configure Browser section
  876. ;-----------------------------------------------
  877. ConfigureBrowser = +
  878. set FLibraryErrCtl = 1
  879. LibraryProcedure ResultList $(!NCPA_HANDLE), CPlBROWSER $(!STF_HWND)
  880. Set Result = *($(ResultList),1)
  881. ifint $(Result) == 0
  882. set CommonStatus = STATUS_REBOOT
  883. else-ifint $(Result) == 1
  884. set CommonStatus = STATUS_USERCANCEL
  885. else
  886. set RegistryErrorIndex = $(Result)
  887. goto fatalregistry
  888. endif
  889. goto successful
  890. ;-----------------------------------------------
  891. ; Binding section
  892. ;-----------------------------------------------
  893. bindingadapter =+
  894. set Error = "Binding: Sorry, not yet implemented."
  895. goto fatal
  896. ;-----------------------------------------------
  897. ; Removeadapter section
  898. ;-----------------------------------------------
  899. removeadapter = +
  900. ;
  901. ; Don't allow removal on NTAS
  902. ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
  903. set RegistryErrorIndex = CANT_REMOVE_WKSTA_NTAS
  904. goto fatalregistry
  905. endif
  906. ;
  907. ; Remove workstation service
  908. ;
  909. ifcontains(i) $(ProductWKSTAName) in $(OEM_ABANDON_OPTIONS)
  910. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  911. $(ProductWKSTAName)
  912. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  913. Debug-Output "OEMNSVWK.INF: ShellCode error"
  914. goto ShellCodeError
  915. endif
  916. set RegistryErrorIndex = $($R0)
  917. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  918. goto fatalregistry
  919. endif
  920. endif
  921. ifcontains(i) $(ProductBROWSERName) in $(OEM_ABANDON_OPTIONS)
  922. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  923. $(ProductBROWSERName)
  924. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  925. Debug-Output "OEMNSVWK.INF: ShellCode error"
  926. goto ShellCodeError
  927. endif
  928. set RegistryErrorIndex = $($R0)
  929. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  930. goto fatalregistry
  931. endif
  932. endif
  933. ;
  934. ; remove NETLOGON, ALERTER, BROWSER,
  935. ; MESSENGER, RDR, REPL services
  936. ;
  937. Set RemoveOptions = {+
  938. $(ProductNETLOGONName), +
  939. $(ProductALERTERName), +
  940. $(ProductMESSENGERName), +
  941. $(ProductRDRName), +
  942. $(ProductRDBSSName), +
  943. $(ProductREPLName)}
  944. ForListDo $(RemoveOptions)
  945. ifcontains(i) $($) in $(OEM_ABANDON_OPTIONS)
  946. Shell $(UtilityInf), RemoveService, $($), "YES"
  947. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  948. Debug-Output "OEMNSVWK.INF: ShellCode error"
  949. goto ShellCodeError
  950. endif
  951. set RegistryErrorIndex = $($R0)
  952. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  953. goto fatalregistry
  954. endif
  955. endif
  956. EndForListDo
  957. ;
  958. ; Remove Provider
  959. ;
  960. Shell $(UtilityInf) RemoveNetworkProvider $(ProviderName)
  961. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  962. Debug-Output "OEMNSVWK.INF: ShellCode error"
  963. goto ShellCodeError
  964. endif
  965. set RegistryErrorIndex = $($R0)
  966. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  967. goto fatalregistry
  968. endif
  969. goto end
  970. ;-----------------------------------------------
  971. ; Upgrade Software section
  972. ;-----------------------------------------------
  973. UpgradeSoftware = +
  974. ; Upgrade software component
  975. ;
  976. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  977. Ifstr $(KeyProduct) != $(KeyNull)
  978. install "Install-Update"
  979. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  980. goto fatal
  981. endif
  982. ; Upgrade the version number
  983. ;
  984. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  985. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  986. ;
  987. ; Update description and op support
  988. ;
  989. set ProductOpSupport = $(ProductOpSupportWKSTA)
  990. ifstr(i) $(!NTN_InfOption) == "BROWSER"
  991. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  992. set ProductOpSupport = $(ProductOpSupportSERVER)
  993. endif
  994. endif
  995. SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(Option)Description)}
  996. SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  997. CloseRegKey $(KeyProduct)
  998. ;
  999. ; Add the RDR2 keys
  1000. ;
  1001. OpenRegKey $(!REG_H_LOCAL) "" $(ProductRDRServiceKeyName) $(MAXIMUM_ALLOWED) KeyRDRService
  1002. Ifstr $(KeyRDRService) == $(KeyNull)
  1003. Shell $(UtilityInf), CreateService, $(ProductRDRName), +
  1004. $(ProductRDRDisplayName), $(ProductRDRImagePath), +
  1005. "system", "Network", {}, "", +
  1006. $(NetEventDLL)
  1007. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1008. Debug-Output "OEMNSVWK.INF: ShellCode error"
  1009. goto ShellCodeError
  1010. endif
  1011. set RegistryErrorIndex = $($R0)
  1012. CloseRegKey $($R1)
  1013. CloseRegKey $($R2)
  1014. CloseRegKey $($R3)
  1015. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1016. EndWait
  1017. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  1018. goto fatalregistry
  1019. endif
  1020. else
  1021. CloseRegKey $(KeyRDRService)
  1022. endif
  1023. OpenRegKey $(!REG_H_LOCAL) "" $(ProductRDBSSServiceKeyName) $(MAXIMUM_ALLOWED) KeyRDBSSService
  1024. Ifstr $(KeyRDBSSService) == $(KeyNull)
  1025. Shell $(UtilityInf), CreateService, $(ProductRDBSSName), +
  1026. $(ProductRDBSSDisplayName), $(ProductRDBSSImagePath), +
  1027. "system", "Network", {}, "", +
  1028. $(NetEventDLL)
  1029. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1030. Debug-Output "OEMNSVWK.INF: ShellCode error"
  1031. goto ShellCodeError
  1032. endif
  1033. set RegistryErrorIndex = $($R0)
  1034. CloseRegKey $($R1)
  1035. CloseRegKey $($R2)
  1036. CloseRegKey $($R3)
  1037. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1038. EndWait
  1039. Debug-Output "OEMNSVWK.INF: Registry error: add software components"
  1040. goto fatalregistry
  1041. endif
  1042. else
  1043. CloseRegKey $(KeyRDBSSService)
  1044. endif
  1045. ;
  1046. ; Change Alerter image path
  1047. ;
  1048. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, "Alerter", $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "%SystemRoot%\System32\services.exe", "", "", "", "", ""
  1049. ;
  1050. ; Change Browser image path
  1051. ;
  1052. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, "Browser", $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "%SystemRoot%\System32\services.exe", "", "", "", "", ""
  1053. ;
  1054. ; Change lanmanworkstation image path
  1055. ;
  1056. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, "LanmanWorkstation", $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "%SystemRoot%\System32\services.exe", "", "", "", "", ""
  1057. ;
  1058. ; Remove DGRcvr service
  1059. ;
  1060. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\DGRcvr" $(MAXIMUM_ALLOWED) DGRcvrKey
  1061. ifstr(i) $(DGRcvrKey) != ""
  1062. CloseRegKey $(DGRcvrKey)
  1063. LibraryProcedure RS_RemoveResult $(!NCPA_HANDLE), CPlSetup, +
  1064. $(!STF_HWND), DELETESVC, "DGRcvr"
  1065. endif
  1066. #if (!defined(CAIRO_INF))
  1067. ;
  1068. ; Remove MUP dependencies
  1069. ;
  1070. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\LanmanWorkstation\Linkage" $(MAXIMUM_ALLOWED) LinkageKey
  1071. ifstr(i) $(LinkageKey) != ""
  1072. GetRegValue $(LinkageKey) "OtherDependencies" DependInfo
  1073. set Dependencies = *($(DependInfo),4)
  1074. ifcontains(i) "mup" in $(Dependencies)
  1075. set newDependencies = {}
  1076. ForListDo $(Dependencies)
  1077. ifstr(i) $($) != "mup"
  1078. ifstr(i) $(newDependencies) == {}
  1079. set newDependencies = {$($)}
  1080. else
  1081. set newDependencies = >($(newDependencies),$($))
  1082. endif
  1083. endif
  1084. EndForListDo
  1085. SetRegValue $(LinkageKey) {OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),$(newDependencies)}
  1086. endif
  1087. CloseRegKey $(LinkageKey)
  1088. endif
  1089. #endif
  1090. ;
  1091. ; Change messenger image path and depedn on services
  1092. ;
  1093. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Messenger" $(MAXIMUM_ALLOWED) KeyMessenger
  1094. ifstr(i) $(KeyMessenger) != ""
  1095. GetRegValue $(KeyMessenger) "Start" StartInfo
  1096. set StartValue = *($(StartInfo),4)
  1097. ; No need to change the service start type.
  1098. ; Why was it done, anyway?
  1099. ; ifint $(StartValue) != 4
  1100. ; set StartValue = 3
  1101. ; Ifint $(SystemMemory) > 12287
  1102. ; Set StartValue = 2
  1103. ; Endif
  1104. ; endif
  1105. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetBios" $(MAXIMUM_ALLOWED) KeyNetBIOS
  1106. ifstr(i) $(KeyNetBIOS) != ""
  1107. set Dependencies = {"LanmanWorkstation", "Netbios"}
  1108. else
  1109. set Dependencies = {"LanmanWorkstation"}
  1110. endif
  1111. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, "Messenger", $(SERVICE_NO_CHANGE), $(StartValue), $(SERVICE_NO_CHANGE), "%SystemRoot%\System32\services.exe", "", $(Dependencies), "", "", ""
  1112. endif
  1113. ;
  1114. ; Chang the device name
  1115. ;
  1116. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\"$(ProviderName)"\networkprovider" $(MAXIMUM_ALLOWED) ProviderKey
  1117. ifstr(i) $(ProviderKey) != ""
  1118. SetRegValue $(ProviderKey) {Devicename,$(NoTitle),$(!REG_VT_SZ),"\Device\"$(ProviderDeviceName)}
  1119. CloseRegKey $(ProviderKey)
  1120. endif
  1121. install "Install-Update"
  1122. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1123. goto fatal
  1124. endif
  1125. else
  1126. ;
  1127. ; Cannot Open software key, goto ERROR
  1128. ;
  1129. goto fatalregistry
  1130. endif
  1131. goto end
  1132. ;
  1133. ; End of Upgrade Software
  1134. ;
  1135. ;
  1136. ; Escape hatches
  1137. ;
  1138. successful = +
  1139. goto end
  1140. ;
  1141. ; warning display
  1142. ;
  1143. warning = +
  1144. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1145. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1146. goto ShellCodeError
  1147. endif
  1148. ifstr(i) $($R1) == "OK"
  1149. goto $(to)
  1150. else-ifstr(i) $($R1) == "CANCEL"
  1151. goto $(from)
  1152. else
  1153. ; Debug-Msg "Error Error Bad DLGEVENT"
  1154. goto end
  1155. endif
  1156. ;
  1157. ; non fatal error display
  1158. ;
  1159. nonfatalinfo = +
  1160. Set CommonStatus = STATUS_USERCANCEL
  1161. Set Severity = STATUS
  1162. goto nonfatalmsg
  1163. nonfatal = +
  1164. Set Severity = NONFATAL
  1165. goto nonfatalmsg
  1166. nonfatalmsg = +
  1167. ifstr(i) $(Error) == ""
  1168. Set Severity = NONFATAL
  1169. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1170. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1171. goto ShellCodeError
  1172. endif
  1173. set Error = $($R0)
  1174. endif
  1175. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1176. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1177. goto ShellCodeError
  1178. endif
  1179. ifstr(i) $($R1) == "OK"
  1180. goto $(from)
  1181. else
  1182. goto "end"
  1183. endif
  1184. ;
  1185. ; Registry is broken
  1186. ;
  1187. fatalregistry = +
  1188. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1189. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1190. goto ShellCodeError
  1191. endif
  1192. set Error = $($R0)
  1193. goto fatal
  1194. ;
  1195. ; fatal error display
  1196. ;
  1197. fatal = +
  1198. ifstr(i) $(Error) == ""
  1199. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1200. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1201. goto ShellCodeError
  1202. endif
  1203. set Error = $($R0)
  1204. endif
  1205. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1206. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1207. goto ShellCodeError
  1208. endif
  1209. goto setfailed
  1210. ;
  1211. ; Shelling error
  1212. ;
  1213. ShellCodeError = +
  1214. set DlgType = "MessageBox"
  1215. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1216. set STF_MB_TEXT = $(ShellCodeErrorText)
  1217. set STF_MB_TYPE = 1
  1218. set STF_MB_ICON = 3
  1219. set STF_MB_DEF = 1
  1220. ui start "Error Message"
  1221. goto setfailed
  1222. setfailed = +
  1223. set CommonStatus = STATUS_FAILED
  1224. Ifint $(RegistryErrorIndex) == CANT_REMOVE_WKSTA_NTAS
  1225. set CommonStatus = STATUS_USERCANCEL
  1226. endif
  1227. ;
  1228. ; If OEM_ABANDON_ON, we need to clean up the registry
  1229. ;
  1230. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1231. set OEM_ABANDON_ON = FALSE
  1232. goto removeadapter
  1233. endif
  1234. goto end
  1235. end = +
  1236. goto term
  1237. term = +
  1238. Return $(CommonStatus)
  1239. ;***************************************************************
  1240. ; INSTALL SECTIONS
  1241. ;***************************************************************
  1242. [Install-Option]
  1243. set STF_VITAL = ""
  1244. ifstr(i) $(AddCopy) == "YES"
  1245. ;
  1246. ; Add the files to the copy list
  1247. ;
  1248. ; BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1249. ; the other INF files
  1250. ;
  1251. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1252. AddSectionFilesToCopyList Files-Drivers $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1253. endif
  1254. ifstr(i) $(DoCopy) == "YES"
  1255. ;
  1256. ; Copy files in the copy list
  1257. ;
  1258. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1259. CopyFilesInCopyList
  1260. endif
  1261. ifstr(i) $(DoConfig) == "YES"
  1262. ;
  1263. ; Add product to registry
  1264. ;
  1265. ;
  1266. ; Finish up
  1267. endif
  1268. Exit
  1269. [Install-Update]
  1270. set STF_VITAL = ""
  1271. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1272. ;set STF_VERSION = "YES"
  1273. AddSectionFilesToCopyList Files-WKSTA $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1274. AddSectionFilesToCopyList Files-Drivers $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1275. Exit
  1276. ;
  1277. ;
  1278. ; Create the directories necessary for the Replicator Service.
  1279. ;
  1280. [Install-Repl-Dirs]
  1281. Set STF_VITAL = ""
  1282. CreateDir $(!STF_WINDOWSSYSPATH)\Repl
  1283. CreateDir $(!STF_WINDOWSSYSPATH)\Repl\Export
  1284. CreateDir $(!STF_WINDOWSSYSPATH)\Repl\Export\Scripts
  1285. CreateDir $(!STF_WINDOWSSYSPATH)\Repl\Import
  1286. CreateDir $(!STF_WINDOWSSYSPATH)\Repl\Import\Scripts
  1287. Exit