home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Bonus / lotus123rel9 / install.dsk / MAIN.LSS < prev    next >
Encoding:
Text File  |  1998-04-30  |  104.7 KB  |  2,896 lines

  1. ''/*********************************************************************
  2. ''
  3. ''   Module Name:   main.lss
  4. ''
  5. ''   Module Code:   TOOLKIT
  6. ''
  7. ''   Author:  Marcel Meth
  8. ''
  9. ''   Creation Date:  Aug 31, 1993
  10. ''
  11. ''   Copyright Lotus Development Corporation, (c) 1991
  12. ''
  13. ''
  14. ''   Description: 
  15. ''     Lotus script file for common install
  16. ''     If you are trying to create an automated install, you need to
  17. ''     remove or comment out the Calls that bring up dialogs and
  18. ''     ensure that the symbols have valid values.
  19. ''     See "AUTOMATE" comments throughout the  code.
  20. ''     You should be able to easily automate a simple COMPLETE install.
  21. ''
  22. ''   SUGGESTION: You should be able to tailor an install to you users by
  23. ''               having shell variables setup for them and using the
  24. ''               the lotus script "ENVIRON$" variable.
  25. ''                e.g. suppose the user has the following line in their autoexec.bat
  26. ''                   set NAME=Marcel
  27. ''                then you can pick it up with:
  28. ''                   name$ = ENVIRON$("NAME")
  29. ''
  30. ''   The following diagram illustrates the basic execution path(s)
  31. ''   available in this script.
  32. ''
  33. ''   InitInstall
  34. ''   |
  35. ''   WELCOME DIALOG (SYM_NAME$, SYM_COMPANY$, SYM_NETWORK$)
  36. ''   |
  37. ''   SERVERorDISTRIBUTION DIALOG (SYM_NETWORK$)
  38. ''   |
  39. ''   IF SMARTSUITE THEN   SUITE DIR DIALOG (SYM_BASEDIR$)
  40. ''   |
  41. ''   SELECT based on SYM_NETWORK$
  42. ''      |
  43. ''      gSTANDARD--.....
  44. ''      |        
  45. ''      gSERVER--.....
  46. ''      |        
  47. ''      gNODE--.....
  48. ''      |        
  49. ''      gDISTRIBUTION--.....
  50. ''
  51. ''     The main Drive for all Installs
  52. ''  
  53. ''   Tabs: 3 (In Brief do tabs 4 7)
  54. ''
  55. ''   Additional authors:  Mariana Zgripcea,   Dave Dupre,
  56. ''                        Thangarag Veerapan, Christopher Moy
  57. ''
  58. ''   Change History:
  59. ''   $Log:   //frontline/INSTLOG/CI/cominst/toolkit/main.lss  $
  60. '' 
  61. ''    Rev 1.239   30 Apr 1998 18:11:26   jpappas
  62. '' Corrected REBOOTLATER flag for Pipeline 
  63. '' 
  64. ''    Rev 1.238   23 Apr 1998 17:38:50   ihachem
  65. '' Added SUITE123INSTALL define which is used to indicate 
  66. '' a 123 minisuite build. Default is set to 0. This define is reset to 1
  67. '' in cisdk\{product}\makefile only if SUITE123BLD=YES (CR: RMonteiro)
  68. '' 
  69. ''    Rev 1.237   02 Mar 1998 11:35:26   jpappas
  70. '' Added reboot code after reboot dialogs
  71. '' 
  72. ''    Rev 1.236   19 Feb 1998 13:57:44   jpappas
  73. '' Changed final dialog to congrat & reboot for std/node but not for dist/svr.  
  74. '' 
  75. ''    Rev 1.235   10 Nov 1997 15:48:08   jdonohue
  76. '' Ref. SPR:   RMOO3NPQ3X
  77. '' Moved registration of OCX files after shared component registration
  78. '' 
  79. ''    Rev 1.234   16 Oct 1997 12:52:20   jdonohue
  80. '' Ref. SPR:   RMOO3MVQ4W
  81. '' Added SetCITSymbols sub which sets value of new "LOTUSWELCOMEDIR" symbol
  82. '' 
  83. ''    Rev 1.233   21 Aug 1997 16:15:20   jdonohue
  84. '' Unfixed register OCX logic (call FLot_RegisterOCX instead of Lot_RegisterOCX2)
  85. '' 
  86. ''    Rev 1.232   20 Aug 1997 15:45:16   jdonohue
  87. '' Ref. SPR: THAY36HQ5C
  88. '' Fixed error in Lot_DoOCXFiles logic
  89. '' 
  90. ''    Rev 1.231   12 Aug 1997 10:51:52   jdonohue
  91. '' Ref. SPR: RWIS3K2HSH
  92. '' Added error message box and quit if multi-user install attempted on Windows 95
  93. '' 
  94. ''    Rev 1.230   08 Jul 1997 11:38:36   jdonohue
  95. '' Added multi-user support function: CopyHCUtoUsers
  96. '' 
  97. ''    Rev 1.229   02 Jul 1997 11:22:08   jdonohue
  98. '' CAndo (Japan) changes:
  99. '' Window handle has LONG type
  100. '' 
  101. ''    Rev 1.228   25 Jun 1997 16:17:18   jdonohue
  102. '' Implement CIT registration of product shared components
  103. '' 
  104. ''    Rev 1.227   24 Jun 1997 09:08:34   jdonohue
  105. '' Added support for node 'install' of OCX files in Lot_DoOCXFiles
  106. '' 
  107. ''    Rev 1.226   19 Jun 1997 14:36:46   cmoy
  108. '' Added MIF creation
  109. '' 
  110. ''    Rev 1.225   19 Jun 1997 13:56:28   jdonohue
  111. '' Changed Lot_RegisterOCX to FLot_RegisterOCX - we don't call wrapper function
  112. '' 
  113. ''    Rev 1.224   18 Jun 1997 14:55:58   jdonohue
  114. '' Added Lot_DoOCXFiles for automatic registration of OCX files in sections with
  115. '' special suffix "_OCX"
  116. '' 
  117. ''    Rev 1.223   17 Jun 1997 13:22:28   jdonohue
  118. '' Added Lot_FixupSharedDLLs() to fixup bad ref count for shared DLLs
  119. '' Popup error dialog if user doesn't have admin privileges    
  120. '' 
  121. ''    Rev 1.222   19 Jul 1996 14:41:46   jdonohue
  122. '' Moved IncrementSharedDLLCount from main.lss to toolkit.lss
  123. '' 
  124. ''    Rev 1.221   11 Jul 1996 19:12:42   glutz
  125. '' Added SUB Lot_TurnOffNodeOptSections for cases where Suite does
  126. '' not surface the nodenodeoptions callback.
  127. '' 
  128. ''    Rev 1.220   11 Jul 1996 14:48:06   jdonohue
  129. '' Made sub IncrementSharedDLLCount Public
  130. '' 
  131. ''    Rev 1.219   11 Jul 1996 13:12:02   jdonohue
  132. '' Ref SPR:    CDWT37FR6B
  133. '' Do not reset copy list for shared server system files, just set all sections off
  134. '' 
  135. ''    Rev 1.218   05 Jul 1996 10:35:10   dfristro
  136. '' Simplified SetTheBaseSymbol to remove redundancy.  Also added check that
  137. '' the dir is writable when getting dir from registry.
  138. '' 
  139. ''    Rev 1.217   01 Jul 1996 15:37:56   jdonohue
  140. '' Detect whether shared windows system directory is writeable, not windows dir
  141. '' Set WINDIR, WINSYSDIR symbol values for shared windows server error dialog
  142. '' 
  143. ''    Rev 1.216   24 Jun 1996 15:51:46   jdonohue
  144. '' Ref SPR:     RWIS36THFG
  145. '' Added function TurnOffSharedWinsysSections to prevent attempting to copy
  146. '' windows system files during a node install in a shared windows environment
  147. '' 
  148. ''    Rev 1.215   14 Jun 1996 16:42:10   jdonohue
  149. '' Added RebootLater Flag to indicate reboot required but deferred
  150. '' 
  151. ''    Rev 1.214   04 Jun 1996 12:13:46   glutz
  152. '' Changed call for Suite case from Lot_IsAnyNodeOptAvailToNode to
  153. '' Lot_AreAnyNodeOptionsAvail.  SPR#AFOG366LGN
  154. '' 
  155. ''    Rev 1.213   16 May 1996 16:00:54   glutz
  156. '' Reset RemovePriorVersion buffer prior to calling PreCopyConfig.
  157. '' 
  158. ''    Rev 1.212   08 May 1996 16:05:04   schen
  159. '' fix automation install for Smartsuite.
  160. '' 
  161. ''    Rev 1.211   07 May 1996 10:15:00   glutz
  162. '' Rewrote logic for nodenodeoptions dialog.
  163. '' 
  164. ''    Rev 1.210   19 Apr 1996 11:55:00   jdonohue
  165. '' Fixed error evaluating Lot_IsDirWritable return (NOT Script TRUE/FALSE)
  166. '' 
  167. ''    Rev 1.209   10 Apr 1996 17:09:14   jdonohue
  168. '' Ref SPR: AGAO33XJT3
  169. '' Changed DetectSharedWindows logic to silently install server files if allowed
  170. '' 
  171. ''    Rev 1.208   05 Apr 1996 14:23:36   jdonohue
  172. '' Use new function FGetSectionFileList to get shared DLL filenames even if they
  173. '' have been renamed in the .INF file
  174. '' 
  175. ''    Rev 1.207   04 Apr 1996 21:49:00   glutz
  176. '' The nodenodeoptions dialog only pops up if there are options
  177. '' available for the selected products.
  178. '' 
  179. ''    Rev 1.206   04 Apr 1996 16:28:44   jdonohue
  180. '' Moved IncrementSharedDLLCount and Lot_DoSharedDLLs from inst.lss to main.lss
  181. '' since inst PostConfig processing not done for node since install not copied
  182. '' 
  183. ''    Rev 1.205   02 Apr 1996 11:49:36   jdonohue
  184. '' Call product INIT functions for server install before determining language install
  185. '' 
  186. ''    Rev 1.204   01 Apr 1996 08:25:56   jdonohue
  187. '' Moved function OneUp to toolkit.lss, made global
  188. '' Added call to Lot_FixupLanguageDirectories
  189. '' Rearranged code for determination of server language install
  190. '' 
  191. ''    Rev 1.203   20 Mar 1996 12:35:58   jdonohue
  192. '' Added function Lot_SetLotusFontsDir called after ResetWinWinSysSymbols
  193. '' 
  194. ''    Rev 1.202   19 Mar 1996 18:08:30   schen
  195. '' fix for Automate addiconoptions for server and node install.
  196. '' 
  197. ''    Rev 1.201   18 Mar 1996 13:12:26   jdonohue
  198. '' Ref SPR:LSCR32TQHP
  199. '' Use IsNewShell instead of WhatPlatform for determination of LOTUSFONTS directory
  200. '' 
  201. ''    Rev 1.200   06 Mar 1996 12:53:54   jdonohue
  202. '' Ref SPR: JMOY332R5H
  203. '' For low disk space on server install, loop back to server customize dialog if
  204. '' customize chosen
  205. '' 
  206. ''    Rev 1.199   05 Mar 1996 14:55:14   jdonohue
  207. '' Set the default basedir to value in HCU "User Path" for node, check if dir exists
  208. '' Added function OneUp to strip last path component
  209. '' 
  210. ''    Rev 1.198   04 Mar 1996 08:31:56   jdonohue
  211. '' Remove 16 bit shared component support -- pass 1 : eliminate LOTUSAPP
  212. '' 
  213. ''    Rev 1.197   29 Feb 1996 13:38:10   jdonohue
  214. '' Move the Lot_DoServerSharedWindows function call AFTER writng features to
  215. '' cinstall.ini
  216. '' 
  217. ''    Rev 1.196   29 Feb 1996 07:57:28   jdonohue
  218. '' Ref SPR: JMOY332R5H
  219. '' Changed main.lss logic to return to the customize dialog when space is
  220. '' insufficient if you chose customize the first time
  221. '' 
  222. ''    Rev 1.195   25 Jan 1996 16:16:58   jdonohue
  223. '' Set Windows directory to point to server for shared windows install, which is
  224. '' assumed to be the parent of the Windows System Directory
  225. '' 
  226. ''    Rev 1.194   24 Jan 1996 11:10:58   jdonohue
  227. '' Ref SPR:    JHOH325K2M
  228. '' Fixed logic error in shared windows detection
  229. '' 
  230. ''    Rev 1.193   23 Jan 1996 16:08:58   cmoy
  231. '' HISHI: Merged FE changes
  232. '' 
  233. ''    Rev 1.192   18 Jan 1996 11:09:42   schen
  234. '' BUG fix for default install addicon    
  235. '' 
  236. ''    Rev 1.191   17 Jan 1996 16:57:32   schen
  237. '' Add Addicon key word in Automate install.
  238. '' 
  239. ''    Rev 1.190   17 Jan 1996 13:50:32   jdonohue
  240. '' Added support for server installation to a shared windows location -- new functions:
  241. '' Lot_DoServerSharedWindows     installs system files on shared server windows location
  242. '' Lot_DetectSharedWindows        detects a shared window system and if writeable sets flag
  243. '' 
  244. ''    Rev 1.189   15 Jan 1996 15:06:34   jdonohue
  245. '' Added function Lot_DetectSharedWindows to detect shared windows server install
  246. '' and present UI for confirmation (NOTE: this is not fully functional as yet!!,
  247. '' placeholder for now)
  248. '' 
  249. ''    Rev 1.188   04 Jan 1996 14:55:20   jdonohue
  250. '' Ref SPR:    KHAN2XZUGU        
  251. '' Don't exit if LOTUSAPP directory doesn't exist -- there is no need to create
  252. '' one if only 32 bit products are installed
  253. '' 
  254. ''    Rev 1.187   29 Dec 1995 08:49:30   jdonohue
  255. '' Added function InitStickyCopyList which preserves user choices on customize
  256. '' 
  257. ''    Rev 1.186   22 Dec 1995 10:13:22   jdonohue
  258. '' Removed all references to SYM_PARENTDIR$ -- is now SYM_BASEDIR$ for all
  259. '' 
  260. ''    Rev 1.185   11 Dec 1995 13:59:46   jdonohue
  261. '' Replaced call to RefreshLanguageSourceDirectories with call to
  262. '' Lot_FixupSourceDirectories
  263. '' 
  264. ''    Rev 1.184   08 Nov 1995 16:57:34   tveerapp
  265. '' Fixes fot SPR#RMOO2xQQDY
  266. '' 
  267. ''    Rev 1.183   25 Oct 1995 08:47:14   glutz
  268. '' SYM_PARENTDIR was not always getting set.
  269. '' 
  270. ''    Rev 1.182   Oct 24 1995 16:55:34   cmoy
  271. '' removed eof char
  272. '' 
  273. ''    Rev 1.181   24 Oct 1995 12:28:28   jdonohue
  274. '' Fixed handling of suite server MLC case
  275. '' 
  276. ''    Rev 1.180   24 Oct 1995 11:59:02   glutz
  277. '' SetTheBaseSymbol sets SYM_BASE16DIR.
  278. '' 
  279. ''    Rev 1.179   23 Oct 1995 16:36:48   tveerapp
  280. '' Fixed spr# LSCR2X6MUC. Call product UI functions for automation.
  281. '' 
  282. ''    Rev 1.178   19 Oct 1995 14:54:52   jdonohue
  283. '' Don't use ".." in resetting SYM_STF_SRCDIR$ for server language install
  284. '' 
  285. ''    Rev 1.177   18 Oct 1995 18:02:36   amontalv
  286. '' Commented out code to check priviledge level.
  287. '' 
  288. ''    Rev 1.176   17 Oct 1995 16:08:28   jdonohue
  289. '' Changed logic for COMPONENTSDIR and LOTUSAPPDIR defaults from cinstall.ini
  290. '' 
  291. ''    Rev 1.175   17 Oct 1995 13:14:54   jdonohue
  292. '' Fixed wrong ini section reference, moved dialog code
  293. '' 
  294. ''    Rev 1.174   13 Oct 1995 14:43:56   jdonohue
  295. '' Added call to Lot_RefreshLocalComponentDir
  296. '' 
  297. ''    Rev 1.173   03 Oct 1995 16:42:18   tveerapp
  298. '' Fixed spr#TVEN2WNS5V. Removed the conditional check for calling into the 
  299. '' product UI functions only during custom install. Lot_CallProductFunctions(UI)
  300. '' will now be called for all types of installs (default,min and custom). This
  301. '' check was removed from case gSTANDARD and case gSERVER. 
  302. '' 
  303. ''    Rev 1.172   27 Sep 1995 17:03:42   jdonohue
  304. '' Set server defaults for LOTUSAPPDIR and COMPONENTSDIR in cinstall.ini found
  305. '' 
  306. ''    Rev 1.171   27 Sep 1995 14:48:02   jdonohue
  307. '' Language install message always based on SYM_REG_PRODUCTNAME$ (prod #1)
  308. '' Set SYM_INSTALLKINDS$ as well as SYM_INSTALLKIND$
  309. '' 
  310. ''    Rev 1.170   26 Sep 1995 16:10:12   jdonohue
  311. '' For suite language install, dialog says "smart Suite" in product field
  312. '' Fixed error on server/language install
  313. '' 
  314. ''    Rev 1.169   25 Sep 1995 15:29:38   jdonohue
  315. '' Call all product functions for InitLanguage
  316. '' 
  317. ''    Rev 1.168   21 Sep 1995 16:22:00   jdonohue
  318. '' Moved resetting of gINSTALLINI$ for output after reading of cinstall.ini file
  319. '' 
  320. ''    Rev 1.167   21 Sep 1995 12:28:34   jdonohue
  321. '' Don't reset gINSTALLINI$ for server language install
  322. '' 
  323. ''    Rev 1.166   13 Sep 1995 14:47:22   tveerapp
  324. '' Fixed the logic in SetTheBase. The registry is read only for a std./node 
  325. '' installs.
  326. '' 
  327. ''    Rev 1.165   13 Sep 1995 14:44:46   jdonohue
  328. '' Moved check for server language install
  329. '' 
  330. ''    Rev 1.164   12 Sep 1995 13:21:38   jdonohue
  331. '' Popup message for server language install
  332. '' 
  333. ''    Rev 1.163   12 Sep 1995 10:53:14   tveerapp
  334. '' Added Lo_SaveFeaturesInInstNodeIni() for a node install. This records
  335. '' uinstall information in cinstnod.ini
  336. '' 
  337. ''    Rev 1.162   08 Sep 1995 16:56:02   tveerapp
  338. '' Fixed spr#KHAN2VUQVY,the change is in SetTheBase for automation.
  339. '' 
  340. ''    Rev 1.161   07 Sep 1995 14:51:54   tveerapp
  341. '' Moved the setting of INSTDIR duringa language server install to Inst.lss
  342. '' to fix spr#WEDS2VNRDZ
  343. '' 
  344. ''    Rev 1.160   02 Sep 1995 15:29:50   amontalv
  345. '' Added check at beginning, right after initialization to determine if we have
  346. '' enough priviledges to install.
  347. '' 
  348. ''    Rev 1.159   31 Aug 1995 11:42:50   jdonohue
  349. '' Added code to check that the parent directory obtained from the registry is
  350. '' a valid drive, and if not, uses default
  351. '' 
  352. ''    Rev 1.158   22 Aug 1995 16:13:46   tveerapp
  353. '' For a standalone and node language installs don not reset the product symbols
  354. '' during automation.
  355. '' 
  356. ''    Rev 1.157   22 Aug 1995 13:52:42   jdonohue
  357. '' SetBaseSymbols now looks in registry under ..\lotus\Components for default
  358. '' 
  359. ''    Rev 1.156   17 Aug 1995 14:53:26   jdonohue
  360. '' Added functions to recognize and handle node install from secondary server
  361. '' language
  362. '' 
  363. ''    Rev 1.155   17 Aug 1995 14:36:28   callanan
  364. '' Set the bitmap display mode for billboards
  365. '' 
  366. ''    Rev 1.154   17 Aug 1995 14:03:22   callanan
  367. '' Changed the default way to handle bitmaps in dialogs
  368. '' 
  369. ''    Rev 1.153   15 Aug 1995 16:40:16   mmeth
  370. '' Part 2 of SPR# RMOO2UPTZD
  371. '' In SUB ConfigureAUTOEXEC I have added a check as to which dialog should be
  372. '' posted.  If there were files marked "SYSTEM", that were busy, then
  373. '' I send a message to the install.exe's window to reboot.
  374. '' This of course is only true, if the user chooses to reebot.
  375. '' 
  376. ''    Rev 1.152   15 Aug 1995 07:53:04   jdonohue
  377. '' For a node install, if main product and install directories differ, sets
  378. '' main directory to parent of install (secondary language install)
  379. '' 
  380. ''    Rev 1.151   14 Aug 1995 11:32:12   jdonohue
  381. '' Added code to handle server language install
  382. '' 
  383. ''    Rev 1.150   14 Aug 1995 10:48:02   callanan
  384. '' Modify SYM_CUSTOM$ to keep track of where we are in install, to decide how we display bitmaps in dialogs
  385. '' 
  386. ''    Rev 1.149   09 Aug 1995 13:48:06   callanan
  387. '' Created global SYM_CUST which keeps track of when we are in the Custom dialog
  388. '' so we can display bitmaps correctly.
  389. '' 
  390. ''    Rev 1.148   04 Aug 1995 14:54:26   amontalv
  391. '' Added quotes around the directory name in the lsirun like written to install.lst
  392. '' 
  393. ''    Rev 1.147   02 Aug 1995 17:45:26   tveerapp
  394. '' Added Lot_AutoSetSrvOptions to gSERVER.
  395. '' 
  396. ''    Rev 1.146   02 Aug 1995 16:28:04   jdonohue
  397. '' Changed calling method for InitLanguage
  398. '' 
  399. ''    Rev 1.145   27 Jul 1995 15:47:00   glutz
  400. '' Took out some print statements.
  401. '' 
  402. ''    Rev 1.144   27 Jul 1995 13:33:28   glutz
  403. '' Added cost of unc files to NumberOfBytesPerBillbd.
  404. '' 
  405. ''    Rev 1.143   27 Jul 1995 10:11:16   amontalv
  406. '' Put a check for the new shell around the CreateProgmanGroup call -- all three
  407. '' of them.  
  408. '' 
  409. ''    Rev 1.142   10 Jul 1995 14:33:06   glutz
  410. '' If CheckForSpace fails return to Select Parent dir dialog.
  411. '' 
  412. ''    Rev 1.141   07 Jul 1995 16:47:32   mzgripce
  413. '' if lotusappdir is deleted before the node install put an error and exit
  414. '' 
  415. ''    Rev 1.140   28 Jun 1995 11:42:28   tveerapp
  416. '' Added check to customize shared components for a custom install only.
  417. '' 
  418. ''    Rev 1.139   22 Jun 1995 15:34:16   tveerapp
  419. '' Added logic to Welcome code.Install ends when the welcome dialogs returns
  420. '' gBACK$.
  421. '' 
  422. ''    Rev 1.138   21 Jun 1995 20:21:16   amontalv
  423. '' Attempt to get User name and Company from 4 different places.  The original, from
  424. '' the Windows registry entry for Windows, the Windows registry location for Windows NT
  425. '' and using GetUserName as last resort.
  426. '' 
  427. ''    Rev 1.137   21 Jun 1995 11:33:36   tveerapp
  428. '' When an STFQUIT error is raised, check for automation by getting the
  429. '' SYM_AUTOMATIONINST value. Script does not store the automation$ variable's
  430. '' value.
  431. '' 
  432. ''    Rev 1.136   20 Jun 1995 13:48:24   tveerapp
  433. '' Changed the call from Lot_AutoGetProgramGroup to Lot_GetProgramGroupOrFolder
  434. '' 
  435. ''    Rev 1.135   19 Jun 1995 17:10:30   tveerapp
  436. '' During automation allow the defaultreg function to be called for the 
  437. '' 1st product(similar to the regular install).
  438. '' Should fix spr#KHAN2T2PCQ.
  439. '' 
  440. ''    Rev 1.134   12 Jun 1995 12:46:12   amontalv
  441. '' Added code to Server and node to display folder instead of program group if
  442. '' on Win95.  The code doesn't completely work yet as I'm waiting for some UI
  443. '' issues to be worked out
  444. '' 
  445. ''    Rev 1.133   08 Jun 1995 17:08:58   tveerapp
  446. '' Fixed spr# CCOL2NULJ2. Moved the AutoGetProductDestDir function after
  447. '' smartsuite appselection for a standard and node install.
  448. '' 
  449. ''    Rev 1.132   08 Jun 1995 12:33:02   tveerapp
  450. '' Modified ConfigureAUTOEXEC. The autoexec modification code has been remmed
  451. '' out. This sub routine now brings up only the success dilaog.
  452. '' This should fix spr#KHAN2SKKQZ.
  453. '' 
  454. ''    Rev 1.131   07 Jun 1995 16:30:22   amontalv
  455. '' Changed the Win95 start folder so that it initializes
  456. '' earlier in the program.  This should make automation
  457. '' easier to implement for it.  There are still a couple of
  458. '' bugs that I need to work out, but I feel that I should
  459. '' check what I have now.
  460. '' 
  461. ''    Rev 1.130   06 Jun 1995 15:53:30   amontalv
  462. '' We are experiencing problems with LotusScript when we fill buffers with
  463. '' nulls and then pass them to C routines.  For the time being, it is suggested
  464. '' that we fill our buffers with spaces.  To this end (and to make it
  465. '' easier to change back later) I have created a small LotusScript routine
  466. '' named CreateBuffer.  You use it any time you ordinarily would use
  467. '' STRING$(num, 0).  CreateBuffer() just needs the num, it decides what to
  468. '' fill the buffer with (sorry about the grammer).  Right now it fill the
  469. '' buffer with spaces.  Later we will change it back to nulls.  Also look
  470. '' at the routine NullTrim().  It will get rid of final nulls and spaces.
  471. '' You can use this when getting a buffer that has been changed or filled
  472. '' in a external C routine.
  473. '' 
  474. ''    Rev 1.129   05 Jun 1995 18:11:54   tveerapp
  475. '' Changed AutoSetPArentCompDirs to AutoSetParentDir
  476. '' 
  477. ''    Rev 1.128   05 Jun 1995 16:37:12   amontalv
  478. '' Made changes for migrating to LotusScript version 3.0.37.
  479. '' 
  480. ''    Rev 1.127   01 Jun 1995 11:11:34   amontalv
  481. '' Added API function CreateLink to create shortcuts.  Also added functions
  482. '' to save and get the link path to support the CreateLink.  I also changed
  483. '' the startup program folder code to use the default dialog proc and changed
  484. '' the default dialog proc to process directory trees.
  485. '' 
  486. ''    Rev 1.126   30 May 1995 15:42:34   amontalv
  487. '' Made a new function PopupWithFunction.  PopupModalDlg now calls this.  Needed to
  488. '' do this to call dialog with my own dialog function.
  489. '' 
  490. ''    Rev 1.125   30 May 1995 09:25:28   amontalv
  491. '' Added back my changes.  Had not made changes to setupapi.lss to declare
  492. '' functions.
  493. '' 
  494. ''    Rev 1.124   26 May 1995 14:36:44   cmoy
  495. '' rolled back Andy's changes to revision 1.122
  496. '' 
  497. ''    Rev 1.122   22 May 1995 23:32:20   amontalv
  498. '' Added browse for Win 95 program folder.
  499. '' 
  500. ''    Rev 1.121   22 May 1995 09:28:22   mzgripce
  501. '' remove the function IsLotusappPromptNeeded() and the calls to it and remove
  502. '' the tags NODEPROMPTLOTUSAPP: STDSUITPROMPTLOTUSAPP: AND STDPROMPTLOTUSAPP
  503. '' FIXING THE GOTOs TO THEM 
  504. '' 
  505. ''    Rev 1.120   18 May 1995 12:17:36   tveerapp
  506. '' Added call AutoSetParentCompDirs inside SetTheBaseSymbol for a single
  507. '' product automated install.
  508. '' 
  509. ''    Rev 1.119   18 May 1995 12:07:26   mzgripce
  510. '' set default for baseDir to lotus and remove initlang... and use language 
  511. '' 
  512. ''    Rev 1.118   18 May 1995 09:54:48   mzgripce
  513. '' display userUI in server install only in customize case.
  514. '' 
  515. ''    Rev 1.117   17 May 1995 17:56:26   mzgripce
  516. '' display user UI only in customize for standalone install
  517. '' 
  518. ''    Rev 1.116   17 May 1995 08:54:12   jdonohue
  519. '' Added call to InitLanguage
  520. '' 
  521. ''    Rev 1.115   16 May 1995 13:45:30   mzgripce
  522. '' initialize SYM_PARENDIR and call PARENTDIRCB 
  523. '' 
  524. ''    Rev 1.114   16 May 1995 12:56:32   tveerapp
  525. '' Resourced the log file strings.
  526. '' 
  527. ''    Rev 1.113   16 May 1995 12:39:00   tveerapp
  528. '' Added  End of log file .
  529. '' 
  530. ''    Rev 1.112   15 May 1995 17:34:26   tveerapp
  531. '' Fixed gSERVER. For an automated server install do not process the individual
  532. '' product directories.
  533. '' 
  534. ''    Rev 1.111   15 May 1995 11:18:12   jdonohue
  535. '' Moved SetUpApi call to toolkit
  536. '' 
  537. ''    Rev 1.110   11 May 1995 17:26:52   tveerapp
  538. '' Commented out the gLOgFile$ setting in InitInstall.
  539. '' 
  540. ''    Rev 1.109   11 May 1995 14:51:50   tveerapp
  541. '' Added Status logging. Modified InitInstall.
  542. '' 
  543. ''    Rev 1.108   03 May 1995 18:12:24   mzgripce
  544. '' change cursor% to cursor& in one instance 
  545. '' 
  546. ''    Rev 1.107   03 May 1995 12:00:38   tveerapp
  547. '' Fixed cfbuild-c2build merge.
  548. '' 
  549. ''    Rev 1.106   02 May 1995 12:52:54   cmoy
  550. '' Merged c2 into cf build
  551. '' 
  552. ''    Rev 1.104   28 Apr 1995 15:57:44   mheerman
  553. '' Commented out the select program manager group dialog.
  554. ''    Rev 1.103   26 Apr 1995 09:54:24   tveerapp
  555. '' Added Customization during automation for a server install.
  556. '' 
  557. ''    Rev 1.102   25 Apr 1995 11:52:52   tveerapp
  558. '' Added Automation Customization to case gSTANDARD.
  559. '' 
  560. ''    Rev 1.103   10 Apr 1995 17:52:18   amontalv
  561. '' Changed code that removed null termination and trimmed spaces.  There
  562. '' is no longer any null termination to Script text gotten from C calls
  563. ''    Rev 1.101   06 Apr 1995 14:51:26   cmoy
  564. '' No change.
  565. '' 
  566. ''    Rev 1.102   07 Apr 1995 15:04:24   mzgripce
  567. '' 
  568. ''    Rev 1.100   05 Apr 1995 19:53:30   amontalv
  569. '' Porting to 32 bit.
  570. '' 
  571. ''    Rev 1.99   16 Mar 1995 09:58:14   mhishinu
  572. '' No change.
  573. '' 
  574. ''    Rev 1.98   22 Feb 1995 02:29:06   cmoy
  575. '' No change.
  576. '' 
  577. ''    Rev 1.97   02 Feb 1995 14:29:34   cmoy
  578. '' 
  579. '' Thangaraj fixed Pipeline Problem
  580. '' 
  581. ''    Rev 1.96   01 Feb 1995 17:51:18   tveerapp
  582. '' 
  583. '' Added the call to process Node Options for suite in NODENODEOPTIONS (for suite).
  584. '' 
  585. ''    Rev 1.95   19 Jan 1995 12:30:20   tveerapp
  586. '' 
  587. '' Fixed the lotusapp/node install problem when the product does not support
  588. '' lotusapp processing.
  589. '' 
  590. ''    Rev 1.94   09 Jan 1995 10:12:00   tveerapp
  591. '' 
  592. '' Fixed STFQUIT problem.Added UIPopAll before ending execution.
  593. '' 
  594. ''    Rev 1.93   29 Dec 1994 11:58:32   tveerapp
  595. '' 
  596. '' Commented out the call to reboot during automation.
  597. '' 
  598. ''    Rev 1.92   29 Dec 1994 11:11:06   tveerapp
  599. '' 
  600. '' Added the bitmap and new dialog for automation.
  601. '' 
  602. ''    Rev 1.91   23 Dec 1994 14:14:50   jplump
  603. '' 
  604. '' Added call to Lot_AutoGetSetLicenserInfo
  605. '' Removed print statement
  606. '' 
  607. ''    Rev 1.90   22 Dec 1994 15:07:00   tveerapp
  608. '' 
  609. '' Clean up print statements
  610. '' 
  611. ''    Rev 1.89   21 Dec 1994 17:10:22   tveerapp
  612. '' 
  613. '' Added node options processing for an automated node install in case gNODE.
  614. '' 
  615. ''    Rev 1.88   21 Dec 1994 15:01:28   tveerapp
  616. '' 
  617. '' Fixed the return value type on line 1423
  618. '' 
  619. ''    Rev 1.87   21 Dec 1994 13:55:36   tveerapp
  620. '' 
  621. '' Added Suite App selection processing to STANDARD,SERVER and NODE.
  622. '' 
  623. ''    Rev 1.86   21 Dec 1994 12:15:54   tveerapp
  624. '' 
  625. '' Modified SetTheBaseSymbol to add the check for a suite install.
  626. '' 
  627. ''    Rev 1.85   21 Dec 1994 12:03:50   tveerapp
  628. '' 
  629. '' Added automation code to SetTheBaseSymbol.Uses response file base during automation.
  630. '' 
  631. ''    Rev 1.84   12 Dec 1994 13:22:36   tveerapp
  632. '' 
  633. '' Added ResetWinWinsys call to case gSERVER$ for a server install
  634. '' to determine the win winsysdir symbols correctly.
  635. '' 
  636. ''    Rev 1.83   12 Dec 1994 13:20:00   tveerapp
  637. '' Added %s to lsirun cmd line modification.This is to account for
  638. '' the new automation command line arguments.
  639. '' 
  640. ''    Rev 1.82   12 Dec 1994 11:49:10   mzgripce
  641. '' 
  642. '' Use the SQL and Paradox Auto symbols
  643. '' 
  644. ''    Rev 1.81   08 Dec 1994 20:14:24   jplump
  645. '' 
  646. '' Added call to Lot_AutoWriteOutDebugFile
  647. '' 
  648. ''    Rev 1.80   06 Dec 1994 17:17:28   tveerapp
  649. '' Added automation processing to case gDISTRIBUTION$.
  650. '' Added response file processing from the command line (shell).
  651. '' 
  652. ''    Rev 1.79   06 Dec 1994 12:16:18   tveerapp
  653. '' Added Automation code to cases gSERVER$ and gNODE$.
  654. '' 
  655. ''    Rev 1.78   06 Dec 1994 10:21:38   tveerapp
  656. '' Added Lot_AutoConfigure and AutoInstallReboot calls.
  657. '' 
  658. ''    Rev 1.77   05 Dec 1994 16:51:44   tveerapp
  659. '' Added call to Lot_AutoGetUserInfo.
  660. '' 
  661. ''    Rev 1.76   02 Dec 1994 16:52:50   cmoy
  662. '' merged automation files
  663. '' 
  664. ''    Rev 1.75   18 Nov 1994 16:13:02   amontalv
  665. '' Japan DBCS: Added some resources to
  666. '' 
  667. ''    Rev 1.8   01 Dec 1994 17:23:14   tveerapp
  668. '' Added AutoCheckForSpace function.
  669. '' 
  670. ''    Rev 1.7   29 Nov 1994 12:49:12   tveerapp
  671. '' 
  672. '' Changed the return value of Lot_AutoGetSizeOfInstall to be an integer.
  673. '' 
  674. ''    Rev 1.6   29 Nov 1994 11:43:52   jplump
  675. '' 
  676. '' Added automation$, changed return type for Lot_AutoGetProgramGroup
  677. '' 
  678. ''    Rev 1.4   28 Nov 1994 15:52:46   tveerapp
  679. '' Added Lot_AutoGetSizeofInstall and other automation code for the standalone
  680. '' install.D
  681. '' 
  682. ''    Rev 1.3   23 Nov 1994 17:03:32   tveerapp
  683. '' 
  684. '' Added automation logic to the Init Symbol processor.
  685. '' 
  686. ''    Rev 1.2   23 Nov 1994 16:22:56   tveerapp
  687. '' 
  688. '' Added Lot_AutoGetInstallType to InitInstall. Added code to bring up
  689. '' a modeless dialog during automation.
  690. '' 
  691. ''    Rev 1.1   23 Nov 1994 14:50:40   tveerapp
  692. '' Added Automation code to InitInstall and called the auto init function.
  693. '' Also identified some of the changes to be made.
  694. ''==========
  695. '' 
  696. ''    Rev 1.74   02 Aug 1994 16:34:40   mzgripce
  697. '' No change.
  698. '' 
  699. ''    Rev 1.73   01 Aug 1994 10:27:00   cmoy
  700. '' No change.
  701. '' 
  702. ''    Rev 1.72   29 Jun 1994 10:54:18   thangv
  703. '' Moved the SYM_NETLOTUSAPP setting to inside the if statement (798,807).
  704. '' This was previously outside. The code is in NETLOTUSAPP processing. This
  705. '' should fix spr#31726.
  706. '' 
  707. ''    Rev 1.71   24 Jun 1994 11:10:38   thangv
  708. '' Moved the call to Initialize the product copylists during a node install
  709. '' to after the NODESSSAPPSEL dialog (smart suite dialog). The new lines are
  710. '' 729-733. This should fix the suite bug for node install when the user
  711. '' deselects apps but still gets them installed. The call was in the right pla
  712. '' for the std and server.
  713. '' 
  714. ''    Rev 1.70   03 Jun 1994 12:18:32   cmoy
  715. '' 
  716. '' substituted CreateProgmanGroup for ProgmanManageGroup
  717. '' 
  718. ''    Rev 1.69   02 Jun 1994 12:30:48   thangv
  719. '' Added code to process sys.admin.mapping for node install.
  720. '' 
  721. ''    Rev 1.68   31 May 1994 13:55:38   thangv
  722. '' Added restore cursor before CheckForSpace(in case node)and Showwait
  723. '' cursor after Checkfor space.
  724. '' 
  725. ''    Rev 1.67   31 May 1994 13:40:44   mmeth
  726. '' Added Function Calls for Suite to handle previous versions
  727. '' 
  728. ''    Rev 1.66   26 May 1994 18:40:06   cmoy
  729. '' 
  730. '' Replaced CreateProgmanGroup and ShowProgmanGroup with ProgmanManageGroup
  731. '' so that accented characters may be used.
  732. '' 
  733. ''    Rev 1.65   26 May 1994 17:35:12   thangv
  734. '' 
  735. '' Fixed the back link from SRVUI to SRVNODEOPTIONS (it was SRVDATALENS before
  736. '' 
  737. ''    Rev 1.64   25 May 1994 16:12:38   thangv
  738. '' Moved CheckForSpace after share is processed for node. This fixes
  739. '' the node install running out of space bug.
  740. '' 
  741. ''    Rev 1.63   17 May 1994 10:59:20   thangv
  742. '' Moved stdlotusappprompt to before stdcustomize.
  743. '' 
  744. ''    Rev 1.62   13 May 1994 12:13:32   thangv
  745. '' Changed the 2nd arg to ShowProgmanGroup to 1.(it is not minimized).
  746. '' 
  747. ''    Rev 1.61   11 May 1994 12:35:06   thangv
  748. '' Moved Showwaitcursor for the node further up before copying files.
  749. '' 
  750. ''    Rev 1.60   11 May 1994 11:11:06   thangv
  751. '' Bring up DB_PLESEWAIT twice (for std, server) and bring it up for node.
  752. '' Re-arranged Lot_CallPostCopyConifg(std,server,node).
  753. '' Added plese wait foe node install.
  754. '' 
  755. ''    Rev 1.59   11 May 1994 10:31:40   mzgripce
  756. '' sprs 29300 and 29280 (DoDatalens) 
  757. '' 
  758. ''    Rev 1.58   06 May 1994 14:15:20   mzgripce
  759. '' send the prognam name to the addicons
  760. '' 
  761. ''    Rev 1.57   05 May 1994 15:51:02   thangv
  762. '' 
  763. '' Fixed the prev. link from the SSAPPSEL.
  764. '' 
  765. ''    Rev 1.56   03 May 1994 11:09:06   mmeth
  766. '' Added back Confirm Dialog
  767. '' 
  768. ''    Rev 1.55   02 May 1994 18:56:30   mzgripce
  769. '' 
  770. '' put the addIconsXXX as its own call
  771. '' 
  772. ''    Rev 1.54   02 May 1994 14:52:42   cmoy
  773. '' 
  774. '' modified SUB AUTOEXECCONFIG to deal with different versions of windows.
  775. '' 
  776. ''    Rev 1.52   02 May 1994 13:58:22   thangv
  777. '' Added ResetCopyList calls.
  778. '' 
  779. ''    Rev 1.51   28 Apr 1994 18:33:42   cmoy
  780. '' Changed Lot_CallProductFunctions(billboards) to Lot_CallOneProductFunction
  781. '' (billboards)
  782. '' modified NumberOfBytesinBillboard to only check first product.
  783. '' 
  784. ''    Rev 1.50   26 Apr 1994 11:16:38   mzgripce
  785. '' 
  786. '' enable previous from consolidation in node
  787. '' 
  788. ''    Rev 1.49   25 Apr 1994 17:32:36   cmoy
  789. '' 
  790. '' Moved LAUNCHNAG so that it comes up after DB_DISKCOPYMETHOD dialog.
  791. '' 
  792. ''    Rev 1.48   25 Apr 1994 15:42:16   cmoy
  793. '' reset the base distribution directory to lotusdis\
  794. '' in SUB SetTheBaseSymbol
  795. '' main calls SetTheBaseSymbol after the DB_DISKCOPYMETHOD dialog
  796. '' instead of before it now.
  797. '' 
  798. ''    Rev 1.47   22 Apr 1994 14:34:14   mzgripce
  799. '' 
  800. '' set direction to back if consolidation returns back
  801. '' 
  802. ''    Rev 1.46   20 Apr 1994 16:22:06   mzgripce
  803. '' initialize SYM_DOSMAXPATHDIFF$
  804. '' 
  805. ''    Rev 1.45   20 Apr 1994 12:44:26   thangv
  806. '' Added the check AND app_flag<> FALSE to SRVNODEOPTIONS.
  807. '' When everything is unselected.
  808. '' 
  809. ''    Rev 1.44   19 Apr 1994 17:02:24   thangv
  810. '' Added code to fix the bug if all the products are
  811. '' deselected in ss dialogs in the case of standalone and
  812. '' server install.
  813. '' 
  814. ''    Rev 1.43   15 Apr 1994 11:58:26   mmeth
  815. '' NODENODEOPTIONSCB was not being registered for Personal directory dialog
  816. '' 
  817. ''    Rev 1.42   13 Apr 1994 17:06:02   mzgripce
  818. '' do not set sym_netlotusapp$ in main
  819. '' 
  820. ''    Rev 1.41   13 Apr 1994 09:31:12   cmoy
  821. '' 
  822. '' Added SUB ConfigureAUTOEXEC and implemented it
  823. '' 
  824. ''    Rev 1.40   11 Apr 1994 17:49:00   thangv
  825. '' Removed Reg_GetProdSupportforDist(1) <> TRUE check from SERVER_DISTRIBUTION
  826. '' Dialog case. (check only for Srv support.)
  827. '' which is correct.
  828. '' 
  829. ''    Rev 1.39   11 Apr 1994 12:32:16   mmeth
  830. '' 
  831. '' Cleaned up and made it more readable
  832. '' 
  833. ''    Rev 1.38   08 Apr 1994 13:53:04   thangv
  834. '' Fixed the problem with prev. button for Distribution install.
  835. '' Also added the lines in case gDISTRIBUTION that was nuked.
  836. '' 
  837. ''    Rev 1.37   07 Apr 1994 16:40:12   mmeth
  838. '' 
  839. '' Cleaned up main.lss
  840. '' 
  841. ''    Rev 1.36   06 Apr 1994 16:30:12   mmeth
  842. '' Added a list gEXTRA.  This list gets initialized with an etra 200000
  843. '' bytes for the Windows drive.  This can be modified by the product groups if
  844. '' necessary. 
  845. '' 
  846. ''*********************************************************************/
  847. OPTION DECLARE
  848.  
  849. USE "CALLBACK"
  850. USE "LANGUAGE"
  851.  
  852. DECLARE PUBLIC SUB Lot_SetLotusFontsDir
  853. DECLARE FUNCTION DoDatalens(BYVAL direction$) AS STRING
  854. DECLARE FUNCTION NumberOfBytesPerBillbd() AS LONG
  855.  
  856. DECLARE SUB      SetTheBaseSymbol()
  857. DECLARE SUB      InitInstall()
  858. DECLARE SUB      ConfigureAUTOEXEC()
  859. DECLARE SUB InitStickyCopyList(network$, direction$)
  860. DECLARE SUB Lot_DoServerSharedWindows()
  861. DECLARE SUB Lot_DetectSharedWindows() 
  862. DECLARE SUB Lot_DoSharedDLLs()
  863. DECLARE SUB Lot_DoOCXFiles()
  864. DECLARE SUB Lot_FixupSharedDLLs()
  865.  
  866. DECLARE SUB TurnOffSharedWinsysSections()
  867. DECLARE SUB CopyHCUtoUsers()
  868. DECLARE SUB SetCITSymbols()
  869.  
  870.  
  871. '*************************************************************************
  872. '** SUB INITIALIZE
  873. '**
  874. '** Purpose: Initial entry point into Common Install
  875. '**            
  876. '** Author:    
  877. '** Arguments: None
  878. '** Returns:   NONE
  879. '*************************************************************************
  880.  
  881. DIM FirstTime$
  882.  
  883. SUB INITIALIZE
  884.    DIM network$, notused%, notused1$, nProducts%,prodIndex%, nDirs%, app_flag%, rc$,i%, cwd$
  885.    DIM inifile$, inf$, curcursor&, grouptitle$, dirSym$, lSize&, destdir$
  886.    DIM direction$, nbytes&, lic$, SameFlag$, netLotusapp$, installini$
  887.    DIM newnetpath$, automation$,longnotused&
  888.    DIM win95proggroup$,yesno&
  889.    DIM lang$, s$, listlen%, dlgID%
  890.  
  891.    '** Set up the error handlers
  892.    ON Error STFQUIT    GOTO MAINERROR
  893.    ON Error STFERR     GOTO STFERR_
  894.    ON Error STFTOGGLE  GOTO STFTOGGLEERR
  895.  
  896.     ' Test for admin privileges, abort if not found
  897.     If FALSE = IsAdmin() then
  898.         direction$ = PopupModalDlg(DB_INSUFPRIVILEGE, DB_INSUFPRIVILEGE)
  899.     END IF
  900.  
  901.    InitInstall
  902.     
  903.    ' Look for the multi-user switch /M in C routine, and set global flag if found
  904.     IF FIsMultiUser() <> FALSE THEN gIsMultiUser% = TRUE
  905.     
  906.     ' Multi-user only supported on Windowss NT
  907.     IF gIsMultiUser% AND WhatPlatform() = PLATFORM_WIN95 THEN 
  908.           ErrorMsg SID_NO_WIN95_MULTIUSER, "" 
  909.         ERROR STFQUIT
  910.     END IF
  911.  
  912.    nProducts% = Reg_GetNumberOfProducts()
  913.  
  914.     'Set up arrays to store product registry name/version information
  915.     ReDim ProductRegistryName(nProducts%)
  916.     ReDim ProductRegistryVersion(nProducts%)
  917.     
  918.  
  919.    '****************************************
  920.    '******* START THE REAL WORK HERE *******
  921.    '****************************************
  922.  
  923. '***********AUTOMATION code*************************************************
  924.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  925.       SetListItem "IDC_BMP", 1, STR$(IDD_TKT_PROD_BMP)
  926.       notused1$ = PopupModelessDlg(DB_AUTOINSTWAIT, DB_AUTOINSTWAIT)
  927.    END IF
  928.    '** Allow the only the 1st product to change the registration default
  929.    '** product will set symbols SYM_NAME$, SYM_COMPANY$
  930.       notused1$  = Lot_CallOneProductFunction (1, "DefaultUserReg", gNEXT, TRUE, "")
  931.       notused%   = Lot_ReadSerialNumber()
  932.  
  933. WELCOME:             '** WELCOME THE USER
  934.    direction$ = gNEXT
  935.    '** Call each product's "ProductReg function". Products register themselves with toolkit.
  936.    notused1$  = Lot_CallProductFunctions ("ProductReg", gNEXT, TRUE, gALLPRODUCTS$, "")
  937.  
  938.    '** AUTOMATE: comment out the "PopupModalDlg" stmts and
  939.    '**           and set SYM_NAME$, SYM_COMPANY$, SYM_NETWORK$.
  940.    IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  941.      IF GetSymbolValue(SYM_NETWORK$) = gNODE$ THEN
  942.    notused% = RegisterCallback("CALLBACK", "WELCOMECB")
  943.          rc$ = PopupModalDlg(DB_WELCOME_NODE, DB_WELCOME_NODE)
  944.      ELSE
  945.         notused% = RegisterCallback("CALLBACK", "WELCOMECB")
  946.         IF Reg_GetProdSupportForSrv(1)  OR _
  947.      Reg_GetProdSupportForDist(1) <> FALSE THEN
  948.      rc$ = PopupModalDlg(DB_WELCOME, DB_WELCOME)
  949.         ELSE
  950.      rc$ = PopupModalDlg(DB_WELCOMENOSRV, DB_WELCOMENOSRV)
  951.         END IF
  952.       END IF
  953.       '** if the welcome dialog returns gBACK end Install.
  954.       IF rc$ = gBACK$ THEN END
  955.       direction$ = Lot_ConfirmNamesDlg ()
  956.       IF direction$ = gBACK$ THEN  GOTO WELCOME
  957.    ELSE
  958.    notused% = Lot_AutoGetUserInfo()
  959.    END IF
  960.  
  961. SERVER_DISTRIBUTION: '** ASK IF THIS IS A SERVER OR DIST. INSTALL
  962.    network$ = GetSymbolValue(SYM_NETWORK$)
  963.    IF network$ = gSERVER$ OR network$ = gDISTRIBUTION$ THEN
  964.       IF Reg_GetProdSupportforSrv(1) <> FALSE THEN
  965.  
  966.     notused%   = RegisterCallback("CALLBACK","DISKCOPYMETHODCB")
  967.     '** AUTOMATE: comment out next line and explicitly set SYM_NETWORK
  968.     '**           SetSymbolValue SYM_NETWORK, gSERVER
  969.     '**    or
  970.     '**           SetSymbolValue SYM_NETWORK, gDISTRIBUTION
  971.     direction$ = PopupModalDlg (DB_DISKCOPYMETHOD, DB_DISKCOPYMETHOD )
  972.       END IF
  973.    END IF
  974.    IF direction$ = gBACK$ GOTO WELCOME
  975.  
  976. '***********AUTOMATION code*************************************************
  977.    SetTheBaseSymbol
  978.  
  979. LAUNCHNAG:
  980.    network$ = GetSymbolValue(SYM_NETWORK$)
  981.    IF network$ = gSERVER$ THEN
  982.       notused% = RegisterCallback("CALLBACK","LAUNCHNAGCB")
  983.       '** AUTOMATE: comment out next line and never get asked about launching NAG
  984.       direction$ = PopupModalDlg (DB_LAUNCHNAG, DB_LAUNCHNAG )
  985.    END IF
  986.    IF direction$ = gBACK$ GOTO SERVER_DISTRIBUTION
  987.    
  988. '** Find out if this is a shared windows environment and confirm that this is
  989. '** what the user wants (server only)
  990.    IF network$ = gSERVER$ THEN Lot_DetectSharedWindows
  991.  
  992. '** Find out if we're a language install -- handle UI differently if so    
  993.       notused1$ = Lot_CallProductFunctions("InitLanguage", gNEXT, TRUE, gALLPRODUCTS$, "")
  994.       
  995. '***********AUTOMATION code*************************************************
  996. SMARTSUITE_BASEDIR: '** If this is SmartSuite: Ask the user for the BASEDIR
  997.    network$ = GetSymbolValue(SYM_NETWORK$)
  998.    'Don't allow user to change parent directory for a language install
  999.    IF GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
  1000.    IF network$ <> gDISTRIBUTION$ AND GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1001.       notused% = RegisterCallback("SUIT", "SUITEDIRCB")
  1002.       '** AUTOMATE: comment out next line and explicitly set SYM_BASEDIR$
  1003.       '**   SetSymbolValue SYM_BASEDIR$, "C:\lotsuite"     
  1004.       direction$ = PopupModalDlg(DB_SUITEDIR, DB_SUITEDIR)
  1005.    ELSEIF network$ <> gDISTRIBUTION$ THEN
  1006.       notused% = RegisterCallback("CALLBACK", "PARENTDIRCB")
  1007.       direction$ = PopupModalDlg(DB_PARENTDIR, DB_PARENTDIR)
  1008.    END IF
  1009.    END IF
  1010.  
  1011. '***********AUTOMATION code schen 5/9/97 *************************************
  1012.    DIM autobase$, defDir$
  1013.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ AND _
  1014.        GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1015.        autobase$ = Lot_AutoGetBaseDirSymbol()
  1016.        IF autobase$ <> "" THEN
  1017.          defDir$ = autobase$
  1018.        ELSE  
  1019.          'ErrorMsg "Base Directory entry Invalid"
  1020.          ErrorMsg SID_ERR_SETSYMBOLVALUE, LdString(SID_ERR_AUTO_BASEDIR) + "SUIT" 
  1021.          ERROR STFQUIT
  1022.        END IF
  1023.    SetSymbolValue SYM_BASEDIR$, defDir$
  1024.    END IF   
  1025.  
  1026.    IF direction$ = gBACK$ THEN GOTO LAUNCHNAG
  1027.    '**************************
  1028.    '** Some more intialization
  1029.    '**************************
  1030.  
  1031.    '** Default all products to complete install
  1032.    SetSymbolValue SYM_SIZEOFINSTALL$, gCOMPLETE$
  1033.    FOR i% = 1 to nProducts%
  1034.       Reg_SetSelectedInstallType i%, gCOMPLETE$
  1035.    NEXT
  1036.  
  1037.    automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
  1038.    network$ = GetSymbolValue(SYM_NETWORK$)
  1039.    cwd$     = GetSymbolValue(SYM_STF_CWDDIR$)
  1040.    inifile$ = MakePath(cwd$,gINSTALLINI$)
  1041.  
  1042.    SELECT CASE network$
  1043.  
  1044.    '**********************************************************************
  1045.    '*********************** Standard Install *****************************
  1046.    '**********************************************************************
  1047.  
  1048.    CASE gSTANDARD$
  1049.  
  1050.       '** Read the INF file and initialize the share engine
  1051.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "STDINFFILE")
  1052.       ReadInfFile inf$
  1053.       notused% = Lot_CallSharedTool("InitSHARE()")
  1054.  
  1055.       '** Allow the products to do their initialization
  1056.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1057.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1058.  
  1059.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1060.       direction$  = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
  1061.     IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1062.       END IF
  1063.  
  1064.  
  1065. '***********AUTOMATION code*************************************************
  1066. STDSSAPPSEL:
  1067.         FirstTime$ = ""
  1068.       '** In this dialog, the user can select/deselect applications to be
  1069.       '** installed, and also specify directories for individual apps
  1070.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1071.          IF automation$ <> gTRUE$ THEN
  1072.          notused% = RegisterCallback("SUIT", "APPSELCB")
  1073.          '** AUTOMATE: comment out to take defaults, too tricky
  1074.          '** to automatically pick anything different.
  1075.          direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
  1076.          ELSE
  1077.          notused% = Lot_AutoSuiteAppSelect()
  1078.          END IF   
  1079.       END IF
  1080.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1081.    
  1082.       '***********AUTOMATION code: Set The destination Dir symbols*********
  1083.       IF automation$ = gTRUE$ AND _
  1084.      GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
  1085.       notused% = Lot_AutoGetProductDestDirSymbol ()
  1086.       END IF
  1087.  
  1088.       '** Consolidate the lotusapp if needed
  1089.       IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
  1090.     direction$ = gBACK$
  1091.       END IF
  1092.       IF direction$ = gBACK$  GOTO STDSSAPPSEL
  1093.  
  1094. '***********AUTOMATION code*************************************************
  1095. STDSIZEOFINSTALL:   '** Ask the user kind of install: (COMPLETE, CUSTOM, LAPTOP)   
  1096.      '** AUTOMATE: comment out call to "Lot_GetSizeOfInstall"
  1097.      '**   Result will be a default install of "COMPLETE", anything else is too tricky.
  1098.      '**   For a non-suite install you can set the destination directory:
  1099.      '**       dirSym$ = Reg_GetDirSymbolList(1)
  1100.      '**       dirSym$ = GetListItem(dirSym$, 1)
  1101.      '**       SetSymbolValue dirSym$, "c:\foo\"
  1102.      '**       Lot_RefreshDestination(dirSym$)
  1103.       nProducts% = Reg_GetNumberOfProducts() :  app_flag% = FALSE
  1104.       FOR prodIndex% = 1 to nProducts%
  1105.      If Reg_GetUIInOrOut (prodIndex%) <> FALSE  AND _
  1106.         Reg_GetAllowUserToPickInSuite(prodIndex%) <> FALSE Then
  1107.         app_flag% = TRUE
  1108.      End If
  1109.       NEXT
  1110.       If app_flag% <> FALSE  Then
  1111.    If automation$ = gTRUE$ Then
  1112.      notused% = Lot_AutoGetSizeOfInstall()
  1113.    Else
  1114.      direction$ = Lot_GetSizeOfInstall()
  1115.      IF direction$ = gBACK$ GOTO STDSSAPPSEL
  1116.    End If
  1117.       End If
  1118.  
  1119. STDINITIALIZECOPYLST:  
  1120.         '** Make the products initialize their own copy list
  1121.         InitStickyCopyList network$, direction$
  1122.       IF direction$ = gBACK$ GOTO STDSIZEOFINSTALL
  1123.  
  1124. '*****AUTOMATION code *****************************************************
  1125.       IF automation$ = gTRUE$ AND _
  1126.     GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  1127.    notused% = Lot_AutoCustomizeShare()
  1128.       END IF
  1129.  
  1130.       Lot_SetCurrentProduct(1) 
  1131.  
  1132. STDCUSTOM:
  1133.  
  1134.      IF automation$ <> gTRUE$ Then
  1135.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  1136.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1137.        notused% = RegisterCallback("CALLBACK","CUSTOM1CB")
  1138.        direction$ = PopupModalDlg (DBM_CUSTOMIZEBASESINGLEPROD, _
  1139.                DBM_CUSTOMIZEBASESINGLEPROD)
  1140.     ELSE
  1141.         If app_flag% <> FALSE  Then
  1142.        notused% = RegisterCallback("SUIT","CUSTOMIZEAPPSCB")
  1143.        direction$ = PopupModalDlg (DBSUIT_CUSTOMIZEAPPS,_
  1144.                   DBSUIT_CUSTOMIZEAPPS)
  1145.         End If
  1146.     END IF
  1147.       END IF
  1148.      ELSE
  1149.    '*** Customize Suite before customizing individual products ***
  1150.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1151.         notused% = Lot_AutoInstallSuiteCustomize()
  1152.    END IF
  1153.    notused% = Lot_AutoInstallCustomize()
  1154.      END IF
  1155.  
  1156.      IF direction$ = gBACK$ GOTO STDINITIALIZECOPYLST
  1157.  
  1158. STDDATALENS:   '** Process the Datalens modules
  1159.       direction$ = DoDatalens(direction$) 
  1160.       IF direction$ = gBACK$ GOTO STDINITIALIZECOPYLST
  1161.  
  1162. STDUSERUI:  '** Allow product to bring up any last minute UI
  1163.      '** AUTOMATE: comment out next line and  avoid product specific UI.
  1164.       direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
  1165.       IF direction$ = gBACK$ GOTO STDDATALENS
  1166.  
  1167. '***********AUTOMATION code*************************************************
  1168. IF  automation$ <> gTRUE$ THEN
  1169. STDPROGMAN: '** Put Progman Group UI
  1170.    notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
  1171.       '** AUTOMATE: comment out next line set the progman group name yourself
  1172.       '**           Reg_SetProgManagerGroup 1, "MY GROUP"
  1173.    IF Reg_GetRootFolder() = "" THEN
  1174.       direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
  1175.    ELSE  
  1176.       direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
  1177.    END IF
  1178.    IF direction$ = gBACK$ GOTO STDUSERUI
  1179. ELSE
  1180.    notused% = Lot_AutoGetProgramGroupOrFolder()
  1181. END IF
  1182.       
  1183.      UIPOP 1     '** Bring down automation PLEASEWAIT
  1184.       
  1185.       '** Start the file copy
  1186.  
  1187.       notused% = Lot_AutoWriteOutDebugFile()
  1188.  
  1189.       direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
  1190.       IF direction$ = gBACK$ GOTO STDPROGMAN
  1191.  
  1192.       '*****AUTOMATIONCODE********************************
  1193.       '*** Precopy Config processor
  1194.  
  1195.       '** Give the products a last crack at the CopyList before it gets copied
  1196.       notused% =  RemovePriorVersion("reset","buffer")
  1197.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  1198.  
  1199.       '** Make sure there is enough space
  1200.       IF automation$ = gTRUE$ THEN
  1201.    notused% = AutoCheckForSpace()
  1202.       ELSE      
  1203.    SELECT CASE GetSymbolValue(SYM_SIZEOFINSTALL$)
  1204.  
  1205.     CASE gCOMPLETE$
  1206.        IF CheckForSpace(DB_INSUFDISKSPACE)     = FAILURE GOTO SMARTSUITE_BASEDIR 'STDSIZEOFINSTALL
  1207.     CASE gLAPTOP$
  1208.        IF CheckForSpace(DB_INSUFDISKSPACEMIN)  = FAILURE GOTO SMARTSUITE_BASEDIR 'STDSIZEOFINSTALL
  1209.     CASE gCUSTOM$
  1210.        IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO STDINITIALIZECOPYLST 'STDCUSTOM
  1211.     END SELECT
  1212.       END IF
  1213.       '** Copy all the files in the copylist
  1214.    longnotused& = SetSizeCheckMode(CLNG(0))
  1215.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN 
  1216.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  1217.       END IF
  1218.       nbytes& = NumberOfBytesPerBillbd()
  1219.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  1220.       
  1221.       ''Display bmps centred in billboards
  1222.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, "CENTERED"
  1223.         '' Added language subdirectory to source/destination paths if needed
  1224.         Lot_FixupLanguageDirectories
  1225.         ' Fixup files that are there already but have no reference count per
  1226.         ' Windows 95 LOGO requirements
  1227.         Lot_FixupSharedDLLs
  1228.  
  1229.         SetCITSymbols
  1230.  
  1231.         ' ## DO THE ACTUAL FILE COPY ##
  1232.       CopyFilesInCopyList
  1233.       ''Set it back to default now
  1234.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  1235.  
  1236.       '** Configure the shared files
  1237.       curcursor& = ShowWaitCursor()
  1238.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1239.       notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1240.       notused% = Lot_SaveFeaturesInstaledInInstallIni()
  1241.  
  1242.         '**   Register shared DLLs for all sections that have the special "_SHRCNT"
  1243.         '**   suffix
  1244.       Lot_DoSharedDLLs
  1245.  
  1246.       '** Allow the products to configure the product after file copy
  1247.       notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1248.       
  1249.       UIPOP 1     '** Bring down DB_PLEASEWAIT
  1250.  
  1251.      IF NOT IsNewShell() THEN
  1252.          '** Create a program manager group for the product #1
  1253.         grouptitle$ = Reg_GetProgManagerGroupName(1)
  1254. '**      notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
  1255.          CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
  1256.      END IF
  1257.  
  1258.     
  1259.       '*** schen  AddiconOptions for Automate install 1/16/95
  1260.  
  1261.       IF automation$ = gTRUE$ Then
  1262.  
  1263.           notused% = Lot_AutoAddiconOptions ()
  1264.           if notused% Then
  1265.              notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1266.           end if
  1267.       ELSE
  1268.           notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1269.       END IF   
  1270.  
  1271.       '** Bring up DB_PLEASEWAIT again
  1272.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1273.       notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1274.       
  1275.       notused% = Lot_CallSharedTool("ConfigSHARE()")
  1276.       notused% = Lot_CallSharedTool("AddSHAREIcons()")
  1277.  
  1278.         '**   Register OCX files for all sections that have the special "_OCX"
  1279.         '**   suffix
  1280.         Lot_DoOCXFiles
  1281.       
  1282.       UIPOP 1     '** Bring down DB_PLEASEWAIT
  1283.       RestoreCursor curcursor&
  1284.      
  1285.       '** Win32: This should do nothing except bring up the success dlg. 
  1286.       ConfigureAUTOEXEC
  1287.  
  1288.         '** For Multi-user install, copy HCU entries to all users for all products
  1289.         CopyHCUtoUsers
  1290.  
  1291.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  1292.       'IF automation$ = gTRUE$ THEN
  1293.       '  AutoInstallReboot
  1294.       'END IF  
  1295.    '**********************************************************************
  1296.    '************************* Server Install *****************************
  1297.    '**********************************************************************
  1298.  
  1299.    CASE gSERVER$
  1300.  
  1301.       '** Read the Server INF and initialize SHARE
  1302.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "SRVINFFILE")
  1303.       ReadInfFile inf$
  1304.       notused% = Lot_CallSharedTool("InitSHARE()")
  1305.  
  1306.       '** Allow the products to do their initialization
  1307.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1308.       IF direction$ = gBACK$ GOTO WELCOME
  1309.  
  1310. '***********AUTOMATION code*************************************************
  1311. SMARTSUITE_COMPONENTSDIR:
  1312.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$  AND _
  1313.              Reg_GetProdSupportforShare(1) = 1 THEN
  1314.  
  1315.             'Set defaults for components and lotusapp directories based on
  1316.             'cinstall.ini found in parent directory
  1317.             s$ = GetSymbolValue(SYM_BASEDIR$)
  1318.             installini$ =  MakePath( s$, gINSTALLINI$)
  1319.             IF DoesFileExist(installini$,femExists) = 1 THEN
  1320.             '** Set server defaults for COMPONENTSDIR based on entries
  1321.             '** in cinstall.ini 
  1322.                 s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
  1323.                         "COMPONENTSDIR")
  1324.                 IF s$ <> "" THEN SetSymbolValue SYM_COMPONENTSDIR$, s$
  1325.         '** Check for language install by looking for the "LANGUAGE" key in 
  1326.         '** cinstall.ini
  1327.                 lang$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
  1328.                 s$ = GetIniKeyString(  installini$, "TOOLKIT", "Language")
  1329.                 IF s$ <> "" AND s$ <> lang$ THEN 
  1330.                     SetSymbolValue SYM_INSTALLKIND$, gLANGUAGEINSTALL$
  1331.                     'For suite/server, all products are language or not
  1332.                     listlen% = GetListLength(SYM_INSTALLKINDS$)
  1333.                     FOR i% = 1 TO listlen%
  1334.                         SetListItem SYM_INSTALLKINDS$, i%, gLANGUAGEINSTALL$
  1335.                     NEXT
  1336.             '** Inform the user what's happening
  1337.             '** The product name is based on first product (single product name or Suite)
  1338.                     s$ = GetSymbolValue(SYM_REG_PRODUCTNAME$)
  1339.                     PopupLanguageInstallMessage( s$ )
  1340.                 END IF
  1341.  
  1342.             END IF
  1343.             IF GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN  
  1344.                 notused% = RegisterCallback ("CALLBACK", "GETCOMPONENTDIRCB")
  1345.          '** AUTOMATE: comment out next line and explicitly set SYM_COMPONENTSDIR$
  1346.          '**   SetSymbolValue SYM_COMPONENTSDIR$, "C:\lotus\compnent" 
  1347.          '**   Lot_RefreshDestination SYM_COMPONENTSDIR$
  1348.                 direction$ = PopupModalDlg (DBM_SPECIFY_SRVLOTUSAPPDIR, DBM_SPECIFY_SRVLOTUSAPPDIR)
  1349.             END IF
  1350.       
  1351.         END IF
  1352.  
  1353.         '** Language Install Code
  1354.         '**
  1355.         IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ THEN
  1356.             s$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(1) + gTOP$)
  1357.             s$ = Lot_GetChapterValStr(s$, F_DESTDIRSYM)
  1358.             s$ = GetSymbolValue(s$)
  1359.             installini$ =  MakePath( s$, gINSTALLINI$)
  1360.             lang$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
  1361.             IF DoesFileExist(installini$,femExists) = 1 THEN
  1362.                 '** If cinstall.ini exists in the product dir, and the language is different
  1363.                 '** and we are a server install, then we are in a language install
  1364.                 '**
  1365.                 s$ = GetIniKeyString(  installini$, "TOOLKIT", "Language")
  1366.                 IF s$ <> "" AND s$ <> lang$ THEN
  1367.                     SetSymbolValue SYM_INSTALLKIND$, gLANGUAGEINSTALL$
  1368.                     SetListItem SYM_INSTALLKINDS$, 1, gLANGUAGEINSTALL$
  1369.                     '** Inform the user what's happening
  1370.                     '** The product name is based on first product (single product name or Suite)
  1371.                     s$ = GetSymbolValue(SYM_REG_PRODUCTNAME$)
  1372.                     PopupLanguageInstallMessage( s$ )
  1373.                     '** Reset server values for COMPONENTSDIR based on entries
  1374.                     '** in cinstall.ini 
  1375.                     s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
  1376.                         "COMPONENTSDIR")
  1377.                     IF s$ <> "" THEN SetSymbolValue SYM_COMPONENTSDIR$, s$
  1378.                 END IF
  1379.             END IF
  1380.         END IF
  1381.         
  1382.       IF direction$ = gBACK$ THEN  GOTO SMARTSUITE_BASEDIR
  1383.  
  1384.       '** TV: These were called in the callbacks. They should be called in main
  1385.       '** instead.
  1386.       ResetWinWinsysSymbols
  1387.  
  1388.       '** Make sure fonts directory is set relative to location on server
  1389.         Lot_SetLotusFontsDir
  1390.  
  1391. SRVSSAPPSEL: '** In this dialog, the user can select/deselect applications to
  1392.         '** be installed, and also specify directories for individual apps
  1393.         FirstTime$ = ""
  1394.  
  1395.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ AND SUITE123INSTALL <> 1 THEN
  1396.          IF automation$ <> gTRUE$ THEN
  1397.          notused% = RegisterCallback("SUIT", "APPSELCB")
  1398.          '** AUTOMATE: comment out to take defaults, too trickey
  1399.          '** to automatically pick anything different.
  1400.          direction$ = PopupModalDlg (DBSUIT_SAPPSEL, DBSUIT_SAPPSEL)
  1401.          ELSE
  1402.          notused% = Lot_AutoSuiteAppSelect()
  1403.          END IF   
  1404.       END IF
  1405.  
  1406.       IF direction$ = gBACK$ GOTO SMARTSUITE_COMPONENTSDIR
  1407.  
  1408. SRVSIZEOFINSTALL:  '** Ask kind of install to do (COMPLETE, CUSTOM, LAPTOP)   
  1409.  
  1410.      '** AUTOMATE: comment out call to "Lot_GetSizeOfInstall"
  1411.      '**   Result will be a default install of "COMPLETE", anything else is too tricky.
  1412.      '**   For a non-suite install you can set the destination directory:
  1413.      '**       dirSym$ = Reg_GetDirSymbolList(1)
  1414.      '**       dirSym$ = GetListItem(dirSym$, 1)
  1415.      '**       SetSymbolValue dirSym$, "c:\foo\"
  1416.      '**       Lot_RefreshDestination(dirSym$)
  1417.       nProducts% = Reg_GetNumberOfProducts() :  app_flag% = FALSE
  1418.       FOR prodIndex% = 1 to nProducts%
  1419.      If Reg_GetUIInOrOut (prodIndex%) <> FALSE  AND _
  1420.         Reg_GetAllowUserToPickInSuite(prodIndex%) <> FALSE Then
  1421.         app_flag% = TRUE
  1422.      End If
  1423.       NEXT
  1424.       If app_flag% <> FALSE  Then
  1425.    If automation$ = gTRUE$ Then
  1426.      notused% = Lot_AutoGetSizeOfInstall()
  1427.    Else
  1428.      direction$ = Lot_GetSizeOfInstall ()
  1429.            IF direction$ = gBACK$ GOTO SRVSSAPPSEL
  1430.    End If
  1431.       End If
  1432.  
  1433.       '** Make the products initialize their own copy list
  1434.         InitStickyCopyList network$, direction$
  1435.       IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
  1436.  
  1437. '*****AUTOMATION code *****************************************************
  1438.       IF automation$ = gTRUE$ AND _
  1439.     GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  1440.    notused% = Lot_AutoCustomizeShare()
  1441.       END IF
  1442.      
  1443.       Lot_SetCurrentProduct(1) 
  1444.  
  1445. SRVCUSTOM:
  1446.  
  1447.      IF automation$ <> gTRUE$ Then
  1448.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
  1449.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1450.        notused% = RegisterCallback("CALLBACK","CUSTOM1CB")
  1451.        direction$ = PopupModalDlg (DBM_CUSTOMIZEBASESINGLEPROD, _
  1452.                DBM_CUSTOMIZEBASESINGLEPROD)
  1453.     ELSE
  1454.        If app_flag% <> FALSE  Then
  1455.          notused% = RegisterCallback("SUIT","CUSTOMIZEAPPSCB")
  1456.          direction$ = PopupModalDlg (DBSUIT_CUSTOMIZEAPPS,_
  1457.                DBSUIT_CUSTOMIZEAPPS)
  1458.        End If
  1459.     END IF
  1460.       END IF
  1461.      ELSE
  1462.    '*** Customize Suite before customizing individual products ***
  1463.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1464.         notused% = Lot_AutoInstallSuiteCustomize()
  1465.    END IF
  1466.    notused% = Lot_AutoInstallCustomize()
  1467.      END IF
  1468.      
  1469.      IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
  1470.  
  1471. SRVDATALENS: '** Process the Datalens modules
  1472.       direction$ = DoDatalens(direction$) 
  1473.       if direction$ = gBACK$ GOTO SRVCUSTOM
  1474.  
  1475. SRVNODEOPTIONS: '** Process the Node Options
  1476.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ AND _
  1477.     Lot_AreAnyNodeOptAvailToSrv() <> 0 AND _
  1478.     app_flag% <> FALSE THEN
  1479.    IF automation$ <> gTRUE$ THEN
  1480.     notused% = RegisterCallback("CALLBACK", "SRVNODEOPTIONSCB")
  1481.     '** AUTOMATE: comment out call toPopupmodalDlg and get default.
  1482.     direction$ = PopupModalDlg (DB_SRV_NODEOPTIONS, _
  1483.                DB_SRV_NODEOPTIONS)
  1484.    ELSE
  1485.     notused% = Lot_AutoSetSrvNodeOptions()
  1486.    END IF
  1487.       END IF
  1488.       IF direction$ = gBACK$ GOTO SRVDATALENS
  1489.  
  1490. SRVUI:  '** Allow product to bring up any last minute UI
  1491.      '** AUTOMATE: comment out next line and  avoid product specific UI.
  1492.  
  1493.  
  1494.             direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
  1495.             IF direction$ = gBACK$ GOTO SRVNODEOPTIONS
  1496.  
  1497.       IF automation$ = gTRUE$ THEN  
  1498.          notused% = Lot_AutoGetSetLicenserInfo()
  1499.       END IF  
  1500.  
  1501. '***********AUTOMATION code*************************************************
  1502. IF  automation$ <> gTRUE$ THEN
  1503. SRVPROGMAN: '** Put Progman Group UI
  1504.       notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
  1505.      '** AUTOMATE: comment out next line set the progman group name yourself
  1506.      '**           Reg_SetProgManagerGroup 1, "MY GROUP"
  1507.       IF Reg_GetRootFolder() = "" THEN
  1508.          direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
  1509.       ELSE  
  1510.          direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
  1511.       END IF
  1512.       IF direction$ = gBACK$ GOTO SRVUI
  1513. ELSE
  1514.       notused% = Lot_AutoGetProgramGroupOrFolder()
  1515. END IF
  1516.  
  1517.      UIPOP 1     '** Bring down automation PLEASEWAIT
  1518.  
  1519.       notused% = Lot_AutoWriteOutDebugFile()
  1520.  
  1521.       direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
  1522.       IF direction$ = gBACK$ GOTO SRVPROGMAN
  1523.  
  1524.       '*****AUTOMATIONCODE********************************
  1525.       '*** Precopy Config processor
  1526.  
  1527.       '** Give the products a last crack at the CopyList before it gets copied
  1528.       ''* IF there is any product with licensing turned on, then
  1529.       ''* assume its on for all products.
  1530.       lic$ = CSTR(FALSE)
  1531.       FOR i% = 1 to nProducts%
  1532.     IF Reg_GetProdSupportForLicense (i%) <> FALSE   AND _
  1533.        Reg_IsLicenseSelected (i%)        <> FALSE   THEN
  1534.           lic$ = CSTR(TRUE)
  1535.           EXIT FOR
  1536.     END IF
  1537.       NEXT
  1538.       notused% =  RemovePriorVersion("reset","buffer")
  1539.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, lic$)
  1540.  
  1541.       '** Make sure there is enough space
  1542.       IF automation$ = gTRUE$ THEN
  1543.    notused% = AutoCheckForSpace()
  1544.       ELSE      
  1545.    IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCOMPLETE$ THEN
  1546.     IF CheckForSpace(DB_INSUFDISKSPACE)     = FAILURE GOTO SMARTSUITE_BASEDIR 'SRVSIZEOFINSTALL
  1547.         ELSE
  1548.     IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO SRVCUSTOM 'SRVCUSTOM
  1549.         END IF
  1550.       END IF
  1551.  
  1552.       '** Start the file copy
  1553.       notused% = SetSizeCheckMode(FALSE)
  1554.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
  1555.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  1556.       END IF
  1557.       nbytes& = NumberOfBytesPerBillbd()
  1558.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  1559.       ''Display bmps centred in billboards
  1560.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, "CENTERED"
  1561.         '' Added language subdirectory to source/destination paths if needed
  1562.         Lot_FixupLanguageDirectories
  1563.  
  1564.         SetCITSymbols
  1565.  
  1566.         ' ## DO THE ACTUAL FILE COPY ##
  1567.         CopyFilesInCopyList
  1568.       ''Set it back to default now
  1569.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  1570.             
  1571.       ' Special case of server/language install
  1572.         ' Set cinstall.ini location to subdirectory for writing installed features
  1573.       IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN 
  1574.             s$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) 
  1575.             gINSTALLINI$ =  Lot_SetLanguageDirectory(s$) + "\" + gINSTALLINI$
  1576.         END IF
  1577.       '** Configure the shared files
  1578.       curcursor& = ShowWaitCursor()
  1579.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1580.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1581.       notused%   = Lot_SaveFeaturesInstaledInInstallIni()
  1582.  
  1583.         '' For a shared windows installation, copy the windows, windows system,
  1584.         '' and font files to the shared windows location
  1585.         Lot_DoServerSharedWindows
  1586.  
  1587.       '** All the products to configure after copy
  1588.       IF Lot_AreAnyNodeOptAvailToSrv() <> 0 THEN
  1589.     notused% = Lot_SaveTheNodeOptionsInInstallIni()
  1590.       END IF
  1591.  
  1592.       '** Allow the products to configure the product after file copy
  1593.       notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
  1594.       
  1595.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1596.  
  1597.       '** Create a program manager group for the product #1
  1598.       grouptitle$ = Reg_GetProgManagerGroupName(1)
  1599. '**      notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
  1600.       If NOT IsNewShell() THEN
  1601.          CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
  1602.       End If
  1603.       
  1604.       '***  schen 3/19 Automate Addicon for server
  1605.       IF automation$ = gTRUE$ Then
  1606.  
  1607.           notused% = Lot_AutoAddiconOptions ()
  1608.           if notused% Then
  1609.              notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1610.           end if
  1611.       ELSE
  1612.           notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1613.       END IF   
  1614.      
  1615.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1616.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1617.       
  1618.       notused% = Lot_CallSharedTool("ConfigSHARE()")
  1619.       notused% = Lot_CallSharedTool("AddSHAREIcons()")
  1620.  
  1621.       '** Change the install.ini file so we can do NODE install from server
  1622.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1623.     dirSym$ = Reg_GetDirSymbolList(1)
  1624.     If GetListLength(dirSym$) <= 0 Then
  1625.        ErrorMsg SID_ERR_SRV_MUST_HAVE_MAINDIR, "" 
  1626.        ERROR STFQUIT
  1627.     End If
  1628.     dirSym$ = GetListItem(dirSym$, 1)
  1629.       ELSE
  1630.     dirSym$ = SYM_BASEDIR$
  1631.       END IF
  1632.       ' Special case of server/language install, use INSTDIR for install.lst
  1633.       IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN _
  1634.             dirSym$ = "INSTDIR"
  1635.       CreateIniKeyValue GetSymbolValue(dirSym$) + "install.lst", _
  1636.          "Params", "CmdLine",                     _
  1637.          |lsirun.exe start /S "%s" %s /N|, cmoOverwrite
  1638.       
  1639.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1640.       RestoreCursor curcursor&
  1641.  
  1642.         RebootLater% = 1    '-- this launches Pipeline from inst.lss
  1643.  
  1644.       '** Tell user we succeeded
  1645.       '* Only looks at first product! Won't work for smartsuite MMETH
  1646.       notused% = RegisterCallback("CALLBACK","SRV_SUCCESSCB")
  1647.       IF CINT(FIsKeywordInCopyList("LICTOP")) <> FALSE AND _
  1648.     Reg_IsLicenseSelected (1) <> FALSE THEN
  1649.     rc$ = PopupModalDlg (DB_SRV_SUCCESS_LIC, DB_SUCCESS_REBOOT)
  1650.  
  1651.     DIM hwnd&, lr&
  1652.  
  1653.  
  1654.       IF rc$="OK"  THEN
  1655.          hwnd&=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  1656.          lr&=SendMessage(hwnd&, WM_COMMAND, UM_REBOOTFLAG, 0)
  1657.             RebootLater% = 0
  1658.         ELSE
  1659.             RebootLater% = 1
  1660.       END IF
  1661.  
  1662.       ELSE
  1663.     rc$ = PopupModalDlg (DB_SRV_SUCCESS, DB_SUCCESS)
  1664.       END IF
  1665.  
  1666.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  1667.  
  1668.    '**********************************************************************
  1669.    '************************* Node Install *******************************
  1670.    '**********************************************************************
  1671.  
  1672.    CASE gNODE$
  1673.       
  1674.       '** Read in the INF file and init share
  1675.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "NODEINFFILE")
  1676.       ReadInfFile inf$
  1677.       notused% = Lot_CallSharedTool("InitSHARE()")
  1678.  
  1679.       '** Call the product initialization functions
  1680.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1681.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1682.  
  1683.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1684.             direction$  = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
  1685.     IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1686.       END IF
  1687.  
  1688.       '************** For smart suite, Application Selection Dialog *****
  1689. NODESSAPPSEL:
  1690.         FirstTime$ = ""
  1691.       '** In this dialog, the user can select/deselect applications to be
  1692.       '** installed, and also specify directories for individual apps
  1693.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  1694.          IF automation$ <> gTRUE$ THEN
  1695.          notused% = RegisterCallback("SUIT", "APPSELCB")
  1696.          '** AUTOMATE: comment out to take defaults, too trickey
  1697.          '** to automatically pick anything different.
  1698.          direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
  1699.          ELSE
  1700.          notused% = Lot_AutoSuiteAppSelect()
  1701.          END IF   
  1702.       END IF
  1703.       IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
  1704.  
  1705.       '***********AUTOMATION code******************************
  1706.       IF automation$ = gTRUE$ AND _
  1707.      GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
  1708.       notused% = Lot_AutoGetProductDestDirSymbol ()
  1709.       END IF
  1710.  
  1711.         '** Language Install Code
  1712.         ' install must be in a language subdirectory and the language a
  1713.         ' secondary language for the server
  1714.         IF IsServerSecondaryLanguage AND SrcDirResetFlag <> TRUE THEN 
  1715.             s$ = GetSymbolValue(SYM_STF_SRCDIR$)  
  1716.             s$ = OneUp(NullTrim(s$))
  1717.             SetSymbolValue SYM_STF_SRCDIR$, s$
  1718.             SrcDirResetFlag = TRUE
  1719.       END IF
  1720.       
  1721.       '** Make the products initialize their own copy list
  1722.         InitStickyCopyList network$, direction$
  1723.       IF direction$ = gBACK$ GOTO NODESSAPPSEL
  1724.  
  1725.       '** Consolidate the lotusapp if needed
  1726.       IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
  1727.     direction$ = gBACK$
  1728.       END IF
  1729.       IF direction$ = gBACK$  GOTO NODESSAPPSEL
  1730.  
  1731.  
  1732.       '************************ Change Node Path *************************
  1733. CHANGE_NODE_PATH:
  1734.       IF direction$ = gBACK$ GOTO NODESSAPPSEL
  1735. NODENODEOPTIONS:
  1736.  
  1737.   '**   For a non-suite install you can set the destination directory:
  1738.   '**       dirSym$ = Reg_GetDirSymbolList(1)
  1739.   '**       dirSym$ = GetListItem(dirSym$, 1)
  1740.   '**       SetSymbolValue dirSym$, "c:\foo\"
  1741.   '**       Lot_RefreshDestination(dirSym$)
  1742.     dlgID% = 0
  1743.   IF automation$ <> gTRUE$ THEN
  1744.         '** If it's standalone and there is a dir symbol
  1745.         IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  1746.             dirSym$ = Reg_GetDirSymbolList(1)
  1747.             IF GetListLength(dirSym$) >= 1  Then
  1748.                 IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
  1749.                     dlgID% = DB_NODE_PERSONALDIRNODEOPT
  1750.                 ELSE
  1751.                     dlgID% = DB_NODE_PERSONALDIR
  1752.                 END IF
  1753.             END IF
  1754.         '** smartSuite
  1755.         ELSE
  1756.             IF Lot_AreAnyNodeOptionsAvail() <> 0 THEN
  1757.                 dlgID% = DB_NODE_NODEOPTIONS
  1758.             END IF
  1759.         END IF
  1760.         IF dlgID% <> 0 THEN
  1761.             notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
  1762.             direction$ = PopupModalDlg (dlgID%,CLng(dlgID%))
  1763.         ELSE
  1764.       Lot_TurnOffAllNodeOptSections
  1765.     END IF
  1766.     ELSE
  1767.         notused% = Lot_AutoProcessNodeoptions()
  1768.     END IF
  1769.   IF direction$ = gBACK$ GOTO CHANGE_NODE_PATH
  1770.  
  1771. NODEUI:  '** Allow the product to put up its UI
  1772.       direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
  1773.       IF direction$ = gBACK$ GOTO NODENODEOPTIONS:
  1774.  
  1775. '***********AUTOMATION code*************************************************
  1776. IF  automation$ <> gTRUE$ THEN
  1777. NODEPROGMAN:  '** Put Progman Group UI
  1778.       notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
  1779.      '** AUTOMATE: comment out next line set the progman group name yourself
  1780.      '**           Reg_SetProgManagerGroup 1, "MY GROUP"
  1781.       IF Reg_GetRootFolder() = "" THEN
  1782.          direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
  1783.       ELSE  
  1784.          direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
  1785.       END IF
  1786.       IF direction$ = gBACK$ GOTO NODEUI
  1787. ELSE
  1788.       notused% = Lot_AutoGetProgramGroupOrFolder()
  1789. END IF
  1790.  
  1791.      UIPOP 1     '** Bring down automation PLEASEWAIT
  1792.  
  1793.       notused% = Lot_AutoWriteOutDebugFile()
  1794.  
  1795.       direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
  1796.       IF direction$ = gBACK$ GOTO NODEPROGMAN
  1797.  
  1798.       '*****AUTOMATIONCODE********************************
  1799.       '*** Precopy Config processor
  1800.  
  1801.       '** Configuration before copying
  1802.       notused% =  RemovePriorVersion("reset","buffer")
  1803.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  1804.  
  1805.  
  1806.       curcursor& = ShowWaitCursor()
  1807.       '** Copy the files
  1808.       longnotused& = SetSizeCheckMode(CLNG(FALSE))
  1809.       notused% = Lot_CallSharedTool ("Lot_RefreshLocalLotusapp()")
  1810.       notused% = Lot_RefreshLocalComponentDir 
  1811.  
  1812.       RestoreCursor curcursor&
  1813.       '** Make sure there is enough space before continuing
  1814.       IF automation$ = gTRUE$ THEN
  1815.    notused% = AutoCheckForSpace()
  1816.       ELSE      
  1817.         IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO CHANGE_NODE_PATH
  1818.       END IF
  1819.       
  1820.       curcursor& = ShowWaitCursor()
  1821.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
  1822.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  1823.       END IF
  1824.  
  1825.       nbytes& = NumberOfBytesPerBillbd()
  1826.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  1827.  
  1828.         '** Fixup location of files on server based on cinstall.ini
  1829.         '** for symbols registered by clients 
  1830.         Lot_FixupSourceDirectories
  1831.         
  1832.       ''Turn off Windows System files for shared windows install
  1833.         Lot_DetectSharedWindows
  1834.         IF gIsSharedWindows% THEN TurnOffSharedWinsysSections
  1835.  
  1836.       ''Display bmps centred in billboards
  1837.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, "CENTERED"
  1838.         '' Added language subdirectory to source/destination paths if needed
  1839.         Lot_FixupLanguageDirectories
  1840.         ' Fixup files that are there already but have no reference count per
  1841.         ' Windows 95 LOGO requirements
  1842.         Lot_FixupSharedDLLs
  1843.  
  1844.         SetCITSymbols
  1845.  
  1846.         ' ## DO THE ACTUAL FILE COPY ##
  1847.       CopyFilesInCopyList
  1848.       ''Set it back to default now
  1849.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  1850.  
  1851.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1852.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1853.       notused% = Lot_SaveFeaturesInstaledInInstNodeIni()
  1854.  
  1855.         '**   Register shared DLLs for all sections that have the special "_SHRCNT"
  1856.         '**   suffix
  1857.       Lot_DoSharedDLLs
  1858.  
  1859.       notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
  1860.       
  1861.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1862.       
  1863.       '** Allow the products to do their initialization
  1864.       grouptitle$ = Reg_GetProgManagerGroupName(1)
  1865. '**      notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
  1866.       If NOT IsNewShell() THEN
  1867.          CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
  1868.       End If
  1869.  
  1870.       '*** schen 3/19 for node Automate addicon
  1871.       
  1872.       IF automation$ = gTRUE$ Then
  1873.  
  1874.           notused% = Lot_AutoAddiconOptions ()
  1875.           if notused% Then
  1876.              notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1877.           end if
  1878.       ELSE
  1879.           notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
  1880.       END IF   
  1881.  
  1882.       SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
  1883.       notused1$  = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
  1884.       
  1885.       '** Configure the shared files
  1886.       notused% = Lot_CallSharedTool("ConfigSHARE()")
  1887.       notused% = Lot_CallSharedTool("AddSHAREIcons()")
  1888.  
  1889.         '**   Register OCX files for all sections that have the special "_OCX"
  1890.         '**   suffix
  1891.         Lot_DoOCXFiles
  1892.  
  1893.       '** DONE
  1894.       UIPOP 1 '** Bring Down DB_PLEASEWAIT
  1895.       RestoreCursor curcursor&
  1896.       
  1897.       '** Win32: This should do nothing except bring up the success dlg. 
  1898.       ConfigureAUTOEXEC
  1899.  
  1900.         '** For Multi-user install, copy HCU entries to all users for all products
  1901.         CopyHCUtoUsers
  1902.  
  1903.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  1904.       'IF automation$ = gTRUE$ THEN
  1905.       '  AutoInstallReboot
  1906.       'END IF  
  1907.  
  1908.  
  1909.    '**********************************************************************
  1910.    '******************** Distribution Install ****************************
  1911.    '**********************************************************************
  1912.  
  1913.    CASE gDISTRIBUTION$
  1914.  
  1915.       '** Initialize
  1916.       inf$ = GetIniKeyString (inifile$, "TOOLKIT", "BYWIREINFFILE")
  1917.       ReadInfFile inf$
  1918.  
  1919.       '** Product initialiation
  1920.       direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
  1921.       IF direction$ = gBACK$ GOTO WELCOME
  1922.  
  1923. '***********AUTOMATION code*************************************************
  1924. IF automation$ = gTRUE$ THEN
  1925.       notused% = Lot_AutoGetProductDestDirSymbol ()
  1926. ELSE
  1927.  
  1928.       '******************* Change Distribution Install *******************
  1929.  
  1930. ChangeDistPath:
  1931.  
  1932.       lSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
  1933.       SetListItem "IDC_TEXT", 1, STR$(lSize&) + gStrK$
  1934.  
  1935.       notused% = RegisterCallback("CALLBACK","DISTSIZEINSTALLCB")
  1936.       '** AUTOMATE: comment out next line and explicitly set directory,
  1937.       '**           if you are not happy with the default
  1938.       '**       dirSym$ = Reg_GetDirSymbolList(1)
  1939.       '**       dirSym$ = GetListItem(dirSym$, 1)
  1940.       '**       SetSymbolValue dirSym$, "c:\foo\"
  1941.       '**       Lot_RefreshDestination(dirSym$)
  1942.       direction$ = PopupModalDlg (DB_CHOOSEPATHDIST, DB_CHOOSEPATHDIST)
  1943.  
  1944.  
  1945.       IF direction$ = gBACK$ GOTO SERVER_DISTRIBUTION
  1946. END IF
  1947.       
  1948.       dirSym$ = Reg_GetDirSymbolList(1)
  1949.       nDirs% = GetListLength(dirSym$)
  1950.       IF nDirs% > 0 THEN
  1951.     dirSym$  = GetListItem(dirSym$, 1)
  1952.     destdir$ = GetSymbolValue(dirSym$)
  1953.     AddSectionFilesToCopyList gDISTRIBUTIONFILES$,_
  1954.                 GetSymbolValue(SYM_STF_SRCDIR$),_
  1955.                 destdir$
  1956.       END IF
  1957.  
  1958.      UIPOP 1     '** Bring down automation PLEASEWAIT
  1959.  
  1960.  
  1961.       IF automation$ = gTRUE$ THEN
  1962.    notused% = AutoCheckForSpace()
  1963.       ELSE      
  1964.         IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO ChangeDistPath
  1965.       END IF
  1966.  
  1967.       '' These UI Pops have a funny interaction with CheckFOrSpace
  1968.       '' When Check for SPace putsup a dialog.  (DAVE LOOK AT)
  1969.  
  1970.       '** Ask the user if we should copy files
  1971.       notused% = Lot_AutoWriteOutDebugFile()
  1972.  
  1973.       direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
  1974.       IF direction$ = gBACK$ GOTO ChangeDistPath
  1975.  
  1976.       '*****AUTOMATIONCODE********************************
  1977.       '*** Precopy Config processor
  1978.  
  1979.       '** Configuration before copying
  1980.       notused% =  RemovePriorVersion("reset","buffer")
  1981.       notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  1982.  
  1983.       '** Copy the distribution files
  1984.       longnotused& = SetSizeCheckMode(CLNG(0))
  1985.       IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
  1986.     DumpCopyList GetSymbolValue(SYM_LOGFILE$)
  1987.       END IF
  1988.  
  1989.       nbytes& = NumberOfBytesPerBillbd()
  1990.       notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
  1991.       ''Display bmps centred in billboards
  1992.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, "CENTERED"
  1993.  
  1994.         SetCITSymbols
  1995.  
  1996.         ' ## DO THE ACTUAL FILE COPY ##
  1997.       CopyFilesInCopyList
  1998.       ''Set it back to default now
  1999.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  2000.  
  2001.       ' ** TV:
  2002.       'notused1$ = Lot_CallProductFunctions("PostCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
  2003.  
  2004.       '** Tell the user you are done
  2005.       rc$ = PopupModalDlg (DB_SUCCESS, DB_SUCCESS)
  2006.    
  2007.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
  2008.  
  2009.    '********************* END OF INSTALL CASES ***************************
  2010.  
  2011.    '** IF you get here then it is an error
  2012.    CASE ELSE
  2013.       
  2014.       ERROR STFQUIT
  2015.  
  2016.    END SELECT
  2017.  
  2018.    IF automation$ = gTRUE$ THEN
  2019.       '** TV:Clean up dialogs before quitting 
  2020.       UIPopAll
  2021.       WriteToFile gLogFile$, LdString(SID_AUTOINST_COMPLETE)
  2022.       WriteToFile gLogFile$, LdString(SID_COMMLOGFILE_END)
  2023.         WriteToMIF Reg_GetProductAcronym(1), 1, LdString(SID_AUTOINST_COMPLETE)
  2024.       END 
  2025.    END IF
  2026. '*************************************************************************
  2027. '********************** ERROR HANDLERS ***********************************
  2028. '*************************************************************************
  2029.  
  2030. '** If major error, this will exit the program
  2031. MAINERROR:
  2032.    '** TV:Clean up dialogs before quitting 
  2033.    UIPopAll
  2034.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  2035.       WriteToFile gLogFile$, LdString(SID_AUTOINST_ERR)
  2036.       WriteToFile gLogFile$, LdString(SID_COMMLOGFILE_END)
  2037.         WriteToMIF Reg_GetProductAcronym(1), 0, GetLastErrorMsg
  2038.    END IF   
  2039.    END
  2040.  
  2041. '** DND: Should we do anything else here?
  2042. STFERR_:
  2043.    RESUME NEXT
  2044.  
  2045. STFTOGGLEERR:
  2046.    RESUME NEXT
  2047.  
  2048. END SUB
  2049.  
  2050.  
  2051.  
  2052. '*************************************************************************
  2053. '** FUNCTION DoDatalens(direction$) AS STRING
  2054. '** Purpose:   Take care of all the datalens stuff
  2055. '**     
  2056. '**     
  2057. '** Author:    DND and MMETH
  2058. '** Arguments: SYM_NETWORK$
  2059. '**     
  2060. '** Returns: gBACK$ or ""
  2061. '**     
  2062. '*************************************************************************
  2063.  
  2064. FUNCTION DoDatalens(BYVAL direction$) AS STRING
  2065.  
  2066.     DIM notused%, rc$, chptname$ 
  2067.    If direction$ = gBACK Then GOTO PARADOXUI
  2068. %rem
  2069. 'This is left over from CARMEN
  2070.    IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
  2071.  
  2072.       '** For COMPLETE installs, remove some datalens stuff from
  2073.       '** the copylist.
  2074.       IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCOMPLETE$ THEN
  2075.     If (CINT(FIsKeywordinCopyList ("SHRPARADOXPRG")) <> FALSE) Then   
  2076.         chptname$ =  Lot_GetChapterFromKeyword("SHRPARADOXPRG")
  2077.         Lot_ToggleChapterFilesInCopyList chptname$              
  2078.     end if 
  2079.     If (CINT(FIsKeywordinCopyList ("SHRSQLPRG")) <> FALSE) Then 
  2080.         chptname$ =  Lot_GetChapterFromKeyword("SHRSQLPRG")
  2081.         Lot_ToggleChapterFilesInCopyList chptname$              
  2082.     end if 
  2083.     If (CINT(FIsKeywordinCopyList ("SHRINFORMIXPRG")) <> FALSE) Then
  2084.         chptname$ =  Lot_GetChapterFromKeyword("SHRINFORMIXPRG")
  2085.         Lot_ToggleChapterFilesInCopyList chptname$              
  2086.     end if 
  2087.     If (CINT(FIsKeywordinCopyList ("SHRIBMPRG")) <> FALSE ) Then
  2088.         chptname$ =  Lot_GetChapterFromKeyword("SHRIBMPRG")
  2089.         Lot_ToggleChapterFilesInCopyList chptname$              
  2090.     end if 
  2091.     If (CINT(FIsKeywordinCopyList ("SHRIBMPRG")) <> FALSE ) Then
  2092.         chptname$ =  Lot_GetChapterFromKeyword("SHRIBMPRG")
  2093.         Lot_ToggleChapterFilesInCopyList chptname$              
  2094.     end if 
  2095.        
  2096.       END IF
  2097.  
  2098.    END IF
  2099. %endrem
  2100.  
  2101.    '************** Standard SQL Server Dialog *************************
  2102.  
  2103. SQLUI:
  2104.  
  2105.    IF Lot_CallSharedTool("Lot_IsSQLSelected()") <> FALSE THEN
  2106.  
  2107.     '** INSYMBOLS: ????
  2108.  
  2109.     notused% = RegisterCallback("SHARE", "SQLSERVERNAMECB")
  2110.     '** AUTOMATE: comment out next line and explicitly set SYM_SQLSERVERNAME$
  2111.          IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  2112.             SetSymbolValue SYM_SQLSERVERNAME$, GetSymbolValue(SYM_AUTO_SQLSERVER)
  2113.          END IF
  2114.        direction$ = PopupModalDlg (DBM_SQL_SERVER_NAME, DBM_SQL_SERVER_NAME)
  2115.  
  2116.     IF direction$ = gBACK$ THEN
  2117.        DoDatalens = direction$
  2118.        EXIT FUNCTION
  2119.     END IF
  2120.    END IF
  2121.  
  2122.    '************** Standard Paradox Dialog ***************************
  2123. PARADOXUI:
  2124.  
  2125.    IF Lot_CallSharedTool("Lot_IsParadoxSelected()") <> FALSE THEN
  2126.  
  2127.     '** INSYMBOLS: ????
  2128.       
  2129.     notused% = RegisterCallback("SHARE", "PARADOXNETWORKINFOCB")
  2130.     '** AUTOMATE: comment out next line and explicitly set SYM_PARADOXNETWORKINFO$
  2131.          IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  2132.        SetSymbolValue SYM_PARADOXNETWORKINFO$, GetSymbolValue(SYM_AUTO_PARADOXINFO$)
  2133.          END IF
  2134.  
  2135.     direction$ = PopupModalDlg (DBM_PARADOX_NETWORK_INFORMATION, DBM_PARADOX_NETWORK_INFORMATION )
  2136.  
  2137.     '** OUTSYMBOLS: ????
  2138.  
  2139.     IF direction$ = gBACK$ THEN
  2140.        IF Lot_CallSharedTool("Lot_IsSQLSelected()") <> FALSE GOTO SQLUI
  2141.        DoDatalens = gBACK$
  2142.        EXIT FUNCTION
  2143.     END IF
  2144.    END IF
  2145.  
  2146.    DoDatalens = direction$
  2147.    
  2148. END FUNCTION
  2149.  
  2150.  
  2151. '*************************************************************************
  2152. '** FUNCTION NumberOfBytesPerBillbd() AS LONG
  2153. '** Purpose:   Take care of all the datalens stuff
  2154. '**     
  2155. '**     
  2156. '** Author:    MMETH
  2157. '** Arguments: NONE
  2158. '**     
  2159. '** Returns: number of bytes per billboard
  2160. '**     
  2161. '*************************************************************************
  2162.  
  2163. FUNCTION NumberOfBytesPerBillbd() AS LONG
  2164.    DIM   n%, i% ,j%, costs&, nBillboards%, nProducts%, UNCSym$
  2165.  
  2166.    ''**** COMPUTE THE number of bytes for each billboard to stay up
  2167.    costs& = LcbGetChapterCost("", "", SYM_COST$, "")
  2168.    n% = GetListLength(SYM_COST$)
  2169.    costs& = 0
  2170.    for i% = 1 to n%
  2171.       costs& = costs& + CLNG(GetListItem(SYM_COST$, i%))
  2172.    next
  2173.    j%=GetListLength("UNCVOLLIST")
  2174.    FOR i% = 1 to j%
  2175.       UNCSym$ = GetListItem("UNCVOLLIST",i%)
  2176.       costs& = costs& + CLNG(GetListItem(UNCSym$, UNC_COST))
  2177.    NEXT
  2178.    nProducts% = Reg_GetNumberOfProducts()
  2179.    nBillboards% = Reg_GetBillboardNumber(1)
  2180.    If nBillboards% = 0 Then
  2181.       NumberOfBytesPerBillbd = 0
  2182.    Else
  2183.       NumberOfBytesPerBillbd = costs&\nBillboards%
  2184.    End If
  2185.  
  2186. END FUNCTION
  2187.  
  2188.  
  2189. '*************************************************************************
  2190. SUB SetTheBaseSymbol()
  2191. '** IN SYMBOLS ::: SYM_NETWORK$
  2192. '** OUT SYMBOLS::: SYM_BASEDIR$
  2193. '*************************************************************************
  2194. DIM network$, defBase$, lcbSpace&, defDir$, i%, nProducts%, s$
  2195. DIM keyvalue$, gbuf$, nsize&, ret&, bRegistryPath%
  2196.  
  2197.    bRegistryPath% = FALSE
  2198.    network$ = GetSymbolValue(SYM_NETWORK$)
  2199.  
  2200.     '** Find out if there's already installed products by querying registry
  2201.     '** Standard takes its value from HLM\SOFTWARE\Lotus\components\LocalPath
  2202.     '** Node takes its value from HCU\SOFTWARE\Lotus\components\User Path
  2203.     SELECT CASE network$
  2204.    CASE gSTANDARD$ 
  2205.      keyvalue$ = "LocalPath"
  2206.      ret& =  Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, gREGLOTUSCOMP, keyvalue$, 0, gbuf$, nsize&) 
  2207.    CASE gNODE$ 
  2208.      keyvalue$ = "User Path"
  2209.      ret& =  Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, gREGLOTUSCOMP, keyvalue$, 0, gbuf$, nsize&) 
  2210.     END SELECT 
  2211.     ' Strip off "compnent" part, e.g. d:\lotus\compnent ==> d:\lotus\
  2212.    IF gbuf$ <> "" AND IsDriveMapped(gbuf$) <> FALSE THEN
  2213.         s$ = OneUp(NullTrim(gbuf$))
  2214.         IF Lot_IsDirWritable(Lot_TrimEndSlash(s$)) THEN 
  2215.             defdir$ = s$
  2216.             bRegistryPath% = TRUE
  2217.         END IF
  2218.    END IF  
  2219.  
  2220.    '** Set the PARENT DIRECTORY based on minimum space required
  2221.     '** if not already gotten from registry
  2222.   IF bRegistryPath% = FALSE THEN
  2223.     lcbSpace& = 0
  2224.     defBase$ = "lotus\"
  2225.     nProducts% = Reg_GetNumberOfProducts()
  2226.     FOR i% = 1 to nProducts%
  2227.       lcbSpace& = lcbSpace& + Reg_GetProdMinSize(i%)
  2228.     NEXT
  2229.     defDir$ = Lot_GetAllHardDrive(lcbSpace&, defBase$)
  2230.     IF defDir$ = "" THEN 
  2231.       defDir$ = LCASE$(GetListItem(SYM_LOCALHARDDRIVES$, 1)) + ":\" + defBase$
  2232.     END IF
  2233.   END IF
  2234.  
  2235.    SetSymbolValue SYM_BASEDIR$, defDir$
  2236.  
  2237.    '*** AUTOMATION****************************************
  2238.   IF bRegistryPath% <> TRUE THEN
  2239.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ AND _
  2240.       GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  2241.           AutoSetParentDir
  2242.    END IF   
  2243.   END IF
  2244.  
  2245.     ' Make sure the special CIT symbols have values
  2246.     SetCITSymbols
  2247.  
  2248. END SUB
  2249.  
  2250. SUB GetNamesFromRegistry(buf1$, buf2$, RegLoc$)
  2251.    DIM ReturnVal&
  2252.    
  2253.    buf1$=CreateBuffer(260)
  2254.    ReturnVal&=260
  2255.    ReturnVal& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  2256.              RegLoc$, gREGUSERNAME, 0, buf1$, ReturnVal&)
  2257.    buf2$=CreateBuffer(260)
  2258.    ReturnVal&=260
  2259.    ReturnVal& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  2260.              RegLoc$, gREGORGNAME, 0, buf2$, ReturnVal&)
  2261.    buf1$ = LTrim$(NullTrim(buf1$))
  2262.    buf1$ = Trim$(buf1$)
  2263.    buf2$ = LTrim$(NullTrim(buf2$))
  2264.    buf2$ = Trim$(buf2$)
  2265. END SUB
  2266.  
  2267. SUB InitInstall
  2268.    DIM hUser&, notused%
  2269.    DIM buf1 AS STRING : buf1$ = CreateBuffer(80)
  2270.    DIM buf2 AS STRING : buf2$ = CreateBuffer(80)
  2271.    DIM count%, network$,ReturnVal&
  2272.  
  2273.    '** Initialize the Setup API
  2274.    '-- SetUpAPI  moved to toolkit
  2275.  
  2276.    '****************************************
  2277.    '******* INITIALIZE ALL GLOBAL SYMBOLS **
  2278.    '****************************************
  2279.  
  2280.    '** Default is Single, SmartSuite will override if it is present
  2281.    '** Even for single product installs there may be more that one
  2282.    SetSymbolValue SYM_SINGLESMARTSUITE, gSINGLE$
  2283.  
  2284.    '** Set up a symbol for where the copylist log will get written
  2285.    IF ENVIRON$(gLOTUS_COPYLIST$) <> "" THEN
  2286.       SetSymbolValue SYM_LOGFILE$, GetWindowsDir() + gCOPYLISTLOG$
  2287.    END IF
  2288.  
  2289.    '** Initialize the Win and Winsys symbols
  2290.    Lot_InitializeWinWinsysSym
  2291.  
  2292.    '** Initialize the expected len of subdirs in *.inf paths
  2293.    SetSymbolValue SYM_DOSMAXPATHDIFF$,"20"
  2294.  
  2295.    '** Initialize the gEXTRA list to allow for fudge
  2296.    '** on the windows drive. A deseprate application can add to it.
  2297.    Lot_InitializeEXTRA 
  2298.  
  2299.    ''We show bitmaps in 3 ways, with transparent backrgound (default), streched or centred
  2300.    SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  2301.  
  2302.    '** Get The default Name & Company
  2303.    hUser& = GetModuleHandle(gUSER$)
  2304.    notused% = LoadString (hUser&, USERNAME,    buf1$, 80)
  2305.    notused% = LoadString (hUser&, COMPANYNAME, buf2$, 80)
  2306.  
  2307.    buf1$ = LTrim$(NullTrim(buf1$))
  2308.    buf1$ = Trim$(buf1$)
  2309.    buf2$ = LTrim$(NullTrim(buf2$))
  2310.    buf2$ = Trim$(buf2$)
  2311.  
  2312.    IF buf1$="" THEN
  2313.       GetNamesFromRegistry buf1$, buf2$, gREGWINNAME
  2314.       IF buf1$="" THEN
  2315.          GetNamesFromRegistry buf1$, buf2$, gREGWINNTNAME
  2316.          IF buf1$="" THEN
  2317.             buf1$=CreateBuffer(260)
  2318.             ReturnVal&=260
  2319.             notused%=GetUserName(buf1$,ReturnVal&)
  2320.             buf1$=NullTrim(buf1$)
  2321.             buf2$=buf1$
  2322.          END IF
  2323.       END IF
  2324.    END IF
  2325.  
  2326.    SetSymbolValue SYM_NAME$,    RTrim$(NullTrim(buf1$))
  2327.    SetSymbolValue SYM_COMPANY$, RTrim$(NullTrim(buf2$))
  2328.  
  2329. '***********AUTOMATION code*************************************************
  2330.    IF GetSymbolValue(SYM_AUTOMATIONINST$) = "1" THEN
  2331.       SetSymbolValue SYM_AUTOMATIONINST$, gTRUE$
  2332.         '*** default must be lotinst.log for automation, set in cmdline processing
  2333.      '*** gLogFile$ = GetWindowsDir() + "lotinst.log"
  2334.    ELSE
  2335.           SetSymbolValue SYM_AUTOMATIONINST$, gFALSE$
  2336.    END IF
  2337.       
  2338.    IF GetSymbolValue(SYM_LOGGING$) = "1" THEN
  2339.       IF GetSymbolValue(SYM_LOGGINGPATH$) <> "" THEN
  2340.           gLogFile$ = GetSymbolValue(SYM_LOGGINGPATH$)
  2341.       END IF
  2342.    END IF
  2343.  
  2344.    '** Check to see if command line asks for Node Install
  2345.    '** TV: This should be independent of automation
  2346.    IF INSTR(UCASE$(COMMAND$), "/N") <> 0 THEN
  2347.       SetSymbolValue SYM_NETWORK$, gNODE$
  2348.    ELSE 
  2349.      IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  2350.    network$ = Lot_AutoGetInstallType()
  2351.    SetSymbolValue SYM_NETWORK$, network$
  2352.      ELSE
  2353.    SetSymbolValue SYM_NETWORK$, gSTANDARD$
  2354.      END IF     
  2355.    END IF
  2356.  
  2357.  
  2358.    '****************************************
  2359.    '******* MISC TRIVIA (Initializing) *****
  2360.    '****************************************
  2361.  
  2362.    '** Even though a Window title is not shown, we need
  2363.    '**  to set the title, so it shows up in the task list.
  2364.    SetTitle LdString(SID_TKT_STD_TITLE)
  2365.  
  2366.    '** The default location of the copy gauge is centered at screen bottom
  2367.    SetCopyGaugePosition -1,32000
  2368.  
  2369. END SUB
  2370.  
  2371. '*************************************************************************
  2372. '** SUB ConfigureAUTOEXEC
  2373. '**
  2374. '** Purpose: Configure AUTOEXEC.BAT after copying files.
  2375. '**            
  2376. '** Author:    CHRISTOPHER MOY
  2377. '** Arguments: None
  2378. '** Returns:   NONE
  2379. '*************************************************************************
  2380. SUB ConfigureAUTOEXEC
  2381.    DIM n%, i%, notused%, notused1$, rc$
  2382.    DIM hwnd&, lr&
  2383.  
  2384. '** DETERMINE IF AUTOEXEC.BAT NEEDS MODIFICATIONS
  2385. SetSymbolValue SYM_NEEDSHARE$, gFALSE$   
  2386. SetSymbolValue SYM_NEEDNOTES$, gFALSE$    
  2387.  
  2388. '**** Win32 does not require autoexec modifictaion *********
  2389. %rem
  2390.  
  2391. n% = Reg_GetNumberOfProducts()
  2392.  
  2393. FOR i% = 1 to n%
  2394.    IF Reg_GetSHAREEXESupport(i%) <> FALSE THEN
  2395. '**      IF IsShareInAUTOEXEC() = FALSE THEN  '** if share is not in autoexec   
  2396. '**         SetSymbolValue SYM_NEEDSHARE$, gTRUE$   '** use symbols?
  2397. '**         EXIT FOR
  2398. '**      ELSE
  2399.       IF IsShareInstalled() = FALSE THEN '**if share is in autoexec
  2400.     SetSymbolValue SYM_NEEDSHARE$, gTRUE$    '**but not running.
  2401.     EXIT FOR
  2402.       END IF
  2403.    END IF
  2404. NEXT
  2405.  
  2406. FOR i% = 1 to n%
  2407.    IF Reg_GetNotesSupport(i%) <> FALSE THEN
  2408.       IF IsNotesInPath() = FALSE THEN
  2409.     SetSymbolValue SYM_NEEDNOTES$, gTRUE$    '** use symbols? 
  2410.     EXIT FOR
  2411.       END IF
  2412.    END IF
  2413. NEXT
  2414.  
  2415. IF GetSymbolValue(SYM_NEEDSHARE$) = gTRUE$ OR GetSymbolValue(SYM_NEEDNOTES$) = gTRUE$ THEN
  2416.   IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  2417.       notused% = RegisterCallback("CALLBACK", "AUTOEXECCB")
  2418.       notused1$ = PopupModalDlg(DB_AUTOEXEC, DB_AUTOEXEC)
  2419.  
  2420.       '** Get value in SYM_AUTOEXEC_CHOICE$ from button
  2421.       '** pressed in DB_AUTOEXEC dialog.
  2422.       notused% = RegisterCallback("CALLBACK", "INSTALLCOMPLETECB")
  2423.  
  2424.       SELECT CASE GetSymbolValue(SYM_AUTOEXEC_CHOICE$)
  2425.  
  2426.          CASE "AUTO"
  2427.       notused1$ = PopupModalDlg(DB_SUCCESS_AUTO, DB_SUCCESS_AUTO)
  2428.  
  2429.          CASE "AUTOCOPY"   
  2430.       notused1$ = PopupModalDlg(DB_SUCCESS_AUTOCOPY, DB_SUCCESS_AUTOCOPY)
  2431.  
  2432.          CASE "MAN"
  2433.       notused1$ = PopupModalDlg(DB_SUCCESS_AUTOMAN, DB_SUCCESS_AUTOMAN)
  2434.  
  2435.    END SELECT
  2436.   ELSE
  2437.    notused% = Lot_AutoConfigureAutoexec()
  2438.         '** Tell the user we are all done
  2439.       rc$ = PopupModalDlg(DB_SUCCESS_REBOOT, DB_SUCCESS_REBOOT)
  2440.       IF rc$="OK"  THEN
  2441.          hwnd&=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  2442.          lr&=SendMessage(hwnd&, WM_COMMAND, UM_REBOOTFLAG, 0)
  2443.             RebootLater% = 0
  2444.         ELSE
  2445.             RebootLater% = 1
  2446.       END IF
  2447.  
  2448.   END IF
  2449.  
  2450. ELSE
  2451.    '** Tell the user we are all done
  2452.    rc$ = PopupModalDlg(DB_SUCCESS_REBOOT, DB_SUCCESS_REBOOT)
  2453.       IF rc$="OK"  THEN
  2454.          hwnd&=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  2455.          lr&=SendMessage(hwnd&, WM_COMMAND, UM_REBOOTFLAG, 0)
  2456.             RebootLater% = 0
  2457.         ELSE
  2458.             RebootLater% = 1
  2459.       END IF
  2460.  
  2461. END IF
  2462.  
  2463. %endrem
  2464. '**** Win32 does not require autoexec modifictaion *********
  2465.  
  2466.    '** Tell the user we are all done
  2467.    
  2468.    IF ExitExecRestart=FALSE THEN
  2469.       rc$ = PopupModalDlg(DB_SUCCESS_REBOOT, DB_SUCCESS_REBOOT)
  2470.       IF rc$="OK"  THEN
  2471.          hwnd&=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  2472.          lr&=SendMessage(hwnd&, WM_COMMAND, UM_REBOOTFLAG, 0)
  2473.             RebootLater% = 0
  2474.         ELSE
  2475.             RebootLater% = 1
  2476.       END IF
  2477.    ELSE
  2478.    
  2479.       rc$ = PopupModalDlg(DB_SUCCESS_REBOOT, DB_SUCCESS_REBOOT)
  2480.       IF rc$="OK"  THEN
  2481.          hwnd&=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  2482.          lr&=SendMessage(hwnd&, WM_COMMAND, UM_REBOOTFLAG, 0)
  2483.             RebootLater% = 0
  2484.         ELSE
  2485.             RebootLater% = 1
  2486.       END IF
  2487.       
  2488.    END IF      
  2489.  
  2490. END SUB
  2491.  
  2492. SUB InitStickyCopyList(network$, direction$)
  2493. '*************************************************************************
  2494. '** Purpose: Initialize copy list, while preserving user settings from a
  2495. '**    previous customize; if the install type changes, local global flag
  2496. '**    FirstTime$ is reset.  This flag is reset when the user backs up to
  2497. '**   the xxxSSAPPSEL portion of the code
  2498. '**            
  2499. '** Author:    JMDonohue
  2500. '** Arguments: 
  2501. '** network$    install type: standard, server, node
  2502. '** direction$    direction
  2503. '*************************************************************************
  2504.     IF FirstTime$ <> network$ THEN
  2505.         ResetCopyList    '** Reset the copylist
  2506.     END IF
  2507.     IF FirstTime$ <> network$ OR _
  2508.             GetSymbolValue(SYM_SIZEOFINSTALL$) <> gCUSTOM$ THEN
  2509.         direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
  2510.         FirstTime$ = network$
  2511.     END IF
  2512. END SUB 
  2513.  
  2514. DIM ServerWinDir$
  2515. DIM ServerWinSysDir$
  2516.  
  2517. SUB Lot_DetectSharedWindows() 
  2518. '*************************************************************************
  2519. '** Purpose: Determine if this is a shared windows installation.
  2520. '**    For a server install determine if the shared windows location is 
  2521. '**    writeable.  If writeable, asks the user to confirm copying files 
  2522. '**    there, if not ask the user to confirm a standard server install.  
  2523. '**   Sets the value of global gIsSharedWindows% 
  2524. '**            
  2525. '** Author:    JMDonohue
  2526. '** Arguments: NONE
  2527. '*************************************************************************
  2528.     DIM windir$, network$, s$, i%
  2529.     DIM IsDirWriteable%, direction$
  2530. '' We assume that if there is a file names 'machines.ini' in the Windows
  2531. '' directory, then it it
  2532.     s$ = GetWindowsSysDir() 
  2533.     ServerWinSysDir$ = s$
  2534.     i% = Len(s$)     'Assume last character is \
  2535.     DO 
  2536.         i% = i% - 1
  2537.     LOOP    UNTIL Mid(s$, i%, 1) = "\"
  2538.     windir$ = Mid(s$, 1, i%)
  2539.     ServerWinDir$ = windir$
  2540.     IF DoesFileExist(windir$ + "machines.ini", femExists) THEN 
  2541.         gIsSharedWindows% = TRUE 
  2542.     ELSE
  2543.         gIsSharedWindows% = FALSE
  2544.     END IF
  2545.    network$ = GetSymbolValue(SYM_NETWORK$)
  2546.    IF network$ <> gSERVER$ THEN EXIT SUB
  2547.     IF gIsSharedWindows% = FALSE THEN EXIT SUB
  2548.  
  2549.     ' Set the values of these symbols to point to the shared server
  2550.     SetSymbolValue SYM_WINDIR$,     ServerWinDir$   
  2551.     SetSymbolValue SYM_WINSYSDIR$,ServerWinSysDir$ 
  2552.  
  2553. '' For server, this is a shared windows install only if location writeable 
  2554.     IsDirWriteable% = CInt(Lot_IsDirWritable(ServerWinSysDir$))
  2555.     IF IsDirWriteable% = 0 THEN
  2556.         gIsSharedWindows% = FALSE
  2557.         direction$ = Lot_SharedWindowsDlg (DB_NOSHAREDWINDOWS)
  2558.     END IF
  2559.     
  2560. END SUB    
  2561.  
  2562. SUB Lot_DoServerSharedWindows()
  2563. '*************************************************************************
  2564. '**    Purpose: For server shared windows, copy the system 
  2565. '**    and font files to the shared server locations, keyed on sections in the 
  2566. '**    inf file with the following special destination directory symbols:
  2567. '**    
  2568. '**    SYM_LOTUSFONTSDIR$, SYM_WINDIR$ and SYM_WINSYSDIR$ 
  2569. '**            
  2570. '** Author:    JMDonohue
  2571. '** Arguments: NONE
  2572. '*************************************************************************
  2573.    DIM chapter$, DirSym$, InorOut% 
  2574.     DIM SpecialDirectorySymbolList LIST AS INTEGER
  2575.     DIM WindowsChaptersList LIST AS INTEGER
  2576.    SpecialDirectorySymbolList(SYM_WINDIR$) = 1
  2577.    SpecialDirectorySymbolList(SYM_WINSYSDIR$) = 1
  2578.    SpecialDirectorySymbolList(SYM_LOTUSFONTSDIR$) = 1
  2579.  
  2580.     IF gIsSharedWindows% = FALSE THEN EXIT SUB
  2581.  
  2582.     ' We have a writeable shared windows location,
  2583.     ' Copy the system files to the shared windows location
  2584.     ' (have already been copied to normal server location)
  2585.  
  2586.     ' Find the chapters to copy
  2587.     chapter$ = Lot_GetFirst("", F_INOROUT)
  2588.     WHILE (chapter$ <> "")
  2589.         DirSym$ = Lot_GetChapterValStr(chapter$, F_DESTDIRSYM)
  2590.         IF IsElement(SpecialDirectorySymbolList(DirSym$)) = TRUE THEN 
  2591.             WindowsChaptersList(chapter$) = 1
  2592.         END IF
  2593.         chapter$ = Lot_GetNext()
  2594.     WEND
  2595.  
  2596.     ' Turn off all sections, turn on the ones in list
  2597.     chapter$ = Lot_GetFirst("", F_NOTHING)
  2598.     WHILE (chapter$ <> "")
  2599.         Lot_SetChapterFilesInCopyListInOrOut chapter$, 0
  2600.         chapter$ = Lot_GetNext()
  2601.     WEND
  2602.     
  2603.    FORALL sym IN WindowsChaptersList
  2604.         chapter$ = ListTag(sym) 
  2605.         Lot_SetChapterFilesInCopyListInOrOut chapter$, 1
  2606.    END FORALL
  2607.     
  2608.     ' Set the values of these symbols to point to the shared server
  2609.     SetSymbolValue SYM_WINDIR$,     ServerWinDir$   
  2610.     SetSymbolValue SYM_WINSYSDIR$,ServerWinSysDir$ 
  2611.     Lot_SetLotusFontsDir
  2612.  
  2613.     Lot_RefreshDestination(SYM_WINDIR$)
  2614.     Lot_RefreshDestination(SYM_WINSYSDIR$)
  2615.  
  2616.     SetCITSymbols
  2617.  
  2618.     ' ## DO THE ACTUAL FILE COPY ##
  2619.     CopyFilesInCopyList
  2620.    ERASE WindowsChaptersList
  2621.  
  2622. END SUB
  2623.  
  2624. PUBLIC SUB Lot_SetLotusFontsDir
  2625. '*************************************************************************
  2626. '**    Purpose: Sets the value of the special destination directory symbol
  2627. '**    LOTUSFONTSDIR to the official Windows fonts directory
  2628. '**   NOTE: SYM_WINDIR$ and SYM_WINSYSDIR$ must have been set prior to call
  2629. '**            
  2630. '** Author:    JMDonohue
  2631. '**     
  2632. '*************************************************************************
  2633.     IF IsNewShell() THEN
  2634.         SetSymbolValue SYM_LOTUSFONTSDIR$, GetSymbolValue(SYM_WINDIR$) _
  2635.             + LdString(SID_FONTS95_DIR) + "\"
  2636.     ELSE
  2637.         SetSymbolValue SYM_LOTUSFONTSDIR$, GetSymbolValue(SYM_WINSYSDIR$)
  2638.     END IF
  2639.     Lot_RefreshDestination (SYM_LOTUSFONTSDIR$)
  2640. END SUB
  2641.  
  2642. '*************************************************************************
  2643. '**                    Shared DLL Handling Routines                     **
  2644. '*************************************************************************
  2645.  
  2646. DIM SharedDLLList LIST AS STRING
  2647. DIM SharedDLLListInitialized AS INTEGER    'Initialized to FALSE
  2648.  
  2649. SUB Lot_InitSharedDLLs()
  2650. '*************************************************************************
  2651. '** Purpose: Traverses the copy list looking for sections whose section
  2652. '** keyword ends in "_SHRCNT", and builds a list of these files
  2653. '**  
  2654. '** Author: JMDonohue
  2655. '**************************************************************************
  2656.     DIM s$, szSect$, i%, n%, chapter$, Keyword$, DestDir$ 
  2657.     DIM ProdDLL$
  2658.     DIM lSuffix%
  2659.     CONST szSym$ = "SHAREDDLLS"
  2660.     CONST szSuffix$ = "_SHRCNT"
  2661.     lSuffix% = lenbp(szSuffix$)
  2662.  
  2663. IF FALSE = SharedDLLListInitialized THEN
  2664.     SharedDLLListInitialized = TRUE
  2665. '' Traverse all copy list sections, find files in those using "_SHRCNT" suffix
  2666.     chapter$ = Lot_GetFirst("", F_INOROUT)
  2667.     WHILE (chapter$ <> "")
  2668.         Keyword$ = Lot_GetChapterValStr(chapter$, F_KEYWORD)
  2669.         DestDir$ = Lot_GetChapterValStr(chapter$, F_DESTDIR)
  2670.         s$ = Right$(Keyword$, lSuffix%)
  2671.         IF s$ = szSuffix$ THEN 
  2672.             szSect$ = Lot_GetChapterValStr(chapter$, F_NOTHING)
  2673.             ' Get the renamed filename if it exists
  2674.             n% = FGetSectionFileList (szSym$, szSect$, 1)
  2675.             n% = GetListLength(szSym$)
  2676.             '' For each shared DLL in section, create fully qualified pathname
  2677.             '' and add to list of filenames 
  2678.             FOR i% = 1 TO n%
  2679.                 s$ = DestDir$ + GetListItem(szSym$, i%) 
  2680.                 '' Save an entry for each product that uses the file(prodno-file)
  2681.                 ProdDLL$ = LEFT(chapter$,1) +  "-" + s$
  2682.                 IF ISELEMENT(SharedDLLList(ProdDLL$)) = FALSE THEN _
  2683.                     SharedDLLList(ProdDLL$) = s$
  2684.             NEXT
  2685.             RemoveSymbol szSym$
  2686.         END IF
  2687.         chapter$ = Lot_GetNext()
  2688.     WEND
  2689. END IF
  2690.  
  2691. END SUB
  2692.  
  2693. SUB Lot_DoSharedDLLs()
  2694. '*************************************************************************
  2695. '** Purpose: Traverses the list of shared DLLs
  2696. '** keyword ends in "_SHRCNT", and increments the usage count in the registry
  2697. '** for these files
  2698. '**  
  2699. '** Author: JMDonohue
  2700. '**************************************************************************
  2701. '' Traverse list, increment the usage count in the registry
  2702.     Lot_InitSharedDLLs
  2703.     FORALL sym IN SharedDLLList
  2704.         IncrementSharedDLLCount(sym)
  2705.     END FORALL
  2706. END SUB
  2707.  
  2708. SUB Lot_FixupSharedDLLs()
  2709. '*************************************************************************
  2710. '** Purpose: Traverses the list of shared DLLs
  2711. '** keyword ends in "_SHRCNT", and increments the usage count in the registry
  2712. '** for these files
  2713. '**  
  2714. '** Author: JMDonohue
  2715. '**************************************************************************
  2716. '' Traverse list, increment the usage count in the registry
  2717.     Lot_InitSharedDLLs
  2718.     FORALL sym IN SharedDLLList
  2719.         FixupSharedDLLCount(sym)
  2720.     END FORALL
  2721.     
  2722. END SUB
  2723.  
  2724. '*************************************************************************
  2725.  
  2726. '*************************************************************************
  2727. '**                    OCX File Handling Routines                       **
  2728. '*************************************************************************
  2729.  
  2730. DIM OCXFileList LIST AS STRING
  2731. DIM OCXFileListInitialized AS INTEGER    'Initialized to FALSE
  2732.  
  2733. SUB Lot_InitOCXFiles()
  2734. '*************************************************************************
  2735. '** Purpose: Traverses the copy list looking for sections whose section
  2736. '** keyword ends in "_OCX", and builds a list of these files
  2737. '**  
  2738. '** Author: JMDonohue
  2739. '**************************************************************************
  2740.     DIM s$, szSect$, i%, n%, chapter$, Keyword$, DestDir$ 
  2741.     DIM ProdDLL$
  2742.     DIM lSuffix%
  2743.     CONST szSym$ = "OCXFILES"
  2744.     CONST szSuffix$ = "_OCX"
  2745.     lSuffix% = lenbp(szSuffix$)
  2746.  
  2747. IF FALSE = OCXFileListInitialized THEN
  2748.     OCXFileListInitialized = TRUE
  2749. '' Traverse all copy list sections, find files in those using "_OCX" suffix
  2750.     chapter$ = Lot_GetFirst("", F_INOROUT)
  2751.     WHILE (chapter$ <> "")
  2752.         Keyword$ = Lot_GetChapterValStr(chapter$, F_KEYWORD)
  2753.         DestDir$ = Lot_GetChapterValStr(chapter$, F_DESTDIR)
  2754.         s$ = Right$(Keyword$, lSuffix%)
  2755.         IF s$ = szSuffix$ THEN 
  2756.             szSect$ = Lot_GetChapterValStr(chapter$, F_NOTHING)
  2757.             ' Get the renamed filename if it exists
  2758.             n% = FGetSectionFileList (szSym$, szSect$, 1)
  2759.             n% = GetListLength(szSym$)
  2760.             '' For each OCX file in section, create fully qualified pathname
  2761.             '' and add to list of filenames 
  2762.             FOR i% = 1 TO n%
  2763.                 s$ = DestDir$ + GetListItem(szSym$, i%) 
  2764.                 '' Save the fully qualified pathname and source section keyword
  2765.                 IF ISELEMENT(OCXFileList(s$)) = FALSE THEN _
  2766.                     OCXFileList(s$) = KeyWord$
  2767.             NEXT
  2768.             RemoveSymbol szSym$
  2769.         END IF
  2770.         chapter$ = Lot_GetNext()
  2771.     WEND
  2772. END IF
  2773.  
  2774. END SUB
  2775.  
  2776. PUBLIC Function StrRChr(tgt$, c$) AS Integer
  2777. '*************************************************************************
  2778. '** Purpose: Returns the index of the last occurence of character 'c$' in
  2779. '** string 'tgt$' or 0 if not found
  2780. '**  
  2781. '** Author: JMDonohue
  2782. '**************************************************************************
  2783.     DIM l%, i%
  2784.     l% = len(tgt$)
  2785.     FOR i% = l% to 1 Step -1
  2786.         if mid$(tgt$, i%, 1) = c$ then 
  2787.             StrRChr = i%
  2788.             exit function
  2789.         End If
  2790.     NEXT    
  2791.     StrRChr = 0
  2792. END FUNCTION    
  2793.     
  2794.     
  2795. SUB Lot_DoOCXFiles()
  2796. '*************************************************************************
  2797. '** Purpose: Traverses the list of section keywords that ends in "_OCX", 
  2798. '** and call the DLLRegisterServer method for these files
  2799. '**  
  2800. '** Author: JMDonohue
  2801. '**************************************************************************
  2802.     Dim OK as Integer    ' BOOL in C
  2803.     Dim i%
  2804.     Dim s$, KeyWord$, ocxname$, file$
  2805.     Lot_InitOCXFiles
  2806.     FORALL sym IN OCXFileList
  2807.         file$ = ListTag(sym)
  2808.         Keyword$ = sym
  2809.         OK = FLot_RegisterOCX (file$)
  2810.         If OK = FALSE then 
  2811.             ' If it's a node install, try registering on server, and record an
  2812.             ' uninstall object
  2813.             i% = StrRChr(file$, "\")
  2814.             If i% <> FALSE then
  2815.                 ocxname$ = mid(file$, i%+1)
  2816.             Else
  2817.                 ocxname$ = file$
  2818.             End If
  2819.             s$ = Lot_WhereIsFeature(1, Keyword$, ocxname$)
  2820.             if s$ <> "" Then
  2821.                 s$ = s$ + ocxname$
  2822.                 'Record the object and call register routine
  2823.                 OK = FLot_RegisterOCX (s$)
  2824.             End If
  2825.         End If
  2826.         If OK = FALSE then Print "OCX Registration failed for file " & s$
  2827.     END FORALL
  2828. END SUB
  2829.  
  2830. '*************************************************************************
  2831.  
  2832.  
  2833. SUB TurnOffSharedWinsysSections()
  2834. '****************************************************************************
  2835. '** Purpose: For a shared windows installation, don't copy system files, since
  2836. '**                these should already be on the shared windows server
  2837. '**
  2838. '** Author:  JMD
  2839. '**
  2840. '****************************************************************************
  2841. DIM DirSym$, chapter$
  2842.     IF gIsSharedWindows% = FALSE THEN EXIT SUB
  2843.  
  2844.     ' Find the chapters to turn off
  2845.     chapter$ = Lot_GetFirst("", F_INOROUT)
  2846.     WHILE (chapter$ <> "")
  2847.         DirSym$ = Lot_GetChapterValStr(chapter$, F_DESTDIRSYM)
  2848.         IF DirSym$ =  SYM_WINSYSDIR$ THEN 
  2849.             Lot_SetChapterFilesInCopyListInOrOut chapter$, 0
  2850.         END IF
  2851.         chapter$ = Lot_GetNext()
  2852.     WEND
  2853. END SUB
  2854.  
  2855. SUB CopyHCUtoUsers
  2856. '****************************************************************************
  2857. '** Purpose: For a multi-user install, copy the registry hive under
  2858. '**    HKEY_CURRENT_USER\Software\Lotus\<prodname>\<prodver>
  2859. '**    to all the other users on the system if the global flag 'gIsMultiUser%'
  2860. '**    is set
  2861. '**
  2862. '** Author:  JMD
  2863. '**
  2864. '****************************************************************************
  2865.     DIM i%, ret%
  2866.    DIM nProducts%
  2867.     DIM ProdName$, ProdVer$
  2868.     if gIsMultiUser% = FALSE THEN Exit Sub
  2869.    nProducts% = Reg_GetNumberOfProducts()
  2870.     For i% = 1 TO nProducts%
  2871.         ProdName$ = ProductRegistryName(i%)
  2872.         ProdVer$ = ProductRegistryVersion(i%)
  2873.         ret% = CreateDefault (ProdName$, ProdVer$)
  2874.     NEXT
  2875. END SUB
  2876.  
  2877.  
  2878. SUB SetCITSymbols
  2879. '****************************************************************************
  2880. '** Purpose: Set the value of destination symbols that are owned by CIT:
  2881. '**    before file copy
  2882. '**    SYM_LOTUSWELCOMEDIR$    = SYM_BASEDIR$ + "Welcome\"
  2883. '**
  2884. '** Author:  JMD
  2885. '**
  2886. '****************************************************************************
  2887.     DIM s$
  2888.     s$ = GetSymbolValue(SYM_BASEDIR$)
  2889.  
  2890.    '** Set the WELCOME DIRECTORY as a child of the base directory
  2891.    SetSymbolValue SYM_LOTUSWELCOMEDIR$,  s$ + LdString(SID_WELCOME) + "\"
  2892.     Lot_RefreshDestination(SYM_LOTUSWELCOMEDIR$)
  2893.     
  2894. END SUB
  2895.  
  2896.