Leaked source code of windows server 2003
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.

2605 lines
77 KiB

  1. ;------------------------------------------------------------------------
  2. ; Copyright(c) 1992-93 Microsoft Corporation
  3. ;
  4. ; Services for Macintosh Setup INF File.
  5. ;
  6. ; Author: KrishG
  7. ;
  8. ; Revision History: 3/3/93 - Changed for Custom/Express removal
  9. ;------------------------------------------------------------------------
  10. [Identification]
  11. OptionType = NetTransport
  12. [LanguagesSupported]
  13. ENG
  14. [Options]
  15. SFM
  16. [OptionsTextENG]
  17. SFM = "Services for Macintosh"
  18. [FileConstants]
  19. ProductFullInfName = $(!STF_CWDDIR)oemnxpsm.inf
  20. Manufacturer = "Microsoft"
  21. ProductMajorVersion = 3
  22. ProductMinorVersion = 1
  23. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  24. ;------------------------------------------------------------------------
  25. ; SFM Software Data
  26. ;------------------------------------------------------------------------
  27. ProductSFMName = "SFM"
  28. ProductSFMTitle = "Services for Macintosh"
  29. ; AppleTalk Transport Product Descriptions /Net Rules
  30. ProductATALKName = "AppleTalk"
  31. ProductATALKDisplayName = "AppleTalk Transport"
  32. ProductATALKTitle = "Services for Macintosh"
  33. ProductATALKImagePath = "%SystemRoot%\system32\drivers\sfmatalk.sys"
  34. ProductATALKSvcType = "kernel"
  35. ProductATALKType = "transport"
  36. ProductATALKEventDll = "%SystemRoot%\system32\sfmatmsg.dll"
  37. NetRuleATALKType = "appletalk appletalktransport"
  38. NetRuleATALKUse = transport " yes yes"
  39. NetRuleATALKBindForm = """appletalk"" yes yes container"
  40. NetRuleATALKClass = {"appletalktransport basic "}
  41. NetRuleATALKBindList = {"appletalktransport ndisDriver non non 100", +
  42. "appletalktransport ltkndisDriver non exclusive 100" }
  43. ;------------------------------------------------------------------------
  44. ; Afp Server Service and Server Product Descriptions /Net Rules
  45. ;------------------------------------------------------------------------
  46. ProductAFPSVCName = "AfpServer"
  47. ProductAFPSVCDisplayName = "AFP File Server"
  48. ProductAFPSVCTitle = "Services for Macintosh"
  49. ProductAFPSVCImagePath = "%SystemRoot%\system32\sfmsvc.exe"
  50. ProductAFPSVCType = "service"
  51. ProductAFPSVCEventDll = "%SystemRoot%\system32\sfmmsg.dll"
  52. NetRuleAFPSVCType = "AfpServer lmNetService"
  53. NetRuleAFPSVCUse = "service"
  54. !UAMVolumeName = "Microsoft UAM Volume"
  55. ProductAFPSRVRName = "AfpSrv"
  56. ProductAFPSRVRDisplayName = "AFP Kernel Driver"
  57. ProductAFPSRVRImagePath = "%SystemRoot%\system32\drivers\sfmsrv.sys"
  58. ProductAFPSRVREventDll = "%SystemRoot%\system32\sfmmsg.dll"
  59. ;------------------------------------------------------------------------
  60. ; Macintosh Print Server Product Descriptions /Net Rules
  61. ;------------------------------------------------------------------------
  62. ProductMACPRINTName = "MacPrint"
  63. ProductMACPRINTDisplayName = "Macintosh Print Service"
  64. ProductMACPRINTTitle = "Services for Macintosh"
  65. ProductMACPRINTImagePath = "%SystemRoot%\system32\sfmprint.exe"
  66. ProductMACPRINTEventDll = "%SystemRoot%\system32\sfmprint.exe"
  67. ProductMonitorDll = "sfmmon.dll"
  68. ProductMonitorEventDll = "%SystemRoot%\system32\sfmmon.dll"
  69. ;------------------------------------------------------------------------
  70. ; Dll And File Names
  71. ;------------------------------------------------------------------------
  72. UtilDll = "sfmutil.dll"
  73. ResDll = "sfmres.dll"
  74. IconsInfFile = "sfmicons.inf"
  75. !UamResSrcFile = "sfmuam.rsc"
  76. !UamInfoSrcFile = "sfmuam.ifo"
  77. !UamResDestFile = "MS UAM:Afp_Resource"
  78. !UamInfoDestFile = "MS UAM:Afp_AfpInfo"
  79. !UamReadMeSrcFile = "sfmuam.txt"
  80. !UamReadMeDestFile = "MS UAM ReadMe.ttxt"
  81. !AppleShareFolder = "AppleShare Folder"
  82. NtNetIniFileName = "ntnet.ini"
  83. WinFileIniFileName = "winfile.ini"
  84. AfpMgrCplFile = "sfmmgr.cpl"
  85. SrvMgrIniSection = "SMAddons"
  86. WinFileIniSection = "Addons"
  87. TypeCreatorMapFile = "sfmmap.inf"
  88. AtWinSockDll = "sfmshat.dll"
  89. PSprintProcFile = "sfmpsprt.dll"
  90. PSprintProc = "PSPRINT"
  91. ;------------------------------------------------------------------------
  92. ; Product Key Names, Registry Key Names of Interest
  93. ;-------------------------------------------------------------------------
  94. !ProductKeyBase = $(!NTN_SoftwareBase)"\"$(Manufacturer)
  95. !ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSFMName)"\CurrentVersion"
  96. !ProductKeyLinkage = $(!NTN_ServiceBase)"\"$(ProductATALKName)"\Linkage"
  97. !PrintMonKeyName = "SYSTEM\CurrentControlSet\Control\Print\Monitors"
  98. !EventLogKey = $(!NTN_ServiceBase)"\EventLog\Application"
  99. [GeneralConstants]
  100. UtilInf = "UTILITY.INF"
  101. SubInf = "SUBROUTN.INF"
  102. !KeyNull = ""
  103. !ACCESS = 33554432
  104. RegistryErrorIndex = NO_ERROR
  105. KeyProduct = ""
  106. KeyParameters = ""
  107. TRUE = 1
  108. FALSE = 0
  109. NoTitle = 0
  110. !UamCopyStatus = TRUE
  111. !DebugOutputControl = 1
  112. [FileConstantsENG]
  113. FunctionTitle = "Services for Macintosh Setup"
  114. ProductATALKDescription = "AppleTalk Transport"
  115. ProductAFPSVCDescription = "AppleTalk File Server"
  116. ProductMACPRINTDescription = "AppleTalk Print Server"
  117. ProductSFMDescription = "Macintosh->Windows NT Connectivity"
  118. ProCaption = $(FunctionTitle)
  119. ProCancel = "Cancel"
  120. ProCancelMsg = "Services for Macintosh is not correctly installed. "+
  121. "Are you sure you want to cancel copying files ?"
  122. ProCancelCap = "Services for Macintosh Setup"
  123. ProText1 = "Copying:"
  124. ProText2 = "To:"
  125. Error = "User has cancelled copying files. Copied files will be removed."
  126. MajorVersion = "MajorVersion"
  127. MinorVersion = "MinorVersion"
  128. AskLocationText = "Please enter the full path of the Services for "+
  129. "Macintosh distribution files. Then choose continue."
  130. [DialogConstantsENG]
  131. Help = "&Help"
  132. Exit = "E&xit Setup"
  133. OK = "OK"
  134. HelpContext = ""
  135. Continue = "Continue"
  136. Cancel = "Cancel"
  137. ConfigCancel = "Close"
  138. [date]
  139. Now = {} ? $(!LIBHANDLE) GetSystemDate
  140. [AvailableSystemMemory]
  141. SystemMemory = "" ? $(!LIBHANDLE) GetMemorySize
  142. MinSystemMemory = 2048
  143. [FSAndDiskSpace]
  144. VolumeList = {} ? $(!LIBHANDLE) GetHardDriveLetters
  145. VolumeFreeList = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  146. VolumeFSList = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  147. [VolList]
  148. VolumeFSList = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  149. VolumeList = {} ? $(!LIBHANDLE) GetHardDriveLetters
  150. [DefAfpParametersENG]
  151. MaxSessions = 255
  152. LoginMessage = ""
  153. ServerOptions = 7
  154. PagedMemLimit = 20000
  155. NonPagedMemLimit = 2000
  156. [ExtensionIds]
  157. XCEL1ID = {"ID=1"}
  158. XCEL2ID = {"ID=2"}
  159. XCEL3ID = {"ID=3"}
  160. XCEL4ID = {"ID=4"}
  161. XCEL5ID = {"ID=5"}
  162. XCEL6ID = {"ID=6"}
  163. XCEL7ID = {"ID=7"}
  164. XCEL8ID = {"ID=8"}
  165. XCEL9ID = {"ID=9"}
  166. XCEL10ID = {"ID=10"}
  167. XCEL11ID = {"ID=11"}
  168. XCEL12ID = {"ID=12"}
  169. XCEL13ID = {"ID=13"}
  170. MSWD1ID = {"ID=14"}
  171. MSWD2ID = {"ID=15"}
  172. MSWD3ID = {"ID=16"}
  173. MSWD4ID = {"ID=17"}
  174. MSWD5ID = {"ID=18"}
  175. MSPJ1ID = {"ID=19"}
  176. MSPJ2ID = {"ID=20"}
  177. MSPJ3ID = {"ID=21"}
  178. MSPJ4ID = {"ID=22"}
  179. MSPJ5ID = {"ID=23"}
  180. MSPJ6ID = {"ID=24"}
  181. ALD31ID = {"ID=25"}
  182. ALD32ID = {"ID=26"}
  183. ALD33ID = {"ID=27"}
  184. MOREID = {"ID=28"}
  185. FOX+ID = {"ID=29"}
  186. ALD2ID = {"ID=30"}
  187. ARTZID = {"ID=31"}
  188. SIT!ID = {"ID=32"}
  189. PPT2ID = {"ID=33"}
  190. PPT3ID = {"ID=34"}
  191. L123ID = {"ID=35"}
  192. TTXTID = {"ID=36"}
  193. [UAMVarsENG]
  194. UAMDirName = "Microsoft UAM Volume"
  195. UAMPath = $(UAMDrive)"\"$(UAMDirName)
  196. ;------------------------------------------------------------------
  197. ; Express /Custom Mode Install Dialog - Used In Initial Setup Only
  198. ;------------------------------------------------------------------
  199. [SetupSpaceDlgENG]
  200. DlgType = "MessageBox"
  201. STF_MB_TYPE = 5
  202. STF_MB_ICON = 3
  203. STF_MB_DEF = 3
  204. STF_MB_TITLE = $(FunctionTitle)
  205. STF_MB_TEXT = "Setup could not find enough space on your Windows NT system partition. "+
  206. "Setup requires atleast 2 MB for installing Services for Macintosh. "+
  207. "You can retry installation by freeing up space on your system drive."
  208. [ConfigureSfmDlgENG]
  209. DlgType = "Radio"
  210. DlgTemplate = "SFMCONFIGSEL"
  211. Caption = $(FunctionTitle)
  212. Label1 = "Select the component to be configured"
  213. RadioHeader = ""
  214. RadioDefault = "1"
  215. Radio1Text = "AppleTalk &Transport"
  216. Radio2Text = "AppleTalk &File Server"
  217. OptionsGreyed = {}
  218. HelpContext = #(SfmSetupHelpIds, HC_SFM_SFMCONFIGSEL,1)
  219. ComboListItemsOut = {}
  220. [ConfigureAfpDlgENG]
  221. DlgType = "RadioCombination"
  222. DlgTemplate = "SRVCFG"
  223. Caption = "SFM File Server Configuration"
  224. Label1 = "Server &Name:"
  225. BuildUAMVol = "&Build UAM Volume"
  226. CheckItemsIn = {$(FShareUAM)}
  227. EditTextIn = $(ServerName)
  228. EditTextOut = ""
  229. EditTextLim = 31
  230. EditFocus = "ALL"
  231. CBOptionsGreyed = $(DisableList)
  232. HelpContext = #(SfmSetupHelpIds, HC_SFM_SRVCFG,1)
  233. ComboListItemsOut = {}
  234. [UAMVolCreateDlgENG]
  235. DlgType = "Edit"
  236. DlgTemplate = "UAMVOLCREATE"
  237. Caption = "Services for Macintosh Setup"
  238. DlgText = "Enter the path for the Microsoft User Authentication files. "+
  239. "The Microsoft User Authentication files will be copied to this "+
  240. "location to allow Macintosh clients to download this module."$(!LF)$(!LF)+
  241. "Press Cancel to cancel installation of this module."
  242. Static1Label = "Volume &Path:"
  243. EditTextLim = 259
  244. HelpContext = #(SfmSetupHelpIds, HC_SFM_UAMVOLCREATE,1)
  245. [SetupAbortDlgENG]
  246. DlgType = "Info"
  247. DlgTemplate = "RESTART"
  248. Caption = $(FunctionTitle)
  249. DlgText = "Setup for Macintosh Services failed."$(!LF)$(!LF)+
  250. "Please choose Exit to exit back to the Windows NT System."
  251. Windows = "E&xit to &Windows NT"
  252. [ExitWarningDlgENG]
  253. DlgType = "MessageBox"
  254. STF_MB_TITLE = "Services for Macintosh Setup"
  255. STF_MB_TEXT = "Services for Macintosh is not correctly installed. Are you "+
  256. "sure you want to exit Setup ?"
  257. STF_MB_TYPE = 3
  258. STF_MB_ICON = 5
  259. STF_MB_DEF = 2
  260. ;------------------------------------------------------------------
  261. ; Error Strings
  262. ;------------------------------------------------------------------
  263. ;------------------------------------------------------------------
  264. ; Miscellaneous Errors
  265. ;------------------------------------------------------------------
  266. [MiscErrorString1ENG]
  267. ErrorString = " of Services for Macintosh is already installed in your system. "+
  268. "Use [Update] to update to newer versions."
  269. [MiscErrorString2ENG]
  270. ErrorString = "The amount of memory available on your system is not sufficient "+
  271. "to run Services for Macintosh. Services for Macintosh requires "+
  272. "at least 8 MB to run."
  273. [MiscErrorString3ENG]
  274. ErrorString = ""
  275. [ShellingErrorENG]
  276. ErrorString = " An internal error occurred. Contact MS support."
  277. [UamFileNotCopiedENG]
  278. ErrorString = "Setup failed to copy Microsoft User Authentication files. "+
  279. "Setup will not create a volume for allowing Macintosh clients to "+
  280. "download these files. Refer to your user's guide on how to setup "+
  281. "this volume after installation."
  282. [UamFileNotCopied1ENG]
  283. ErrorString = "Setup failed to copy Microsoft User Authentication files. "+
  284. "Setup will not create a volume for allowing Macintosh clients to "+
  285. "download these files."
  286. ;------------------------------------------------------------------
  287. ; Status Strings
  288. ;------------------------------------------------------------------
  289. [IntroMessageENG]
  290. Status = "Setup is ready to install Services for Macintosh. "+
  291. "Setup will install the AppleTalk Transport, the AppleTalk File "+
  292. "Server, the Macintosh Print Server and create a volume for "+
  293. "downloading Microsoft Authentication files to Macintosh clients. "+
  294. "Press OK to start installation."
  295. [Status0ENG]
  296. Status = "Checking Disk Space and File System Information..."
  297. [Status1ENG]
  298. Status = "Installing "$(Product$(Option))"..."
  299. [StatusAtalk1ENG]
  300. Status = "Adding AppleTalk Transport to registry..."
  301. [StatusAtalk3ENG]
  302. Status = "Starting AppleTalk ..."
  303. [StatusAfp1ENG]
  304. Status = "Adding Afp Server Service to registry..."
  305. [StatusAfp2ENG]
  306. Status = "Creating Afp Service ..."
  307. [StatusAfp3ENG]
  308. Status = "Adding Afp File Server to File Manager and Server Manager ..."
  309. [StatusMacPrint1ENG]
  310. Status = "Adding Macintosh Print Service to registry..."
  311. [StatusRemove1ENG]
  312. Status = "Removing Services for Macintosh files..."
  313. [StatusRemove2ENG]
  314. Status = "Restoring Services for Macintosh original state..."
  315. [StatusRemoveDoneENG]
  316. Status = "Services for Macintosh has been successfully removed. "+
  317. "You must now close the Network Applet and reboot for the system "+
  318. "to work correctly. Do not attempt to reinstall Services for "+
  319. "Macintosh now."
  320. ;------------------------------------------------------------------
  321. ; AppleTalk Transport Error Strings
  322. ;------------------------------------------------------------------
  323. [AtalkString1ENG]
  324. ErrorString = "Setup failed to add WinSock support for the Appletalk transport. "+
  325. "This will not affect installation. Contact your system administrator "+
  326. "for support."
  327. [AtalkString2ENG]
  328. ErrorString = "Setup failed to remove WinSock support for the Appletalk transport."
  329. [AtalkString3ENG]
  330. ErrorString = "Services for Macintosh has just been installed. Services will be "+
  331. "available to Macintoshes in the default network. If you would like "+
  332. "the services to appear in a different zone or to configure routing, close "+
  333. "the Control Panel, reboot, Start AppleTalk and use the Control Panel "+
  334. "to configure Services for Macintosh."
  335. [AFPString1ENG]
  336. ErrorString = "Setup could not find any NT File System volumes in your system. "+
  337. "Services for Macintosh requires a NT File System volume for "+
  338. "Macintosh clients to share files. You can create the NT FileSystem "+
  339. "volume after installing Services for Macintosh. Setup will proceed to "+
  340. "install Services for Macintosh."
  341. [AFPString2ENG]
  342. ErrorString = "Unable to add Afp File Server to the File Manager Menu. "+
  343. "You will not be able to use the File Manager to create/edit/delete or edit "+
  344. "type creator associations from File Manager. Consult your user's guide "+
  345. "on how to do this after installation."
  346. [AFPString3ENG]
  347. ErrorString = "Unable to add Afp File Server to the Server Manager Menu. "+
  348. "You will not be able to use the Server Manager to administer Afp Servers on your "+
  349. "network. Consult your user's guide on how to do this after installation."
  350. [AFPString10ENG]
  351. ErrorString = "An invalid volume path has been entered or this volume is not a NT File System volume."
  352. [AFPString11ENG]
  353. ErrorString = "Could not find the volumes key in the AfpServer section in registry. "+
  354. "UAM Volume cannot be built."
  355. [AFPString12ENG]
  356. ErrorString = "Could not find any NTFS volumes in your system. UAM Volume cannot be built."
  357. [MacPrintString1ENG]
  358. ErrorString = "Unable to create Macintosh Print user account. This account may already exist. "+
  359. "Enter a new account name to create."
  360. [MacPrintString2ENG]
  361. ErrorString = "Unable to open registry key for eventlog. Macintosh Print Service event log entries "+
  362. "may not be set correctly."
  363. [MacPrintString3ENG]
  364. ErrorString = "Unable to add Macintosh Print Service Print Processor. Macintosh clients will be unable to "+
  365. "print postscript jobs to a non-postscript printer on the Advanced Server network."
  366. [MacPrintString4ENG]
  367. ErrorString = "Unable to add Macintosh Print Monitor. You will be unable to use the "+
  368. "Macintosh Print Service. Contact Microsoft Support."
  369. [MacPrintString5ENG]
  370. ErrorString = "Unable to remove the Macintosh Print Service Print Processor. "+
  371. "Contact your system admnistrator for support."
  372. [MacPrintString6ENG]
  373. ErrorString = "Unable to find the directory to install the Macintosh Print Processor. "+
  374. "Macintosh Print Processor will not be installed."
  375. [MacPrintString7ENG]
  376. ErrorString = "Unable to remove the Macintosh Print Monitor. Contact your Administrator. "+
  377. "Temporary Message: Setup will manually delete your monitor registry keys NOW!."
  378. [MacPrintString8ENG]
  379. ErrorString = "Unable to create the Macintosh Print User Account. Refer "+
  380. "to your Services for Macintosh User's Guide on how to set up "+
  381. "this account after installation."
  382. [MacPrintString9ENG]
  383. ErrorString = "Unable to remove the Macintosh Print User Account. Refer "+
  384. "to your Services for Macintosh User's Guide on how to remove "+
  385. "this account."
  386. [MacPrintString10ENG]
  387. ErrorString = "Unable to open registry key for eventlog. The event log entry for "+
  388. "the Macintosh Print Service monitor may not be set correctly."
  389. [NoAdaptersFoundENG]
  390. ErrorString = "Fatal Error: Unable to find any network adapter "+
  391. "for Services for Macintosh. You will not be able "+
  392. "to use Services for Macintosh. Add a network "+
  393. "adapter or enable AppleTalk Transport bindings."
  394. [CantRemoveSfmENG]
  395. ErrorString = "Services for Macintosh is currently running on your system. You "+
  396. "cannot remove now. Stop Services for Macintosh and retry."
  397. [RemoveDefaultPortENG]
  398. ErrorString = "The default network adapter used by Services"$(!LF)+
  399. "for Macintosh has been removed. An attempt"$(!LF)+
  400. "will be made to change the default port."$(!LF)+
  401. "This may cause Macintosh clients to no longer"$(!LF)+
  402. "see services on the current zone. You must"$(!LF)+
  403. "configure the AppleTalk transport to change"$(!LF)+
  404. "the zone for Services for Macintosh."
  405. [SetupSuccessENG]
  406. Status = "Services for Macintosh has been installed."$(LF)+
  407. "Services will self-start on reboot."$(LF)$(LF)+
  408. "Services will be available to Macintosh clients in the default network. "+
  409. "If you would like the services to appear in a different zone or to configure routing, "+
  410. "reboot and use the Control Panel Network Applet to configure the AppleTalk Transport. "+
  411. "Consult your Services for Macintosh User's Guide on things to do after installation."
  412. [Identify]
  413. read-syms Identification
  414. set Status = STATUS_SUCCESSFUL
  415. set Identifier = $(OptionType)
  416. set Media = #("Source Media Descriptions", 1, 1)
  417. Return $(Status) $(Identifier) $(Media)
  418. [ReturnOptions]
  419. set Status = STATUS_FAILED
  420. set OptionList = {}
  421. set OptionTextList = {}
  422. set LanguageList = ^(LanguagesSupported, 1)
  423. Ifcontains(i) $($0) in $(LanguageList)
  424. goto returnoptions
  425. else
  426. set Status = STATUS_NOLANGUAGE
  427. goto finish_ReturnOptions
  428. endif
  429. returnoptions = +
  430. set OptionList = ^(Options, 1)
  431. set OptionTextList = ^(OptionsText$($0), 1)
  432. set Status = STATUS_SUCCESSFUL
  433. finish_ReturnOptions = +
  434. Return $(Status) $(OptionList) $(OptionTextList)
  435. [InstallOption]
  436. set Status = STATUS_FAILED
  437. set Option = $($1)
  438. set SrcDir = $($2)
  439. Set AddCopy = $($3)
  440. Set DoCopy = $($4)
  441. Set DoConfig = $($5)
  442. set LanguageList = ^(LanguagesSupported, 1)
  443. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  444. return STATUS_NOLANGUAGE
  445. EndIf
  446. StartWait
  447. set-subst LF = "\n"
  448. set-subst CR = "\r"
  449. read-syms GeneralConstants
  450. read-syms FileConstants
  451. read-syms DialogConstants$(!STF_LANGUAGE)
  452. read-syms FileConstants$(!STF_LANGUAGE)
  453. read-syms SfmSetupHelpIds
  454. SetHelpFile $(!STF_CWDDIR)sfmsetup.hlp $(MinHelpID) $(MaxHelpID)
  455. detect date
  456. set-title $(FunctionTitle)
  457. set to = Begin
  458. set from = Begin
  459. set CommonStatus = STATUS_SUCCESSFUL
  460. Debug-Output "SFMSETUP: Install Mode = "$(!NTN_InstallMode)
  461. Debug-Output "SFMSETUP: Origin = "$(!NTN_Origination)
  462. Debug-Output "SFMSETUP: Phase = "$(!NTN_InstallPhase)
  463. Debug-Output "SFMSETUP: Context INF = "$(!STF_CONTEXTINFNAME)
  464. EndWait
  465. Begin = +
  466. Set REMOVE_SOFTWARE = {}
  467. Set REMOVE_SERVICES = {}
  468. IfStr(i) $(!NTN_InstallMode) == deinstall
  469. Set StartLabel = Removesfm
  470. Set REMOVE_SOFTWARE = { $(ProductATALKName),+
  471. $(ProductAFPSVCName),+
  472. $(ProductMACPRINTName)+
  473. }
  474. Set REMOVE_SERVICES = {$(ProductAFPSRVRName)}
  475. LoadLibrary "x" $(!STF_CWDDIR)$(UtilDll) !UTILHANDLE
  476. Debug-Output "Remove Software List = "$(REMOVE_SOFTWARE)
  477. Debug-Output "Remove Services List = "$(REMOVE_SERVICES)
  478. else-Ifstr(i) $(!NTN_InstallMode) == Update
  479. set StartLabel = Upgradesfm
  480. else-Ifstr(i) $(!NTN_InstallMode) == configure
  481. set StartLabel = Configuresfm
  482. else-Ifstr(i) $(!NTN_InstallMode) == bind
  483. set StartLabel = Bindingssfm
  484. else-Ifstr(i) $(!NTN_InstallMode) == install
  485. set StartLabel = Installsfm
  486. else
  487. ; CODEWORK - Declare Error and Bomb Out
  488. endif
  489. goto $(StartLabel)
  490. ;------------------------------------------------------------------
  491. ; Install the product
  492. ;------------------------------------------------------------------
  493. Installsfm = +
  494. Set FLibraryErrCtl = 1
  495. ; Detect if we are already installed. If installed, ask the user to
  496. ; use the update option. Otherwise ask the user to input the
  497. ; location of the SFM files
  498. OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyName) $(!ACCESS) KeyProduct
  499. Ifstr $(KeyProduct) != $(!KeyNull)
  500. GetRegValue $(KeyProduct) $(MajorVersion) VersionInfo
  501. set VersionMajor = *($(VersionInfo), 4)
  502. GetRegValue $(KeyProduct) $(MinorVersion) VersionInfo
  503. set VersionMinor = *($(VersionInfo), 4)
  504. set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  505. ifstr(i) $(ProductVersion) == $(InstalledVersion)
  506. read-syms MiscErrorString1$(!STF_LANGUAGE)
  507. Set Text = "Version "$(ProductVersion)
  508. Shell $(SubInf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)$(ErrorString)
  509. goto end
  510. EndIf
  511. Else
  512. set Text = $(AskLocationText)
  513. ifstr(i) $(!NTN_InstallPhase) == "secondary"
  514. Shell $(SubInf), DoAskSourceEx, $(SrcDir) $(Text)
  515. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  516. Goto fatal
  517. Else-Ifstr(i) $($R0) == STATUS_FAILED
  518. Shell $(UtilInf) RegistryErrorString "ASK_SOURCE_FAIL"
  519. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  520. goto ShellCodeError
  521. endif
  522. set Error = $($R0)
  523. Goto fatal
  524. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  525. Goto initialsetupcancel
  526. Endif
  527. Set SrcDir = $($R1)
  528. EndIf
  529. EndIf
  530. StartWait
  531. Debug-Output "Detecting memory"
  532. read-syms AvailableSystemMemory
  533. detect AvailableSystemMemory
  534. Debug-Output "System Memory = "$(SystemMemory)
  535. Debug-Output "Min System Memory = "$(MinSystemMemory)
  536. Ifint $(SystemMemory) < $(MinSystemMemory)
  537. read-syms MiscErrorString2(!STF_LANGUAGE)
  538. shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  539. goto end
  540. EndIf
  541. Debug-Output "Reading Status 0"
  542. read-syms Status0$(!STF_LANGUAGE)
  543. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  544. Debug-Output "Detecting Disk Space"
  545. read-syms FSAndDiskSpace
  546. detect FSAndDiskSpace
  547. GetDriveInPath NtDrive $(!STF_WINDOWSSYSPATH)
  548. ; Check if the user has any NTFS Volumes or not
  549. Set NTFSVolExists = FALSE
  550. Set !NTFSVolumeList = {}
  551. ForListDo $(VolumeFSList)
  552. Ifstr(i) $($) == "NTFS"
  553. Set NTFSVolExists = TRUE
  554. Set NTFSVolumeList = >($(NTFSVolumeList),*($(VolumeList),$(#)))
  555. Endif
  556. EndForListDo
  557. ifstr(i) $(NTFSVolExists) == FALSE
  558. read-syms AFPString1$(!STF_LANGUAGE)
  559. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  560. endIf
  561. ; Check if there is enough space in the Windows NT System Drive.
  562. ; If not enough space, tell the user ot make some space and retry
  563. readvollist = +
  564. Debug-Output "Detecting vol list"
  565. ForListDo $(VolumeList)
  566. set CurrentVolume = *($(VolumeList), $(#))
  567. set CurrentVolumeFree = *($(VolumeFreeList), $(#))
  568. Ifstr(i) $(CurrentVolume) == $(NtDrive)
  569. Ifint $(CurrentVolumeFree) < $(RequiredSfmSize)
  570. read-syms SetupSpaceDlg$(!STF_LANGUAGE)
  571. ui start "SetupSpaceDlg"
  572. Ifstr(i) $(DLGEVENT) == "RETRY"
  573. read-syms FSAndDiskSpace
  574. detect FSAndDiskSpace
  575. goto readvollist
  576. else
  577. goto initialsetupcancel
  578. EndIf
  579. Else
  580. goto intromessage
  581. EndIf
  582. EndIf
  583. EndForListDo
  584. intromessage = +
  585. Shell $(SubInf) PopBillBoard
  586. read-syms IntroMessage$(!STF_LANGUAGE)
  587. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Status)
  588. ;------------------------------------------------------------------
  589. ; Copy the SFM Files
  590. ;------------------------------------------------------------------
  591. CopySfmFiles = +
  592. install "Install-Initial"
  593. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  594. read-syms StatusRemove1$(!STF_LANGUAGE)
  595. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  596. Shell "" RemoveSfmFiles "INSTALL"
  597. Shell $(SubInf) PopBillBoard
  598. goto usercancel
  599. endif
  600. LoadLibrary "x" $(!STF_CWDDIR)$(UtilDll) !UTILHANDLE
  601. Set Result = ""
  602. Set FLibraryErrCtl = 1
  603. LibraryProcedure Result, $(!UTILHANDLE), CopyUamFiles, $(SrcDir)"\"$(!UamResSrcFile) $(!STF_WINDOWSSYSPATH)"\"$(!UamResSrcFile)
  604. Set FLibraryErrCtl = 0
  605. ifstr(i) $(Result) == "FAILED"
  606. read-syms UamFileNotCopied$(!STF_LANGUAGE)
  607. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  608. Set !UamCopyStatus = FALSE
  609. goto StartInstall
  610. EndIf
  611. Set FLibraryErrCtl = 1
  612. LibraryProcedure Result, $(!UTILHANDLE), CopyUamFiles, $(SrcDir)"\"$(!UamInfoSrcFile) $(!STF_WINDOWSSYSPATH)"\"$(!UamInfoSrcFile)
  613. Set FLibraryErrCtl = 0
  614. ifstr(i) $(Result) == "FAILED"
  615. read-syms UamFileNotCopied$(!STF_LANGUAGE)
  616. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  617. Set !UamCopyStatus = FALSE
  618. EndIf
  619. StartInstall = +
  620. Set REMOVE_FLAG = TRUE
  621. Set ThisOption = "SFM"
  622. Shell $(UtilInf), InstallSoftwareProduct, $(Manufacturer),$(Product$(ThisOption)Name), $(ProductFullInfName)
  623. ifint $(ShellCode) != 0
  624. goto ShellCodeError
  625. endif
  626. set RegistryErrorIndex = $($R0)
  627. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  628. CloseRegKey $($R1)
  629. CloseRegKey $($R2)
  630. goto fatalregistry
  631. endif
  632. Set SfmProductKey = $($R1)
  633. Set SfmNetRuleKey = $($R2)
  634. ; set product key information in the registry
  635. set NewValueList = +
  636. {{Infname,0,$(!REG_VT_SZ),$(ProductFullInfName)},+
  637. {ServiceName,0,$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  638. {Title,0,$(!REG_VT_SZ), $(Product$(ThisOption)Title)},+
  639. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  640. {MajorVersion,0,$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  641. {MinorVersion,0,$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  642. {InstalledComponents,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TobeInstalledList)},+
  643. {InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
  644. Shell $(UtilInf), AddValueList, $(SfmProductKey), $(NewValueList)
  645. ifint $(ShellCode) != 0
  646. goto ShellCodeError
  647. endif
  648. set RegistryErrorIndex = $($R0)
  649. CloseRegKey $(SfmProductKey)
  650. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  651. EndWait
  652. CloseRegKey $(SfmNetRuleKey)
  653. goto fatalregistry
  654. endif
  655. Set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  656. {Infname,$(NoTitle),$(!REG_VT_SZ),$(ProductFullInfName)}}
  657. Shell $(UtilInf), AddValueList, $(SfmNetRuleKey), $(NewValueList)
  658. ifint $(ShellCode) != 0
  659. goto ShellCodeError
  660. endif
  661. set RegistryErrorIndex = $($R0)
  662. CloseRegKey $(SfmNetRuleKey)
  663. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  664. goto fatalregistry
  665. endif
  666. Set ThisOption = ATALK
  667. Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(Product$(ThisOption)Name))
  668. read-syms StatusAtalk1$(!STF_LANGUAGE)
  669. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  670. Set Atalk_DependList = {"+NDIS"}
  671. Set FLibraryErrCtl = 1
  672. Shell $(UtilInf), AddSoftwareComponent, $(Manufacturer), +
  673. $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  674. $(Product$(ThisOption)DisplayName), +
  675. $(ProductFullInfName), $(Product$(ThisOption)ImagePath),+
  676. "kernelautostart", "", $(Atalk_DependList), "" $(Product$(ThisOption)EventDll)
  677. Set FLibraryErrCtl = 0
  678. Set RegistryErrorIndex = $($R0)
  679. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  680. CloseRegKey $($R1)
  681. CloseRegKey $($R2)
  682. CloseRegKey $($R3)
  683. CloseRegKey $($R4)
  684. CloseRegKey $($R5)
  685. goto fatalregistry
  686. EndIf
  687. ; At this point:
  688. ; $R1 contains the product version key handle;
  689. ; $R2 contains the NetRules subkey handle;
  690. ; $R3 contains the new Services key handle; and
  691. ; $R4 contains the Parameters key
  692. ; $R5 contains the Linkage Key
  693. ;
  694. Set AtkVersKey = $($R1)
  695. Set AtkNetRuleKey = $($R2)
  696. Set AtkSvcKey = $($R3)
  697. Set AtalkParameters = $($R4)
  698. Set AtkLinkageKey = $($R5)
  699. set NewValueList = {{SoftwareType,0,$(!REG_VT_SZ),$(Product$(ThisOption)Type)},+
  700. {Title,0,$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  701. {Description,0,$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  702. {PathName,0,$(!REG_VT_SZ),$(!STF_WINDOWSSYSPATH)},+
  703. {ServiceName,0,$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  704. {Review,0,$(!REG_VT_DWORD),1},+
  705. {Hidden,0,$(!REG_VT_DWORD),1},+
  706. {InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
  707. Shell $(UtilInf), AddValueList, $(AtkVersKey), $(NewValueList)
  708. set RegistryErrorIndex = $($R0)
  709. Ifstr $(RegistryErrorIndex) != NO_ERROR
  710. CloseRegKey $(AtkVersKey)
  711. CloseRegKey $(AtkNetRuleKey)
  712. CloseRegKey $(AtkSvcKey)
  713. CloseRegKey $(AtkLinkageKey)
  714. CloseRegKey $(AtalkParameters)
  715. goto fatalregistry
  716. EndIf
  717. set NewValueList = {{type,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)}, +
  718. {use,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  719. {bindform,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)}, +
  720. {class,0, $(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)}, +
  721. {bindable,0, $(!REG_VT_MULTI_SZ), $(NetRule$(ThisOption)BindList)},+
  722. {InfOption,0,$(!REG_VT_SZ),$(ThisOption)}, +
  723. {Infname,0,$(!REG_VT_SZ),$(ProductFullInfName)} }
  724. Shell $(UtilInf), AddValueList, $(AtkNetRuleKey), $(NewValueList)
  725. set RegistryErrorIndex = $($R0)
  726. CloseRegKey $(AtkVersKey)
  727. CloseRegKey $(AtkNetRuleKey)
  728. Ifstr $(RegistryErrorIndex) != NO_ERROR
  729. goto fatalregistry
  730. EndIf
  731. set NewValueList = {{OtherDependencies,0,$(!REG_VT_MULTI_SZ),{"+NDIS"}}}
  732. shell $(UtilInf), AddValueList, $(AtkLinkageKey), $(NewValueList)
  733. set RegistryErrorIndex = $($R0)
  734. Ifstr $(RegistryErrorIndex) != NO_ERROR
  735. EndWait
  736. CloseRegKey $(AtkVersKey)
  737. CloseRegKey $(AtkNetRuleKey)
  738. CloseRegKey $(AtkSvcKey)
  739. CloseRegKey $(AtkLinkageKey)
  740. CloseRegKey $(AtalkParameters)
  741. goto fatalregistry
  742. EndIf
  743. ;
  744. ; Create the Adapters Key
  745. ;
  746. CreateRegKey $(AtkSvcKey), {"Adapters",0,GenericClass},"", $(!ACCESS),+
  747. "" , KeyAdapters
  748. ; write global parameters
  749. Set DesiredZone = ""
  750. set NewValueList = {{EnableRouter,0,$(!REG_VT_DWORD),0},+
  751. {DesiredZone,0,$(!REG_VT_SZ),$(DesiredZone)}}
  752. Shell $(UtilInf), AddValueList, $(AtalkParameters), $(NewValueList)
  753. set RegistryErrorIndex = $($R0)
  754. CloseRegKey $(AtalkParameters)
  755. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  756. goto fatalregistry
  757. EndIf
  758. ; Add WinSock Support to AppleTalk
  759. Set WinAtalkDll = $(!STF_WINDOWSSYSPATH)"\"$(AtWinSockDll)
  760. Set MaxSockAddrLen = 8
  761. Set MinSockAddrLen = 6
  762. Shell $(UtilInf) AddWinsockInfo $(Product$(ThisOption)Name), $(WinAtalkDll), +
  763. $(MaxSockAddrLen), $(MinSockAddrLen)
  764. ifstr(i) $($R0) != NO_ERROR
  765. read-syms AtalkString1$(!STF_LANGUAGE)
  766. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  767. Endif
  768. Shell $(SubInf) PopBillBoard
  769. ; Install AFPSVC
  770. Set ThisOption = AFPSVC
  771. Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(Product$(ThisOption)Name))
  772. Set REMOVE_SERVICES = >($(REMOVE_SERVICES), $(ProductAFPSRVRName))
  773. StartWait
  774. read-syms StatusAfp1$(!STF_LANGUAGE)
  775. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  776. Set FLibraryErrCtl = 1
  777. Shell $(UtilInf), AddSoftwareComponent, $(Manufacturer), +
  778. $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  779. $(Product$(ThisOption)DisplayName), +
  780. $(ProductFullInfName), $(Product$(ThisOption)ImagePath),+
  781. "autoserviceshare", "", {"AppleTalk","NetLogon"}, "" $(Product$(ThisOption)EventDll)
  782. Set FLibraryErrCtl = 0
  783. Ifint $(ShellCode) != 0
  784. goto ShellCodeError
  785. endif
  786. set RegistryErrorIndex = $($R0)
  787. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  788. EndWait
  789. CloseRegKey $($R1)
  790. CloseRegKey $($R2)
  791. CloseRegKey $($R3)
  792. CloseRegKey $($R4)
  793. goto fatalregistry
  794. endif
  795. ;
  796. ; At this point:
  797. ; $R1 contains the product version key handle;
  798. ; $R2 contains the NetRules subkey handle;
  799. ; $R3 contains the new Services key handle; and
  800. ; $R4 contains the Parameters key
  801. ;
  802. Shell $(SubInf) PopBillBoard
  803. Set McProductKey = $($R1)
  804. Set McNetRuleKey = $($R2)
  805. Set McServiceKey = $($R3)
  806. set McParameters = $($R4)
  807. Set McLinkageKey = $($R5)
  808. set NewValueList = {{SoftwareType,0 ,$(!REG_VT_SZ),$(Product$(ThisOption)Type)},+
  809. {Title,0,$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  810. {Description,0,$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  811. {PathName,0,$(!REG_VT_SZ),$(!STF_CWDDIR)},+
  812. {ServiceName,0,$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  813. {Hidden,0,$(!REG_VT_DWORD),1},+
  814. {InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
  815. Shell $(UtilInf),AddValueList,$(McProductKey),$(NewValueList)
  816. ifint $(ShellCode) != 0
  817. goto ShellCodeError
  818. endif
  819. set RegistryErrorIndex = $($R0)
  820. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  821. EndWait
  822. CloseRegKey $(McProductKey)
  823. CloseRegKey $(McNetRuleKey)
  824. CloseRegKey $(McServiceKey)
  825. CloseRegKey $(McParameters)
  826. CloseRegKey $(McLinkageKey)
  827. goto fatalregistry
  828. Endif
  829. set NewValueList = {{type,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  830. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOpton)Use)},+
  831. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  832. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductFullInfName)}}
  833. Shell $(UtilInf), AddValueList, $(McNetRuleKey), $(NewValueList)
  834. ifint $(ShellCode) != 0
  835. goto ShellCodeError
  836. endif
  837. set RegistryErrorIndex = $($R0)
  838. CloseRegKey $(McNetRuleKey)
  839. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  840. EndWait
  841. CloseRegKey $(McParameters)
  842. CloseRegKey $(McLinkageKey)
  843. goto fatalregistry
  844. endif
  845. CreateRegKey $(McParameters) {"Type_Creators",0,GenericClass} "" +
  846. $(!ACCESS) "" KeyTypeCreator
  847. CreateRegKey $(McParameters) {"Extensions",0,GenericClass} "" +
  848. $(!ACCESS) "" KeyExtensions
  849. CreateRegKey $(McParameters) {"Icons",0,GenericClass} "" +
  850. $(!ACCESS) "" KeyIcons
  851. CreateRegKey $(McParameters) {"Volumes",$(NoTitle),GenericClass} "" +
  852. $(!ACCESS) "" KeyVolumeList
  853. Shell $(!STF_CWDDIR)$(IconsInfFile) ReadIconVariables
  854. set NewValueList = {{LMANDEXE,0,$(!REG_VT_MULTI_SZ),$(!LMANDEXE)},+
  855. {LMANTEXT,0, $(!REG_VT_MULTI_SZ),$(!LMANTEXT)},+
  856. {SRVRSRVR,0, $(!REG_VT_MULTI_SZ),$(!SRVRSRVR)}}
  857. Shell $(UtilInf),AddValueList,$(KeyIcons),$(NewValueList)
  858. ifint $(ShellCode) != 0
  859. goto ShellCodeError
  860. endif
  861. set RegistryErrorIndex = $($R0)
  862. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  863. EndWait
  864. CloseRegKey $(McProductKey)
  865. CloseRegKey $(McNetRuleKey)
  866. CloseRegKey $(McServiceKey)
  867. CloseRegKey $(McParameters)
  868. CloseRegKey $(McLinkageKey)
  869. goto fatalregistry
  870. endif
  871. ; Set TypeCreator Mappings
  872. Shell $(!STF_CWDDIR)$(TypeCreatorMapFile) ReadTypeCreatorMappings
  873. Set NewValueList = +
  874. {{1,0,$(!REG_VT_MULTI_SZ),$(!XCEL1CREATOR)},+
  875. {2,0,$(!REG_VT_MULTI_SZ),$(!XCEL2CREATOR)},+
  876. {3,0,$(!REG_VT_MULTI_SZ),$(!XCEL3CREATOR)},+
  877. {4,0,$(!REG_VT_MULTI_SZ),$(!XCEL4CREATOR)},+
  878. {5,0,$(!REG_VT_MULTI_SZ),$(!XCEL5CREATOR)},+
  879. {6,0,$(!REG_VT_MULTI_SZ),$(!XCEL6CREATOR)},+
  880. {7,0,$(!REG_VT_MULTI_SZ),$(!XCEL7CREATOR)},+
  881. {8,0,$(!REG_VT_MULTI_SZ),$(!XCEL8CREATOR)},+
  882. {9,0,$(!REG_VT_MULTI_SZ),$(!XCEL9CREATOR)},+
  883. {10,0,$(!REG_VT_MULTI_SZ),$(!XCEL10CREATOR)},+
  884. {11,0,$(!REG_VT_MULTI_SZ),$(!XCEL11CREATOR)},+
  885. {12,0,$(!REG_VT_MULTI_SZ),$(!XCEL12CREATOR)},+
  886. {13,0,$(!REG_VT_MULTI_SZ),$(!XCEL13CREATOR)},+
  887. {14,0,$(!REG_VT_MULTI_SZ),$(!MSWD1CREATOR)},+
  888. {15,0,$(!REG_VT_MULTI_SZ),$(!MSWD2CREATOR)},+
  889. {16,0,$(!REG_VT_MULTI_SZ),$(!MSPJ1CREATOR)},+
  890. {17,0,$(!REG_VT_MULTI_SZ),$(!MSPJ2CREATOR)},+
  891. {18,0,$(!REG_VT_MULTI_SZ),$(!MSPJ3CREATOR)},+
  892. {19,0,$(!REG_VT_MULTI_SZ),$(!MSPJ4CREATOR)},+
  893. {20,0,$(!REG_VT_MULTI_SZ),$(!MSPJ5CREATOR)},+
  894. {21,0,$(!REG_VT_MULTI_SZ),$(!MSPJ6CREATOR)},+
  895. {22,0,$(!REG_VT_MULTI_SZ),$(!ALD31CREATOR)},+
  896. {23,0,$(!REG_VT_MULTI_SZ),$(!ALD32CREATOR)},+
  897. {24,0,$(!REG_VT_MULTI_SZ),$(!ALD33CREATOR)},+
  898. {25,0,$(!REG_VT_MULTI_SZ),$(!MORECREATOR)},+
  899. {26,0,$(!REG_VT_MULTI_SZ),$(!FOX+CREATOR)},+
  900. {27,0,$(!REG_VT_MULTI_SZ),$(!ALD2CREATOR)},+
  901. {28,0,$(!REG_VT_MULTI_SZ),$(!ARTZCREATOR)},+
  902. {29,0,$(!REG_VT_MULTI_SZ),$(!SIT!CREATOR)},+
  903. {30,0,$(!REG_VT_MULTI_SZ),$(!PPT2CREATOR)},+
  904. {31,0,$(!REG_VT_MULTI_SZ),$(!PPT3CREATOR)},+
  905. {32,0,$(!REG_VT_MULTI_SZ),$(!L123CREATOR)}}
  906. Shell $(UtilInf),AddValueList,$(KeyTypeCreator),$(NewValueList)
  907. ifint $(ShellCode) != 0
  908. goto ShellCodeError
  909. endif
  910. set RegistryErrorIndex = $($R0)
  911. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  912. EndWait
  913. CloseRegKey $(McProductKey)
  914. CloseRegKey $(McNetRuleKey)
  915. CloseRegKey $(McServiceKey)
  916. CloseRegKey $(McParameters)
  917. CloseRegKey $(McLinkageKey)
  918. goto fatalregistry
  919. endif
  920. ; Set Extensions
  921. read-syms ExtensionIds
  922. Set NewValueList = +
  923. {{XLC,0,$(!REG_VT_MULTI_SZ),$(XCEL1ID)},+
  924. {XLS,0,$(!REG_VT_MULTI_SZ),$(XCEL2ID)},+
  925. {XLM,0,$(!REG_VT_MULTI_SZ),$(XCEL3ID)},+
  926. {XLW,0,$(!REG_VT_MULTI_SZ),$(XCEL4ID)},+
  927. {XLA,0,$(!REG_VT_MULTI_SZ),$(XCEL5ID)},+
  928. {XLT,0,$(!REG_VT_MULTI_SZ),$(XCEL6ID)},+
  929. {SLK,0,$(!REG_VT_MULTI_SZ),$(XCEL7ID)},+
  930. {WKS,0,$(!REG_VT_MULTI_SZ),$(XCEL8ID)},+
  931. {WK1,0,$(!REG_VT_MULTI_SZ),$(XCEL9ID)},+
  932. {CSV,0,$(!REG_VT_MULTI_SZ),$(XCEL10ID)},+
  933. {DIF,0,$(!REG_VT_MULTI_SZ),$(XCEL11ID)},+
  934. {DOC,0,$(!REG_VT_MULTI_SZ),$(MSWD1ID)},+
  935. {WRD,0,$(!REG_VT_MULTI_SZ),$(MSWD2ID)},+
  936. {RTF,0,$(!REG_VT_MULTI_SZ),$(MSWD3ID)},+
  937. {STY,0,$(!REG_VT_MULTI_SZ),$(MSWD4ID)},+
  938. {GLY,0,$(!REG_VT_MULTI_SZ),$(MSWD5ID)},+
  939. {TXT,0,$(!REG_VT_MULTI_SZ),$(MSWD6ID)},+
  940. {MPP,0,$(!REG_VT_MULTI_SZ),$(MSPJ1ID)},+
  941. {MPX,0,$(!REG_VT_MULTI_SZ),$(MSPJ2ID)},+
  942. {MPC,0,$(!REG_VT_MULTI_SZ),$(MSPJ3ID)},+
  943. {MPV,0,$(!REG_VT_MULTI_SZ),$(MSPJ4ID)},+
  944. {MPW,0,$(!REG_VT_MULTI_SZ),$(MSPJ5ID)},+
  945. {PM3,0,$(!REG_VT_MULTI_SZ),$(ALD31ID)},+
  946. {PT3,0,$(!REG_VT_MULTI_SZ),$(ALD32ID)},+
  947. {TEM,0,$(!REG_VT_MULTI_SZ),$(ALD33ID)},+
  948. {TPL,0,$(!REG_VT_MULTI_SZ),$(ALD33ID)},+
  949. {TIF,0,$(!REG_VT_MULTI_SZ),$(ALD33ID)},+
  950. {RDY,0,$(!REG_VT_MULTI_SZ),$(MOREID)},+
  951. {DBF,0,$(!REG_VT_MULTI_SZ),$(FOX+ID)},+
  952. {PUB,0,$(!REG_VT_MULTI_SZ),$(ALD2ID)},+
  953. {EPS,0,$(!REG_VT_MULTI_SZ),$(ARTZID)},+
  954. {SIT,0,$(!REG_VT_MULTI_SZ),$(SIT!ID)},+
  955. {PPT,0,$(!REG_VT_MULTI_SZ),$(PPT2ID)},+
  956. {WK3,0,$(!REG_VT_MULTI_SZ),$(L123ID)}}
  957. Shell $(UtilInf),AddValueList,$(KeyExtensions),$(NewValueList)
  958. ifint $(ShellCode) != 0
  959. goto ShellCodeError
  960. endif
  961. set RegistryErrorIndex = $($R0)
  962. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  963. EndWait
  964. CloseRegKey $(McProductKey)
  965. CloseRegKey $(McNetRuleKey)
  966. CloseRegKey $(McServiceKey)
  967. CloseRegKey $(McParameters)
  968. CloseRegKey $(McLinkageKey)
  969. goto fatalregistry
  970. endif
  971. Ifstr(i) $(NTFSVolExists) == TRUE
  972. Ifstr(i) $(!UamCopyStatus) == TRUE
  973. Shell "" DoUAMInstall "INSTALL"
  974. EndIf
  975. EndIf
  976. read-syms DefAfpParameters$(!STF_LANGUAGE)
  977. set NewValueList = +
  978. {{ServerOptions,0,$(!REG_VT_DWORD),$(ServerOptions)},+
  979. {MaxSessions,0,$(!REG_VT_DWORD),$(MaxSessions)},+
  980. {LoginMsg,0,$(!REG_VT_SZ),$(LoginMessage)}, +
  981. {PagedMemLimit,0,$(!REG_VT_DWORD),$(PagedMemLimit)}, +
  982. {NonPagedMemLimit,0,$(!REG_VT_DWORD),$(NonPagedMemLimit)}}
  983. Shell $(UtilInf), AddValueList, $(McParameters), $(NewValueList)
  984. set RegistryErrorIndex = $($R0)
  985. CloseRegKey $(McParameters)
  986. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  987. goto fatalregistry
  988. endif
  989. read-syms StatusAfp2$(!STF_LANGUAGE)
  990. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  991. Set Afp_DependList = {"+TDI"}
  992. Set FLibraryErrCtl = 1
  993. Shell $(UtilInf) CreateService,+
  994. $(ProductAFPSRVRName),$(ProductAFPSRVRDisplayName),+
  995. $(ProductAFPSRVRImagePath),"system",+
  996. "Network", $(Afp_DependList),"",+
  997. $(ProductAFPSRVREventDll)
  998. Set FLibraryErrCtl = 0
  999. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1000. goto ShellCodeError
  1001. endif
  1002. set RegistryErrorIndex = $($R0)
  1003. CloseRegKey $($R1)
  1004. CloseRegKey $($R2)
  1005. CloseRegKey $($R3)
  1006. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1007. goto fatalregistry
  1008. endif
  1009. Shell $(SubInf) PopBillBoard
  1010. ; WRITE Private Profile String in NTNET.INI
  1011. read-syms StatusAfp3$(!STF_LANGUAGE)
  1012. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  1013. Set IniFile = $(!STF_NTPATH)"\"$(NtNetIniFileName)
  1014. Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
  1015. Set IniSection = $(SrvMgrIniSection)
  1016. Set FLibraryErrCtl = 1
  1017. LibraryProcedure IniStatus $(!UTILHANDLE) WriteAfpMgrIniStrings, $(IniSection), $(IniString), $(IniFile)
  1018. Set FLibraryErrCtl = 0
  1019. ifstr(i) $(IniStatus) == "FAILED"
  1020. read-syms AFPString3$(!STF_LANGUAGE)
  1021. shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1022. EndIf
  1023. ; Do the same thing for File Manager
  1024. Set IniFile = $(!STF_NTPATH)"\"$(WinFileIniFileName)
  1025. Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
  1026. Set IniSection = $(WinFileIniSection)
  1027. Set FLibraryErrCtl = 1
  1028. LibraryProcedure IniStatus $(!UTILHANDLE) WriteAfpMgrIniStrings, $(IniSection), $(IniString), $(IniFile)
  1029. Set FLibraryErrCtl = 0
  1030. ifstr(i) $(IniStatus) == "FAILED"
  1031. read-syms AFPString2$(!STF_LANGUAGE)
  1032. shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1033. EndIf
  1034. Shell $(SubInf) PopBillBoard
  1035. Set ThisOption = MACPRINT
  1036. Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(Product$(ThisOption)Name))
  1037. read-syms StatusMacPrint1$(!STF_LANGUAGE)
  1038. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  1039. Set FLibraryErrCtl = 1
  1040. Shell $(UtilInf), AddSoftwareComponent, $(Manufacturer), +
  1041. $(Product$(ThisOption)Name), $(Product$(ThisOption)Name),+
  1042. $(Product$(ThisOption)DisplayName), +
  1043. $(ProductFullInfName), $(Product$(ThisOption)ImagePath),+
  1044. "serviceauto", "", {"AppleTalk"},"",+
  1045. $(Product$(ThisOption)EventDll) "", "Application", ""
  1046. Set FLibraryErrCtl = 0
  1047. ifint $(ShellCode) != 0
  1048. goto ShellCodeError
  1049. EndIf
  1050. set RegistryErrorIndex = $($R0)
  1051. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1052. EndWait
  1053. CloseRegKey $($R1)
  1054. CloseRegKey $($R2)
  1055. CloseRegKey $($R3)
  1056. CloseRegKey $($R4)
  1057. goto fatalregistry
  1058. EndIf
  1059. ;
  1060. ; At this point:
  1061. ; $R1 contains the product version key handle;
  1062. ; $R2 contains the NetRules subkey handle;
  1063. ; $R3 contains the new Services key handle; and
  1064. ; $R4 contains the Parameters key
  1065. ;
  1066. Shell $(SubInf) PopBillBoard
  1067. Set MpProductKey = $($R1)
  1068. Set MpNetRuleKey = $($R2)
  1069. Set MpServiceKey = $($R3)
  1070. Set MpParameters = $($R4)
  1071. Set MpLinkageKey = $($R5)
  1072. set NewValueList = {{SoftwareType,0,$(!REG_VT_SZ),$(Product$(ThisOption)Type)},+
  1073. {Title,0,$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1074. {Description,0,$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  1075. {PathName,$(NoTitle),$(!REG_VT_SZ),$(!STF_CWDDIR)},+
  1076. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  1077. {Hidden,0,$(!REG_VT_DWORD),1},+
  1078. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  1079. Shell $(UtilInf),AddValueList,$(MpProductKey),$(NewValueList)
  1080. ifint $(ShellCode) != 0
  1081. goto ShellCodeError
  1082. EndIf
  1083. set RegistryErrorIndex = $($R0)
  1084. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1085. EndWait
  1086. CloseRegKey $(MpProductKey)
  1087. CloseRegKey $(MpNetRuleKey)
  1088. CloseRegKey $(MpServiceKey)
  1089. CloseRegKey $(MpParameters)
  1090. CloseRegKey $(MpLinkageKey)
  1091. goto fatalregistry
  1092. EndIf
  1093. set NewValueList = {{InfOption,0,$(!REG_VT_SZ),$(ThisOption)}, +
  1094. {Infname,0,$(!REG_VT_SZ),$(ProductFullInfName)}}
  1095. Shell $(UtilInf), AddValueList, $(MpNetRuleKey), $(NewValueList)
  1096. ifint $(ShellCode) != 0
  1097. goto ShellCodeError
  1098. EndIf
  1099. set RegistryErrorIndex = $($R0)
  1100. CloseRegKey $(MpProductKey)
  1101. CloseRegKey $(MpNetRuleKey)
  1102. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1103. EndWait
  1104. CloseRegKey $(MpParameters)
  1105. CloseRegKey $(MpLinkageKey)
  1106. goto fatalregistry
  1107. EndIf
  1108. set NewValueList = {{OtherDependencies,0, $(!REG_VT_MULTI_SZ), {"AppleTalk"}}}
  1109. Shell $(UtilInf), AddValueList $(MpLinkageKey), $(NewValueList)
  1110. ifint $(ShellCode) != 0
  1111. goto ShellCodeError
  1112. EndIf
  1113. set RegistryErrorIndex = $($R0)
  1114. CloseRegKey $(MpProductKey)
  1115. CloseRegKey $(MpNetRuleKey)
  1116. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1117. EndWait
  1118. CloseRegKey $(MpParameters)
  1119. CloseRegKey $(MpLinkageKey)
  1120. goto fatalregistry
  1121. EndIf
  1122. ; Add additional EventLogging Entries for MacPrint
  1123. Set MacPrintEventLogKey = $(!EventLogKey)"\"$(ThisOption)
  1124. OpenRegKey $(!REG_H_LOCAL) "" $(MacPrintEventLogKey) $(!ACCESS) MacEvntLogKey
  1125. ifstr(i) $(MacEvntLogKey) != $(!KeyNull)
  1126. Set EventFile = "%SystemRoot%\System32\sfmprint.exe"
  1127. Set NewValueList = {{CategoryMessageFile,0,$(!REG_VT_EXPAND_SZ),$(EventFile)}, +
  1128. {CategoryCount,0,$(!REG_VT_DWORD),4}}
  1129. Shell $(UtilInf) AddValueList, $(MacEvntLogKey), $(NewValueList)
  1130. ifint $(ShellCode) != 0
  1131. goto ShellCodeError
  1132. EndIf
  1133. set RegistryErrorIndex = $($R0)
  1134. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1135. CloseRegKey $(KeyMcEventLog)
  1136. goto fatalregistry
  1137. EndIf
  1138. Else
  1139. read-syms MacPrintString2$(!STF_LANGUAGE)
  1140. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1141. EndIf
  1142. ; Add the AppleTalk Print Monitor Stuff
  1143. Set AddMonStatus = ""
  1144. Set FLibraryErrCtl = 1
  1145. LibraryProcedure AddMonStatus $(!UTILHANDLE) SfmAddPrintMonitor
  1146. Set FLibraryErrCtl = 0
  1147. ifstr(i) $(AddMonStatus) == "FAILED"
  1148. read-syms MacPrintString4$(!STF_LANGUAGE)
  1149. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1150. EndIf
  1151. ; Set up Event Loggin for the AppleTalk Monitor
  1152. OpenRegKey $(!REG_H_LOCAL) "" $(!EventLogKey) $(!ACCESS) EvntLogKey
  1153. ifstr(i) $(EvntLogKey) != $(!KeyNull)
  1154. CreateRegKey $(EvntLogKey) {"AppleTalk Print Monitor",0,GenericClass} "" +
  1155. $(!ACCESS) "" AtalkMonKey
  1156. Set EventFile = "%SystemRoot%\system32\sfmmon.dll"
  1157. Set NewValueList = {{CategoryMessageFile,0,$(!REG_VT_EXPAND_SZ),$(EventFile)},+
  1158. {EventMessageFile,0,$(!REG_VT_EXPAND_SZ),$(EventFile)},+
  1159. {CategoryCount,0,$(!REG_VT_DWORD),4},+
  1160. {TypesSupported,0,$(!REG_VT_DWORD),7}}
  1161. Shell $(UtilInf) AddValueList $(AtalkMonKey) $(NewValueList)
  1162. ifint $(ShellCode) != 0
  1163. goto ShellCodeError
  1164. EndIf
  1165. set RegistryErrorIndex = $($R0)
  1166. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1167. CloseRegKey $(AtalkMonKey)
  1168. goto fatalregistry
  1169. EndIf
  1170. Else
  1171. read-syms MacPrintString10$(!STF_LANGUAGE)
  1172. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1173. EndIf
  1174. ; Install PSTODIB Stuff
  1175. Set PrintProcDir = ""
  1176. Set FLibraryErrCtl = 1
  1177. LibraryProcedure PrintProcDir $(!UTILHANDLE) GetPrintProcDir
  1178. Set FLibraryErrCtl = 0
  1179. Debug-Output "SFMSETUP: GetPrintProcDir Return Val = "$(PrintProcDir)
  1180. ifstr(i) $(PrintProcDir) == "FAILED"
  1181. read-syms MacPrintString6$(!STF_LANGUAGE)
  1182. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1183. goto pstodibdone
  1184. Endif
  1185. ; Copy PSPRINT.DLL to the Print Processor Directory
  1186. Set !PrintProcDir = $(PrintProcDir)
  1187. install "Install-PSPrint"
  1188. ; Call AddPrintProcessor to add the PrintProcessor to system
  1189. Set FLibraryErrCtl = 1
  1190. LibraryProcedure Status $(!UTILHANDLE) AddPrintProc $(PSprintProcFile) $(PSprintProc)
  1191. Set FLibraryErrCtl = 0
  1192. ifstr(i) $(Status) != SUCCESS
  1193. read-syms MacPrintString3$(!STF_LANGUAGE)
  1194. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1195. EndIf
  1196. pstodibdone = +
  1197. EndWait
  1198. FreeLibrary $(!UTILHANDLE)
  1199. read-syms SetupSuccess$(!STF_LANGUAGE)
  1200. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Status)
  1201. goto successful
  1202. ;=============================Install Section End=========================
  1203. ;=============================Configure Section Begin=========================
  1204. Configuresfm = +
  1205. LoadLibrary "x" $(!STF_CWDDIR)$(ResDll) !SFMDLGHANDLE
  1206. LoadLibrary "x" $(!STF_CWDDIR)$(UtilDll) !UTILHANDLE
  1207. read-syms ConfigureSfmDlg$(!STF_LANGUAGE)
  1208. beginconfigui = +
  1209. ui start "cfgsfm" $(!SFMDLGHANDLE)
  1210. Ifstr(i) $(DLGEVENT) == "CONTINUE"
  1211. Ifstr(i) $(ButtonChecked) == "1"
  1212. Set Option = ATALK
  1213. else
  1214. Set Option = AFPSVC
  1215. Endif
  1216. ui pop 1
  1217. else-ifstr(i) $(DLGEVENT) == "BACK"
  1218. ui pop 1
  1219. goto endconfigui
  1220. EndIf
  1221. ifstr(i) $(Option) == "ATALK"
  1222. StartWait
  1223. OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyLinkage) $(!ACCESS) LinkageKey
  1224. ifstr(i) $(LinkageKey) != $(!KeyNull)
  1225. GetRegValue $(LinkageKey) "Bind" BindList
  1226. ifstr(i) $(BindList) == ""
  1227. read-syms AtalkString3$(!STF_LANGUAGE)
  1228. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1229. goto endconfigui
  1230. endif
  1231. else
  1232. Set RegistryErrorIndex = $($R0)
  1233. goto fatalregistry
  1234. EndIf
  1235. LoadLibrary "x" $(!STF_CWDDIR)sfmatcfg.dll ATHANDLE
  1236. Set FLibraryErrCtl = 1
  1237. LibraryProcedure "", $(ATHANDLE),EnterAtalkConfigDLL $(!STF_HWND)
  1238. FreeLibrary $(ATHANDLE)
  1239. Set FLibraryErrCtl = 0
  1240. goto endconfigui
  1241. else-ifstr(i) $(Option) == "AFPSVC"
  1242. Set ParamKeyName = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Parameters"
  1243. OpenRegKey $(!REG_H_LOCAL) "" $(ParamKeyName) $(!ACCESS) AfpParameters
  1244. Ifstr(i) $(AfpParameters) == $(!KeyNull)
  1245. set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1246. goto fatalregistry
  1247. endif
  1248. set ValueList = {}
  1249. set ServerName = ""
  1250. EnumRegValue $(AfpParameters) ValueList
  1251. ForListDo $(ValueList)
  1252. Ifstr(i) *($($),1) == "ServerName"
  1253. set ServerName = *($($),4)
  1254. endif
  1255. EndForListDo
  1256. Ifstr(i) $(ServerName) == ""
  1257. Set ServerName = $(!STF_COMPUTERNAME)
  1258. EndIf
  1259. read-syms ConfigureAfpDlg$(!STF_LANGUAGE)
  1260. processui = +
  1261. ui start "afpdlg" $(!SFMDLGHANDLE)
  1262. Debug-Output "DLGEVENT = "$(DLGEVENT)
  1263. ifstr(i) $(DLGEVENT) == "CONTINUE"
  1264. set ServerName = *($(EditTextOut),1)
  1265. ; If Server Name is same as Computer Name, donot update
  1266. ifstr(i) $(ServerName) != $(!STF_COMPUTERNAME)
  1267. set NewValueList = {{ServerName,0,$(!REG_VT_SZ),$(ServerName)}}
  1268. Shell $(UtilInf), AddValueList, $(AfpParameters), $(NewValueList)
  1269. CloseRegKey $(AfpParameters)
  1270. set RegistryErrorIndex = $($R0)
  1271. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1272. goto fatalregistry
  1273. endif
  1274. else
  1275. DeleteRegValue $(AfpParameters) "ServerName"
  1276. EndIf
  1277. ui pop 1
  1278. Else-ifstr(i) $(DLGEVENT) == "EXIT"
  1279. Shell "" DoUAMInstall "CONFIGURE"
  1280. goto processui
  1281. Else
  1282. ui pop 1
  1283. EndIf
  1284. EndIf
  1285. endconfigui = +
  1286. FreeLibrary $(!SFMDLGHANDLE)
  1287. FreeLibrary $(!UTILHANDLE)
  1288. Set CommonStatus = STATUS_USERCANCEL
  1289. goto usercancel
  1290. ;=============================Configure Section End=========================
  1291. ;=============================Bindings Section Begin=========================
  1292. Bindingssfm = +
  1293. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Linkage" $(!ACCESS) LinkageKey
  1294. Ifstr(i) $(LinkageKey) == $(!KeyNull)
  1295. Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  1296. Goto fatalregistry
  1297. Endif
  1298. Set BindList = {}
  1299. Set ExportList = {}
  1300. Set RouteList = {}
  1301. GetRegValue $(LinkageKey) "Bind" BindList
  1302. GetRegValue $(LinkageKey) "Export" ExportList
  1303. GetRegValue $(LinkageKey) "Route" RouteList
  1304. GetRegValue $(LinkageKey) "Exclude" ExcludeList
  1305. QueryListSize BindCount $(BindList)
  1306. IfInt $(BindCount) == 0
  1307. Goto endbinding
  1308. Endif
  1309. set NewBindList = {}
  1310. set NewExportList = {}
  1311. set NewRouteList = {}
  1312. ForListDo *($(BindList),4)
  1313. Split-String $($), "\", BindInfo
  1314. set NewBindList = >($(NewBindList), *($(BindInfo),4))
  1315. EndForListDo
  1316. ForListDo *($(ExportList),4)
  1317. set NewExportList = >($(NewExportList), $($))
  1318. EndForListDo
  1319. ForListDo *($(RouteList),4)
  1320. set NewRouteList = >($(NewRouteList), $($))
  1321. EndForListDo
  1322. ForListDo *($(ExcludeList),4)
  1323. set NewExcludeList = >($(NewExcludeList), $($))
  1324. EndForListDo
  1325. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Adapters" $(!ACCESS) AdapterKey
  1326. Ifstr(i) $(AdapterKey) == $(!KeyNull)
  1327. Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  1328. Goto fatalregistry
  1329. Endif
  1330. set AdapterList = ""
  1331. EnumRegKey $(AdapterKey) AdapterList
  1332. Set AtalkAdapterList = {}
  1333. ForListDo $(AdapterList)
  1334. Set AtalkAdapterList = >($(AtalkAdapterList), *($($),1))
  1335. EndForListDo
  1336. Set NewBindings = ""
  1337. Set TobeUsedBindList = {}
  1338. Set TobeUsedExportList = {}
  1339. Set TobeUsedRouteList = {}
  1340. ForListDo $(NewBindList)
  1341. IfContains(i) $($) not-in $(AtalkAdapterList)
  1342. Set NewBindings = TRUE
  1343. Set TobeUsedBindList = >($(TobeUsedBindList),"\Device\"$($))
  1344. Set TobeUsedExportList = >($(TobeUsedExportList),*($(NewExportList),$(#)))
  1345. Set TobeUsedRouteList = >($(TobeUsedRouteList),*($(NewRouteList),$(#)))
  1346. Shell "" CreateAtalkConfig $($) $(AdapterKey)
  1347. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1348. CloseRegKey $(AdapterKey)
  1349. Set RegistryErrorIndex = $($R1)
  1350. goto fatalregistry
  1351. EndIf
  1352. Else
  1353. Set TobeUsedBindList = >($(TobeUsedBindList),"\Device\"$($))
  1354. Set TobeUsedExportList = >($(TobeUsedExportList),*($(NewExportList),$(#)))
  1355. Set TobeUsedRouteList = >($(TobeUsedRouteList),*($(NewRouteList),$(#)))
  1356. Endif
  1357. EndForListDo
  1358. set NewValueList = {{Bind,0,$(!REG_VT_MULTI_SZ),$(TobeUsedBindList)}, +
  1359. {Export,0,$(!REG_VT_MULTI_SZ),$(TobeUsedExportList)}, +
  1360. {Route,0,$(!REG_VT_MULTI_SZ),$(TobeUsedRouteList)}}
  1361. Ifstr(i) $(NewBindings) == TRUE
  1362. Shell $(UtilInf), AddValueList, $(LinkageKey), $(NewValueList)
  1363. set RegistryErrorIndex = $($R0)
  1364. CloseRegKey $(LinkageKey)
  1365. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1366. goto fatalregistry
  1367. EndIf
  1368. EndIf
  1369. ; Add the Default Port
  1370. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Parameters" $(!ACCESS) ParmKey
  1371. Ifstr(i) $(ParmKey) == $(!KeyNull)
  1372. Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  1373. Goto fatalregistry
  1374. Endif
  1375. Set DefaultPort = {}
  1376. Set MediaTypeList = {}
  1377. GetRegValue $(ParmKey) "DefaultPort" DefaultPort
  1378. Ifstr(i) $(DefaultPort) != {}
  1379. goto removeadapters
  1380. EndIf
  1381. finddefaultport = +
  1382. ForListDo $(TobeUsedBindList)
  1383. Split-String $($) "\" PortName
  1384. Shell "" FindMediaType *($(PortName),4)
  1385. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  1386. Set MediaTypeList = >($(MediaTypeList), $($R1))
  1387. EndIf
  1388. EndForListDo
  1389. Ifcontains(i) "1" in $(MediaTypeList)
  1390. ForListDo $(MediaTypeList)
  1391. Ifint $($) == 1
  1392. Set DefaultPort = *($(TobeUsedBindList),$(#))
  1393. goto defportdone
  1394. EndIf
  1395. EndForListDo
  1396. else-ifcontains(i) "2" in $(MediaTypeList)
  1397. ForListDo $(MediaTypeList)
  1398. Ifint $($) == 2
  1399. Set DefaultPort = *($(TobeUsedBindList),$(#))
  1400. goto defportdone
  1401. EndIf
  1402. EndForListDo
  1403. else-ifcontains(i) "3" in $(MediaTypeList)
  1404. Set DefaultPort = *($(TobeUsedBindList),1)
  1405. else
  1406. read-syms NoAdaptersFound$(!STF_LANGUAGE)
  1407. Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(ErrorString)
  1408. goto endbinding
  1409. Endif
  1410. defportdone = +
  1411. Set NewValueList = {{DefaultPort,0,$(!REG_VT_SZ),$(DefaultPort)}}
  1412. Shell $(UtilInf), AddValueList, $(ParmKey), $(NewValueList)
  1413. set RegistryErrorIndex = $($R0)
  1414. CloseRegKey $(ParmKey)
  1415. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1416. goto fatalregistry
  1417. EndIf
  1418. goto endbinding
  1419. removeadapters = +
  1420. Split-String *($(DefaultPort),4) "\" PortName
  1421. ForListDo $(AtalkAdapterList)
  1422. Ifcontains(i) $($) not-in $(NewBindList)
  1423. DeleteRegKey $(AdapterKey) $($)
  1424. Ifstr(i) $($) == *($(PortName),4)
  1425. read-syms RemoveDefaultPort$(!STF_LANGUAGE)
  1426. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  1427. goto finddefaultport
  1428. Endif
  1429. EndIf
  1430. EndForListDo
  1431. endbinding = +
  1432. goto end
  1433. ;=============================Bindings Section End=========================
  1434. Removesfm = +
  1435. ; Remove the SMAddons String in regnet.ini. This is done first, because
  1436. ; we remove the util dll in "SfmRemoveFiles". If RemoveFiles failed,
  1437. ; the SMAddons section will be restored to it's former shape.
  1438. Set FLibraryErrCtl = 1
  1439. Ifcontains(i) "AfpServer" in $(REMOVE_SOFTWARE)
  1440. Set IniFile = $(!STF_NTPATH)"\"$(NtNetIniFileName)
  1441. Set IniSection = $(SrvMgrIniSection)
  1442. Set Result = ""
  1443. Set FLibraryErrCtl = 1
  1444. LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, $(IniSection), NULL, $(IniFile)
  1445. Set FLibraryErrCtl = 0
  1446. ifstr(i) $(Result) == "FAILED"
  1447. endif
  1448. ; Remove the file manager addons also
  1449. Set IniFile = $(!STF_NTPATH)"\"$(WinFileIniFileName)
  1450. Set IniSection = $(WinFileIniSection)
  1451. Set FLibraryErrCtl = 1
  1452. LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, $(IniSection), NULL, $(IniFile)
  1453. Set FLibraryErrCtl = 0
  1454. ifstr(i) $(Result) == "FAILED"
  1455. endif
  1456. EndIf
  1457. read-syms StatusRemove1$(!STF_LANGUAGE)
  1458. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  1459. Shell "" RemoveSfmFiles "REMOVE"
  1460. Shell $(SubInf) PopBillBoard
  1461. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1462. ; restore the Afp Server SMAddons
  1463. read-syms CantRemoveSfm$(!STF_LANGUAGE)
  1464. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  1465. read-syms StatusRemove2$(!STF_LANGUAGE)
  1466. Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
  1467. Ifcontains(i) "AfpServer" in $(REMOVE_SOFTWARE)
  1468. Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
  1469. Set IniFile = $(!STF_NTPATH)"\"$(NtNetIniFileName)
  1470. Set IniSection = $(SrvMgrIniSection)
  1471. Set FLibraryErrCtl = 1
  1472. LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, +
  1473. $(IniSection), $(IniString), $(IniFile)
  1474. Set FLibraryErrCtl = 0
  1475. ifstr(i) $(Result) == "FAILED"
  1476. endif
  1477. ; Restore the File Manager Addons too
  1478. Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
  1479. Set IniFile = $(!STF_NTPATH)"\"$(WinFileIniFileName)
  1480. Set IniSection = $(WinFileIniSection)
  1481. Set FLibraryErrCtl = 1
  1482. LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, +
  1483. $(IniSection), $(IniString), $(IniFile)
  1484. Set FLibraryErrCtl = 0
  1485. ifstr(i) $(Result) == "FAILED"
  1486. endif
  1487. EndIf
  1488. Shell $(SubInf) PopBillBoard
  1489. goto removeabort
  1490. EndIf
  1491. OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyBase) $(!ACCESS) ProductKey
  1492. Ifstr $(ProductKey) == $(!KeyNull)
  1493. set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  1494. goto fatalregistry
  1495. endif
  1496. DeleteRegTree $(ProductKey) $(ProductSFMName)
  1497. CloseRegKey $(ProductKey)
  1498. ForListDo $(REMOVE_SOFTWARE)
  1499. debug-output "Removing component: "$($)
  1500. Shell $(UtilInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  1501. EndForListDo
  1502. ForListDo $(REMOVE_SERVICES)
  1503. debug-output "Removing component service: "$($)
  1504. Shell $(UtilInf), RemoveService, $($), "YES"
  1505. EndForListDo
  1506. ; Use Deletemonitor Api
  1507. Ifcontains(i) "MACPRINT" in $(REMOVE_SOFTWARE)
  1508. Set DelMonStatus = ""
  1509. Set FLibraryErrCtl = 1
  1510. LibraryProcedure DelMonStatus $(!UTILHANDLE) SfmDeletePrintMonitor
  1511. Set FLibraryErrCtl = 0
  1512. ifstr(i) $(DelMonStatus) == "FAILED"
  1513. read-syms MacPrintString7$(!STF_LANGUAGE)
  1514. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1515. EndIf
  1516. ; Temporary Fix
  1517. OpenRegKey $(!REG_H_LOCAL) "" $(!PrintMonKeyName) $(!ACCESS) MonitorKey
  1518. DeleteRegTree $(MonitorKey) "AppleTalk Printers"
  1519. ; Delete EventLog entries for MacPrint and AppleTalk Monitors
  1520. OpenRegKey $(!REG_H_LOCAL) "" $(!EventLogKey) $(!ACCESS) LogKey
  1521. Ifstr(i) $(LogKey) == $(!KeyNull)
  1522. Set RegistryErrorIndex = $($R0)
  1523. goto fatalregistry
  1524. EndIf
  1525. Set AtalkMonKey = "AppleTalk Print Monitor"
  1526. DeleteRegTree $(LogKey) $(AtalkMonKey)
  1527. Set MacPrintKey = "MACPRINT"
  1528. DeleteRegTree $(LogKey) $(MacPrintKey)
  1529. CloseRegKey $(!EventLogKey)
  1530. ; Delete the PSPRINT Print Processor
  1531. Set DelStatus = ""
  1532. Set FLibraryErrCtl = 1
  1533. LibraryProcedure DelStatus $(!UTILHANDLE) DeletePrintProc "\\"$(!STF_COMPUTERNAME) PSPRINT
  1534. Set FLibraryErrCtl = 0
  1535. Ifstr(i) $(DelStatus) == FAILED
  1536. read-syms MacPrintString5$(!STF_LANGUAGE)
  1537. Shell $(SubInf) SetupMessage "NONFATAL" $(ErrorString)
  1538. EndIf
  1539. EndIf
  1540. ; Update WinSock Service to remove from Transport List
  1541. Ifcontains(i) "AppleTalk" in $(REMOVE_SOFTWARE)
  1542. Shell $(UtilInf) UpdateWinsockService "AppleTalk" FALSE
  1543. EndIf
  1544. Ifstr(i) $($R0) != NO_ERROR
  1545. read-syms AtalkString2$(!STF_LANGUAGE)
  1546. Shell $(SubInf) SetupMessage "NONFATAL" $(ErrorString)
  1547. EndIf
  1548. FreeLibrary $(!UTILHANDLE)
  1549. Set FLibraryErrCtl = 1
  1550. LibraryProcedure Status, $(!LIBHANDLE), DelFile $(!STF_CWDDIR)$(UtilDll)
  1551. Set FLibraryErrCtl = 0
  1552. read-syms StatusRemoveDone$(!STF_LANGUAGE)
  1553. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Status)
  1554. goto end
  1555. removeabort = +
  1556. FreeLibrary $(!UTILHANDLE)
  1557. goto usercancel
  1558. Upgradesfm = +
  1559. ifstr(i) $(!ProductKeyName) == $(!NTN_RegBase)
  1560. OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyName) $(!ACCESS) KeyProduct
  1561. Ifstr $(KeyProduct) != $(!KeyNull)
  1562. GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1563. set Version = *($(VersionInfo), 4)
  1564. Split-String $(!NTN_Infname), "\", FilenameList
  1565. QueryListSize ListSize $(FilenameList)
  1566. set !UG_Filename = *($(FilenameList), $(ListSize))
  1567. install Install-Initial
  1568. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1569. goto fatal
  1570. endif
  1571. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1572. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1573. CloseRegKey $(KeyProduct)
  1574. else
  1575. Set RegistryErrorIndex = $($R0)
  1576. goto fatalregistry
  1577. endif
  1578. endif
  1579. goto end
  1580. successful = +
  1581. Set Status = STATUS_SUCCESSFUL
  1582. goto end
  1583. fatalregistry = +
  1584. EndWait
  1585. Shell $(UtilInf) RegistryErrorString $(RegistryErrorIndex)
  1586. IfInt $(ShellCode) != 0
  1587. goto ShellCodeError
  1588. EndIf
  1589. set Error = $($R0)
  1590. goto fatal
  1591. fatal = +
  1592. Ifint $(BillboardVisible) != 0
  1593. Shell $(SubInf) PopBillboard
  1594. Set BillboardVisible = 0
  1595. Endif
  1596. read-syms MiscErrorString3$(!STF_LANGUAGE)
  1597. Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(ThisOption):$(Error)
  1598. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1599. goto ShellCodeError
  1600. endif
  1601. goto failed
  1602. ShellCodeError = +
  1603. read-syms ShellingError$(!STF_LANGUAGE)
  1604. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  1605. failed = +
  1606. set CommonStatus = STATUS_FAILED
  1607. ifstr(i) $(REMOVE_FLAG) == TRUE
  1608. set REMOVE_FLAG = FALSE
  1609. goto Removesfm
  1610. endif
  1611. goto end
  1612. setupabort = +
  1613. read-syms SetupAbortDlg$(!STF_LANGUAGE)
  1614. ui start "setupabort"
  1615. initialsetupcancel = +
  1616. Set CommonStatus = STATUS_USERCANCEL
  1617. goto end
  1618. usercancel = +
  1619. Set CommonStatus = STATUS_USERCANCEL
  1620. end = +
  1621. Return $(CommonStatus)
  1622. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1623. ;-------------------------------------------------------------
  1624. ; ROUTINE : Find MediaType
  1625. ; DESCRIPTION : Gets the media type of the card
  1626. ; RETURNS : R0: STATUS_SUCCESSFUL | STATUS_FAILED
  1627. ; : R1: RegistryErrorIndex, if error, else media type
  1628. ;
  1629. ;------------------------------------------------------------
  1630. [FindMediaType]
  1631. Set Status = STATUS_FAILED
  1632. Set CardName = $(!NTN_ServiceBase)"\"$($0)"\Parameters"
  1633. OpenRegKey $(!REG_H_LOCAL) "" $(CardName) $(!ACCESS) CardKey
  1634. Ifstr(i) $(CardKey) == $(!KeyNull)
  1635. Set RegistryErrorIndex = $($R0)
  1636. Return $(Status) $(RegistryErrorIndex)
  1637. EndIf
  1638. GetRegValue $(CardKey) "MediaType" MediaTypeList
  1639. Set MediaType = *($(MediaTypeList),4)
  1640. Set Status = STATUS_SUCCESSFUL
  1641. Return $(Status) $(MediaType)
  1642. ;-------------------------------------------------------------
  1643. ; ROUTINE : CreateAtalkConfig
  1644. ; DESCRIPTION : Creates the registry entries for AppleTalk
  1645. ; RETURNS : R0: STATUS_SUCCESSFUL | STATUS_FAILED
  1646. ; : R1: RegistryErrorIndex
  1647. ;
  1648. ;------------------------------------------------------------
  1649. [CreateAtalkConfig]
  1650. Set AdapterName = $($0)
  1651. Set KeyAdapters = $($1)
  1652. Set RetStatus = STATUS_SUCCESSFUL
  1653. read-syms GeneralConstants
  1654. CreateRegKey $(KeyAdapters) {$(AdapterName), 0, GenericClass} "" $(!ACCESS) "", TempKeyAdapters
  1655. Shell "" FindMediaType $($0)
  1656. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  1657. Set MediaType = $($R1)
  1658. else
  1659. Set RegistryErrorIndex = $($R1)
  1660. Set RetStatus = $($R0)
  1661. goto return
  1662. EndIf
  1663. set PortName = $($0)"@"$(!STF_COMPUTERNAME)
  1664. set ZoneList = {""}
  1665. IfInt $(MediaType) == 3
  1666. set NewValueList = {{"NetworkRangeUpperEnd",0,$(!REG_VT_DWORD),0 },+
  1667. {"NetworkRangeLowerEnd",0,$(!REG_VT_DWORD),0 },+
  1668. {"ZoneList",0,$(!REG_VT_MULTI_SZ),$(ZoneList)},+
  1669. {"SeedingNetwork", 0,$(!REG_VT_DWORD),0},+
  1670. {"DdpCheckSums", 0,$(!REG_VT_DWORD),0},+
  1671. {"PortName",0,$(!REG_VT_SZ),$(PortName)}}
  1672. else
  1673. set AarpRetries = 10
  1674. set DefaultZone = ""
  1675. set NewValueList = {{"AarpRetries",0,$(!REG_VT_DWORD),$(AarpRetries)}, +
  1676. {"DefaultZone", 0,$(!REG_VT_SZ),$(DefaultZone)},+
  1677. {"NetworkRangeUpperEnd",0,$(!REG_VT_DWORD),0 },+
  1678. {"NetworkRangeLowerEnd",0,$(!REG_VT_DWORD),0 },+
  1679. {"ZoneList",0,$(!REG_VT_MULTI_SZ),$(ZoneList)},+
  1680. {"SeedingNetwork", 0,$(!REG_VT_DWORD),0},+
  1681. {"DdpCheckSums", 0,$(!REG_VT_DWORD),0},+
  1682. {"PortName",0,$(!REG_VT_SZ),$(PortName)}}
  1683. EndIf
  1684. Shell $(UtilInf),AddValueList, $(TempKeyAdapters), $(NewValueList)
  1685. set RegistryErrorIndex = $($R0)
  1686. Ifstr $(RegistryErrorIndex) != NO_ERROR
  1687. CloseRegKey $(TmpKeyAdapters)
  1688. Set RetStatus = STATUS_FAILED
  1689. EndIf
  1690. return = +
  1691. Return $(RetStatus) $(RegistryErrorIndex)
  1692. ;-------------------------------------------------------------------------
  1693. ;
  1694. ; DO UAM INSTALL
  1695. ;
  1696. ;-------------------------------------------------------------------------
  1697. [DoUAMInstall]
  1698. Set Status = STATUS_FAILED
  1699. Set Mode = $($0)
  1700. read-syms DialogConstants$(!STF_LANGUAGE)
  1701. read-syms VolList
  1702. detect VolList
  1703. Set NTFSVolumeList = {}
  1704. ; loop thru the volume list and find the first NTFS Volume
  1705. ForListDo $(VolumeFSList)
  1706. Ifstr(i) $($) == "NTFS"
  1707. Set NTFSExists = TRUE
  1708. Set NTFSVolumeList = >($(NTFSVolumeList),*($(VolumeList),$(#)))
  1709. EndIf
  1710. EndForListDo
  1711. Ifstr(i) $(NTFSExists) != TRUE
  1712. read-syms AFPString12$(!STF_LAMGUAGE)
  1713. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1714. goto enduam
  1715. EndIf
  1716. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AfpServer\Parameters\Volumes" $(!ACCESS) KeyVol
  1717. ifstr(i) $(KeyVol) == $(!KeyNull)
  1718. read-syms AFPString11$(!STF_LAMGUAGE)
  1719. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1720. goto enduam
  1721. endif
  1722. Ifstr(i) $(Mode) == "INSTALL"
  1723. Set UAMDrive = *($(NTFSVolumeList),1)
  1724. read-syms UAMVars$(!STF_LANGUAGE)
  1725. goto uamuidone
  1726. Else-Ifstr(i) $(Mode) == "CONFIGURE"
  1727. Set UAMDrive = *($(NTFSVolumeList),1)
  1728. read-syms UAMVars$(!STF_LANGUAGE)
  1729. Set EditTextIn = $(UAMPath)
  1730. read-syms UAMVolCreateDlg$(!STF_LANGUAGE)
  1731. EndIf
  1732. ; display the uam ui
  1733. uamui = +
  1734. ui start "uaminstall" $(!SFMDLGHANDLE)
  1735. ifstr(i) $(DLGEVENT) == "CONTINUE"
  1736. Set FLibraryErrCtl = 1
  1737. LibraryProcedure IsFullPath, $(!LIBHANDLE), CheckPathFullPathSpec $(EditTextOut)
  1738. Set FLibraryErrCtl = 0
  1739. ifstr(i) $(IsFullPath) == "YES"
  1740. Split-String $(EditTextOut) ":" DriveLetter
  1741. Set NTFSDrive = *($(DriveLetter),1)":"
  1742. IfContains(i) $(NTFSDrive) not-in $(NTFSVolumeList)
  1743. read-syms AFPString10$(!STF_LANGUAGE)
  1744. Shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  1745. goto uamui
  1746. Endif
  1747. Else
  1748. read-syms AFPString10$(!STF_LANGUAGE)
  1749. Shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  1750. goto uamui
  1751. EndIf
  1752. ui pop 1
  1753. Set UAMPath = $(EditTextOut)
  1754. Else-ifstr(i) $(DLGEVENT) == "BACK"
  1755. ui pop 1
  1756. EndIf
  1757. uamuidone = +
  1758. install "CreateUAMDir"
  1759. Set Result = ""
  1760. Set FLibraryErrCtl = 1
  1761. LibraryProcedure Result, $(!UTILHANDLE), CopyUamFiles, +
  1762. $(!STF_CWDDIR)$(!UamResSrcFile), +
  1763. $(UAMPath)"\"$(!AppleShareFolder)"\"$(!UamResDestFile)
  1764. Set FLibraryErrCtl = 0
  1765. ifstr(i) $(Result) == "FAILED"
  1766. read-syms UamFileNotCopied1$(!STF_LANGUAGE)
  1767. Shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1768. Set Status = STATUS_USERCANCEL
  1769. goto enduam
  1770. EndIf
  1771. Set Result = ""
  1772. Set FLibraryErrCtl = 1
  1773. LibraryProcedure Result, $(!UTILHANDLE), CopyUamFiles, $(!STF_CWDDIR)$(!UamInfoSrcFile) +
  1774. $(UAMPath)"\"$(!AppleShareFolder)"\"$(!UamInfoDestFile)
  1775. Set FLibraryErrCtl = 0
  1776. ifstr(i) $(Result) == "FAILED"
  1777. read-syms UamFileNotCopied1$(!STF_LANGUAGE)
  1778. Shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1779. Set Status = STATUS_USERCANCEL
  1780. goto enduam
  1781. EndIf
  1782. ; copy the UAM Readme
  1783. Set Result = ""
  1784. Set FLibraryErrCtl = 1
  1785. LibraryProcedure Result, $(!UTILHANDLE), CopyUamFiles, $(!STF_CWDDIR)$(!UamReadMeSrcFile) +
  1786. $(UAMPath)"\"$(!AppleShareFolder)"\"$(!UamReadMeDestFile)
  1787. Set FLibraryErrCtl = 0
  1788. ifstr(i) $(Result) == "FAILED"
  1789. read-syms UamFileNotCopied1$(!STF_LANGUAGE)
  1790. Shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
  1791. Set Status = STATUS_USERCANCEL
  1792. goto enduam
  1793. EndIf
  1794. Set VolProperties = {"MAXUSES=25", "PROPERTIES=32768","PASSWORD="}
  1795. Set VolProperties = >($(VolProperties),"PATH="$(UAMPath))
  1796. set NewValueList = {{$(!UAMVolumeName), 0, $(!REG_VT_MULTI_SZ),+
  1797. $(VolProperties)}}
  1798. Shell "utility.inf" AddValueList $(KeyVol) $(NewValueList)
  1799. set RegistryErrorIndex = $($R0)
  1800. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1801. CloseRegKey $(KeyVol)
  1802. Set Status = STATUS_FAILED
  1803. goto enduam
  1804. EndIf
  1805. Set Status = STATUS_SUCCESSFUL
  1806. enduam = +
  1807. Return $(Status) $(RegistryErrorIndex)
  1808. [RemoveSfmFiles]
  1809. Set Mode = $($0)
  1810. Set RemoveList = {}
  1811. Set RenameList = {}
  1812. Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATALKSYS, 1))
  1813. Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATALKMSG, 1))
  1814. Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATCONFIG, 1))
  1815. Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPSVCEXE, 1))
  1816. Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPSVCMSG, 1))
  1817. Set RenameList = >($(RenameList), #(Files-RemoveList, AFPSVCAPI, 1))
  1818. Set RenameList = >($(RenameList), #(Files-RemoveList, AFPSVCMGR, 1))
  1819. Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPSRVR, 1))
  1820. Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPICONS, 1))
  1821. Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPTYPECRTR, 1))
  1822. Set RemoveList = >($(RemoveList), #(Files-RemoveList, UAMRES, 1))
  1823. Set RemoveList = >($(RemoveList), #(Files-RemoveList, UAMINF, 1))
  1824. Set RemoveList = >($(RemoveList), #(Files-RemoveList, PSTODIB1, 1))
  1825. Set RemoveList = >($(RemoveList), #(Files-RemoveList, PSTODIB2, 1))
  1826. Set RenameList = >($(RenameList), #(Files-RemoveList, PSTODIB3, 1))
  1827. Set RemoveList = >($(RemoveList), #(Files-RemoveList, PSTODIB4, 1))
  1828. Set RemoveList = >($(RemoveList), #(Files-RemoveList, MACPRINT, 1))
  1829. Set RenameList = >($(RenameList), #(Files-RemoveList, ATALKMON, 1))
  1830. ; Remove resource dll's and other dll's
  1831. Set RemoveList = >($(RemoveList), #(Files-RemoveList, SFMRESDLL, 1))
  1832. Set RemoveList = >($(RemoveList), #(Files-RemoveList, SFMSETUPINF, 1))
  1833. ForListDo $(RemoveList)
  1834. Set DelStatus = ""
  1835. Debug-Output "Deleting File "$($)
  1836. Set FLibraryErrCtl = 1
  1837. Ifstr(i) $(Mode) == "REMOVE"
  1838. LibraryProcedure DelStatus $(!UTILHANDLE), DelFile $($)
  1839. else
  1840. LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $($)
  1841. EndIf
  1842. Set FLibraryErrCtl = 0
  1843. Debug-Output "Del File Status = "$(DelStatus)
  1844. ifstr(i) $(DelStatus) == "FAILED"
  1845. Ifstr(i) $(Mode) == "REMOVE"
  1846. read-syms CantRemoveSfm$(!STF_LANGUAGE)
  1847. Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
  1848. Set Status = STATUS_FAILED
  1849. goto endremove
  1850. EndIf
  1851. Endif
  1852. EndForListDo
  1853. ForListDo $(RenameList)
  1854. Ifstr(i) $(Mode) == "REMOVE"
  1855. Debug-Output "File to remove on reboot = "$($)
  1856. AddFileToDeleteList $($)
  1857. else
  1858. Set FLibraryErrCtl = 1
  1859. LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $($)
  1860. Set FLibraryErrCtl = 0
  1861. EndIf
  1862. EndForListDo
  1863. Set Status = STATUS_SUCCESSFUL
  1864. endremove = +
  1865. Return $(Status)
  1866. [SfmSetupHelpIds]
  1867. MinHelpID = 25000
  1868. MaxHelpID = 30000
  1869. InitialSfmId = 25000
  1870. HC_SFM_SFMCONFIGSEL = 25023
  1871. HC_SFM_SRVCFG = 25024
  1872. HC_SFM_UAMVOLCREATE = 25026
  1873. ;-----------------------------------------------------------------------------
  1874. ;
  1875. ; Copy File /Install Sections
  1876. ;
  1877. ;-----------------------------------------------------------------------------
  1878. [Install-Initial]
  1879. set STF_VITAL = ""
  1880. AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1881. AddSectionFilesToCopyList Files-SFM $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1882. AddSectionFilesToCopyList Files-SFMDrivers $(SrcDir) $(!STF_WINDOWSSYSPATH)"\drivers"
  1883. CopyFilesInCopyList
  1884. Exit
  1885. [Install-PSPrint]
  1886. AddSectionFilesToCopyList Files-PRINTPROC $(!STF_CWDDIR) $(!PrintProcDir)
  1887. CopyFilesInCopyList
  1888. Exit
  1889. [CreateUAMDir]
  1890. CreateDir $(UAMPath)
  1891. CreateDir $(UAMPath)"\"$(!AppleShareFolder)
  1892. Exit
  1893. [Source Media Descriptions]
  1894. 1 = "Windows NT Advanced Server Setup Disk #1" , TAGFILE = sfmutil.dll
  1895. 2 = "Windows NT Advanced Server Setup CD-ROM Disk" , TAGFILE = sfmutil.dll
  1896. [ProductType]
  1897. STF_PRODUCT = LanmanNT
  1898. STF_PLATFORM = I386
  1899. [Files-Inf]
  1900. 2, oemsetup.inf, SIZE=75000, RENAME=oemnxpsm.inf, DECOMPRESS
  1901. 2, sfmicons.inf, SIZE=2599, DECOMPRESS
  1902. 2, sfmmap.inf, SIZE=2599, DECOMPRESS
  1903. [Files-SFM]
  1904. 2, sfmres.dll, SIZE=10752, DECOMPRESS
  1905. 2, sfmutil.dll, SIZE=9210, DECOMPRESS
  1906. 2, sfmatmsg.dll, SIZE=55555, DECOMPRESS
  1907. 2, sfmatcfg.dll, SIZE=72704, DECOMPRESS
  1908. 2, sfmwshat.dll, SIZE=55555, DECOMPRESS
  1909. 2, sfmsvc.exe, SIZE=141824, DECOMPRESS
  1910. 2, sfmmsg.dll, SIZE=10752, DECOMPRESS
  1911. 2, sfmapi.dll, SIZE=61440, DECOMPRESS
  1912. 2, sfmmgr.dll, SIZE=126976, RENAME=sfmmgr.cpl, DECOMPRESS
  1913. 2, sfmprint.exe, SIZE=76288, DECOMPRESS
  1914. 2, sfmmon.dll, SIZE=47616, DECOMPRESS
  1915. 2, sfmpsexe.exe, SIZE=55555, DECOMPRESS
  1916. 2, sfmpsfnt.dll, SIZE=55555, DECOMPRESS
  1917. 2, sfmpsprt.dll, SIZE=55555, DECOMPRESS
  1918. 2, sfmpsdib.dll, SIZE=55555, DECOMPRESS
  1919. 2. sfmuam.txt SIZE=55555, DECOMPRESS
  1920. [Files-SFMDrivers]
  1921. 2, sfmatalk.sys, SIZE=436224, DECOMPRESS
  1922. 2, sfmsrv.sys, SIZE=274432, DECOMPRESS
  1923. [Files-PRINTPROC]
  1924. 2, sfmpsprt.dll, SIZE=55555, DECOMPRESS
  1925. [Files-RemoveList]
  1926. SFMSETUPINF = $(!STF_WINDOWSSYSPATH)\oemnxpsm.inf
  1927. SFMRESDLL = $(!STF_WINDOWSSYSPATH)\sfmres.dll
  1928. SFMUTILDLL = $(!STF_WINDOWSSYSPATH)\sfmutil.dll
  1929. ATALKSYS = $(!STF_WINDOWSSYSPATH)\drivers\sfmatalk.sys
  1930. ATALKMSG = $(!STF_WINDOWSSYSPATH)\sfmatmsg.dll
  1931. ATCONFIG = $(!STF_WINDOWSSYSPATH)\sfmatcfg.dll
  1932. ATWINSOCK = $(!STF_WINDOWSSYSPATH)\sfmwshat.dll
  1933. AFPSVCEXE = $(!STF_WINDOWSSYSPATH)\sfmsvc.exe
  1934. AFPSVCMSG = $(!STF_WINDOWSSYSPATH)\sfmmsg.dll
  1935. AFPSVCAPI = $(!STF_WINDOWSSYSPATH)\sfmapi.dll
  1936. AFPSVCMGR = $(!STF_WINDOWSSYSPATH)\sfmmgr.cpl
  1937. AFPSRVR = $(!STF_WINDOWSSYSPATH)\drivers\sfmsrv.sys
  1938. AFPICONS = $(!STF_WINDOWSSYSPATH)\sfmicons.inf
  1939. AFPTYPECRTR = $(!STF_WINDOWSSYSPATH)\sfmmap.inf
  1940. UAMINF = $(!STF_WINDOWSSYSPATH)\sfmuam.ifo
  1941. UAMRES = $(!STF_WINDOWSSYSPATH)\sfmuam.rs
  1942. MACPRINT = $(!STF_WINDOWSSYSPATH)\sfmprint.exe
  1943. ATALKMON = $(!STF_WINDOWSSYSPATH)\sfmmon.dll
  1944. PSTODIB1 = $(!STF_WINDOWSSYSPATH)\sfmpsexe.exe
  1945. PSTODIB2 = $(!STF_WINDOWSSYSPATH)\sfmpsfnt.dll
  1946. PSTODIB3 = $(!STF_WINDOWSSYSPATH)\sfmpsprt.dll
  1947. PSTODIB4 = $(!STF_WINDOWSSYSPATH)\sfmpsdib.dll