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.

878 lines
26 KiB

  1. ;***********************************************************************
  2. ;
  3. ; OEMNSVDF.INF
  4. ;
  5. ; Dfs Service
  6. ;
  7. ; History: milans 01/16/96 created
  8. ; WayneSc 07/10/96 Bug Fix - Added code to add dfsadmin to
  9. ; a Administrative Tools group.
  10. ; WayneSc 08/09/96 Bug Fix - 50130 - Update only changes date
  11. ; and time stamps.
  12. ;
  13. ;***********************************************************************
  14. ;-----------------------------------------------------------------------
  15. ; OPTION TYPE
  16. ; -----------
  17. ; This identifies the Option type we are dealing with. The different
  18. ; possible types are:
  19. ;
  20. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  21. ;
  22. ; Types specific to networking:
  23. ;
  24. ; NetAdapter, a netcard / adapter combination or just a netcard
  25. ; NetDriver, just a netcard driver
  26. ; NetTransport, a complete NDIS-compliant TDI transport stack
  27. ; NetService, an NT networking service
  28. ; NetWork, a complete network ensemble.
  29. ; NetProvider a complete network which supports NT MPR protocol
  30. ;-----------------------------------------------------------------------
  31. [Identification]
  32. OptionType = NetService
  33. ;-----------------------------------------------------------------------
  34. ; OPTION LIST
  35. ; -----------
  36. ; This section lists the OEM Option key names. These keys are locale
  37. ; independent and used to represent the option in a locale independent
  38. ; manner.
  39. ;
  40. ;-----------------------------------------------------------------------
  41. [Options]
  42. DFS
  43. ;***********************************************************************
  44. ; CONSTANTS FOR USING DIALOGS
  45. ;***********************************************************************
  46. [FileConstants]
  47. ;
  48. ; Product Info
  49. ;
  50. Manufacturer = "Microsoft"
  51. ProductMajorVersion = "4"
  52. ProductMinorVersion = "0"
  53. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  54. ;================================================================
  55. ; DFS Service
  56. ;
  57. ;================================================================
  58. ;
  59. ;
  60. ;
  61. ProductDfsName = "DfsService"
  62. ProductDfsDisplayName = "Distributed File System"
  63. ProductDfsImagePath = "%SystemRoot%\System32\dfssvc.exe"
  64. ; Service is auto start mode
  65. ProductDfsSvcType = "serviceauto"
  66. ;
  67. ; Registry Key Names
  68. ;
  69. ;
  70. ; BUGBUG (WayneSc)- This section should be in USA_NET.txt
  71. ; Delayed until NT 4.0 ships.
  72. ;
  73. ProductGroup = "Administrative Tools"
  74. DfsAdminName = "Dfs Administrator"
  75. [GeneralConstants]
  76. ;
  77. ; File names, etc.
  78. ;
  79. UtilityInf = "UTILITY.INF"
  80. subroutineinf = "SUBROUTN.INF"
  81. Exit_Code = 0
  82. ;ShellCode = 0
  83. BillboardVisible = 0
  84. ProCaption = "Windows NT Setup"
  85. ProCancel = "Cancel"
  86. ProCancelMsg = "Windows NT Networking is not correctly installed. "+
  87. "Are you sure you want to cancel copying files?"
  88. ProCancelCap = "Network Setup Message"
  89. ProText1 = "Copying:"
  90. ProText2 = "To:"
  91. ;
  92. ; Program flow control variables.
  93. ;
  94. from = ""
  95. to = ""
  96. ;
  97. ; Return codes; Exit_Code is set to one of these
  98. ;
  99. ExitCodeOk = 0
  100. ExitCodeCancel = 1
  101. ExitCodeFatal = 2
  102. KeyNull = ""
  103. RegistryErrorIndex = NO_ERROR
  104. KeyProduct = ""
  105. KeyParameters = ""
  106. TRUE = 1
  107. FALSE = 0
  108. NoTitle = 0
  109. ExitState = "Active"
  110. OldVersionExisted = $(FALSE)
  111. [date]
  112. ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  113. ; Minute, Second }
  114. Now = {} ? $(!LIBHANDLE) GetSystemDate
  115. ;---------------------------------------------------------------------------
  116. ; 1. Identify
  117. ;
  118. ; DESCRIPTION: To verify that this INF deals with the same type of options
  119. ; as we are choosing currently.
  120. ;
  121. ; INPUT: None
  122. ;
  123. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  124. ; $($R1): Option Type (COMPUTER ...)
  125. ; $($R2): Diskette description
  126. ;---------------------------------------------------------------------------
  127. [Identify]
  128. ;
  129. ;
  130. read-syms Identification
  131. set Status = STATUS_SUCCESSFUL
  132. set Identifier = $(OptionType)
  133. set Media = #("Source Media Descriptions", 1, 1)
  134. Return $(Status) $(Identifier) $(Media)
  135. ;------------------------------------------------------------------------
  136. ; 2. ReturnOptions:
  137. ;
  138. ; DESCRIPTION: To return the option list supported by this INF and the
  139. ; localised text list representing the options.
  140. ;
  141. ;
  142. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  143. ;
  144. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  145. ; STATUS_NOLANGUAGE
  146. ; STATUS_FAILED
  147. ;
  148. ; $($R1): Option List
  149. ; $($R2): Option Text List
  150. ;------------------------------------------------------------------------
  151. [ReturnOptions]
  152. ;
  153. ;
  154. set Status = STATUS_SUCCESSFUL
  155. set OptionList = {"DFS"}
  156. set OptionTextList = {"Distributed File System"}
  157. Return $(Status) $(OptionList) $(OptionTextList)
  158. ;----------InstallOption-------------------------------------------------
  159. ;
  160. ; InstallOption:
  161. ;
  162. ; This section is shelled to by main installation processing
  163. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  164. ;
  165. ;
  166. ; FUNCTION: To copy files representing Options
  167. ; To configure the installed option
  168. ; To update the registry for the installed option
  169. ;
  170. ; INPUT: $($0): Language to use
  171. ; $($1): OptionID to install
  172. ; $($2): SourceDirectory
  173. ; $($3): AddCopy (YES | NO)
  174. ; $($4): DoCopy (YES | NO)
  175. ; $($5): DoConfig (YES | NO)
  176. ;
  177. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  178. ; STATUS_NOLANGUAGE |
  179. ; STATUS_USERCANCEL |
  180. ; STATUS_FAILED
  181. ;
  182. ;------------------------------------------------------------------------
  183. [InstallOption]
  184. ;
  185. ; extract parameters
  186. ;
  187. set Option = $($1)
  188. set SrcDir = $($2)
  189. set AddCopy = $($3)
  190. set DoCopy = $($4)
  191. set DoConfig = $($5)
  192. Debug-Output "OEMNSVDF.INF: STF_CWDIR is: "$(!STF_CWDIR)
  193. Debug-Output "OEMNSVDF.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  194. ; define all the constants
  195. set-subst LF = "\n"
  196. read-syms GeneralConstants
  197. read-syms FileConstants
  198. ifstr(i) $(!NTN_Origination) == "NCPA"
  199. set Continue = $(OK)
  200. endif
  201. detect date
  202. set-title $(FunctionTitle)
  203. set to = Begin
  204. set from = Begin
  205. ;
  206. ; Assume all is well.
  207. ;
  208. set CommonStatus = STATUS_REBOOT
  209. EndWait
  210. ;
  211. ; Set up the operation-mode-based variables and gaily welcome
  212. ; the user. If the "install mode" variable is improperly set,
  213. ; assume this is a new installation.
  214. ;
  215. Begin = +
  216. Ifstr(i) $(!NTN_InstallMode) == deinstall
  217. set StartLabel = removeadapter
  218. else-Ifstr(i) $(!NTN_InstallMode) == Update
  219. set StartLabel = UpgradeSoftware
  220. else-Ifstr(i) $(!NTN_InstallMode) == configure
  221. set StartLabel = configureadapter
  222. ;
  223. ; You cannot config the software component
  224. ;
  225. Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  226. Debug-Output "Cannot configure the software."
  227. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  228. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  229. Debug-Output "ShellCode error: cannot get an error string."
  230. goto ShellCodeError
  231. endif
  232. set Error = $($R0)
  233. set from = end
  234. set to = end
  235. goto nonfatalinfo
  236. endif
  237. else-Ifstr(i) $(!NTN_InstallMode) == bind
  238. set StartLabel = bindingadapter
  239. else
  240. set StartLabel = installadapter
  241. endif
  242. set from = $(fatal)
  243. set to = $(fatal)
  244. goto $(StartLabel)
  245. ;-----------------------------------------------
  246. ; Installation Section
  247. ;-----------------------------------------------
  248. installadapter = +
  249. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  250. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  251. Goto ShellCodeError
  252. Else-Ifstr(i) $($R0) == STATUS_FAILED
  253. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  254. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  255. goto ShellCodeError
  256. endif
  257. set Error = $($R0)
  258. Goto fatal
  259. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  260. Goto successful
  261. Endif
  262. Set SrcDir = $($R1)
  263. ifstr(i) $(!NTN_InstallMode) == "install"
  264. Debug-Output "OEMNSVDF.INF: installadapter: installing [Install-Option]"
  265. install "Install-Option"
  266. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  267. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  268. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  269. goto ShellCodeError
  270. endif
  271. set Error = $($R0)
  272. goto fatal
  273. endif
  274. endif
  275. set OEM_ABANDON_ON = TRUE
  276. StartWait
  277. ;
  278. ; Install the Dfs components...
  279. ;
  280. LoadLibrary "" dfssetup.dll DfsSetupLib
  281. LibraryProcedure UnusedResult $(DfsSetupLib) DfsSetupDfs
  282. FreeLibrary $(DfsSetupLib)
  283. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  284. $(ProductDfsName),+
  285. $(ProductDfsName),+
  286. $(ProductDfsDisplayName), $(STF_CONTEXTINFNAME),+
  287. $(ProductDfsImagePath),+
  288. $(ProductDfsSvcType),+
  289. "NetworkProvider", {"Dfs", "Mup", "LanmanServer"}, "",+
  290. "", "", "", "", "", ""
  291. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  292. Debug-Output "OEMNSVDF.INF: ShellCode error, add software component"
  293. goto ShellCodeError
  294. endif
  295. set RegistryErrorIndex = $($R0)
  296. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  297. EndWait
  298. Debug-Output "OEMNSVDF.INF: Registry error: add software components"
  299. goto fatalregistry
  300. endif
  301. set DfsVersKeyHandle = $($R1)
  302. set DfsNetRulesKeyHandle = $($R2)
  303. CloseRegKey $($R3)
  304. CloseRegKey $($R4)
  305. CloseRegKey $($R5)
  306. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),"service"},+
  307. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  308. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  309. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductDfsDisplayName)},+
  310. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductDfsDisplayName)},+
  311. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductDfsName)},+
  312. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  313. Shell $(UtilityInf), AddValueList, $(DfsVersKeyHandle), $(NewValueList)
  314. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  315. Debug-Output "OEMNSVDF.INF: ShellCode error, add value list"
  316. goto ShellCodeError
  317. endif
  318. set RegistryErrorIndex = $($R0)
  319. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  320. EndWait
  321. Debug-Output "OEMNSVDF.INF: Registry error: add value list."
  322. CloseRegKey $(DfsVersKeyHandle)
  323. CloseRegKey $(DfsNetRulesKeyHandle)
  324. goto fatalregistry
  325. Endif
  326. set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  327. Shell $(UtilityInf), AddValueList, $(DfsNetRulesKeyHandle), $(NewValueList)
  328. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  329. Debug-Output "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: add value list."
  336. CloseRegKey $(DfsVersKeyHandle)
  337. CloseRegKey $(DfsNetRulesKeyHandle)
  338. goto fatalregistry
  339. Endif
  340. CloseRegKey $(DfsVersKeyHandle)
  341. CloseRegKey $(DfsNetRulesKeyHandle)
  342. LoadLibrary "" dfssetup.dll DfsSetupLib
  343. LibraryProcedure ConfigureResult $(DfsSetupLib) DfsSetupConfigure $(!STF_HWND)
  344. FreeLibrary $(DfsSetupLib)
  345. ;
  346. ; Register the Explorer extensions
  347. ;
  348. ; OpenRegKey $(!REG_H_LOCAL) "" "Software\Classes\CLSID" +
  349. ; $(!REG_KEY_ALL_ACCESS) ClsidKey
  350. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  351. ; Debug-Output "OEMNSVDF.INF: Registry error: Open clsid key."
  352. ; goto fatalregistry
  353. ; Endif
  354. ;
  355. ; CreateRegKey $(ClsidKey) +
  356. ; {"{d456e010-be15-11ce-a81a-00aa003ca9f6}",0,GenericClass} +
  357. ; "" $(!REG_KEY_ALL_ACCESS) "" DfsUiKey
  358. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  359. ; SetRegValue $(DfsUiKey) {"", 0, $(!REG_VT_SZ), "DFS Administration"}
  360. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  361. ; CreateRegKey $(DfsUiKey) +
  362. ; {"InProcServer32",0,GenericClass} +
  363. ; "" $(!REG_KEY_ALL_ACCESS) "" InProcKey
  364. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  365. ; SetRegValue $(InProcKey) {"", 0, $(!REG_VT_SZ), "dfsui.dll"}
  366. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  367. ; SetRegValue $(InProcKey) {"ThreadingModel", 0, $(!REG_VT_SZ), "Apartment"}
  368. ; Endif
  369. ; CloseRegKey $(InProcKey)
  370. ; Endif
  371. ; Endif
  372. ; CloseRegKey $(DfsUiKey)
  373. ; Endif
  374. ;
  375. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  376. ; Debug-Output "OEMNSVDF.INF: Registry error: Creating clsid key 1."
  377. ; CloseRegKey $(ClsidKey)
  378. ; goto fatalregistry
  379. ; Endif
  380. ;
  381. ; CreateRegKey $(ClsidKey) +
  382. ; {"{841d6ffb-c2b9-11ce-afe2-00aa003ca9f6}",0,GenericClass} +
  383. ; "" $(!REG_KEY_ALL_ACCESS) "" DfsUiKey
  384. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  385. ; SetRegValue $(DfsUiKey) {"", 0, $(!REG_VT_SZ), "DFS Administration"}
  386. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  387. ; CreateRegKey $(DfsUiKey) +
  388. ; {"InProcServer32",0,GenericClass} +
  389. ; "" $(!REG_KEY_ALL_ACCESS) "" InProcKey
  390. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  391. ; SetRegValue $(InProcKey) {"", 0, $(!REG_VT_SZ), "dfsui.dll"}
  392. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  393. ; SetRegValue $(InProcKey) {"ThreadingModel", 0, $(!REG_VT_SZ), "Apartment"}
  394. ; Endif
  395. ; CloseRegKey $(InProcKey)
  396. ; Endif
  397. ; Endif
  398. ; CloseRegKey $(DfsUiKey)
  399. ; Endif
  400. ;
  401. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  402. ; Debug-Output "OEMNSVDF.INF: Registry error: Creating clsid key 2."
  403. ; CloseRegKey $(ClsidKey)
  404. ; goto fatalregistry
  405. ; Endif
  406. ;
  407. ; CloseRegKey $(ClsidKey)
  408. ;
  409. ; CreateRegKey $(!REG_H_LOCAL) +
  410. ; {"Software\Classes\Folder\ShellEx\DragDropHandlers",0,GenericClass} +
  411. ; "" $(!REG_KEY_ALL_ACCESS) "" DragDropKey
  412. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  413. ; OpenRegKey $(!REG_H_LOCAL) "" +
  414. ; "Software\Classes\Folder\ShellEx\DragDropHandlers" +
  415. ; $(!REG_KEY_ALL_ACCESS) DragDropKey
  416. ; Endif
  417. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  418. ; CreateRegKey $(DragDropKey) {"DFS Administration",0,GenericClass} +
  419. ; "" $(!REG_KEY_ALL_ACCESS) "" DfsAdminKey
  420. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  421. ; SetRegValue $(DfsAdminKey) {"", 0, $(!REG_VT_SZ), "{841d6ffb-c2b9-11ce-afe2-00aa003ca9f6}"}
  422. ; CloseRegKey $(DfsAdminKey)
  423. ; Endif
  424. ; CloseRegKey $(DragDropKey)
  425. ; Endif
  426. ;
  427. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  428. ; Debug-Output "OEMNSVDF.INF: Registry error: DragDrop key."
  429. ; goto fatalregistry
  430. ; Endif
  431. ;
  432. ; CreateRegKey $(!REG_H_LOCAL) +
  433. ; {"Software\Classes\Folder\ShellEx\PropertySheetHandlers",0,GenericClass} +
  434. ; "" $(!REG_KEY_ALL_ACCESS) "" PropertySheetKey
  435. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  436. ; OpenRegKey $(!REG_H_LOCAL) "" +
  437. ; "Software\Classes\Folder\ShellEx\PropertySheetHandlers" +
  438. ; $(!REG_KEY_ALL_ACCESS) PropertySheetKey
  439. ; Endif
  440. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  441. ; CreateRegKey $(PropertySheetKey) {"DFS Administration",0,GenericClass} +
  442. ; "" $(!REG_KEY_ALL_ACCESS) "" DfsAdminKey
  443. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  444. ; SetRegValue $(DfsAdminKey) {"", 0, $(!REG_VT_SZ), "{d456e010-be15-11ce-a81a-00aa003ca9f6}"}
  445. ; CloseRegKey $(DfsAdminKey)
  446. ; Endif
  447. ; CloseRegKey $(PropertySheetKey)
  448. ; Endif
  449. ;
  450. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  451. ; Debug-Output "OEMNSVDF.INF: Registry error: PropertySheet key."
  452. ; goto fatalregistry
  453. ; Endif
  454. ;
  455. ; CreateRegKey $(!REG_H_LOCAL) +
  456. ; {"Software\Classes\Folder\ShellEx\ContextMenuHandlers",0,GenericClass} +
  457. ; "" $(!REG_KEY_ALL_ACCESS) "" ContextKey
  458. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  459. ; OpenRegKey $(!REG_H_LOCAL) "" +
  460. ; "Software\Classes\Folder\ShellEx\ContextMenuHandlers" +
  461. ; $(!REG_KEY_ALL_ACCESS) ContextKey
  462. ; Endif
  463. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  464. ; CreateRegKey $(ContextKey) {"DFS Administration",0,GenericClass} +
  465. ; "" $(!REG_KEY_ALL_ACCESS) "" DfsAdminKey
  466. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  467. ; SetRegValue $(DfsAdminKey) {"", 0, $(!REG_VT_SZ), "{d456e010-be15-11ce-a81a-00aa003ca9f6}"}
  468. ; CloseRegKey $(DfsAdminKey)
  469. ; Endif
  470. ; CloseRegKey $(ContextKey)
  471. ; Endif
  472. ;
  473. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  474. ; Debug-Output "OEMNSVDF.INF: Registry error: ContextMenuHandlers key."
  475. ; goto fatalregistry
  476. ; Endif
  477. ;
  478. ; OpenRegKey $(!REG_H_LOCAL) "" +
  479. ; "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" +
  480. ; $(!REG_KEY_ALL_ACCESS) ShellExKey
  481. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  482. ; SetRegValue $(ShellExKey) {"{d456e010-be15-11ce-a81a-00aa003ca9f6}", 0, $(!REG_VT_SZ), "DFS Administration"}
  483. ; SetRegValue $(ShellExKey) {"{841d6ffb-c2b9-11ce-afe2-00aa003ca9f6}", 0, $(!REG_VT_SZ), "DFS Administration"}
  484. ; CloseRegKey $(ShellExKey)
  485. ; Endif
  486. ;
  487. ; Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  488. ; Debug-Output "OEMNSVDF.INF: Registry error: Shell Extensions key."
  489. ; goto fatalregistry
  490. ; Endif
  491. ;
  492. ; CreateRegKey $(!REG_H_CUSER) +
  493. ; {"Software\Microsoft\DFS Administrator",0,GenericClass} +
  494. ; "" $(!REG_KEY_ALL_ACCESS) "" AllowKey
  495. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  496. ; CloseRegKey $(AllowKey)
  497. ; Endif
  498. ;
  499. EndWait
  500. ;
  501. ; Set our master component for auto-self-removal
  502. ;
  503. ;
  504. ; Install DFS Administrator into the Administrative Tools program group
  505. ;
  506. install Install-DFSAdmin-Icon
  507. goto successful
  508. ;-----------------------------------------------
  509. ; Configuration Section
  510. ;-----------------------------------------------
  511. configureadapter = +
  512. LoadLibrary "" dfssetup.dll DfsSetupLib
  513. LibraryProcedure ConfigureResult $(DfsSetupLib) DfsSetupConfigure $(!STF_HWND)
  514. Ifstr(i) $(ConfigureResult) == Cancel
  515. Debug-Output "OEMNSVDF.INF: Configuration Cancelled"
  516. set CommonStatus = STATUS_USERCANCEL
  517. Else-Ifstr(i) $(ConfigureResult) == Reboot
  518. Debug-Output "OEMNSVDF.INF: Configuration complete - Reboot required"
  519. set CommonStatus = STATUS_REBOOT
  520. Endif
  521. FreeLibrary $(DfsSetupLib)
  522. goto end
  523. ;-----------------------------------------------
  524. ; Binding section
  525. ;-----------------------------------------------
  526. bindingadapter =+
  527. goto end
  528. ;-----------------------------------------------
  529. ; Removeadapter section
  530. ;
  531. ;
  532. ; Removal errors are ignored, since we want to
  533. ; try to remove as much as possible.
  534. ;-----------------------------------------------
  535. removeadapter = +
  536. ;
  537. ; Remove the Dfs components...
  538. ;
  539. ; DeleteRegTree $(!REG_H_LOCAL) "Software\Classes\Clsid\{d456e010-be15-11ce-a81a-00aa003ca9f6}"
  540. ; DeleteRegTree $(!REG_H_LOCAL) "Software\Classes\Clsid\{841d6ffb-c2b9-11ce-afe2-00aa003ca9f6}"
  541. ; DeleteRegTree $(!REG_H_LOCAL) "Software\Classes\Folder\ShellEx\DragDropHandlers\DFS Administration"
  542. ; DeleteRegTree $(!REG_H_LOCAL) "Software\Classes\Folder\ShellEx\PropertySheetHandlers\DFS Administration"
  543. ; DeleteRegTree $(!REG_H_LOCAL) "Software\Classes\Folder\ShellEx\ContextMenuHandlers\DFS Administration"
  544. ; DeleteRegTree $(!REG_H_CUSER) "Software\Microsoft\DFS Administrator"
  545. ; OpenRegKey $(!REG_H_LOCAL) "" +
  546. ; "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" +
  547. ; $(!REG_KEY_ALL_ACCESS) ShellExKey
  548. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  549. ; DeleteRegValue $(ShellExKey) "{d456e010-be15-11ce-a81a-00aa003ca9f6}"
  550. ; DeleteRegValue $(ShellExKey) "{841d6ffb-c2b9-11ce-afe2-00aa003ca9f6}"
  551. ; CloseRegKey $(ShellExKey)
  552. ; Endif
  553. DeleteRegTree $(!REG_H_LOCAL) "Software\Microsoft\Dfs"
  554. DeleteRegTree $(!REG_H_LOCAL) "System\CurrentControlSet\Services\Dfs"
  555. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(ProductDfsName)
  556. ;
  557. ; Remove DFS Administrator from the Administrative Tools program group
  558. ;
  559. install Remove-DFSAdmin-Icon
  560. set CommonStatus = STATUS_SUCCESSFUL
  561. goto end
  562. ;-----------------------------------------------
  563. ; Upgrade Software section
  564. ;-----------------------------------------------
  565. UpgradeSoftware = +
  566. ;
  567. ; Upgrade software component
  568. ;
  569. install "Install-Update"
  570. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  571. goto fatal
  572. endif
  573. ;
  574. ; Install DFS Administrator into the Administrative Tools program group
  575. ;
  576. install Install-DFSAdmin-Icon
  577. goto end
  578. ;
  579. ; End of Upgrade Software
  580. ;
  581. ;
  582. ; Escape hatches
  583. ;
  584. successful = +
  585. goto end
  586. ;
  587. ; info display
  588. ;
  589. infomsg =+
  590. read-syms InfoDlg
  591. ui start "Warning"
  592. set CommonStatus = STATUS_USERCANCEL
  593. goto end
  594. ;
  595. ; warning display
  596. ;
  597. warning = +
  598. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  599. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  600. goto ShellCodeError
  601. endif
  602. ifstr(i) $($R1) == "OK"
  603. goto $(to)
  604. else-ifstr(i) $($R1) == "CANCEL"
  605. goto $(from)
  606. else
  607. ; Debug-Msg "Error Error Bad DLGEVENT"
  608. goto "end"
  609. endif
  610. ;
  611. ; non fatal error display
  612. ;
  613. nonfatalinfo = +
  614. Set CommonStatus = STATUS_USERCANCEL
  615. Set Severity = STATUS
  616. goto nonfatalmsg
  617. nonfatal = +
  618. Set Severity = NONFATAL
  619. goto nonfatalmsg
  620. nonfatalmsg = +
  621. ifstr(i) $(Error) == ""
  622. Set Severity = NONFATAL
  623. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  624. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  625. goto ShellCodeError
  626. endif
  627. set Error = $($R0)
  628. endif
  629. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  630. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  631. goto ShellCodeError
  632. endif
  633. ifstr(i) $($R1) == "OK"
  634. goto $(from)
  635. else
  636. goto "end"
  637. endif
  638. ;
  639. ; Registry is broken
  640. ;
  641. fatalregistry = +
  642. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  643. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  644. goto ShellCodeError
  645. endif
  646. set Error = $($R0)
  647. goto fatal
  648. ;
  649. ; fatal error display
  650. ;
  651. fatal = +
  652. ifstr(i) $(Error) == ""
  653. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  654. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  655. goto ShellCodeError
  656. endif
  657. set Error = $($R0)
  658. endif
  659. Ifint $(BillboardVisible) != 0
  660. Shell "subroutn.inf" PopBillboard
  661. Set BillboardVisible = 0
  662. Endif
  663. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  664. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  665. goto ShellCodeError
  666. endif
  667. goto setfailed
  668. ;
  669. ; Shelling error
  670. ;
  671. ShellCodeError = +
  672. set DlgType = "MessageBox"
  673. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  674. set STF_MB_TEXT = $(ShellCodeErrorText)
  675. set STF_MB_TYPE = 1
  676. set STF_MB_ICON = 3
  677. set STF_MB_DEF = 1
  678. ui start "Error Message"
  679. goto setfailed
  680. setfailed = +
  681. set CommonStatus = STATUS_FAILED
  682. ;
  683. ; If OEM_ABANDON_ON, we need to clean up the registry
  684. ;
  685. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  686. set OEM_ABANDON_ON = FALSE
  687. goto removeadapter
  688. endif
  689. goto end
  690. end = +
  691. goto term
  692. term = +
  693. Return $(CommonStatus)
  694. ;***************************************************************
  695. ; Get File Size SECTIONS
  696. ;***************************************************************
  697. [GetFilesSize]
  698. set FileSizeList = ^(Files-DFS,3)
  699. set TotalSize = 0
  700. ForListDo $(FileSizeList)
  701. Split-String $($) "=" SplitString
  702. set Size = *($(SplitString),3)
  703. set-add TotalSize = $(TotalSize) $(Size)
  704. EndForListDo
  705. set-div SizeInK = $(TotalSize) 1024
  706. return $(SizeInK)
  707. ;***************************************************************
  708. ; INSTALL SECTIONS
  709. ;***************************************************************
  710. [Install-Option]
  711. set STF_VITAL = ""
  712. ifstr(i) $(AddCopy) == "YES"
  713. ;
  714. ; Add the files to the copy list
  715. ;
  716. AddSectionFilesToCopyList Files-DFS $(SrcDir) $(!STF_WINDOWSSYSPATH)
  717. AddSectionFilesToCopyList Files-DFSDRV $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  718. endif
  719. ifstr(i) $(DoCopy) == "YES"
  720. ;
  721. ; Copy files in the copy list
  722. ;
  723. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  724. CopyFilesInCopyList
  725. endif
  726. ifstr(i) $(DoConfig) == "YES"
  727. ;
  728. ; Add product to registry
  729. ;
  730. ;
  731. ; Finish up
  732. endif
  733. Exit
  734. [Install-Update]
  735. set STF_VITAL = ""
  736. ;
  737. ; BUGBUG - Problem using orginal option (VERIFYSOURCEFOLDER) on FAT volumes (WAYNESC)
  738. ;
  739. set STF_OVERWRITE = "ALWAYS"
  740. AddSectionFilesToCopyList Files-DFS $(SrcDir) $(!STF_WINDOWSSYSPATH)
  741. AddSectionFilesToCopyList Files-DFSDRV $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  742. ;
  743. ; Copy files in the copy list
  744. ;
  745. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  746. CopyFilesInCopyList
  747. Exit
  748. ;***************************************************************
  749. ; Add the DFSAdmin icon from the Administrative program group
  750. ;***************************************************************
  751. [Install-DFSAdmin-Icon]
  752. CreateCommonProgManGroup $(ProductGroup) ""
  753. ShowCommonProgManGroup $(ProductGroup), 1
  754. RemoveCommonProgManItem $(ProductGroup), $(DfsAdminName)
  755. CreateCommonProgManItem $(ProductGroup), $(DfsAdminName) "dfsadmin.exe" "dfsadmin.exe" ""
  756. Exit
  757. ;***************************************************************
  758. ; Del the DFSAdmin icon from the Administrative program group
  759. ;***************************************************************
  760. [Remove-DFSAdmin-Icon]
  761. RemoveCommonProgManItem $(ProductGroup), $(DfsAdminName)
  762. Exit