home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 April A / Pcwk4a98.iso / Lotus / Notes46 / INSTALL.DSK / SHARE.LSS < prev    next >
Text File  |  1995-11-15  |  291KB  |  6,428 lines

  1. ''/*********************************************************************
  2. ''
  3. ''   Module Name:    share.lss
  4. ''
  5. ''   Module Code:    TOOLKIT
  6. ''
  7. ''   Author:         MZ     
  8. ''
  9. ''   Creation Date:  Aug 31, 1993
  10. ''
  11. ''   Copyright Lotus Development Corporation, (c) 1991
  12. ''
  13. ''
  14. ''  
  15. ''   Description: 
  16. ''     Lotus script file for common install
  17. ''  
  18. ''
  19. ''   Additional authors:
  20. ''
  21. ''   Change History:
  22. ''   $Log:   //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/share__@.lss  $
  23. '' 
  24. ''    Rev 1.101.1.0   15 Nov 1995 17:19:34   mhishinu
  25. '' Merged GC5 into FE5
  26. '' 
  27. ''    Rev 1.101   11 Oct 1995 17:15:32   jdonohue
  28. '' Dialog editor folder under "Lotus Accessories"
  29. '' 
  30. ''    Rev 1.100   10 Oct 1995 15:45:22   jdonohue
  31. '' Fixed error in automation logic for LOTUSAPP symbol (SPR KHAN2WRPHC)
  32. '' 
  33. ''    Rev 1.99   22 Sep 1995 17:03:14   glutz
  34. '' Lot_WriteIniFiles does not create an ini ley for lotusapp unless the 
  35. '' directory exists.
  36. '' 
  37. ''    Rev 1.98   22 Sep 1995 15:31:28   tveerapp
  38. '' Added checks for UNC path/LongDir names for lotusapp. Part of the fix for 
  39. '' spr#LSCR2VZVGB
  40. '' 
  41. ''    Rev 1.97   19 Sep 1995 16:33:00   glutz
  42. '' Added checks for long dir names and UNC in ConsolidateLotusAppDirCb.
  43. '' 
  44. ''    Rev 1.96   09 Sep 1995 16:39:18   tveerapp
  45. '' Fixed a problem for the suite node fix. Set the SYM_NETLOTUSAPP if
  46. '' a cleanpath is found with the mapped rive.
  47. '' 
  48. ''    Rev 1.95   08 Sep 1995 16:11:24   glutz
  49. '' SPR KHAN2SHNAN: Put GOTO EXIT_CONSOLIDATELOTUSAPPDIR statement in continue
  50. '' case if path validation fails in CONSOLIDATELOTUSAPPDIRCB.
  51. '' 
  52. ''    Rev 1.94   06 Sep 1995 09:27:32   tveerapp
  53. '' Fixed suite node install problem.
  54. '' 
  55. ''    Rev 1.93   31 Aug 1995 14:58:04   jdonohue
  56. '' Take out print statement for Invalid Share Keyword
  57. '' 
  58. ''    Rev 1.92   31 Aug 1995 14:17:00   jdonohue
  59. '' Fixed share keys in SHARESUBDIR list
  60. '' 
  61. ''    Rev 1.91   30 Aug 1995 11:31:46   jdonohue
  62. '' Added LOTUSDIALOGSPROGRAM to share names
  63. '' 
  64. ''    Rev 1.90   07 Aug 1995 17:35:10   jdonohue
  65. '' Replaced Lot_GetLocalLotusappDest to fix bug in directory naming
  66. '' 
  67. ''    Rev 1.89   03 Aug 1995 10:11:18   mmeth
  68. '' Fix for SPR#  KHAN2UJMFN:
  69. '' Fix is in share.lss:InitSHARE
  70. '' the problem was that under the automation else clause we were not checking
  71. '' calling ValidatePath(AutoLotusApp$).
  72. '' The fix is to call the validate and in case of a bad return code 
  73. '' put up an error message and quit.
  74. '' 
  75. ''    Rev 1.88   02 Aug 1995 15:00:18   jdonohue
  76. '' Remove SID_ERR_SHARE_CONSOLID1 resource
  77. '' 
  78. ''    Rev 1.87   01 Aug 1995 16:29:26   jdonohue
  79. '' Allow lotusapp dir to be on UNC volume
  80. '' 
  81. ''    Rev 1.86   20 Jul 1995 10:56:16   glutz
  82. '' GetFreeSpaceForDrive now returns K bytes so I made changes accordingly.
  83. '' 
  84. ''    Rev 1.85   20 Jul 1995 08:37:52   jdonohue
  85. '' CONSOLIDATELOTUSAPPDIRCB 
  86. '' was not setting directory if no changes were made
  87. '' 
  88. ''    Rev 1.84   17 Jul 1995 17:09:08   amontalv
  89. '' Commented out Register code for 16 bit.
  90. '' 
  91. ''    Rev 1.83   17 Jul 1995 16:49:14   amontalv
  92. '' Added some code for Greg Lutz.  Also changed the code for registering dlgedit.
  93. '' 
  94. ''    Rev 1.82   17 Jul 1995 16:36:40   amontalv
  95. '' Added registration for dlg editor
  96. '' 
  97. ''    Rev 1.81   17 Jul 1995 15:35:18   amontalv
  98. '' Added Lot_AddLinkToFolder to add Dialog Editor in correct location.
  99. '' 
  100. ''    Rev 1.80   30 Jun 1995 09:13:20   glutz
  101. '' Added browse feature to CONSOLIDATELOTUSAPPDIRCB.
  102. '' 
  103. ''    Rev 1.79   28 Jun 1995 12:35:30   mzgripce
  104. '' change Lot_BackupLotusBcfFile() to trim the backslash of the lotusappdir 
  105. '' before adding the datalens subdir
  106. '' 
  107. ''    Rev 1.78   26 Jun 1995 13:36:44   mzgripce
  108. '' DoMsgBox returns a long in Win95 so I changed the yesno and and I compare 
  109. '' with CLNG(7) for NO on confirmation
  110. '' 
  111. ''    Rev 1.77   19 Jun 1995 18:47:54   mzgripce
  112. '' check if the shared tools are supported before executing any share operation
  113. '' 
  114. ''    Rev 1.76   06 Jun 1995 15:58:54   amontalv
  115. '' We are experiencing problems with LotusScript when we fill buffers with
  116. '' nulls and then pass them to C routines.  For the time being, it is suggested
  117. '' that we fill our buffers with spaces.  To this end (and to make it
  118. '' easier to change back later) I have created a small LotusScript routine
  119. '' named CreateBuffer.  You use it any time you ordinarily would use
  120. '' STRING$(num, 0).  CreateBuffer() just needs the num, it decides what to
  121. '' fill the buffer with (sorry about the grammer).  Right now it fill the
  122. '' buffer with spaces.  Later we will change it back to nulls.  Also look
  123. '' at the routine NullTrim().  It will get rid of final nulls and spaces.
  124. '' You can use this when getting a buffer that has been changed or filled
  125. '' in a external C routine.
  126. '' 
  127. ''    Rev 1.75   01 Jun 1995 15:39:34   mzgripce
  128. '' enable share32 init and config and reintroduce bcf processing 
  129. '' 
  130. ''    Rev 1.74   22 May 1995 19:15:10   mzgripce
  131. '' rewrite InitShare for SYM_LOTUSAPP
  132. '' 
  133. ''    Rev 1.73   21 May 1995 17:24:10   mzgripce
  134. '' redefine the init value for lotusapp
  135. '' 
  136. ''    Rev 1.72   13 May 1995 16:56:24   mzgripce
  137. '' separate Lot_SaveShareConfig from saving the 32share config
  138. '' 
  139. ''    Rev 1.71   03 May 1995 18:15:26   mzgripce
  140. '' move some functions to share32.lss
  141. '' 
  142. ''    Rev 1.70   02 May 1995 12:53:08   cmoy
  143. '' Merged c2 into cf build
  144. '' 
  145. ''    Rev 1.70   28 Apr 1995 17:17:14   mzgripce
  146. '' Comment out the call to FixODBCiniSources() because BCFMOD.DLL was not ported
  147. '' to 32 bit.
  148. ''    Rev 1.69F  17 Apr 1995 16:46:06   mzgripce
  149. '' change Lot_SaveShareConfigInInstallIni to record component directory
  150. '' 
  151. ''    Rev 1.69   10 Apr 1995 17:57:16   amontalv
  152. '' Had to change the definition of some callback functions so that they would
  153. '' work correctly going from C to Script.
  154. ''    Rev 1.68F  13 Apr 1995 10:57:16   mzgripce
  155. '' change InitSHARE() to call InitSHARE32()
  156. '' 
  157. ''    Rev 1.68   07 Apr 1995 19:36:48   amontalv
  158. '' LSS 32 bit port merge changes.
  159. '' 
  160. ''    Rev 1.66   30 Mar 1995 14:47:06   mheerman
  161. '' Removed remed out code blocks
  162. '' 
  163. ''    Rev 1.65   18 Jan 1995 15:56:30   mzgripce
  164. '' 
  165. '' Fix the NODE over NODE bug by casting LCASE when commpating the result of a MID$ call with a strin
  166. '' g in Refresh function.
  167. '' Change the validation of the common directory to not check for the files in the spell
  168. '' directory because a node creates that directory for the user path, but 
  169. '' if the user does not add any words to its private spell dictionary the
  170. '' directory is empty.
  171. '' 
  172. ''    Rev 1.64   12 Dec 1994 14:50:26   tveerapp
  173. '' Check for trailing backslash in lotusapp section in the response file.
  174. '' 
  175. ''    Rev 1.63   12 Dec 1994 12:14:22   mzgripce
  176. '' 
  177. '' added automation around the callbacks and read the needed setings in 
  178. '' initSHARE() 
  179. '' 
  180. ''    Rev 1.62   28 Nov 1994 15:33:16   jplump
  181. '' No change.
  182. '' 
  183. ''    Rev 1.61   13 Oct 1994 13:58:50   mzgripce
  184. '' 
  185. '' in validate the common dir do not trim an empty string 
  186. '' 
  187. ''    Rev 1.60   04 Oct 1994 15:37:28   mzgripce
  188. '' fix Banyan vines bug already tested by CIT QE
  189. '' 
  190. ''    Rev 1.59   04 Aug 1994 17:50:56   tveerapp
  191. '' in Lot_refresh I replaced the call to Lot_LocalGetPathFromIni()
  192. '' with a call to GetIniKeyString()-MZ.
  193. '' 
  194. ''    Rev 1.58   14 Jul 1994 19:10:06   mzgripce
  195. '' 
  196. '' add LCASE$ to stringcompare in initSHARE
  197. '' 
  198. ''    Rev 1.57   14 Jul 1994 18:18:14   mzgripce
  199. '' 
  200. '' fix the algorithm  for flw node in initSHARE
  201. ''    Rev 1.56   14 Jul 1994 11:24:56   mzgripce
  202. '' 
  203. '' change in initSHARE for the conditions when I prompt to use the existing
  204. '' common directory in a network and when to create a new one
  205. '' 
  206. ''    Rev 1.55   11 Jul 1994 15:32:08   mzgripce
  207. '' before moving and deleting lotusapp.ini I check if the source is the sameth
  208. '' 
  209. ''    Rev 1.54   01 Jul 1994 17:13:58   mzgripce
  210. '' 
  211. '' create a function Lot_LocalGetPathFromIni() and replac
  212. '' FromIni with the new call 
  213. '' 
  214. ''    Rev 1.53   30 Jun 1994 18:20:02   ptilton
  215. '' Added Lot_ModifyDatalensIni function that updates a users DATALENS.INI
  216. '' changing QODBF.DLL to LODBF04.DLL.  The changes are only made when the
  217. '' LODBF04 DataLens driver is installed.
  218. '' 
  219. ''    Rev 1.52   24 Jun 1994 14:53:28   thangv
  220. '' 
  221. '' Changed NetLotusApp to use the server path in Lot_WriteOLEReg
  222. '' line 5663.
  223. '' 
  224. ''    Rev 1.51   24 Jun 1994 11:39:58   thangv
  225. '' 
  226. '' Added Lot_TrimEndSlash to args toFremoveDir to remove the trailing back
  227. '' slash. This fixes spr#31431. there were 16 calls to FremoveDir in this
  228. '' module.
  229. '' 
  230. ''    Rev 1.50   21 Jun 1994 20:48:06   mzgripce
  231. '' in Lot_UpdateWinIni() commented out the calls to Lot_IsTheFeatureInstalled(
  232. '' lines 2626,2644,2645 and 2651. 
  233. '' 
  234. ''    Rev 1.49   19 Jun 1994 09:43:34   mzgripce
  235. '' change in Lot_GetEntryFlag() from MAILINABLINGPROGRAM to MAILENABLINGPROGRA
  236. '' 
  237. ''    Rev 1.48   17 Jun 1994 12:17:02   mzgripce
  238. '' 
  239. '' replace FatalErrorMessage() call with 3 calls: ErrorMsg(); set flag gEndSta
  240. '' 
  241. ''    Rev 1.47   16 Jun 1994 18:12:40   mzgripce
  242. '' in InitShare add check for writable lotus.ini and if failes quit. 
  243. '' 
  244. ''    Rev 1.46   15 Jun 1994 12:19:00   thangv
  245. '' change function: Lot_IsExistingLotusappDirValid() to check for subdirectori
  246. '' and strip last slash from the path entry in lotus.ini for LotusDialogs and 
  247. '' MailEnabling
  248. '' 
  249. ''    Rev 1.45   14 Jun 1994 14:46:16   mzgripce
  250. '' check the path and the space on default in consolidatelotusappdircb and cre
  251. '' 
  252. ''    Rev 1.44   10 Jun 1994 17:11:28   mzgripce
  253. '' 
  254. '' take out comment
  255. '' 
  256. ''    Rev 1.43   10 Jun 1994 16:53:40   mzgripce
  257. '' do not check if directory is valid if the entry does not exist in lotus.ini
  258. '' 
  259. ''    Rev 1.42   09 Jun 1994 15:07:50   mzgripce
  260. '' fixed OLE reg for multimedia 
  261. '' 
  262. ''    Rev 1.41   08 Jun 1994 17:24:54   mzgripce
  263. '' 
  264. '' comment out Grammar checker, Thesaurus and Hyph. processing 
  265. '' 
  266. ''    Rev 1.40   08 Jun 1994 10:16:24   thangv
  267. '' added createdir in Lot_WriteEntry for case SPELLCHECKERUSER path.
  268. '' 
  269. ''    Rev 1.39   06 Jun 1994 18:41:40   mzgripce
  270. '' 
  271. '' added prompt and processing for DBM_ISTHISNETLOTUSAPP 
  272. '' 
  273. ''    Rev 1.38   05 Jun 1994 20:43:10   ptilton
  274. '' 
  275. '' Added calls to Set OracleHomeDir and NotesDataDir Symbols. Removed
  276. '' Functions to determine symbol values and inserted them into TOOLKIT.LSS
  277. '' 
  278. ''    Rev 1.37   03 Jun 1994 19:47:08   ptilton
  279. '' Moved Modifying of ODBC.INI to only when dBASE DataLens Driver is installed
  280. '' 
  281. ''    Rev 1.36   01 Jun 1994 14:45:06   mzgripce
  282. '' correct the the misspeling for GRAMMERCHECKERPROGRAM
  283. '' 
  284. ''    Rev 1.35   27 May 1994 16:25:54   mzgripce
  285. '' check if the common dir is EQ with netcommondir 
  286. '' 
  287. ''    Rev 1.34   26 May 1994 15:45:40   thangv
  288. '' Added LCASE$ for dirToChange in CONSOLIDATELOTUSAPPDIRCB to fix bug.
  289. '' 
  290. ''    Rev 1.33   25 May 1994 17:52:58   ihachem
  291. ''  fixed spr 30227; do not write screencam config and make infobox work for 
  292. ''  node (check-in for mzgripce).
  293. '' 
  294. '' 
  295. ''    Rev 1.32   24 May 1994 14:54:24   mzgripce
  296. '' 
  297. '' change consolidatelotusappdircb and write consolidatemovecopycb 
  298. '' 
  299. ''    Rev 1.31   19 May 1994 23:47:40   ptilton
  300. '' 
  301. '' Added Updating of ODBCINST.INI with Codepage Translation information
  302. '' for ODBC SQL Server Driver.
  303. '' 
  304. ''    Rev 1.30   13 May 1994 18:09:18   ptilton
  305. '' Added ODBC 2.0 Subroutine and Substitue Oracle & Notes Directories
  306. '' 
  307. ''    Rev 1.29   09 May 1994 15:16:56   mzgripce
  308. '' 
  309. '' fixed for spr # 29358
  310. '' 
  311. ''    Rev 1.28   05 May 1994 14:11:18   ptilton
  312. '' 
  313. '' Fixed SPR 28491 Added IsSQLSelected
  314. '' 
  315. ''    Rev 1.27   02 May 1994 18:13:42   mzgripce
  316. '' add AddSHAREIcons() function
  317. '' 
  318. ''    Rev 1.26   27 Apr 1994 18:12:50   mzgripce
  319. '' fixed spr# 27621
  320. '' 
  321. ''    Rev 1.25   26 Apr 1994 10:55:34   mzgripce
  322. '' fixed SPR # 28669
  323. '' 
  324. ''    Rev 1.24   21 Apr 1994 16:47:40   mzgripce
  325. '' 
  326. '' fix for SPR 27387
  327. '' 
  328. ''    Rev 1.23   14 Apr 1994 15:25:36   mzgripce
  329. '' set gDatalensInstalled in config
  330. '' 
  331. ''    Rev 1.21   13 Apr 1994 16:53:44   mmeth
  332. '' fixed datalens strings
  333. '' 
  334. ''    Rev 1.20   13 Apr 1994 14:27:04   cmoy
  335. '' 
  336. '' Unbolded text in SQLSERVERNAMECB and PARADOXNETWORKINFOCB
  337. '' 
  338. ''    Rev 1.19   13 Apr 1994 14:20:30   ptilton
  339. '' Added Support for All DataLens and ODBC available drivers.
  340. ''
  341. ''     Rev 1.16   13 Apr 1994 13:34:58   mzgripce
  342. '' changes made by Corinne
  343. '' 
  344. ''    Rev 1.18   07 Apr 1994 17:56:46   mzgripce
  345. '' add mail enabling and take out lotus mail
  346. '' 
  347. ''    Rev 1.17   06 Apr 1994 10:48:30   mzgripce
  348. '' put processing for Lotus Dialogs, LotusScript and LotusMail
  349. '' 
  350. ''    Rev 1.16   05 Apr 1994 09:30:52   mzgripce
  351. '' fixed SPR #27685
  352. '' 
  353. ''    Rev 1.15   04 Apr 1994 18:40:12   mmeth
  354. '' 
  355. '' CheckIn for MMETH by vts
  356. '' 
  357. ''    Rev 1.14   04 Apr 1994 14:58:32   mzgripce
  358. '' update OLE registration on consolidation and refresh
  359. '' 
  360. ''    Rev 1.13   31 Mar 1994 16:30:34   mzgripce
  361. '' change initSHARE 
  362. '' 
  363. ''    Rev 1.12   31 Mar 1994 14:20:10   mzgripce
  364. '' merge the raptor beta changes and fix 2 bugs: suppress share move prompt
  365. '' when not needed and change the netcommon dir drive if node maps with 
  366. '' the network with different drive then the admin.
  367. '' 
  368. ''    Rev 1.11   28 Mar 1994 16:55:50   mzgripce
  369. '' overwrite the shared icons
  370. '' 
  371. ''    Rev 1.10   28 Mar 1994 14:28:36   mmeth
  372. '' Changes with Christopher, obsoleteing dialosg
  373. '' 
  374. ''    Rev 1.9   26 Mar 1994 16:33:22   pjt
  375. '' Datalens Install changes for ODBC driver
  376. '' 
  377. ''    Rev 1.8   25 Mar 1994 14:53:06   mzgripce
  378. '' change initShare to account for suit; change consolidate call back; write
  379. '' function Lot_IsExistingLotusappDirValid(); change the lotusapp destination
  380. '' 
  381. ''    Rev 1.7   24 Mar 1994 17:54:30   mmeth
  382. '' Pete's datalens
  383. ''
  384. ''    Rev 1.6   22 Mar 1994 18:23:26   mzgripce
  385. '' added notesSQL
  386. '' 
  387. ''    Rev 1.5   22 Mar 1994 17:53:54   mzgripce
  388. '' added help section and Help Program /Help Data path
  389. '' 
  390. ''    Rev 1.4   21 Mar 1994 18:42:24   mzgripce
  391. '' put the dialogeditor icon
  392. '' 
  393. ''    Rev 1.3   15 Mar 1994 13:56:36   jbrodeur
  394. '' Added French Canadian Dictionary
  395. '' 
  396. ''    Rev 1.2   10 Mar 1994 21:02:44   amello
  397. '' Added Shared Icon Palette
  398. '' 
  399. ''    Rev 1.1   10 Mar 1994 17:31:30   mzgripce
  400. '' add comments in Lot_AreShareToolsSupported() and remove seting of win and 
  401. '' winsys symbols from InitSHARE()  (I move it in toolkit.lss and call it in 
  402. '' main.lss 
  403. '' 
  404. ''    Rev 1.0   11 Feb 1994 10:56:46   jbrodeur
  405. '' Initial Revision
  406. ''----------------------------------------------------------------------
  407. ''   Date     Vers. Pgmr  SPR#  Change
  408. ''----------------------------------------------------------------------
  409. '' 02-07-94   0100  MZ        Update win.ini only if the feature was installed
  410. ''                            change Lot_WriteOLERegForShare()  
  411. ''!
  412. '' 02-07-94   0099  MZ        Add replace isTheChapterInstalled call with 
  413. ''                            isTheFeature... in Lot_AddSectionToNodeList()
  414. '' 02-07-94   0098  MZ        move Lot_SaveFeaturesInstaledInInstallIni()
  415. ''                            and Lot_GetLastFeatureNumber() to toolkit.lss
  416. '' 02-03-94   0097  MMETH     In Lot_SaveFeaturesInstaledInInstallIni()
  417. ''                            save for gSTANDARD as well and call 
  418. ''                            Lot_SaveFeaturesInstaledInInstallIni() for std also
  419. ''                            also moved Lot_IstheFeatureInstall to toolkit.lss
  420. '' 02-01-94   0096  JMB         Added return for Functions that return values
  421. '' 01-28-94   0095  MZ        set SYM_LOTUSAPPEXISTS$
  422. '' 01-27-94   0094  MZ/DND    Change all the paths in here 
  423. '' 01-26-94   0093  MZ        Add the function Lot_DoMoveSHARE
  424. ''                            Set "" in Lot_GetLocalHardDrive for the root
  425. '' 01-25-94   0092  MZ        Add the functions:
  426. ''                            Lot_GetTheShareToolsSizeToMove
  427. ''                            Lot_MakeAPathFromLotusappIni
  428. ''                            Lot_GetInLotusappIniSizeOfFilesToMove
  429. ''                            Lot_GetInLotusIniSizeOfFilesToMove
  430. ''                            Lot_GetSharedIniPath
  431. ''                            Lot_ChkLotusIniSizePath
  432. '' 01-25-94   0091  MMETH     add "\" wherever we are using gLOTUSAPP$
  433. '' 01-25-94   0090  MMETH     changed almost all CreateIniKeyValue:
  434. ''                            Took off LCASE$ and where needed added
  435. ''                            Lot_TrimEndSlash. Also removed double \\
  436. ''                            between dir & filename in CreateIniKeyValues
  437. '' 01-24-94   0089  MZ         Change CONSOLIDATELOTUSAPPDIRCB
  438. '' 01-24-94   0089  TQI         Capture all function returns (lsi36)
  439. '' 01-24-94   0088  MMETH      Move GetTheReal Prod to Toolkit.lss &
  440. ''                             changed the refernce to in to Lot_GetInstallDIr
  441. '' 01-21-94   0087  MZ         Set SYM_LOTUSAPPDIR+gNAME needed for UI
  442. '' 01-20-94   0086  MZ         Add processing in InitSHARE(),PreConfigSHARE()
  443. ''                             ConfigSHARE(),Lot_RefreshLocalLotusapp() to
  444. ''                             execute only if any registered product supports
  445. ''                             share and add func. Lot_AreShareToolsSupported()
  446. '' 01-19-94   0085  MZ         Make it work again
  447. '' 01-19-94   0084  TQI           option declare
  448. '' 01-18-94   0083  DND        No longer call FCleanFatPath
  449. '' 01-18-94   0082  JMB        Added StatusBar to Lot_GetAllSharedInstalled()
  450. '' 01-12-94   0081  TQI        option declare DIMs (not done)
  451. '' 01-10-94   0080  MZ         Make all symbols Constants and put them
  452. ''                             in GLOBALS.LSS
  453. ''  01-07-94  0079  DND/MZ     Use TOOLKIT
  454. ''  12-27-93  0078  MZ         Change Lot_RefreshLocalLotusapp; put the call
  455. ''                             to DoesDirExist by itself in an IF     
  456. ''  12-22-93  0077  MZ         Cleanup the commented code
  457. ''  12-20-93  0076  TQI        Changes for lsi34
  458. ''  12-17-93  0075  MZ 25868   Backup lotus.bcf in node install; in standard
  459. ''                             install the call into datalens DLL creates a backup
  460. ''                             if there is a lotus.bcf in the destination.
  461. ''  12-16-93  0074  MZ 25770   replace DoesDirExist with DoesFileExist
  462. ''                             call in the switch for lotusapp.ini processing
  463. ''  12-16-93  0073  MZ         add to the copy list the files needed 
  464. ''                             for the datalens drivers
  465. ''  12-13-93  0072  MZ         put an extera IF/ELSE when commondir is ""
  466. ''  12-10-93  0071  MZ 25819   check if the lotusapp.ini exist
  467. ''  12-09-93  0070  MZ 25771   change Lot_IsConsolidationNeeded
  468. ''                     25660   add Lot_GetSizeOfFilesInLotusappIni and
  469. ''                     25768   Lot_DoConsolidateFilesInLotusappIni
  470. ''  12-08-93  0069  MZ 25721   update win.ini after consolidation
  471. ''  12-07-93  0068  MZ 25580   delete the old common dir after consolidation        
  472. ''                             and replace the removedir function
  473. ''  12-03-93  0067  MZ         add a box with SID_SHARE_INFO_TEXT
  474. ''  12-03-93  0066  MZ         Add SID_ERR_SHARE_CONSOLID0
  475. ''  12-03-93  0065  MZ   25660 Correct the process for paths with filenames      
  476. ''  12-02-93  0064  MZ         Take out \ from makepath call
  477. ''  12-02-93  0064  DND   25449 Make sure all strings are resourced
  478. ''  12-01-93  0036  MZ          change combo3 to combo1 in consotidate box
  479. ''  12-01-93  0035  DND/MZ 25446 Handle errors consistently and some cleanup
  480. ''  12-01-93  0034  MZ   25652 verify if I am in the dir before remove it
  481. ''  11-29-93  0033  MZ         Write the lotus.ini for node
  482. ''  11-24-93  0033  MMETH      Moved GetTheReal123Dir to share.lss from 123.lss
  483. ''                             and renamed it to GetTheRealProdDir
  484. ''  11-24-93  0032  MZ         Make Lot_IsTheFeatureInstalled() public
  485. ''  11-22-93  0031  MZ         Add Lot_IsTheFeatureInstalled(s$)
  486. ''                             Lot_GetLastFeatureNumber() and 
  487. ''                             Lot_SaveFeaturesInstaledInInstallIni()
  488. ''                             to record F_KEYWORD
  489. ''  11-22-93  0030  MZ         fixed spr 25310
  490. ''  11-22-93  0029  MZ         Change Graphic to graphics
  491. ''  11-19-93  0028  MZ         fixed 25568, 25580, 25594 and 25595
  492. ''  11-17-93  0026  JKK        FIXED SPR 25544 & 25545.
  493. ''  11-17-93  0025  MZ         fix  25434
  494. ''  11-15-93  0024  MZ         Change Lot_GetNetLotusappSource to use NETLOTUSAPP
  495. ''                             symbol value and replace Dir$() call with Lot_Dir()
  496. ''                             to fix 25531   
  497. ''  11-15-93  0024 JKK         Called GetAbsPathFrom ini instead of GetIniKeyString.
  498. ''  11-14-93  0023  MZ          fix for spr# 25433
  499. ''  11-12-93  0022  MZ          fix spr 25268
  500. ''  11-10-93  0021  MZ          -disable the writing of lotusapp.ini because it is
  501. ''                              not in lotus.ini database spr#25414
  502. ''                              -reset the LOTUSAPP symbol if I found a valid one
  503. ''                              change the init for consolidation dialog box spr# 25443
  504. ''
  505. ''  11-10-93  0020  MZ          put sid_err messages
  506. ''  11-10-93  0019  MZ          comment out OLE reg for multimedia and populate
  507. ''                              NETLOTUSAPP symbol
  508. ''  11-09-93  0018  MZ          correction to the screen cam name
  509. ''  11-08-93  0017  MZ          add OLE reg for ScreenCamMovie and its entry in lotus.ini
  510. ''  10-27-93  0016  MZ          Correction in Lot_SaveShareConfigInInstallIni()
  511. ''                              For server set lotus            .bcf dest to 123DIR
  512. ''                              add Lot_RefreshLocalLotusapp(),Lot_AddSectionToNodeList(),
  513. ''                              Lot_IsTheChapterInstalled(),Lot_GetNetLotusappSource()
  514. ''                              Lot_GetLocalLotusappDest()
  515. ''  10-26-93  0015  MZ          Initialize LOTUSAPP to \LOTUS\LOTUSAPP for
  516. ''                              server install
  517. ''  10-25-93  0014  MZ          Fix Previous in consolidate prompt
  518. ''  10-21-93  0013  MZ          Add Confirm directory box in Consolidate prompt
  519. ''  10-21-93  0012  MZ          Add processing for DBM_CONSOLIDATE_LOTUSAPP
  520. ''  19-20-93  0011  MZ          Add a switch depending on the copyMode flag
  521. ''                              and dBase,Informix and EEDM funcs    
  522. ''  10-19-93  0010  MZ          Add the processing for SQL and PARADOX server
  523. ''                              and set symbols:SQLSERVERNAME,PARADOXNETWORKINFO
  524. ''  10-01-93  0002   MZ         Add Lot_SaveShareConfigInInstallIni()
  525. ''  9-29-93   0005   JKK/TV/DND Removed unneeded dialog code
  526. ''  9-22-93   0004   MZ         Add OLE registration  
  527. ''  9-10-93   0003   MZ         Finish the consolidation
  528. ''  9-09-93   0002   MZ         Move the consolidation in preconfig
  529. ''                              from init and debug
  530. ''  9-08-93   0001   MZ         Put the consolidation code in
  531. ''  8-12-93   0000              Initial Check-In
  532. ''----------------------------------------------------------------------
  533. ''
  534. ''*********************************************************************/
  535.  
  536. USE "SHARE32"
  537. OPTION DECLARE
  538.  
  539. 'Global Functions
  540. DECLARE PUBLIC FUNCTION InitSHARE () AS INTEGER
  541. DECLARE PUBLIC FUNCTION ConfigSHARE () AS INTEGER
  542. DECLARE PUBLIC FUNCTION PreConfigSHARE () AS INTEGER
  543. DECLARE PUBLIC FUNCTION AddSHAREIcons () AS INTEGER
  544. DECLARE PUBLIC FUNCTION Lot_IsSQLSelected() AS INTEGER
  545. DECLARE PUBLIC FUNCTION Lot_IsParadoxSelected AS INTEGER
  546. DECLARE PUBLIC FUNCTION Lot_IsdBaseSelected () AS INTEGER
  547. DECLARE PUBLIC FUNCTION Lot_IsInformixSelected () AS INTEGER
  548. DECLARE PUBLIC FUNCTION Lot_IsIBMdBaseManagerSelected () AS INTEGER
  549. DECLARE PUBLIC FUNCTION Lot_IsNotesSQLSelected () AS INTEGER
  550. DECLARE PUBLIC FUNCTION Lot_IsSpreadSheetSelected () AS INTEGER
  551. DECLARE PUBLIC FUNCTION Lot_IsIBM_DB2Selected () AS INTEGER
  552. DECLARE PUBLIC FUNCTION Lot_IsDB2_SQLDS_Selected () AS INTEGER
  553. DECLARE PUBLIC FUNCTION Lot_IsDB2_SQL400_Selected () AS INTEGER
  554. DECLARE PUBLIC FUNCTION Lot_IsIBM_DDCS2_Selected () AS INTEGER
  555. DECLARE PUBLIC FUNCTION Lot_IsODBCDriverSelected () AS INTEGER
  556. DECLARE PUBLIC FUNCTION Lot_IsODBCSpreadSheetSelected () AS INTEGER
  557. DECLARE PUBLIC FUNCTION Lot_IsODBCTextDriverSelected () AS INTEGER
  558. DECLARE PUBLIC FUNCTION Lot_IsOracleSelected () AS INTEGER
  559. DECLARE PUBLIC FUNCTION Lot_IsODBCBtrieveSelected () AS INTEGER
  560. DECLARE PUBLIC FUNCTION Lot_IsODBCDB2Selected () AS INTEGER
  561. DECLARE PUBLIC FUNCTION Lot_IsODBCFoxbaseSelected () AS INTEGER
  562. DECLARE PUBLIC FUNCTION Lot_IsODBCAccessSelected () AS INTEGER
  563. DECLARE PUBLIC FUNCTION Lot_IsODBCParadoxSelected () AS INTEGER
  564. DECLARE PUBLIC FUNCTION Lot_IsODBCOracleSelected () AS INTEGER
  565. DECLARE PUBLIC FUNCTION Lot_IsODBCSQLServerSelected () AS INTEGER
  566. DECLARE PUBLIC FUNCTION Lot_RefreshLocalLotusapp () AS INTEGER
  567. DECLARE PUBLIC FUNCTION Lot_GetTheShareToolsSizeToMove (s$) AS LONG
  568. DECLARE PUBLIC FUNCTION Lot_DoMoveSHARE (s$) AS INTEGER
  569.  
  570. 'Local Functions
  571. DECLARE FUNCTION Lot_UpdateWinIni(s1$,s2$) AS INTEGER
  572. DECLARE FUNCTION Lot_TheEntryWasRefreshed(s$) AS INTEGER
  573. DECLARE FUNCTION Lot_GetAllSharedInstalled () AS INTEGER
  574. DECLARE FUNCTION Lot_WriteIniFiles () AS INTEGER
  575. DECLARE FUNCTION Lot_WriteLotusBcfFile()AS INTEGER
  576. DECLARE FUNCTION Lot_BackupLotusBcfFile()AS INTEGER
  577. DECLARE FUNCTION Lot_WriteEntry (s$,i%) AS INTEGER
  578. DECLARE FUNCTION Lot_WriteOLERegForShare(s$,i%) AS INTEGER
  579. 'DECLARE FUNCTION Lot_PutFilesInTheMoveList (s1$,s2$,s3$,s4$) AS INTEGER
  580. DECLARE FUNCTION Lot_GetNetCommDirPath (s1$,s2$) AS STRING
  581. DECLARE FUNCTION Lot_GetFileSize (s1$,s2$,s3$,i&) AS LONG
  582. DECLARE FUNCTION Lot_MoveFiles(s1$,s2$,s3$,s4$) AS INTEGER
  583. DECLARE FUNCTION Lot_IsConsolidationNeeded (s1$, s2$) AS LONG
  584. DECLARE FUNCTION Lot_GetSizeOfFilesInLotusappIni(s1$,s2$,s3$,size&) AS LONG
  585. DECLARE FUNCTION Lot_DoShareConsolidation(s1$, s2$, s3$) AS INTEGER
  586. DECLARE FUNCTION Lot_DoConsolidateFilesInLotusappIni(s1$, s2$) AS INTEGER
  587. DECLARE FUNCTION Lot_AddSectionToNodeList(s1$,s2$) AS INTEGER
  588. DECLARE FUNCTION Lot_GetEntryFlag(s1$) AS STRING
  589. DECLARE FUNCTION Lot_DoVerDateValidation(s1$,s2$,s3$,l&) AS INTEGER
  590. DECLARE FUNCTION Lot_DoCopyDelete(s1$,s2$,s3$,l&) AS INTEGER
  591. DECLARE FUNCTION Lot_DoDelete(s1$,s2$) AS INTEGER
  592. DECLARE FUNCTION Lot_IsTheChapterInstalled(s1$) AS INTEGER
  593. DECLARE SUB CONSOLIDATELOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  594. DECLARE SUB CONSOLIDATEMOVECOPYCB (hDlg&, CtrlId%, Classes$, Inst&)
  595. DECLARE SUB ISTHISNETLOTUSAPPCB (hDlg&, CtrlId%, Classes$, Inst&)
  596. DECLARE SUB SQLSERVERNAMECB (hDlg&, CtrlId%, Classes$, Inst&)
  597. DECLARE SUB PARADOXNETWORKINFOCB (hDlg&, CtrlId%, Classes$, Inst&)
  598. DECLARE FUNCTION Lot_GetNetLotusappSource(s1$) AS STRING
  599. DECLARE FUNCTION Lot_GetLocalLotusappDest(s1$,s2$) AS STRING
  600. DECLARE FUNCTION Lot_MakeAPathFromLotusappIni(s1$,s2$,s3$) AS STRING
  601. DECLARE FUNCTION Lot_GetInLotusappIniSizeOfFilesToMove(s1$,s2$,s3$,s4$,l&) AS LONG
  602. DECLARE FUNCTION Lot_GetInLotusIniSizeOfFilesToMove(s1$,s2$,l&) AS LONG
  603. DECLARE FUNCTION Lot_ChkLotusIniSizePath(s1$,s2$,s3$,s4$) AS INTEGER
  604. DECLARE FUNCTION Lot_WriteShareInProgMan(Network$) AS INTEGER
  605. DECLARE FUNCTION Lot_IsExistingLotusappDirValid(BYVAL ExistingCommonDir$) AS INTEGER
  606. DECLARE SUB WriteODBCINST ( DriverDesc$, DriverPath$, SetupPath$ )
  607. DECLARE FUNCTION Lot_WriteODBCINST() AS INTEGER
  608. DECLARE FUNCTION Lot_ModifyODBC() AS INTEGER
  609. DECLARE FUNCTION Lot_ModifyDataLensIni() AS INTEGER
  610. DECLARE SUB WriteODBC20INST ( Driver$, SQLLvl$, APILvl$,  Usage$, Ext$, DrvVer$, Cnnct$ )
  611. DECLARE FUNCTION Lot_SaveShareConfigInInstallIni() AS INTEGER
  612.  
  613.  
  614. 'Global variables
  615. PUBLIC gNetCommDirPath AS STRING
  616. PUBLIC gConsolidateSize AS LONG
  617. PUBLIC gMoveSize AS LONG
  618.  
  619. 'Local variables
  620. PUBLIC ProgramPath$
  621. PUBLIC DataPath$
  622. PUBLIC UserPath$
  623. PUBLIC FilterPath$
  624. PUBLIC lDidAnyMove%
  625. PUBLIC GraphicsFileFiltersProgPath$
  626. PUBLIC DocFileFiltersProgPath$
  627. PUBLIC gDataLensInstalled AS INTEGER
  628. PUBLIC gODBCOnly     AS INTEGER
  629. PUBLIC gODBCSelected AS INTEGER
  630. DECLARE SUB INITIALIZE 
  631.  
  632. DIM ValidCommDir%
  633.  
  634. SUB INITIALIZE
  635.   ProgramPath$="Program Path"
  636.   DataPath$="Data Path"
  637.   UserPath$="User Path"
  638.   FilterPath$="Filter Path"
  639. END SUB
  640.  
  641.  
  642. PUBLIC FUNCTION InitSHARE () AS INTEGER
  643. '** Purpose:    Initialize WINDIR, WINSYSDIR, default LOTUSAPPDIR
  644. '**             symbols 
  645. '**             and for automated install 
  646. '**              sets SYM_AUTO_CONSOLIDATION$
  647. '**                   SYM_DEFAULT_LOTUSAPP$
  648. '**                   SYM_AUTO_SQLSERVER$
  649. '**                   SYM_AUTO_PARADOXINFO$
  650. '** Author:     MZ
  651. '** Arguments:  None
  652. '** Returns:    SUCCESS
  653. '*************************************************************************
  654.    DIM lbLotusAppsize&, shareDir$, shareDrv$, possibleDrv$
  655.    DIM availSpace&, network$, cwd$, gInstallIniFile$, rc%, netLotusapp$
  656.    DIM rv%, ExistingCommonDir$, ExistingNetCommonDir$, notused%, SameFlag$
  657.    DIM source$, FLWPath$, drive$, RCDialog$, AutoLotusapp$
  658.    DIM NetLotappFromIni$
  659.  
  660.    notused%=InitSHARE32()
  661.    '** Execute the rest only if there is a registered product that supports 
  662.    '** share Prods(i%)Share=1
  663.    IF Lot_AreShareToolsSupported()=1 THEN
  664.  
  665.       '** MZ: Available space returns bytes
  666.       lbLotusAppSize& = CLNG(10485760) ''10Mb
  667.  
  668.       network$ = GetSymbolValue(SYM_NETWORK$)
  669.    
  670.       'Initialize global gLotusIniPath$
  671.       gLotusIniPath$ = CreateBuffer(256)
  672.       notused% = Lot_GetLotusiniPath(gLotusIniPath$)
  673.       'print gLotusIniPath$,"gLotusIniPath$"
  674.       gLotusappIniPath$=CreateBuffer(256)
  675.       gLotusBcfDir$=CreateBuffer(256)
  676.  
  677.       'Check if Lotus.ini is write protected
  678.       IF network$ = gNODE$ OR network$ = gSTANDARD$  THEN
  679.          notused% = IsFileWritable(gLotusIniPath$)
  680.          IF notused% <> 1 THEN
  681.             ErrorMsg SID_ERR_INIREADONLY, CHR$(10) + CHR$(10)+gLotusIniPath$
  682.             gEndStatementEncountered% = TRUE
  683.             EXIT FUNCTION
  684.          END IF
  685.       END IF
  686.  
  687.       'Check the entries in <windir>\lotus.ini
  688.       ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  689.       ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTRERR)
  690. '     print ExistingCommonDir$,"ExistingCommonDir$ share.lss"
  691.       SetSymbolValue SYM_EXISTINGCOMMDIR$, ExistingCommonDir$
  692.       SetSymbolValue SYM_EXISTINGNETCOMMDIR$, ExistingNetCommonDir$
  693.    
  694.       IF ExistingCommonDir$ <> "" THEN
  695.          SetSymbolValue SYM_LOTUSAPPEXISTS$, "1"
  696.       ELSE
  697.          SetSymbolValue SYM_LOTUSAPPEXISTS$, "0"
  698.       END IF
  699.  
  700.       ValidCommDir% = Lot_IsExistingLotusappDirValid(ExistingCommonDir$)
  701.       shareDir$ = GetWindowsDir()+gLOTUSAPP$+"\"
  702.       SetSymbolValue SYM_DEFAULT_LOTUSAPP$, shareDir$
  703.  
  704.  
  705.       'Built the default lotusapp directory location
  706.       '*********************************************
  707.       'For single product
  708.       '    for standalone or node
  709.       '        preexisting one OR
  710.       '        if parent dir not UNC
  711.       '            Parent+ components+LOTUSAPP
  712.       '        if parent dir IS UNC
  713.       '            winDir+LOTUSAPP
  714.       '    for server  
  715.       '        if parent dir not UNC
  716.       '            Parent + LOTUSAPP
  717.       '        if Parent dir IS UNC
  718.       '            first not UNC drive with space+lotus+LOTUSAPP (tv: added lotus)
  719.       'For SUITE
  720.       '    for standalone or node
  721.       '        preexisting one OR
  722.       '        if base dir not UNC
  723.       '            Base+ components+LOTUSAPP
  724.       '        if Base dir IS UNC
  725.       '            winDir+LOTUSAPP
  726.       '    for server   
  727.       '        if Base dir not UNC
  728.       '            Base + LOTUSAPP
  729.       '        if Base dir IS UNC
  730.       '            first not UNC drive with space+lotus+LOTUSAPP
  731.  
  732.       IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  733.          IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  734.             IF (network$ = gSTANDARD$ OR network$ = gNODE$) THEN
  735.                IF ValidCommDir% = 1 THEN
  736.                   SetSymbolValue SYM_LOTUSAPPDIR$,ExistingCommonDir$
  737.                ELSE
  738.                   IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_PARENTDIR$)) = 0 AND _        
  739.              IsLongDirPath(GetSymbolValue(SYM_PARENTDIR$)) = FALSE THEN         
  740.                      shareDir$ = GetSymbolValue(SYM_PARENTDIR$)+gCOMPONENTS+"\"+gLOTUSAPP$+"\"
  741.                      SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  742.                   ELSE
  743.                      SetSymbolValue SYM_LOTUSAPPDIR$,GetWindowsDir()+gLOTUSAPP$+"\"
  744.                   END IF
  745.                END IF
  746.             ELSE 'not standard or node
  747.                IF network$ = gSERVER THEN
  748.                   IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_PARENTDIR$)) = 0 AND _
  749.              IsLongDirPath(GetSymbolValue(SYM_PARENTDIR$)) = FALSE  THEN         
  750.                      shareDir$ = GetSymbolValue(SYM_PARENTDIR$)+gLOTUSAPP$+"\"
  751.                      SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  752.                   ELSE
  753.                      possibleDrv$ = Lot_GetLocalHardDrive(lbLotusAppSize&,"")
  754.                      IF possibleDrv$ <> "" THEN
  755.                         shareDir$ = possibleDrv$+ "lotus\"+ gLOTUSAPP$+"\"
  756.  
  757.                         SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  758.                         'print shareDir$,"shareDir$"
  759.                      ELSE
  760.                         possibleDrv$ = Lot_GetLocalHardDrive(CLNG(1),"")
  761.                         shareDir$ = possibleDrv$+ "lotus\" + gLOTUSAPP$+"\"
  762.                         SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  763.                         'print shareDir$,"shareDir$"
  764.                      END IF
  765.                   END IF
  766.                END IF
  767.             END IF
  768.          ELSE 'is smartsuite
  769.             IF (network$ = gSTANDARD$ OR network$ = gNODE$) THEN
  770.                IF ValidCommDir% = 1 THEN
  771.                   SetSymbolValue SYM_LOTUSAPPDIR$,ExistingCommonDir$
  772.                ELSE
  773.                   IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_BASEDIR$)) = 0 AND _         
  774.              IsLongDirPath(GetSymbolValue(SYM_BASEDIR$)) = FALSE  THEN         
  775.                      shareDir$ = GetSymbolValue(SYM_BASEDIR$)+gCOMPONENTS+"\"+gLOTUSAPP$+"\"
  776.                      SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  777.                   ELSE
  778.                      SetSymbolValue SYM_LOTUSAPPDIR$,GetWindowsDir()+gLOTUSAPP$+"\"
  779.                   END IF
  780.                END IF
  781.             ELSE 'not standard or node
  782.                IF network$ = gSERVER THEN
  783.                   IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_BASEDIR$)) = 0 AND _         
  784.              IsLongDirPath(GetSymbolValue(SYM_BASEDIR$)) = FALSE  THEN         
  785.                      shareDir$ = GetSymbolValue(SYM_BASEDIR$)+gLOTUSAPP$+"\"
  786.                      SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  787.                   ELSE
  788.                      possibleDrv$ = Lot_GetLocalHardDrive(lbLotusAppSize&,"")
  789.                      IF possibleDrv$ <> "" THEN
  790.                         shareDir$ =possibleDrv$+"lotus\"+gLOTUSAPP$+"\"
  791.                         SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  792.                         'print shareDir$,"shareDir$"
  793.                      ELSE
  794.                         possibleDrv$ = Lot_GetLocalHardDrive(CLNG(1),"")
  795.                         shareDir$ =possibleDrv$+"lotus\"+gLOTUSAPP$+"\"
  796.                         SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  797.                         'print shareDir$,"shareDir$"
  798.                      END IF
  799.                   END IF
  800.                END IF
  801.             END IF
  802.          END IF
  803.       ELSE ' in automation
  804.          shareDir$ = GetWindowsDir()+gLOTUSAPP$+"\"
  805.          AutoLotusapp$ = Lot_GetKeyValFromResponseFile("Lotusapp","LOTUSAPPDIR")
  806.             
  807.          IF ValidatePath(AutoLotusapp$) <> FALSE THEN
  808.             IF AutoLotusapp$ <> "" AND _
  809.            IsLongDirPath(AutoLotusapp$) = FALSE AND _
  810.            Lot_IsUnvalidatedUNCPath(AutoLotusapp$) = 0 THEN         
  811.                IF RIGHT$(AutoLotusapp$, 1) <> "\" THEN
  812.                   AutoLotusapp$ = AutoLotusapp$+ "\"
  813.                   'print AutoLotusapp$
  814.                END IF
  815.                SetSymbolValue SYM_LOTUSAPPDIR$,AutoLotusapp$
  816.                SetSymbolValue SYM_DEFAULT_LOTUSAPP$, shareDir$
  817.             ELSE
  818.                IF network$ = gSERVER THEN
  819.              possibleDrv$ = Lot_GetLocalHardDrive(lbLotusAppSize&,"")
  820.                      IF possibleDrv$ <> "" THEN
  821.                         shareDir$ = possibleDrv$+ "lotus\"+ gLOTUSAPP$+"\"
  822.              END IF
  823.            END IF
  824.                SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
  825.             END IF
  826.          ELSE
  827.             ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_PRODDIR) + "  " + "Lotusapp"
  828.             ERROR STFQUIT
  829.          END IF
  830.       END IF
  831.  
  832.       'print GetSymbolValue(SYM_LOTUSAPPDIR$),"GetSymbolValue(SYM_LOTUSAPPDIR$)in share.lss: INIT"
  833.       'Set the name of the lotusapp dir
  834.       SetSymbolValue SYM_LOTUSAPPDIR$+gNAME$, LdString(SID_SHARED_LOTUS_TOOLS)
  835.    
  836.       'Set NETLOTUSAPP symbol
  837.       IF network$ = gNODE$ THEN
  838.          'Get the current working directory
  839.          cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
  840.          source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  841.          gInstallIniFile$ = cwd$+gINSTALLINI$
  842.          rc% = DoesFileExist(gInstallIniFile$,femExists)
  843.          IF rc% = 1 THEN
  844.             netLotusapp$ = Lot_LocalGetPathFromIni(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$,NULLSTROK,INVALIDSTROK)
  845.             SameFlag$ = GetIniKeyString(gInstallIniFile$, _
  846.                      "Server Configuration of Shared Tools", _
  847.                      "SameDriveFlag")
  848.             IF netLotusapp$ = "" THEN
  849.                '** TV: netLotusapp comes back empty (win32) beacuse FValidPath fails
  850.               '** if the drive does not exist    
  851.            rv% = 0
  852.            netLotusapp$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$)
  853.            NetLotappFromIni$ = netLotusapp$
  854.            IF netLotusapp$ <> "" THEN
  855.           IF SameFlag$ = "1" AND NOT Lot_IsUnvalidatedUNCPath(source$) THEN
  856.               netLotusapp$ = MID$(source$,1,1)+MID$(netLotusapp$,2)
  857.               rv% = Lot_CleanPath(netLotusapp$)
  858.           END IF
  859.            ELSE
  860.           'print "0", gInstallIniFile$
  861.           ErrorMsg SID_ERR_INSTALLINI_CORRUPT, CHR$(10) + CHR$(10)+NetLotappFromIni$
  862.           gEndStatementEncountered% = TRUE
  863.           EXIT FUNCTION
  864.            END IF
  865.            IF rv% = 0 THEN
  866.           'ErrorMsg SID_NODENONEXISTLOTUSAPPDIR1, CHR$(10) + CHR$(10)+NetLotappFromIni$
  867.           'gEndStatementEncountered% = TRUE
  868.           'EXIT FUNCTION
  869.           SetSymbolValue SYM_NETLOTUSAPP$, NetLotappFromIni$
  870.            ELSE
  871.           SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
  872.            END IF
  873.         ELSE
  874.            IF SameFlag$ = "1" AND NOT Lot_IsUnvalidatedUNCPath(source$) THEN
  875.                   SetSymbolValue SYM_NETLOTUSAPP$, MID$(source$,1,1)+MID$(netLotusapp$,2)
  876.                ELSE
  877.                   SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
  878.                END IF
  879.             END IF
  880.          ELSE
  881.            'print "1", gInstallIniFile$
  882.             ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
  883.             gEndStatementEncountered% = TRUE
  884.             EXIT FUNCTION
  885.             'FatalErrorMsg SID_ERR_INSTALLINI_MISSING, gInstallIniFile$, STFQUIT
  886.          END IF
  887.    
  888.       END IF
  889.    
  890.       '** AUTOMATE: read the response file for the shared entries
  891.       '**           and set SYM_AUTO_CONSOLIDATION$
  892.       '**                   SYM_AUTO_SQLSERVER$
  893.       '**                   SYM_AUTO_PARADOXINFO$
  894.       IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
  895.           SetSymbolValue SYM_AUTO_CONSOLIDATION$, Lot_GetKeyValFromResponseFile("Lotusapp","Consolidation")
  896.           SetSymbolValue SYM_AUTO_SQLSERVER$,Lot_GetKeyValFromResponseFile("Datalens","SQLServerName")
  897.           SetSymbolValue SYM_AUTO_PARADOXINFO$,Lot_GetKeyValFromResponseFile("DataLens","PARADOXNetInfo")
  898.       END IF
  899.  
  900.       'Initialize global gLotusappIniPath$
  901.       notused% = Lot_GetLotusappiniPath(gLotusappIniPath$, GetSymbolValue(SYM_LOTUSAPPDIR$),gLotusBcfDir$)
  902.       'print gLotusappIniPath$,"gLotusappIniPath"
  903.       'print gLotusBcfDir$,"gLotusBcfDir$"   
  904.       '**Prompt for the clarification if:
  905.                 '- FLW is installed
  906.                 '- NetCommonDirectory does not exist
  907.                 '- CommonDirectory exists
  908.                 '- CommonDirectory drive is a network drive
  909.         '** if the existing Common directory is the same as the SYM_NETLOTUSAPPDIR
  910.         '** assume that Common Directory is the Net Common Directory and 
  911.         '** change that in lotus.ini whitouth prompt
  912.  
  913.       FLWPath$ = GetIniKeyString(gLotusIniPath$,"Lotus Applications", "FLW")
  914.       drive$ = MID$(ExistingCommonDir$,1,1)
  915.  
  916.  
  917.       IF network$ = gNODE$ AND _
  918.          FLWPath$ <> "" AND _
  919.          ExistingNetCommonDir$ = "" AND _
  920.          ExistingCommonDir$ <> "" THEN
  921.          IF DoesDirExist(ExistingCommonDir$) = 1 AND _
  922.             IsDriveNetwork(UCASE$(drive$)) = 1 AND _
  923.             LCASE$(GetSymbolValue(SYM_NETLOTUSAPP$)) = LCASE$(ExistingCommonDir$)  THEN
  924.             CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(ExistingCommonDir$), cmoOverwrite
  925.             RemoveIniKey gLotusIniPath$, "Lotus Applications", "Common Directory", cmoVital
  926.          ELSE
  927.             IF DoesDirExist(ExistingCommonDir$) = 1 AND _
  928.                IsDriveNetwork(UCASE$(drive$)) = 1 THEN
  929.                  '** AUTOMATE: comment out the "PopupModalDlg" stmts and
  930.                  '**           and change lotus.ini like the user selected YES
  931.                  IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  932.  
  933.                     notused% = RegisterCallback("SHARE","ISTHISNETLOTUSAPPCB")
  934.                     RCDialog$=PopupModalDlg (DBM_ISTHISNETLOTUSAPP, DBM_ISTHISNETLOTUSAPP)
  935.                  ELSE
  936.                     notused% = Lot_AutoIsThisNetLotusApp(gLotusIniPath$, ExistingCommonDir$)
  937.                  END IF     
  938.             END IF     
  939.          END IF        
  940.       ELSE
  941.         IF network$ = gSTANDARD$ AND _
  942.             FLWPath$ <> "" AND _
  943.             ExistingNetCommonDir$ = "" AND _
  944.             ExistingCommonDir$ <> "" THEN
  945.             IF DoesDirExist(ExistingCommonDir$) = 1 AND _
  946.                IsDriveNetwork(UCASE$(drive$)) = 1 THEN
  947.                  '** AUTOMATE: comment out the "PopupModalDlg" stmts and
  948.                  '**           and change lotus.ini like the user selected YES
  949.                  IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  950.  
  951.                     notused% = RegisterCallback("SHARE","ISTHISNETLOTUSAPPCB")
  952.                     RCDialog$=PopupModalDlg (DBM_ISTHISNETLOTUSAPP, DBM_ISTHISNETLOTUSAPP)
  953.                  ELSE
  954.                     notused% = Lot_AutoIsThisNetLotusApp(gLotusIniPath$,ExistingCommonDir$)
  955.                  END IF     
  956.             END IF        
  957.         END IF        
  958.  
  959.       END IF        
  960.       
  961.       'Initialize the symbols for SQL and Paradox
  962.       SetSymbolValue SYM_SQLSERVERNAME$, ""
  963.       SetSymbolValue SYM_PARADOXNETWORKINFO$, ""
  964.       'Initialize the symbols for Notes Data and ORACLE Home directories
  965.       DL_SetNotesDataPath
  966.       DL_SetOraclePath
  967.    
  968.   END IF
  969.    
  970.   InitSHARE = SUCCESS
  971. END FUNCTION
  972.  
  973. '*************************************************************************
  974.  
  975. PUBLIC FUNCTION Lot_RefreshLocalLotusapp () AS INTEGER
  976. '** Purpose:    Read the lotus.ini and if there are local features it
  977. '**             will add those sections to the copyList ;  In the same time 
  978. '**             if any of the datalenses were installed BCF section is added
  979. '**             to the copyList and lotus.bcf is backedup in lotus.bak
  980. '** Author:     MZ
  981. '** Arguments:  None
  982. '** Returns:    SUCCESS
  983. '*************************************************************************
  984.    DIM cwd$, gSharedIniFile$, WinDir$, dBaseWinSysChapter$, dBaseWinSysChapterSpec$
  985.    DIM Source$, Dest$, dbaseWinChapter$,dbaseWinChapterSpec$
  986.    DIM dbaseDataChapter$, dbaseDataChapterSpec$, InformixWinChapter$, InformixWinChapterSpec$
  987.    DIM BcfChapter$, BcfChapterSpec$, ExistingCommonDir$, ExistingNetCommonDir$
  988.    DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
  989.    DIM lDidProgramRefresh%, ExistingProgPath$, lDidAnyRefresh%, Entry$
  990.    DIM lDidDataRefresh%, ExistingDataPath$, lDIdUserRefresh%, ExistingUserPath$
  991.    DIM lDidFilterRefresh%, ExistingFilterPath$, notused%, lenNet%
  992.  
  993.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  994.  
  995.    WinDir$=GetWindowsDir()
  996.  
  997.    '** Execute the rest only if there is a registered product that supports 
  998.    '** share Prods(i%)Share=1
  999.    IF Lot_AreShareToolsSupported()=1 THEN
  1000.     
  1001.       'If datalens drivers are installed install the win/winsys files
  1002.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
  1003.          Lot_IsTheFeatureInstalled("SHRDBASEWINSYS")=1 THEN
  1004.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRDBASEWINSYS")
  1005.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1006.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1007.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1008.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1009.       END IF
  1010.  
  1011.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
  1012.          Lot_IsTheFeatureInstalled("SHRDBASEWIN")=1 THEN
  1013.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRDBASEWIN")
  1014.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1015.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1016.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1017.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1018.       END IF
  1019.  
  1020.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
  1021.          Lot_IsTheFeatureInstalled("SHRDBASEDATA")=1 THEN
  1022.             dBaseDataChapter$ = Lot_GetChapterFromKeyword("SHRDBASEDATA")
  1023.             dBaseDataChapterSpec$ = Lot_GetChapterValStr(dBaseDataChapter$, F_NOTHING)
  1024.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1025.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1026.             AddSectionFilesToCopyList dBaseDataChapterSpec$,Source$,Dest$
  1027.       END IF
  1028.  
  1029.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
  1030.          Lot_IsTheFeatureInstalled("SHRDBASEDATAL")=1 THEN
  1031.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRDBASEDATAL")
  1032.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1033.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1034.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1035.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1036.       END IF
  1037.  
  1038.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
  1039.          Lot_IsTheFeatureInstalled("SHRDBASEDATALWIN")=1 THEN
  1040.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRDBASEDATALWIN")
  1041.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1042.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1043.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1044.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1045.       END IF
  1046.  
  1047.  
  1048.       IF Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 AND _
  1049.          Lot_IsTheFeatureInstalled("SHRINFORMIXWIN")=1 THEN
  1050.             InformixWinChapter$ = Lot_GetChapterFromKeyword("SHRINFORMIXWIN")
  1051.             InformixWinChapterSpec$ = Lot_GetChapterValStr(InformixWinChapter$, F_NOTHING)
  1052.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1053.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1054.             AddSectionFilesToCopyList InformixWinChapterSpec$,Source$,Dest$
  1055.       END IF
  1056.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 OR _
  1057.          Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 OR _
  1058.          Lot_IsTheFeatureInstalled("SHRIBMPRG")=1 OR _
  1059.          Lot_IsTheFeatureInstalled("SHRPARADOXPRG")=1 OR _
  1060.          Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 OR _
  1061.          Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG")=1 OR _
  1062.          Lot_IsTheFeatureInstalled("SHRIBMDB2PRG")=1 OR _
  1063.          Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG")=1 OR _
  1064.          Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG")=1 OR _
  1065.          Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG")=1 OR _
  1066.          Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 OR _
  1067.          Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 OR _
  1068.          Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 OR _
  1069.          Lot_IsTheFeatureInstalled("SHRORACLEPRG")=1 OR _
  1070.          Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 OR _
  1071.          Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 OR _
  1072.          Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 OR _
  1073.          Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 OR _
  1074.          Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 OR _
  1075.          Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 OR _
  1076.          Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 THEN 
  1077.             BcfChapter$ = Lot_GetChapterFromKeyword("SHRDLENSDATA")
  1078.             BcfChapterSpec$ = Lot_GetChapterValStr(BcfChapter$, F_NOTHING)
  1079.             Source$ = GetSymbolValue(SYM_NETLOTUSAPP$)
  1080.             Dest$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
  1081.             AddSectionFilesToCopyList BcfChapterSpec$,Source$,Dest$
  1082.             'Backup lotus.bcf file (into lotus.bak)
  1083.             notused% = Lot_BackupLotusBcfFile()
  1084.       END IF
  1085.       IF Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 AND _
  1086.          Lot_IsTheFeatureInstalled("SHRNOTESSQLWIN")=1 THEN
  1087.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRNOTESSQLWIN")
  1088.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1089.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1090.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1091.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1092.  
  1093.       END IF
  1094.  
  1095.       IF Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 AND _
  1096.          Lot_IsTheFeatureInstalled("SHRNOTESSQLWINSYS")=1 THEN
  1097.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRNOTESSQLWINSYS")
  1098.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1099.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1100.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1101.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1102.       END IF
  1103.  
  1104.       IF Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 AND _
  1105.          Lot_IsTheFeatureInstalled("SHRODBCDRVRWIN")=1 THEN
  1106.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCDRVRWIN")
  1107.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1108.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1109.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1110.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1111.       END IF
  1112.  
  1113.       IF Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 AND _
  1114.          Lot_IsTheFeatureInstalled("SHRODBCDRVRWINSYS")=1 THEN
  1115.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCDRVRWINSYS")
  1116.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1117.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1118.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1119.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1120.       END IF
  1121.       
  1122.       IF Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 AND _
  1123.          Lot_IsTheFeatureInstalled("SHRODBCWKSWIN")=1 THEN
  1124.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCWKSWIN")
  1125.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1126.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1127.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1128.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1129.       END IF
  1130.  
  1131.       IF Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 AND _
  1132.          Lot_IsTheFeatureInstalled("SHRODBCWKSWINSYS")=1 THEN
  1133.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCWKSWINSYS")
  1134.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1135.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1136.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1137.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1138.       END IF
  1139.       
  1140.       IF Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 AND _
  1141.          Lot_IsTheFeatureInstalled("SHRODBCTEXTWIN")=1 THEN
  1142.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCTEXTWIN")
  1143.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1144.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1145.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1146.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1147.       END IF
  1148.  
  1149.       IF Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 AND _
  1150.          Lot_IsTheFeatureInstalled("SHRODBCTEXTWINSYS")=1 THEN
  1151.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCTEXTWINSYS")
  1152.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1153.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1154.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1155.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1156.       END IF
  1157.       
  1158.       IF Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 AND _
  1159.          Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEWIN")=1 THEN
  1160.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCBTRIEVEWIN")
  1161.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1162.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1163.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1164.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1165.       END IF
  1166.  
  1167.       IF Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 AND _
  1168.          Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEWINSYS")=1 THEN
  1169.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCBTRIEVEWINSYS")
  1170.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1171.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1172.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1173.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1174.       END IF
  1175.       
  1176.       IF Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 AND _
  1177.          Lot_IsTheFeatureInstalled("SHRODBCFOXBASEWIN")=1 THEN
  1178.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCFOXBASEWIN")
  1179.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1180.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1181.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1182.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1183.       END IF
  1184.  
  1185.       IF Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 AND _
  1186.          Lot_IsTheFeatureInstalled("SHRODBCFOXBASEWINSYS")=1 THEN
  1187.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCFOXBASEWINSYS")
  1188.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1189.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1190.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1191.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1192.       END IF
  1193.       
  1194.       IF Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 AND _
  1195.          Lot_IsTheFeatureInstalled("SHRODBCACCESSWIN")=1 THEN
  1196.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCACCESSWIN")
  1197.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1198.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1199.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1200.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1201.       END IF
  1202.  
  1203.       IF Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 AND _
  1204.          Lot_IsTheFeatureInstalled("SHRODBCACCESSWINSYS")=1 THEN
  1205.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCACCESSWINSYS")
  1206.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1207.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1208.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1209.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1210.       END IF
  1211.       
  1212.       IF Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 AND _
  1213.          Lot_IsTheFeatureInstalled("SHRODBCPARADOXWIN")=1 THEN
  1214.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCPARADOXWIN")
  1215.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1216.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1217.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1218.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1219.       END IF
  1220.  
  1221.       IF Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 AND _
  1222.          Lot_IsTheFeatureInstalled("SHRODBCPARADOXWINSYS")=1 THEN
  1223.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCPARADOXWINSYS")
  1224.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1225.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1226.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1227.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1228.       END IF
  1229.       
  1230.       IF Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 AND _
  1231.          Lot_IsTheFeatureInstalled("SHRODBCDB2WIN")=1 THEN
  1232.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCDB2WIN")
  1233.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1234.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1235.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1236.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1237.       END IF
  1238.  
  1239.       IF Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 AND _
  1240.          Lot_IsTheFeatureInstalled("SHRODBCDB2WINSYS")=1 THEN
  1241.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCDB2WINSYS")
  1242.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1243.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1244.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1245.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1246.       END IF
  1247.       
  1248.       IF Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 AND _
  1249.          Lot_IsTheFeatureInstalled("SHRODBCORACLEWIN")=1 THEN
  1250.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCORACLEWIN")
  1251.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1252.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1253.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1254.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1255.       END IF
  1256.  
  1257.       IF Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 AND _
  1258.          Lot_IsTheFeatureInstalled("SHRODBCORACLEWINSYS")=1 THEN
  1259.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCORACLEWINSYS")
  1260.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1261.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1262.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1263.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1264.       END IF
  1265.       
  1266.       IF Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 AND _
  1267.          Lot_IsTheFeatureInstalled("SHRODBCSQLSVRWIN")=1 THEN
  1268.             dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCSQLSVRWIN")
  1269.             dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
  1270.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1271.             Dest$ = GetSymbolValue(SYM_WINDIR$)
  1272.             AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
  1273.       END IF
  1274.  
  1275.       IF Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 AND _
  1276.          Lot_IsTheFeatureInstalled("SHRODBCSQLSVRWINSYS")=1 THEN
  1277.             dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCSQLSVRWINSYS")
  1278.             dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
  1279.             Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1280.             Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
  1281.             AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
  1282.       END IF
  1283.  
  1284.       'Get the Common Directory and Net Common Directory from the user lotus.ini
  1285.       ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  1286.       'print "ExistingCommonDir$",ExistingCommonDir$ 
  1287.       ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
  1288.       IF ExistingNetCommonDir$ <> "" THEN
  1289.          lenNet% = LEN(ExistingNetCommonDir$) - 1
  1290.          'print "lenNet%",lenNet%
  1291.       ELSE
  1292.          lenNet% = 0
  1293.          'print "lenNet%",lenNet%
  1294.       END IF
  1295.       
  1296.       'print "ExistingNetCommonDir$",ExistingNetCommonDir$
  1297.  
  1298.       'Initialize the loop
  1299.       SectionPref$="Section"
  1300.       SectionNumber%=1
  1301.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  1302.       SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  1303.  
  1304.       'Using the shared.ini as a data driver I find all the files to be Refreshed
  1305.       '
  1306.       DO
  1307.      
  1308.          'Processing for Program Path
  1309.          '***************************
  1310.          lDidProgramRefresh%=0
  1311.          ExistingProgPath$ = GetIniKeyString(gLotusIniPath$,SectionName$,"Program Path")
  1312.          'print "SectionName$", SectionName$
  1313.          'print "ExistingProgPath$",ExistingProgPath$
  1314.  
  1315.          'If the sectionName if Graphics File Filters or Document File Filters save it
  1316.          'because now FLW installs the graphics filters in the \FILTERS subdirectory
  1317.          'and does not use Filter Path to find them and I have to preserve this
  1318.          IF SectionName$="Graphics File Filters" AND ExistingProgPath$ <> "" THEN
  1319.             GraphicsFileFiltersProgPath$=LCASE$(MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-11))
  1320.             ExistingProgPath$ = GraphicsFileFiltersProgPath$
  1321.          ELSEIF SectionName$="Document File Filters" AND ExistingProgPath$ <> "" THEN
  1322.             DocFileFiltersProgPath$=LCASE$(MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-13))
  1323.             ExistingProgPath$ = DocFileFiltersProgPath$
  1324.          END IF
  1325.          
  1326.          '** DND: For toolkit we should do LCASE once.
  1327.          '** DND: Make the dir questions a function.
  1328.  
  1329.  
  1330.          'The extra nested IF is due to a bug in LotusScript
  1331.          IF ExistingNetCommonDir$ <> "" THEN
  1332.             IF ExistingProgPath$ <> "" THEN
  1333.                IF DoesDirExist(ExistingProgPath$) = 1 THEN
  1334.                   'print "the ExistingProgPath  dir exists"
  1335.                   'print "MID$(ExistingProgPath$,1,lenNet%) compare with",LCASE$(MID$(ExistingProgPath$,1,lenNet%))
  1336.                   'print "ExistingNetCommonDir$",ExistingNetCommonDir$
  1337.                   'print "IsDirWritable(ExistingProgPath$)",IsDirWritable(ExistingProgPath$)
  1338.                   'print "IsDriveLocalHard(MID$(ExistingProgPath$,1,1))",IsDriveLocalHard(MID$(ExistingProgPath$,1,1))
  1339.                   'print "Lot_Dir(ExistingProgPath$+\*.*)",Lot_Dir(ExistingProgPath$+"\*.*")
  1340.                   IF ExistingProgPath$ <> WinDir$ AND _
  1341.                      LCASE$(MID$(ExistingProgPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
  1342.                      IsDirWritable(ExistingProgPath$) = 1 AND _
  1343.                      IsDriveLocalHard(LCASE$(MID$(ExistingProgPath$,1,1))) = 1 AND _
  1344.                      Lot_Dir(ExistingProgPath$+"\*.*") <> "" THEN
  1345.  
  1346.                      lDidProgramRefresh%=Lot_AddSectionToNodeList(ExistingProgPath$,SectionName$+" Program")
  1347.  
  1348.                      'print "1 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1349.  
  1350.                      IF lDidProgramRefresh% <> 0 THEN
  1351.                         lDidAnyRefresh%=1
  1352.                         Entry$=Lot_GetEntryFlag(SectionName$+" Program")
  1353.                         'Write the Entry to remember when updating the lotus.ini
  1354.                      END IF
  1355.                   END IF
  1356.                END IF
  1357.             END IF
  1358.          ELSE
  1359.             IF ExistingProgPath$ <> "" THEN
  1360.                IF DoesDirExist(ExistingProgPath$) = 1 THEN
  1361.                   IF ExistingProgPath$ <> WinDir$ AND _
  1362.                      IsDirWritable(ExistingProgPath$) = 1 AND _
  1363.                      IsDriveLocalHard(LCASE$(MID$(ExistingProgPath$,1,1))) = 1 AND _
  1364.                      Lot_Dir(ExistingProgPath$+"\*.*") <> "" THEN
  1365.  
  1366.                      lDidProgramRefresh%=Lot_AddSectionToNodeList(ExistingProgPath$,SectionName$+" Program")
  1367.                      'print "2 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1368.  
  1369.  
  1370.                      IF lDidProgramRefresh% <> 0 THEN
  1371.                         lDidAnyRefresh%=1
  1372.                         Entry$=Lot_GetEntryFlag(SectionName$+" Program")
  1373.                         'Write the Entry to remember when updating the lotus.ini
  1374.                      END IF
  1375.                   END IF
  1376.                END IF
  1377.             END IF
  1378.          END IF
  1379.  
  1380.          'Processing for Data Path
  1381.          '************************
  1382.          lDidDataRefresh%=0
  1383.          ExistingDataPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "Data Path")
  1384.          'print "ExistingDataPath$",ExistingDataPath$
  1385.  
  1386.          IF ExistingNetCommonDir$ <> "" THEN
  1387.             IF ExistingDataPath$ <> "" THEN
  1388.                IF DoesDirExist(ExistingDataPath$) = 1  THEN
  1389.                   IF ExistingDataPath$ <> WinDir$ AND _
  1390.                      LCASE$(MID$(ExistingDataPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
  1391.                      IsDirWritable(ExistingDataPath$) = 1  AND _
  1392.                      IsDriveLocalHard(LCASE$(MID$(ExistingDataPath$,1,1))) = 1 AND _
  1393.                      Lot_Dir(ExistingDataPath$+"\*.*") <> "" THEN
  1394.  
  1395.                      lDidDataRefresh%=Lot_AddSectionToNodeList(ExistingDataPath$,SectionName$+" Data")
  1396.                      'print "3 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1397.  
  1398.  
  1399.                      IF lDidDataRefresh% <> 0 THEN
  1400.                         lDidAnyRefresh%=1
  1401.                         Entry$=Lot_GetEntryFlag(SectionName$+" Data")
  1402.              
  1403.                      END IF
  1404.                   END IF
  1405.                END IF
  1406.             END IF
  1407.          ELSE
  1408.             IF ExistingDataPath$ <> "" THEN
  1409.                IF DoesDirExist(ExistingDataPath$) = 1  THEN
  1410.                   IF ExistingDataPath$ <> WinDir$ AND _
  1411.                      IsDirWritable(ExistingDataPath$) = 1  AND _
  1412.                      IsDriveLocalHard(LCASE$(MID$(ExistingDataPath$,1,1))) = 1 AND _
  1413.                      Lot_Dir(ExistingDataPath$+"\*.*") <> "" THEN
  1414.                      lDidDataRefresh%=Lot_AddSectionToNodeList(ExistingDataPath$,SectionName$+" Data")
  1415.                      'print "4 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1416.  
  1417.                      IF lDidDataRefresh% <> 0 THEN
  1418.                         lDidAnyRefresh%=1
  1419.                         Entry$=Lot_GetEntryFlag(SectionName$+" Data")
  1420.     
  1421.                      END IF
  1422.                   END IF
  1423.                END IF
  1424.             END IF
  1425.          END IF
  1426.    
  1427.          'Processing for User Path
  1428.          '************************
  1429.          lDidUserRefresh%=0
  1430.          ExistingUserPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "User Path")
  1431.          'print "ExistingUserPath$",ExistingUserPath$ 
  1432.  
  1433.          'print "SectionName$", SectionName$
  1434.          IF ExistingNetCommonDir$ <> "" THEN
  1435.             IF ExistingUserPath$ <> "" THEN
  1436.                IF DoesDirExist(ExistingUserPath$) = 1  THEN
  1437.                   IF ExistingUserPath$ <> WinDir$ AND _
  1438.                      LCASE$(MID$(ExistingUserPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
  1439.                      IsDirWritable(ExistingUserPath$) = 1  AND _
  1440.                      Lot_Dir(ExistingUserPath$+"\*.*") <> "" THEN
  1441.  
  1442.                      lDidUserRefresh%=Lot_AddSectionToNodeList(ExistingUserPath$,SectionName$+" User")
  1443.                      'print "5 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1444.  
  1445.                      IF lDidUserRefresh% <> 0 THEN
  1446.                         lDidAnyRefresh%=1
  1447.                         Entry$=Lot_GetEntryFlag(SectionName$+" User")
  1448.                      END IF
  1449.                   END IF
  1450.                END IF
  1451.             END IF
  1452.          ELSE
  1453.             IF ExistingUserPath$ <> "" THEN
  1454.                IF DoesDirExist(ExistingUserPath$) = 1  THEN
  1455.                   IF ExistingUserPath$ <> WinDir$ AND _
  1456.                      IsDirWritable(ExistingUserPath$) = 1  AND _
  1457.                      Lot_Dir(ExistingUserPath$+"\*.*") <> "" THEN
  1458.  
  1459.                      lDidUserRefresh%=Lot_AddSectionToNodeList(ExistingUserPath$,SectionName$+" User")
  1460.                      'print "6 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1461.  
  1462.                      IF lDidUserRefresh% <> 0 THEN
  1463.                         lDidAnyRefresh%=1
  1464.                         Entry$=Lot_GetEntryFlag(SectionName$+" User")
  1465.                      END IF
  1466.                   END IF
  1467.                END IF
  1468.             END IF
  1469.           END IF
  1470.  
  1471.          'Processing for Filter Path
  1472.          '**************************
  1473.          lDidFilterRefresh%=0
  1474.          ExistingFilterPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "Filter Path")
  1475.          'print  "SectionName$", SectionName$
  1476.          'print "ExistingFilterPath$",ExistingFilterPath$
  1477.          IF ExistingNetCommonDir$ <> "" THEN
  1478.             IF ExistingFilterPath$ <> "" THEN
  1479.                IF DoesDirExist(ExistingFilterPath$) = 1  THEN
  1480.                   IF ExistingFilterPath$ <> WinDir$ AND _
  1481.                      LCASE$(MID$(ExistingFilterPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
  1482.                      IsDirWritable(ExistingFilterPath$) = 1  AND _
  1483.                      IsDriveLocalHard(LCASE$(MID$(ExistingFilterPath$,1,1))) = 1  AND _
  1484.                      Lot_Dir(ExistingFilterPath$+"\*.*") <> "" THEN
  1485.  
  1486.                      lDidFilterRefresh%=Lot_AddSectionToNodeList(ExistingFilterPath$,SectionName$+" Filter")
  1487.  
  1488.                      'print "7 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1489.                      IF lDidFilterRefresh% <> 0 THEN
  1490.                         lDidAnyRefresh%=1
  1491.                         Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
  1492.                      END IF
  1493.                    END IF
  1494.                 END IF
  1495.             END IF
  1496.          ELSE
  1497.             IF ExistingFilterPath$ <> "" THEN
  1498.                IF DoesDirExist(ExistingFilterPath$) = 1  THEN
  1499.                   IF ExistingFilterPath$ <> WinDir$ AND _
  1500.                      IsDirWritable(ExistingFilterPath$) = 1  AND _
  1501.                      IsDriveLocalHard(LCASE$(MID$(ExistingFilterPath$,1,1))) = 1  AND _
  1502.                      Lot_Dir(ExistingFilterPath$+"\*.*") <> "" THEN
  1503.  
  1504.                      lDidFilterRefresh%=Lot_AddSectionToNodeList(ExistingFilterPath$,SectionName$+" Filter")
  1505.                      'print "8 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
  1506.  
  1507.                      IF lDidFilterRefresh% <> 0 THEN
  1508.                         lDidAnyRefresh%=1
  1509.                         Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
  1510.                      END IF
  1511.                    END IF
  1512.                 END IF
  1513.             END IF
  1514.           END IF
  1515.      
  1516.          SectionNumber% = SectionNumber% + 1
  1517.          SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  1518.  
  1519.          SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  1520.  
  1521.        LOOP UNTIL SectionName$ = ""
  1522.    END IF
  1523.  
  1524.    Lot_RefreshLocalLotusapp = SUCCESS
  1525. END FUNCTION
  1526. '*************************************************************************
  1527.  
  1528. PUBLIC FUNCTION PreConfigSHARE () AS INTEGER
  1529. '** Purpose:    Read the lotus.ini and lotusapp.ini 
  1530. '**             check the paths and validate the lotusapp dir
  1531. '**             Identify what product edition mix (standard server or node) 
  1532. '**             there is in the user environment
  1533. '**             Build the appropriate move list
  1534. '**             Interact with the user if I do not have place to move the files
  1535. '** Author:     MZ
  1536. '** Arguments:  None
  1537. '** Returns:    SUCCESS
  1538. '**             2  for Previous
  1539. '*************************************************************************
  1540.    DIM NetworkIns$, ret%, SaveCursor&, ExistingCommonDir$, LotusAppIniPath$
  1541.    DIM result%, secResult%, FLWpath$, ImprovPath$, RC$, notused%
  1542.    'print "5 share"
  1543.  
  1544.  
  1545.    '** Execute the rest only if there is a registered product that supports 
  1546.    '** share Prods(i%)Share=1
  1547.    IF Lot_AreShareToolsSupported()=1 THEN
  1548.       NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  1549.       IF NetworkIns$ <> gSERVER$ THEN
  1550.          'Find Lotus.ini
  1551.          gLotusIniPath$ = GetWindowsDir()+gLOTUSINI$
  1552.          ret% = DoesFileExist(gLotusIniPath$, femExists)
  1553.  
  1554.          IF ret% <> 0 THEN
  1555.             'Find if I have to consolidate local LOTUSAPP dir
  1556.             SaveCursor&=ShowWaitCursor()
  1557.             gConsolidateSize&=Lot_IsConsolidationNeeded(gLotusIniPath$,NetworkIns$)
  1558.             RestoreCursor SaveCursor&
  1559.  
  1560.             IF gConsolidateSize& <> CLNG(0) THEN
  1561.                ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  1562.                LotusappIniPath$=MakePath(ExistingCommonDir$,gLOTUSAPPINI$)
  1563.                'print "LotusappIniPath$ after creation",LotusappIniPath$
  1564.  
  1565.                'If the common directory exists, it is valid and has space put a message
  1566.  
  1567.                IF ValidCommDir% = 1 THEN
  1568.                   IF GetFreeSpaceForDrive(ExistingCommonDir$) > (gConsolidateSize& \ 1024) THEN
  1569.                      'ErrorMsg SID_MOVE_SHARE_INFO_TEXT, ""
  1570.                      'I prompt the user for move/copy or exit
  1571.  
  1572.                      '** AUTOMATE: comment out the "PopupModalDlg" stmts and
  1573.                      '**           and assume that the user chose MOVE
  1574.                      IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  1575.  
  1576.                         notused% = RegisterCallback("SHARE","CONSOLIDATEMOVECOPYCB")
  1577.                         RC$=PopupModalDlg (DBM_CONSOLIDATE_MOVECOPY, DBM_CONSOLIDATE_MOVECOPY)
  1578.                      ELSE
  1579.                         notused% = Lot_AutoConsolidateMoveCopy()
  1580.                      END IF     
  1581.  
  1582.  
  1583.                      'Do the Consolidation
  1584.                      lDidAnyMove%=0
  1585.                      SaveCursor&=ShowWaitCursor()
  1586.                      result%=Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,GetSymbolValue( SYM_LOTUSAPPDIR$))
  1587.                      IF DoesFileExist(LotusappIniPath$,femExists)=1 THEN
  1588.                         secResult%=Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,GetSymbolValue( SYM_LOTUSAPPDIR$)) 
  1589.                      ELSE
  1590.                         secResult%=0
  1591.                      END IF
  1592.                      RestoreCursor SaveCursor&
  1593.                      IF result%=1 OR secResult%=1 THEN
  1594.                         'If Freelance or improv was already installed put a message TO UPDATE ICONS
  1595.                         FLWPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "FLW")
  1596.                         ImprovPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "IMPROV")
  1597.                         IF FLWPath$ <> "" OR ImprovPath$ <> "" THEN
  1598.                            IF GetSymbolValue("SYM_MOVE") = "1" THEN
  1599.                               ErrorMsg SID_ERR_SHARE_CONSOLID, _
  1600.                                             GetSymbolValue(SYM_LOTUSAPPDIR$)+_
  1601.                                             LdString(SID_ERR_SHARE_CONSOLID0)
  1602.                            END IF
  1603.                         END IF
  1604.                      END IF
  1605.                   ELSE            
  1606.                      '** AUTOMATE: comment out the "PopupModalDlg" stmts and
  1607.                      '**           and assume that the user chose MOVE
  1608.                      IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  1609.  
  1610.                         'I prompt the user for the location to consolidate into
  1611.                         notused% = RegisterCallback("SHARE","CONSOLIDATELOTUSAPPDIRCB")
  1612.                         RC$=PopupModalDlg (DBM_CONSOLIDATE_LOTUSAPPDIR, DBM_CONSOLIDATE_LOTUSAPPDIR)
  1613.  
  1614.                      ELSE
  1615.                         notused% = Lot_AutoConsolidateLotusAppDir(gConsolidateSize&)
  1616.                      END IF     
  1617.  
  1618.                      IF RC$ = gBACK$ Then
  1619.                         PreConfigSHARE = 2
  1620.                         Exit Function
  1621.                      End IF
  1622.  
  1623.                      'Do the Consolidation
  1624.                      lDidAnyMove%=0
  1625.                      SaveCursor&=ShowWaitCursor()
  1626.                      result%=Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,GetSymbolValue( SYM_LOTUSAPPDIR$))
  1627.  
  1628.                      IF DoesFileExist(LotusappIniPath$,femExists)=1 THEN
  1629.                         secResult%=Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,GetSymbolValue( SYM_LOTUSAPPDIR$)) 
  1630.                      ELSE
  1631.                         secResult%=0
  1632.                      END IF
  1633.  
  1634.                      RestoreCursor SaveCursor&
  1635.  
  1636.                      IF result%=1 OR secResult%=1 THEN
  1637.                         'If Freelance or improv was already installed put a message TO UPDATE ICONS
  1638.                         FLWPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "FLW")
  1639.                         ImprovPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "IMPROV")
  1640.  
  1641.                         IF FLWPath$ <> "" OR ImprovPath$ <> "" THEN
  1642.                            IF GetSymbolValue("SYM_MOVE") = "1" THEN
  1643.                               ErrorMsg SID_ERR_SHARE_CONSOLID, _
  1644.                                             GetSymbolValue(SYM_LOTUSAPPDIR$)+_
  1645.                                             LdString(SID_ERR_SHARE_CONSOLID0)
  1646.                            END IF
  1647.                         END IF
  1648.  
  1649.                      END IF
  1650.  
  1651.                   END IF
  1652.  
  1653.                ELSE
  1654.                   'no valid lotusappdir
  1655.                   'I prompt the user for the location to consolidate into
  1656.                   '** AUTOMATE: comment out the "PopupModalDlg" stmts and
  1657.                   '**           and assume that the user chose MOVE
  1658.                   IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
  1659.  
  1660.                      'I prompt the user for the location to consolidate into
  1661.                      notused% = RegisterCallback("SHARE","CONSOLIDATELOTUSAPPDIRCB")
  1662.                      RC$=PopupModalDlg (DBM_CONSOLIDATE_LOTUSAPPDIR, DBM_CONSOLIDATE_LOTUSAPPDIR)
  1663.                   ELSE
  1664.                      notused% = Lot_AutoConsolidateLotusAppDir(gConsolidateSize&)
  1665.                   END IF     
  1666.  
  1667.                   'notused% = RegisterCallback("CALLBACK","GETLOTUSAPPDIRCB")
  1668.                   'RC$=PopupModalDlg (DBM_SPECIFY_LOTUSAPPDIR, DBM_SPECIFY_LOTUSAPPDIR)
  1669.  
  1670.                   IF RC$ = gBACK$ Then
  1671.                      PreConfigSHARE = 2
  1672.                      Exit Function
  1673.                   End IF
  1674.  
  1675.                   'Do the Consolidation
  1676.                   lDidAnyMove%=0
  1677.                   SaveCursor&=ShowWaitCursor()
  1678.                   result%=Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,GetSymbolValue( SYM_LOTUSAPPDIR$))
  1679.  
  1680.                   IF DoesFileExist(LotusappIniPath$,femExists)=1 THEN
  1681.                      secResult%=Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,GetSymbolValue( SYM_LOTUSAPPDIR$)) 
  1682.                   ELSE
  1683.                      secResult%=0
  1684.                   END IF
  1685.  
  1686.                   RestoreCursor SaveCursor&
  1687.  
  1688.                   IF result%=1 OR secResult%=1 THEN
  1689.                      'If Freelance or improv was already installed put a message TO UPDATE ICONS
  1690.                      FLWPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "FLW")
  1691.                      ImprovPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "IMPROV")
  1692.  
  1693.                      IF FLWPath$ <> "" OR ImprovPath$ <> "" THEN
  1694.                         IF GetSymbolValue("SYM_MOVE") = "1" THEN
  1695.                               ErrorMsg SID_ERR_SHARE_CONSOLID, _
  1696.                                             GetSymbolValue(SYM_LOTUSAPPDIR$)+_
  1697.                                             LdString(SID_ERR_SHARE_CONSOLID0)
  1698.                         END IF
  1699.                      END IF
  1700.  
  1701.                   END IF 'result%=1 OR secResult%=1 
  1702.  
  1703.                END IF
  1704.  
  1705.            END IF 'gConsolidateSize& <> CLNG(0)
  1706.  
  1707.         ELSE 
  1708.           'no move is necessary because no lotus.ini found
  1709.           gConsolidateSize&=CLNG(0) 
  1710.         END IF 'lotus.ini found or not
  1711.  
  1712.      END IF 'if not server
  1713.  
  1714.    END IF 'if share are supported
  1715.  
  1716.    PreConfigSHARE = SUCCESS
  1717. END FUNCTION
  1718. '*************************************************************************
  1719.  
  1720. FUNCTION Lot_GetNetLotusappSource(Chapter$) AS STRING
  1721. '** Purpose:   Reads [Server Configuration of Shared Tools]
  1722. '**                  LOTUSAPPDIR=D:\lotus\lotusapp
  1723. '**                  SameDriveFlag=1
  1724. '**            from install.ini
  1725. '** Author:    MZ
  1726. '** Arguments: Chapter$
  1727. '** Returns:   the lotusapp dir
  1728. '*************************************************************************
  1729.    DIM NetworkIns$, prodDir$, DestSpec$
  1730.    'print "6 share"
  1731.  
  1732.    'Identify if I am in node install
  1733.    NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  1734.    IF NetworkIns$=gNODE$ THEN
  1735.  
  1736.       prodDir$ = GetSymbolValue(SYM_STF_SRCDIR$)
  1737.       DestSpec$ = Lot_GetChapterValStr(Chapter$, F_DESTDIR)
  1738.  
  1739.       'If the section is intended to go in Win dir  it was installed 
  1740.       ' by the administrator into 123r4w directory
  1741.       IF LCASE$(DestSpec$) <> GetWindowsDir() Then
  1742.             Lot_GetNetLotusappSource=GetSymbolValue(SYM_NETLOTUSAPP$)
  1743.       ELSE
  1744.             Lot_GetNetLotusappSource = prodDir$
  1745.       END IF
  1746.  
  1747.    END IF
  1748.  END FUNCTION
  1749. '*************************************************************************
  1750.    
  1751. FUNCTION Lot_IsTheChapterInstalled(ChapterToFind$) AS INTEGER
  1752. '** Purpose:   Reads the chapters installed by the network  administrator 
  1753. '**            during server install into install.ini in the section
  1754. '**            [Server Configuration of 123w] and if the chapter 
  1755. '**            was installed  returns 1 if not returns 0
  1756. '** Author:    MZ
  1757. '** Arguments: chapter$
  1758. '** Returns:   1 YES
  1759. '**            0 NO
  1760. '*************************************************************************
  1761.    DIM NetworkIns$, cwd$, gInstallIniFile$, ChapterPref$, ChapterNumber%
  1762.    DIM ChapterTag$, ChapterID$, rc%
  1763.    'print "7 share"
  1764.  
  1765.    'Identify if I am in node install
  1766.    NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  1767.  
  1768.    IF NetworkIns$=gNODE$ THEN
  1769.  
  1770.       'Get the current working directory
  1771.       cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
  1772.       gInstallIniFile$ = MakePath(cwd$,gINSTALLINI$)
  1773.       ChapterPref$ = "Chapter"
  1774.       ChapterNumber%=1
  1775.       ChapterTag$=ChapterPref$+LTRIM$(STR$(ChapterNumber%))
  1776.       ChapterID$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of 123w", ChapterTag$)
  1777.       rc% = DoesFileExist(gInstallIniFile$,femExists)
  1778.       IF rc% = 1 THEN
  1779.          DO
  1780.             IF ChapterID$ = ChapterToFind$ THEN
  1781.                 Lot_IsTheChapterInstalled = 1
  1782.                 EXIT FUNCTION
  1783.             END IF
  1784.             ChapterNumber% = ChapterNumber% + 1
  1785.             ChapterTag$=ChapterPref$+LTRIM$(STR$(ChapterNumber%))
  1786.             ChapterID$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of 123w", ChapterTag$)
  1787.          LOOP UNTIL ChapterID$ = ""
  1788.      ELSE
  1789.         'print "2", gInstallIniFile$
  1790.          ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
  1791.          gEndStatementEncountered% = TRUE
  1792.          EXIT FUNCTION
  1793.          'FatalErrorMsg SID_ERR_INSTALLINI_MISSING, gInstallIniFile$, STFQUIT
  1794.      END IF
  1795.    END IF
  1796.      Lot_IsTheChapterInstalled = 0
  1797.  END FUNCTION
  1798. '*************************************************************************
  1799.  
  1800. FUNCTION Lot_GetNetCommDirPath (gLotusIniPath$,gNetCommDirPath$) AS STRING
  1801. '** Purpose:   This function investigates the users environment and 
  1802. '**            find if Lotus.ini exists and if it has [Lotus Applications]
  1803. '**            Section and Net Common Directory entry
  1804. '** Author:    MZ
  1805. '** Arguments: gLotusIniPath$,gNetCommDir$
  1806. '** Returns:   gNetCommDirPath$
  1807. '*************************************************************************
  1808.    DIM gLotusIniExist%
  1809.    'print "8 share"
  1810.  
  1811.    gNetCommDirPath$=""
  1812.    gLotusIniExist% =  DoesFileExist(gLotusIniPath$, femExists)
  1813.    IF gLotusIniExist% <>0 THEN
  1814.       gNetCommDirPath$=Lot_LocalGetPathFromIni(gLotusIniPath$, "Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
  1815.    END IF
  1816.  
  1817.    Lot_GetNetCommDirPath = gNetCommDirPath$
  1818.  
  1819. END FUNCTION
  1820. '*************************************************************************
  1821.  
  1822. PUBLIC FUNCTION Lot_IsSQLSelected () AS INTEGER
  1823. '** Purpose:    Read the copy list and determines if SQL was selected to 
  1824. '**             be installed 
  1825. '** Author:     MZ
  1826. '** Arguments:  None
  1827. '** Returns:    1  if SQL was selected or
  1828. '**             0  if SQL was not selected
  1829. '*************************************************************************
  1830.      DIM buf1$, CurrChpt$, ChapterName$
  1831.      'print "9 share"
  1832.  
  1833.      buf1$ = LdString(SID_SHARED_DATA_LENS_SQL)
  1834.  
  1835.      Lot_IsSQLSelected=0
  1836.  
  1837.      IF Lot_AreShareToolsSupported()=1 THEN
  1838.  
  1839.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  1840.         WHILE (CurrChpt$ <> "")
  1841.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  1842.            IF ChapterName$ = buf1$ THEN
  1843.               Lot_IsSQLSelected=1
  1844.               EXIT FUNCTION
  1845.            END IF
  1846.            CurrChpt$ = Lot_GetNext() 
  1847.         WEND
  1848.      END IF
  1849.  
  1850.  
  1851. END FUNCTION
  1852. '*************************************************************************
  1853. PUBLIC FUNCTION Lot_IsParadoxSelected () AS INTEGER
  1854. '** Purpose:    Read the copy list and determines if Paradox was selected to 
  1855. '**             be installed 
  1856. '** Author:     MZ
  1857. '** Arguments:  None
  1858. '** Returns:    1  if Paradox was selected or
  1859. '**             0  if Paradox was not selected
  1860. '*************************************************************************
  1861.      DIM buf1$, CurrChpt$, ChapterName$
  1862.      'print "10 share"
  1863.  
  1864.      buf1$ = LdString(SID_SHARED_DATA_LENS_PARADOX)
  1865.  
  1866.      Lot_IsParadoxSelected=0
  1867.      IF Lot_AreShareToolsSupported()=1 THEN
  1868.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  1869.         WHILE (CurrChpt$ <> "")
  1870.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  1871.            IF ChapterName$ = buf1$ THEN
  1872.               Lot_IsParadoxSelected=1
  1873.               EXIT FUNCTION
  1874.            END IF
  1875.            CurrChpt$ = Lot_GetNext() 
  1876.         WEND
  1877.      END IF 
  1878. END FUNCTION
  1879.  
  1880. '*************************************************************************
  1881. PUBLIC FUNCTION Lot_IsdBaseSelected () AS INTEGER
  1882. '** Purpose:    Read the copy list and determines if dBase was selected to 
  1883. '**             be installed 
  1884. '** Author:     MZ
  1885. '** Arguments:  None
  1886. '** Returns:    1  if dBase was selected or
  1887. '**             0  if dBase was not selected
  1888. '*************************************************************************
  1889.      DIM buf1$, CurrChpt$, ChapterName$
  1890.      'print "11 share"
  1891.  
  1892.      buf1$ = LdString(SID_SHARED_DATA_LENS_DBASE)
  1893.  
  1894.      Lot_IsdBaseSelected=0
  1895.      IF Lot_AreShareToolsSupported()=1 THEN
  1896.  
  1897.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  1898.         WHILE (CurrChpt$ <> "")
  1899.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  1900.            IF ChapterName$ = buf1$ THEN
  1901.               Lot_IsdBaseSelected=1
  1902.               EXIT FUNCTION
  1903.            END IF
  1904.            CurrChpt$ = Lot_GetNext() 
  1905.         WEND
  1906.      END IF
  1907. END FUNCTION
  1908. '*************************************************************************
  1909.  
  1910. PUBLIC FUNCTION Lot_IsInformixSelected () AS INTEGER
  1911. '** Purpose:    Read the copy list and determines if Informix was selected to 
  1912. '**             be installed 
  1913. '** Author:     MZ
  1914. '** Arguments:  None
  1915. '** Returns:    1  if Informix was selected or
  1916. '**             0  if Informix was not selected
  1917. '*************************************************************************
  1918.      DIM buf1$, CurrChpt$, ChapterName$
  1919.      'print "12 share"
  1920.   
  1921.      buf1$ = LdString(SID_SHARED_DATA_LENS_INFORMIX)
  1922.  
  1923.      Lot_IsInformixSelected=0
  1924.      IF Lot_AreShareToolsSupported()=1 THEN
  1925.  
  1926.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  1927.         WHILE (CurrChpt$ <> "")
  1928.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  1929.            IF ChapterName$ = buf1$ THEN
  1930.               Lot_IsInformixSelected=1
  1931.               EXIT FUNCTION
  1932.            END IF
  1933.            CurrChpt$ = Lot_GetNext() 
  1934.         WEND
  1935.      END IF
  1936. END FUNCTION
  1937. '*************************************************************************
  1938.  
  1939. PUBLIC FUNCTION Lot_IsIBMdBaseManagerSelected () AS INTEGER
  1940. '** Purpose:    Read the copy list and determines if IBMdBaseManager was selected to 
  1941. '**             be installed 
  1942. '** Author:     MZ
  1943. '** Arguments:  None
  1944. '** Returns:    1  if IBMdBaseManager was selected or
  1945. '**             0  if IBMdBaseManager was not selected
  1946. '*************************************************************************
  1947.      DIM buf1$, CurrChpt$, ChapterName$
  1948.      'print "13 share"
  1949.     
  1950.      buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DBM)
  1951.  
  1952.      Lot_IsIBMdBaseManagerSelected=0
  1953.      IF Lot_AreShareToolsSupported()=1 THEN
  1954.  
  1955.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  1956.         WHILE (CurrChpt$ <> "")
  1957.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  1958.            IF ChapterName$ = buf1$ THEN
  1959.               Lot_IsIBMdBaseManagerSelected=1
  1960.               EXIT FUNCTION
  1961.            END IF
  1962.            CurrChpt$ = Lot_GetNext() 
  1963.         WEND
  1964.      END IF
  1965. END FUNCTION
  1966. '*************************************************************************
  1967.  
  1968. '*************************************************************************
  1969.  
  1970. PUBLIC FUNCTION Lot_IsNotesSQLSelected () AS INTEGER
  1971. '** Purpose:    Read the copy list and determines if NotesSQL was selected to 
  1972. '**             be installed 
  1973. '** Author:     PJT
  1974. '** Arguments:  None
  1975. '** Returns:    1  if NotesSQL was selected or
  1976. '**             0  if NotesSQL was not selected
  1977. '*************************************************************************
  1978.      DIM buf1$, CurrChpt$, ChapterName$
  1979.      'print "14 share"
  1980.     
  1981.      buf1$ = LdString(SID_SHARED_DATA_LENS_NOTESSQL)
  1982.  
  1983.      Lot_IsNotesSQLSelected=0
  1984.      IF Lot_AreShareToolsSupported()=1 THEN
  1985.  
  1986.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  1987.         WHILE (CurrChpt$ <> "")
  1988.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  1989.            IF ChapterName$ = buf1$ THEN
  1990.               Lot_IsNotesSQLSelected=1
  1991.               EXIT FUNCTION
  1992.            END IF
  1993.            CurrChpt$ = Lot_GetNext() 
  1994.         WEND
  1995.      END IF
  1996. END FUNCTION
  1997. '*************************************************************************
  1998. PUBLIC FUNCTION Lot_IsSpreadSheetSelected () AS INTEGER
  1999. '** Purpose:    Read the copy list and determines if DataLens SpreadSheet 
  2000. '**             driver was selected to be installed 
  2001. '** Author:     PJT
  2002. '** Arguments:  None
  2003. '** Returns:    1  if SpreadSheet was selected or
  2004. '**             0  if SpreadSheet was not selected
  2005. '*************************************************************************
  2006.      DIM buf1$, CurrChpt$, ChapterName$
  2007.      'print "15 share"
  2008.     
  2009.      buf1$ = LdString(SID_SHARED_DATA_LENS_SPREADSHEET)
  2010.      Lot_IsSpreadSheetSelected=0
  2011.      IF Lot_AreShareToolsSupported()=1 THEN
  2012.  
  2013.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2014.         WHILE (CurrChpt$ <> "")
  2015.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2016.            IF ChapterName$ = buf1$ THEN
  2017.               Lot_IsSpreadSheetSelected=1
  2018.               EXIT FUNCTION
  2019.            END IF
  2020.            CurrChpt$ = Lot_GetNext() 
  2021.         WEND
  2022.      END IF
  2023. END FUNCTION
  2024. '*************************************************************************
  2025.  
  2026. PUBLIC FUNCTION Lot_IsIBM_DB2Selected () AS INTEGER
  2027. '** Purpose:    Read the copy list and determines if IBM DB2 was selected
  2028. '**             to be installed 
  2029. '** Author:     PJT
  2030. '** Arguments:  None
  2031. '** Returns:    1  if IBM DB2 was selected or
  2032. '**             0  if IBM DB2 was not selected
  2033. '*************************************************************************
  2034.      DIM buf1$, CurrChpt$, ChapterName$
  2035.      'print "16 share"
  2036.     
  2037.      buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DB2)
  2038.      Lot_IsIBM_DB2Selected=0
  2039.      IF Lot_AreShareToolsSupported()=1 THEN
  2040.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2041.         WHILE (CurrChpt$ <> "")
  2042.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2043.            IF ChapterName$ = buf1$ THEN
  2044.               Lot_IsIBM_DB2Selected=1
  2045.               EXIT FUNCTION
  2046.            END IF
  2047.            CurrChpt$ = Lot_GetNext() 
  2048.         WEND
  2049.      END IF
  2050. END FUNCTION
  2051. '*************************************************************************
  2052.  
  2053. PUBLIC FUNCTION Lot_IsDB2_SQLDS_Selected () AS INTEGER
  2054. '** Purpose:    Read the copy list and determines if IBM DB2 SQLDS was 
  2055. '**             selected to be installed 
  2056. '** Author:     PJT
  2057. '** Arguments:  None
  2058. '** Returns:    1  if DB2_SQLDS was selected or
  2059. '**             0  if DB2_SQLDS was not selected
  2060. '*************************************************************************
  2061.      DIM buf1$, CurrChpt$, ChapterName$
  2062.     
  2063.      buf1$ = LdString(SID_SHARED_DATA_LENS_DB2_SQLDS)
  2064.      Lot_IsDB2_SQLDS_Selected=0
  2065.      IF Lot_AreShareToolsSupported()=1 THEN
  2066.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2067.         WHILE (CurrChpt$ <> "")
  2068.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2069.            IF ChapterName$ = buf1$ THEN
  2070.               Lot_IsDB2_SQLDS_Selected=1
  2071.               EXIT FUNCTION
  2072.            END IF
  2073.            CurrChpt$ = Lot_GetNext() 
  2074.         WEND
  2075.      END IF
  2076. END FUNCTION
  2077. '*************************************************************************
  2078.  
  2079. PUBLIC FUNCTION Lot_IsDB2_SQL400_Selected () AS INTEGER
  2080. '** Purpose:    Read the copy list and determines if IBM SQL400
  2081. '**             was selected to be installed 
  2082. '** Author:     PJT
  2083. '** Arguments:  None
  2084. '** Returns:    1  if DB2SQL400 was selected or
  2085. '**             0  if DB2 SQL400 was not selected
  2086. '*************************************************************************
  2087.      DIM buf1$, CurrChpt$, ChapterName$
  2088.     
  2089.      buf1$ = LdString(SID_SHARED_DATA_LENS_DB2_SQL400)
  2090.      Lot_IsDB2_SQL400_Selected=0
  2091.      IF Lot_AreShareToolsSupported()=1 THEN
  2092.  
  2093.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2094.         WHILE (CurrChpt$ <> "")
  2095.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2096.            IF ChapterName$ = buf1$ THEN
  2097.               Lot_IsDB2_SQL400_Selected=1
  2098.               EXIT FUNCTION
  2099.            END IF
  2100.            CurrChpt$ = Lot_GetNext() 
  2101.         WEND
  2102.      END IF
  2103. END FUNCTION
  2104. '*************************************************************************
  2105.  
  2106. PUBLIC FUNCTION Lot_IsIBM_DDCS2_Selected () AS INTEGER
  2107. '** Purpose:    Read the copy list and determines if IBM DB2 through
  2108. '**             DDCS2 Gateway was selected to be installed 
  2109. '** Author:     PJT
  2110. '** Arguments:  None
  2111. '** Returns:    1  if IBM_DDCS2 was selected or
  2112. '**             0  if IBM_DDCS2 was not selected
  2113. '*************************************************************************
  2114.      DIM buf1$, CurrChpt$, ChapterName$
  2115.     
  2116.      buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DDCS_2)
  2117.      Lot_IsIBM_DDCS2_Selected=0
  2118.      IF Lot_AreShareToolsSupported()=1 THEN
  2119.  
  2120.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2121.         WHILE (CurrChpt$ <> "")
  2122.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2123.            IF ChapterName$ = buf1$ THEN
  2124.               Lot_IsIBM_DDCS2_Selected=1
  2125.               EXIT FUNCTION
  2126.            END IF
  2127.            CurrChpt$ = Lot_GetNext() 
  2128.         WEND
  2129.      END IF
  2130. END FUNCTION
  2131. '*************************************************************************
  2132.  
  2133. PUBLIC FUNCTION Lot_IsODBCDriverSelected () AS INTEGER
  2134. '** Purpose:    Read the copy list and determines if DataLENS ODBC Driver 
  2135. '**             was selected to be installed 
  2136. '** Author:     PJT
  2137. '** Arguments:  None
  2138. '** Returns:    1  if ODBCDriver was selected or
  2139. '**             0  if ODBCDriver was not selected
  2140. '*************************************************************************
  2141.      DIM buf1$, CurrChpt$, ChapterName$
  2142.     
  2143.      buf1$ = LdString(SID_SHARED_DATA_LENS_ODBCD)
  2144.      Lot_IsODBCDriverSelected=0
  2145.      IF Lot_AreShareToolsSupported()=1 THEN
  2146.  
  2147.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2148.         WHILE (CurrChpt$ <> "")
  2149.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2150.            IF ChapterName$ = buf1$ THEN
  2151.               Lot_IsODBCDriverSelected=1
  2152.               gODBCSelected=1
  2153.               EXIT FUNCTION
  2154.            END IF
  2155.            CurrChpt$ = Lot_GetNext() 
  2156.         WEND
  2157.      END IF
  2158. END FUNCTION
  2159. '*************************************************************************
  2160.  
  2161. PUBLIC FUNCTION Lot_IsODBCSpreadSheetSelected () AS INTEGER
  2162. '** Purpose:    Read the copy list and determines if ODBC SpreadSheet was 
  2163. '**             selected to be installed 
  2164. '** Author:     PJT
  2165. '** Arguments:  None
  2166. '** Returns:    1  if ODBC SpreadSheet was selected or
  2167. '**             0  if ODBC SpreadSheet was not selected
  2168. '*************************************************************************
  2169.      DIM buf1$, CurrChpt$, ChapterName$
  2170.     
  2171.      buf1$ = LdString(SID_SHARED_ODBC_SPREADSHEET)
  2172.      Lot_IsODBCSpreadSheetSelected=0
  2173.      IF Lot_AreShareToolsSupported()=1 THEN
  2174.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2175.         WHILE (CurrChpt$ <> "")
  2176.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2177.            IF ChapterName$ = buf1$ THEN
  2178.               Lot_IsODBCSpreadSheetSelected=1
  2179.               gODBCSelected=1
  2180.               EXIT FUNCTION
  2181.            END IF
  2182.            CurrChpt$ = Lot_GetNext() 
  2183.         WEND
  2184.      END IF
  2185. END FUNCTION
  2186. '*************************************************************************
  2187.  
  2188. PUBLIC FUNCTION Lot_IsODBCTextDriverSelected () AS INTEGER
  2189. '** Purpose:    Read the copy list and determines if ODBC Text Driver was 
  2190. '**             selected to be installed 
  2191. '** Author:     PJT
  2192. '** Arguments:  None
  2193. '** Returns:    1  if ODBC Text Driver was selected or
  2194. '**             0  if ODBC Text Driver was not selected
  2195. '*************************************************************************
  2196.      DIM buf1$, CurrChpt$, ChapterName$
  2197.     
  2198.      buf1$ = LdString(SID_SHARED_ODBC_TEXTDRVR)
  2199.      Lot_IsODBCTextDriverSelected=0
  2200.      IF Lot_AreShareToolsSupported()=1 THEN
  2201.  
  2202.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2203.         WHILE (CurrChpt$ <> "")
  2204.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2205.            IF ChapterName$ = buf1$ THEN
  2206.               Lot_IsODBCTextDriverSelected=1
  2207.               gODBCSelected=1
  2208.               EXIT FUNCTION
  2209.            END IF
  2210.            CurrChpt$ = Lot_GetNext() 
  2211.         WEND
  2212.      END IF
  2213. END FUNCTION
  2214. '*************************************************************************
  2215.  
  2216. PUBLIC FUNCTION Lot_IsOracleSelected () AS INTEGER
  2217. '** Purpose:    Read the copy list and determines if Oracle was 
  2218. '**             selected to be installed 
  2219. '** Author:     PJT
  2220. '** Arguments:  None
  2221. '** Returns:    1  if Oracle was selected or
  2222. '**             0  if Oracle was not selected
  2223. '*************************************************************************
  2224.      DIM buf1$, CurrChpt$, ChapterName$
  2225.     
  2226.      buf1$ = LdString(SID_SHARED_DATA_LENS_ORACLE)
  2227.      Lot_IsOracleSelected=0
  2228.      IF Lot_AreShareToolsSupported()=1 THEN
  2229.  
  2230.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2231.         WHILE (CurrChpt$ <> "")
  2232.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2233.            IF ChapterName$ = buf1$ THEN
  2234.               Lot_IsOracleSelected=1
  2235.               EXIT FUNCTION
  2236.            END IF
  2237.            CurrChpt$ = Lot_GetNext() 
  2238.         WEND
  2239.      END IF
  2240. END FUNCTION
  2241. '*************************************************************************
  2242.  
  2243. PUBLIC FUNCTION Lot_IsODBCBtrieveSelected () AS INTEGER
  2244. '** Purpose:    Read the copy list and determines if ODBCBtrieve was 
  2245. '**             selected to be installed 
  2246. '** Author:     PJT
  2247. '** Arguments:  None
  2248. '** Returns:    1  if ODBC Btrieve was selected or
  2249. '**             0  if ODBC Btrieve was not selected
  2250. '*************************************************************************
  2251.      DIM buf1$, CurrChpt$, ChapterName$
  2252.     
  2253.      buf1$ = LdString(SID_SHARED_ODBC_Btrieve)
  2254.      Lot_IsODBCBtrieveSelected=0
  2255.      IF Lot_AreShareToolsSupported()=1 THEN
  2256.  
  2257.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2258.         WHILE (CurrChpt$ <> "")
  2259.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2260.            IF ChapterName$ = buf1$ THEN
  2261.               Lot_IsODBCBtrieveSelected=1
  2262.               gODBCSelected=1
  2263.               EXIT FUNCTION
  2264.            END IF
  2265.            CurrChpt$ = Lot_GetNext() 
  2266.         WEND
  2267.      END IF
  2268. END FUNCTION
  2269. '*************************************************************************
  2270.  
  2271. PUBLIC FUNCTION Lot_IsODBCDB2Selected () AS INTEGER
  2272. '** Purpose:    Read the copy list and determines if ODBC DB2 was 
  2273. '**             selected to be installed 
  2274. '** Author:     PJT
  2275. '** Arguments:  None
  2276. '** Returns:    1  if ODBC DB2 was selected or
  2277. '**             0  if ODBC DB2 was not selected
  2278. '*************************************************************************
  2279.      DIM buf1$, CurrChpt$, ChapterName$
  2280.     
  2281.      buf1$ = LdString(SID_SHARED_ODBC_DB2)
  2282.      Lot_IsODBCDB2Selected=0
  2283.      IF Lot_AreShareToolsSupported()=1 THEN
  2284.  
  2285.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2286.         WHILE (CurrChpt$ <> "")
  2287.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2288.            IF ChapterName$ = buf1$ THEN
  2289.               Lot_IsODBCDB2Selected=1
  2290.               gODBCSelected=1
  2291.               EXIT FUNCTION
  2292.            END IF
  2293.            CurrChpt$ = Lot_GetNext() 
  2294.         WEND
  2295.      END IF
  2296. END FUNCTION
  2297. '*************************************************************************
  2298.  
  2299. PUBLIC FUNCTION Lot_IsODBCFoxbaseSelected () AS INTEGER
  2300. '** Purpose:    Read the copy list and determines if ODBCFoxbase was selected to 
  2301. '**             be installed 
  2302. '** Author:     PJT
  2303. '** Arguments:  None
  2304. '** Returns:    1  if ODBCFoxbase was selected or
  2305. '**             0  if ODBCFoxbase was not selected
  2306. '*************************************************************************
  2307.      DIM buf1$, CurrChpt$, ChapterName$
  2308.     
  2309.      buf1$ = LdString(SID_SHARED_ODBC_FOXBASE)
  2310.      Lot_IsODBCFoxbaseSelected=0
  2311.      IF Lot_AreShareToolsSupported()=1 THEN
  2312.  
  2313.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2314.         WHILE (CurrChpt$ <> "")
  2315.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2316.            IF ChapterName$ = buf1$ THEN
  2317.               Lot_IsODBCFoxbaseSelected=1
  2318.               gODBCSelected=1
  2319.               EXIT FUNCTION
  2320.            END IF
  2321.            CurrChpt$ = Lot_GetNext() 
  2322.         WEND
  2323.      END IF
  2324. END FUNCTION
  2325. '*************************************************************************
  2326.  
  2327. PUBLIC FUNCTION Lot_IsODBCAccessSelected () AS INTEGER
  2328. '** Purpose:    Read the copy list and determines if ODBCAccess was 
  2329. '**             selected to be installed 
  2330. '** Author:     PJT
  2331. '** Arguments:  None
  2332. '** Returns:    1  if ODBCAccess was selected or
  2333. '**             0  if ODBCAccess was not selected
  2334. '*************************************************************************
  2335.      DIM buf1$, CurrChpt$, ChapterName$
  2336.     
  2337.      buf1$ = LdString(SID_SHARED_ODBC_ACCESS)
  2338.      Lot_IsODBCAccessSelected=0
  2339.      IF Lot_AreShareToolsSupported()=1 THEN
  2340.  
  2341.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2342.         WHILE (CurrChpt$ <> "")
  2343.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2344.            IF ChapterName$ = buf1$ THEN
  2345.               Lot_IsODBCAccessSelected=1
  2346.               gODBCSelected=1
  2347.               EXIT FUNCTION
  2348.            END IF
  2349.            CurrChpt$ = Lot_GetNext() 
  2350.         WEND
  2351.      END IF
  2352. END FUNCTION
  2353. '*************************************************************************
  2354.  
  2355. PUBLIC FUNCTION Lot_IsODBCParadoxSelected () AS INTEGER
  2356. '** Purpose:    Read the copy list and determines if ODBC Paradox was 
  2357. '**             selected to be installed 
  2358. '** Author:     PJT
  2359. '** Arguments:  None
  2360. '** Returns:    1  if ODBC Paradox was selected or
  2361. '**             0  if ODBC Paradox was not selected
  2362. '*************************************************************************
  2363.      DIM buf1$, CurrChpt$, ChapterName$
  2364.     
  2365.      buf1$ = LdString(SID_SHARED_ODBC_PARADOX)
  2366.      Lot_IsODBCParadoxSelected=0
  2367.      IF Lot_AreShareToolsSupported()=1 THEN
  2368.  
  2369.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2370.         WHILE (CurrChpt$ <> "")
  2371.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2372.            IF ChapterName$ = buf1$ THEN
  2373.               Lot_IsODBCParadoxSelected=1
  2374.               EXIT FUNCTION
  2375.            END IF
  2376.            CurrChpt$ = Lot_GetNext() 
  2377.         WEND
  2378.      END IF
  2379. END FUNCTION
  2380. '*************************************************************************
  2381.  
  2382. PUBLIC FUNCTION Lot_IsODBCOracleSelected () AS INTEGER
  2383. '** Purpose:    Read the copy list and determines if ODBCOracle was selected to 
  2384. '**             be installed 
  2385. '** Author:     PJT
  2386. '** Arguments:  None
  2387. '** Returns:    1  if ODBCOracle was selected or
  2388. '**             0  if ODBCOracle was not selected
  2389. '*************************************************************************
  2390.      DIM buf1$, CurrChpt$, ChapterName$
  2391.     
  2392.      buf1$ = LdString(SID_SHARED_ODBC_Oracle)
  2393.      Lot_IsODBCOracleSelected=0
  2394.      IF Lot_AreShareToolsSupported()=1 THEN
  2395.  
  2396.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2397.         WHILE (CurrChpt$ <> "")
  2398.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2399.            IF ChapterName$ = buf1$ THEN
  2400.               Lot_IsODBCOracleSelected=1
  2401.               EXIT FUNCTION
  2402.            END IF
  2403.            CurrChpt$ = Lot_GetNext() 
  2404.         WEND
  2405.      END IF
  2406. END FUNCTION
  2407. '*************************************************************************
  2408.  
  2409. PUBLIC FUNCTION Lot_IsODBCSQLServerSelected () AS INTEGER
  2410. '** Purpose:    Read the copy list and determines if ODBC SQL Server was 
  2411. '**             selected to be installed 
  2412. '** Author:     PJT
  2413. '** Arguments:  None
  2414. '** Returns:    1  if ODBCSQLServer was selected or
  2415. '**             0  if ODBCSQLServer was not selected
  2416. '*************************************************************************
  2417.      DIM buf1$, CurrChpt$, ChapterName$
  2418.  
  2419.      buf1$ = LdString(SID_SHARED_ODBC_SQLSERVER)
  2420.      Lot_IsODBCSQLServerSelected=0
  2421.      IF Lot_AreShareToolsSupported()=1 THEN
  2422.  
  2423.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  2424.         WHILE (CurrChpt$ <> "")
  2425.            ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
  2426.            IF ChapterName$ = buf1$ THEN
  2427.               Lot_IsODBCSQLServerSelected=1
  2428.               EXIT FUNCTION
  2429.            END IF
  2430.            CurrChpt$ = Lot_GetNext() 
  2431.         WEND
  2432.     END IF
  2433. END FUNCTION
  2434. '*************************************************************************
  2435.  
  2436.  
  2437. PUBLIC FUNCTION ConfigSHARE () AS INTEGER
  2438. '** Purpose:    Read the copy list and depending on the Shared tools 
  2439. '**             installed update lotus.ini and lotusapp.ini
  2440. '** Author:     MZ
  2441. '** Arguments:  None
  2442. '** Returns:    SUCCESS
  2443. '*************************************************************************
  2444.    DIM NetworkIns$, notused%
  2445.  
  2446.    '
  2447.    ' First I get all the sections that have the shared flag and build a list
  2448.    ' The maximum current list is:
  2449.  
  2450.  
  2451.    ' This list will be populated by a loop of calls to FGetFirst()&FGetNext()
  2452.    ' for today I add the entries like all sections got installed
  2453.    notused% = Lot_GetAllSharedInstalled()
  2454.  
  2455.    'Initialize globals gLotusappIniPath$ and gLotusappDir
  2456.    gLotusappDir=CreateBuffer(256)
  2457.    gLotusappDir=GetSymbolValue(SYM_LOTUSAPPDIR$)
  2458.    gLotusappIniPath=CreateBuffer(256)
  2459.    gLotusBcfDir=CreateBuffer(256)
  2460.    notused% = Lot_GetLotusappiniPath(gLotusappIniPath, gLotusappDir, gLotusBcfDir)
  2461.    'print "before calling ConfigSHARE32"
  2462.    ConfigSHARE32
  2463.    '** Execute the rest only if there is a registered product that supports 
  2464.    '** share Prods(i%)Share=1
  2465.    IF Lot_AreShareToolsSupported()=1 THEN
  2466.       'Write the INI files for standard and node install and save the config in server
  2467.       NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  2468.  
  2469.       IF NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$ THEN
  2470.           notused% = Lot_WriteIniFiles()
  2471. '          notused% = Lot_WriteShareInProgMan(NetworkIns$)
  2472.       ELSEIF NetworkIns$ = gSERVER$ THEN
  2473.           'Save the server configuration in the install.ini (to be used by the node install)
  2474.           notused% = Lot_SaveShareConfigInInstallIni()
  2475.       END IF
  2476.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 OR _
  2477.          Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 OR _
  2478.          Lot_IsTheFeatureInstalled("SHRIBMPRG")=1 OR _
  2479.          Lot_IsTheFeatureInstalled("SHRSQLPRG")=1 OR _
  2480.          Lot_IsTheFeatureInstalled("SHRPARADOXPRG")=1 OR _
  2481.          Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 OR _
  2482.          Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG")=1 OR _
  2483.          Lot_IsTheFeatureInstalled("SHRIBMDB2PRG")=1 OR _
  2484.          Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG")=1 OR _
  2485.          Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG")=1 OR _
  2486.          Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG")=1 OR _
  2487.          Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 OR _
  2488.          Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 OR _
  2489.          Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 OR _
  2490.          Lot_IsTheFeatureInstalled("SHRORACLEPRG")=1 OR _
  2491.          Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 OR _
  2492.          Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 OR _
  2493.          Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 OR _
  2494.          Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 OR _
  2495.          Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 OR _
  2496.          Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 OR _
  2497.          Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 THEN 
  2498.             gDataLensInstalled = 1
  2499.        ELSE
  2500.             gDataLensInstalled = 0
  2501.       END IF
  2502.  
  2503.       'Write lotus.bcf file
  2504.       'print STR$(gDataLensInstalled)
  2505.       IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gSERVER$) AND _
  2506.          gDataLensInstalled = 1 THEN
  2507.          notused% = Lot_WriteLotusBcfFile()
  2508.       END IF
  2509.  
  2510.       IF NetworkIns$ = gSTANDARD$ AND gDataLensInstalled = 1 THEN
  2511.           'write the datapath for BCF file
  2512.           gLotusappDir$=GetSymbolValue(SYM_LOTUSAPPDIR$)
  2513.           CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
  2514.       END IF
  2515.  
  2516.       IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$) AND _
  2517.          gDataLensInstalled = 1 THEN
  2518.  
  2519.          notused% = Lot_WriteODBCINST()
  2520.       END IF     
  2521.  
  2522.    END IF
  2523.  
  2524.    ConfigSHARE = SUCCESS
  2525. END FUNCTION
  2526. '*************************************************************************
  2527.  
  2528. PUBLIC FUNCTION AddSHAREIcons() AS INTEGER
  2529. '** Purpose:   Puts up the shared tools icons
  2530. '** Author:    MZ
  2531. '** Returns:   1 if success
  2532. '***************************************************
  2533. DIM grouptitle$,Lotusappdir$,dlgeditor$,Network$,notused%,IconName$
  2534. DIM Feature$, s$
  2535.  
  2536.    IF Lot_AreShareToolsSupported () = 1 THEN
  2537.       Network$ = GetSymbolValue(SYM_NETWORK$)
  2538.       grouptitle$ = Reg_GetProgManagerGroupName(1)
  2539.         IconName$ = LdString(SID_LOTDIALOGEDITOR)
  2540.         Feature$ = "SHRDLGPRG"
  2541.       '** DIALOG EDITOR   
  2542.       If network$ = gSTANDARD$ Then
  2543.          If (FIsKeywordinCopyList (Feature$) = 1) Then   
  2544.             Lotusappdir$= GetSymbolValue(SYM_LOTUSAPPDIR$)
  2545.             dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
  2546.                If IsNewShell() THEN
  2547.                     s$ = LdString(SID_LOTACCESSORIES)+IconName$+".lnk"
  2548.                 notused%=Lot_AddLinkToFolder(1, dlgeditor$, s$, IconName$, "", Lotusappdir$)
  2549. 'JMD                notused%=Lot_AddLinkToFolder(1, dlgeditor$, IconName$+".lnk", IconName$, "", Lotusappdir$)
  2550. '                notused%=Lot_RegisterObject(Feature$, UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(1)+IconName$+".lnk")
  2551.                 Else    
  2552.                 CreateProgmanItem  grouptitle$, IconName$, dlgeditor$, "", cmoOverwrite
  2553.                 End If
  2554.          End If
  2555.       ElseIf network$ = gNODE$ Then
  2556.          If Lot_IsTheFeatureInstalled("SHRDLGPRG") = 1 Then 
  2557.             Lotusappdir$= GetSymbolValue(SYM_NETLOTUSAPP$)
  2558.             dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
  2559.                If IsNewShell() THEN
  2560.                     s$ = LdString(SID_LOTACCESSORIES)+IconName$+".lnk"
  2561.                 notused%=Lot_AddLinkToFolder(1, dlgeditor$, s$, IconName$, "", Lotusappdir$)
  2562. 'JMD                notused%=Lot_AddLinkToFolder(1, dlgeditor$, IconName$+".lnk", IconName$, "", Lotusappdir$)
  2563. '                notused%=Lot_RegisterObject(Feature$, UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(1)+IconName$+".lnk")
  2564.                 Else    
  2565.                 CreateProgmanItem  grouptitle$, IconName$, dlgeditor$, "", cmoOverwrite
  2566.                 End If
  2567.          End If
  2568.       End If
  2569.    End If
  2570. AddSHAREIcons=SUCCESS
  2571. END FUNCTION
  2572. '*************************************************************************
  2573.  
  2574. FUNCTION Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,NewDestDir$) AS INTEGER
  2575. '** Purpose:   Copies the shared files referenced in lotusapp.ini to a new location 
  2576. '**            if the copy is successful deletes the files on the old location
  2577. '**            and writes the new location in the loths.ini
  2578. '** Author:    MZ
  2579. '** Arguments: LotusappIniPath$ where LOTUSAPP.INI file is
  2580. '**            NewDestDir$    where to move the files
  2581. '** Returns:   1 if success
  2582. '**            0 if no consolidation was done
  2583. '***************************************************
  2584. '**  NOTE: This function is called after Lot_DoShareConsolidation
  2585. '******************************************************
  2586. '*************************************************************************
  2587.    DIM cwd$, gSharedIniFile$, WinDir$, ExistingCommonDir$, SectionPref$
  2588.    DIM SectionNumber%, SectionTag$, SectionName$, lDidProgramMove%
  2589.    DIM recordedPath$, ExistingProgPath$, ExistingnetCommonDir$
  2590.    DIM Entry$, lDidDataMove%, ExistingDataPath$, lDidUserMove%, ExistingUserPath$
  2591.    DIM lDidFilterMove%, ExistingFilterPath$, SpellUserPath$, fileSize&, notused%
  2592.    
  2593.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  2594.    WinDir$=GetWindowsDir()
  2595.  
  2596.    'Get the Common Directory and Net Common Directory 
  2597.    ExistingCommonDir$ = GetSymbolValue(SYM_EXISTINGCOMMDIR$)
  2598.    'print "ExistingCommonDir$",ExistingCommonDir$
  2599.    'print "LotusappIniPath$",LotusappIniPath$
  2600.    'Initialize the loop
  2601.    SectionPref$="section"
  2602.    SectionNumber%=1
  2603.    SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  2604.    SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  2605.  
  2606.    'Using the shared.ini as a data driver I find all the files to be moved
  2607.    DO
  2608.    'print "SectionName$",SectionName$
  2609.       'Processing for Program Path
  2610.       '***************************
  2611.       lDidProgramMove%=0
  2612.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
  2613.       'print "RecordedPath$ prog",RecordedPath$
  2614.       ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  2615.  
  2616.       'print ExistingProgPath$,"ExistingProgPath$"
  2617.       'print "NewDestDir$",NewDestDir$
  2618.  
  2619.       'If the sectionName if Graphics File Filters or Document File Filters 
  2620.       'save it because now FLW installs the graphics filters in the 
  2621.       '\FILTERS subdirectory and does not use Filter Path to find them and 
  2622.       'I have to preserve this
  2623.       IF SectionName$="Graphics File Filters" AND ExistingProgPath$ <> "" THEN
  2624.          GraphicsFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-11)
  2625.       ELSEIF SectionName$="Document File Filters" AND ExistingProgPath$ <> "" THEN
  2626.          DocFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-13)
  2627.       END IF
  2628.          
  2629.  
  2630.       'The nested IFs are used to get around a bug in LotusScript.
  2631.       '** DND: The existing path questions could be packaged in a function
  2632.       '** DND: LCASE should be done once
  2633.       IF ExistingNetCommonDir$ <>"" Then
  2634.          IF ExistingProgPath$ <> "" AND _
  2635.             ExistingProgPath$ <> WinDir$ AND _
  2636.             MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2637.             MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2638.             lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
  2639.  
  2640.             IF lDidProgramMove% <> 0 THEN
  2641.                lDidAnyMove%=1
  2642.                Entry$=Lot_GetEntryFlag(SectionName$+" Program")
  2643.  
  2644.                notused% = Lot_WriteEntry(Entry$,1)            
  2645.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
  2646.                notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
  2647.             END IF
  2648.          END IF
  2649.       ELSE
  2650.          IF ExistingProgPath$ <> "" AND _
  2651.             ExistingProgPath$ <> WinDir$ AND _
  2652.             MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2653.             lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
  2654.  
  2655.             IF lDidProgramMove% <> 0 THEN
  2656.                lDidAnyMove%=1
  2657.                Entry$=Lot_GetEntryFlag(SectionName$+" Program")
  2658.  
  2659.                notused% = Lot_WriteEntry(Entry$,1)            
  2660.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
  2661.                notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
  2662.             END IF
  2663.          END IF
  2664.      END IF
  2665.  
  2666.       'Processing for Data Path
  2667.       '************************
  2668.       lDidDataMove%=0
  2669.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
  2670.       'print "RecordedPath$ data",RecordedPath$
  2671.       ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  2672.       'print ExistingDataPath$,"ExistingDataPath$"
  2673.       'print "NewDestDir$",NewDestDir$
  2674.       IF ExistingNetCommonDir$ <>"" Then
  2675.          IF ExistingDataPath$ <> "" AND _
  2676.             ExistingDataPath$ <> WinDir$ AND _
  2677.             MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2678.             MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2679.             lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
  2680.     
  2681.             IF lDidDataMove% <> 0 THEN
  2682.                lDidAnyMove%=1
  2683.                Entry$=Lot_GetEntryFlag(SectionName$+" Data")
  2684.  
  2685.                notused% = Lot_WriteEntry(Entry$,1)            
  2686.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
  2687.  
  2688.             ELSEIF Entry$="DATALENSDATA" THEN
  2689.                notused% = Lot_WriteEntry(Entry$,1)            
  2690.             END IF
  2691.          END IF
  2692.       ELSE
  2693.          IF ExistingDataPath$ <> "" AND _
  2694.             ExistingDataPath$ <> WinDir$ AND _
  2695.             MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2696.             lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
  2697.     
  2698.             IF lDidDataMove% <> 0 THEN
  2699.                lDidAnyMove%=1
  2700.                Entry$=Lot_GetEntryFlag(SectionName$+" Data")
  2701.  
  2702.                notused% = Lot_WriteEntry(Entry$,1)            
  2703.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
  2704.  
  2705.             ELSEIF Entry$="DATALENSDATA" THEN
  2706.                notused% = Lot_WriteEntry(Entry$,1)            
  2707.             END IF
  2708.          END IF
  2709.        END IF
  2710.    
  2711.       'Processing for User Path
  2712.       '*************************
  2713.       lDidUserMove%=0
  2714.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "User Path")
  2715.       ExistingUserPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  2716.  
  2717.       IF ExistingNetCommonDir$ <>"" Then
  2718.          IF ExistingUserPath$ <> "" AND _
  2719.             ExistingUserPath$ <> WinDir$ AND _
  2720.             MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2721.             MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2722.             lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
  2723.             IF lDidUserMove% <> 0 THEN
  2724.                lDidAnyMove%=1
  2725.                Entry$=Lot_GetEntryFlag(SectionName$+" User")
  2726.                notused% = Lot_WriteEntry(Entry$,1)            
  2727.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
  2728.  
  2729.             END IF
  2730.          END IF
  2731.       ELSE
  2732.          IF ExistingUserPath$ <> "" AND _
  2733.             ExistingUserPath$ <> WinDir$ AND _
  2734.             MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <>NewDestDir$ THEN
  2735.             lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
  2736.             IF lDidUserMove% <> 0 THEN
  2737.                lDidAnyMove%=1
  2738.                Entry$=Lot_GetEntryFlag(SectionName$+" User")
  2739.                notused% = Lot_WriteEntry(Entry$,1)            
  2740.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
  2741.  
  2742.             END IF
  2743.          END IF
  2744.  
  2745.       END IF
  2746.  
  2747.       'Processing for Filter Path
  2748.       '**************************
  2749.       lDidFilterMove%=0
  2750.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Filter Path")
  2751.       ExistingFilterPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  2752.  
  2753.       IF ExistingNetCommonDir$ <>"" Then
  2754.          IF ExistingFilterPath$ = "" AND _
  2755.             SectionName$="Graphics File Filters" AND _
  2756.             GraphicsFileFiltersProgPath$<>"" AND _
  2757.             ExistingFilterPath$ <> NewDestDir$ THEN
  2758.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  2759.          ELSEIF ExistingFilterPath$ <> "" AND _
  2760.             ExistingFilterPath$ <> WinDir$ AND _
  2761.             MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2762.             ExistingFilterPath$ <> NewDestDir$ THEN
  2763.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  2764.          END IF
  2765.       ELSE
  2766.          IF ExistingFilterPath$ = "" AND _
  2767.             SectionName$="Graphics File Filters" AND _
  2768.             GraphicsFileFiltersProgPath$<>"" AND _
  2769.             MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2770.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  2771.          ELSEIF ExistingFilterPath$ <> "" AND _
  2772.             ExistingFilterPath$ <> WinDir$ AND _
  2773.             MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2774.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  2775.          END IF
  2776.       END IF
  2777.  
  2778.       IF lDidFilterMove% <> 0 THEN
  2779.          lDidAnyMove%=1
  2780.          Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
  2781.          notused% = Lot_WriteEntry(Entry$,1)            
  2782.          notused% = FRemoveDir(Lot_TrimEndSlash(ExistingFilterPath$))
  2783.  
  2784.       END IF
  2785.       
  2786.       SectionNumber% = SectionNumber% + 1
  2787.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  2788.       SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  2789.     LOOP UNTIL SectionName$ = ""
  2790.  
  2791.    IF lDidAnyMove%=1 THEN
  2792.       'Write common Dir
  2793.       CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  2794.       'If the UserPath for spell is not equal with the common dir make it so
  2795.       SpellUserPath$ = GetIniKeyString(gLotusIniPath$, "Spell Checker", "User Path")
  2796.       IF LCASE$(SpellUserPath$) <> gLotusappDir$+"spell" THEN
  2797.           CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path",gLotusappDir$+"spell",cmoOverwrite
  2798.       END IF
  2799.  
  2800.       'Special processing for lotusapp.ini
  2801.       FileSize& = GetSizeOfFile(LotusappIniPath$)
  2802.  
  2803.       'print ExistingCommonDir$,"ExistingCommonDir$"
  2804.       'print NewDestDir$,"NewDestDir$"
  2805.       IF ExistingCommonDir$ <> NewDestDir$ THEN
  2806.          notused% = Lot_DoVerDateValidation(ExistingCommonDir$,NewDestDir$,gLOTUSAPPINI$,FileSize&)
  2807.       END IF   
  2808.    
  2809.       ' Delete the old common directory
  2810.       notused% = FRemoveDir(Lot_TrimEndSlash(ExistingCommonDir$))
  2811.  
  2812.       Lot_DoConsolidateFilesInLotusappIni=1
  2813.    ELSE
  2814.       Lot_DoConsolidateFilesInLotusappIni=0
  2815.    END IF
  2816. END FUNCTION
  2817. '*************************************************************************
  2818.  
  2819. FUNCTION Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,NewDestDir$) AS INTEGER
  2820. '** Purpose:   Copies the shared files referenced in lotus.ini to a new location 
  2821. '**            if the copy is successful deletes the files on the old location
  2822. '**            and writes the new location in the loths.ini
  2823. '** Author:    MZ
  2824. '** Arguments: gLotusIniPath$ where LOTUS.INI file is
  2825. '**            NetworkIns$    gSTANDARD$ or gNODE$ 
  2826. '**            NewDestDir$    where to move the files
  2827. '** Returns:   1 if success
  2828. '**            0 if no consolidation was done
  2829. '*************************************************************************
  2830.    DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, SectionPref$
  2831.    DIM SectionNumber%, SectionTag$, SectionName$, lDidProgramMove%
  2832.    DIM FileExist%, ExistingProgPath$, entry$, lDIdDataMove%, ExistingDataPath$
  2833.      DIM ExistingNetCommonDir$, lDidUserMove%, ExistingUserPath$, lDIdFilterMove%
  2834.    DIM ExistingFilterPath$, SpellUserPath$, notused%
  2835.  
  2836.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  2837.    WinDir$=GetWindowsDir()
  2838.    FileExist% =  DoesFileExist(gSharedIniFile$, femExists)
  2839.  
  2840.    'Get the Common Directory and Net Common Directory from the user lotus.ini
  2841.    ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  2842.  
  2843.    ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
  2844.  
  2845.    'Initialize the loop
  2846.    SectionPref$="section"
  2847.    SectionNumber%=1
  2848.    SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  2849.    SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  2850.  
  2851.    'Using the shared.ini as a data driver I find all the files to be moved
  2852.    DO
  2853.       'Processing for Program Path
  2854.       '***************************
  2855.       lDidProgramMove%=0
  2856.       ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
  2857.  
  2858.       'If the sectionName if Graphics File Filters or Document File Filters 
  2859.       'save it because now FLW installs the graphics filters in the 
  2860.       '\FILTERS subdirectory and does not use Filter Path to find them and 
  2861.       'I have to preserve this
  2862.       IF SectionName$="Graphics File Filters" AND ExistingProgPath$ <> "" THEN
  2863.          GraphicsFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-11)
  2864.       ELSEIF SectionName$="Document File Filters" AND ExistingProgPath$ <> "" THEN
  2865.          DocFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-13)
  2866.       END IF
  2867.          
  2868.  
  2869.       'The nested IFs are used to get around a bug in LotusScript.
  2870.       '** DND: The existing path questions could be packaged in a function
  2871.       '** DND: LCASE should be done once
  2872.       IF ExistingNetCommonDir$ <>"" Then
  2873.          IF ExistingProgPath$ <> "" AND _
  2874.             ExistingProgPath$ <> WinDir$ AND _
  2875.             MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2876.             MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2877.             lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
  2878.  
  2879.             IF lDidProgramMove% <> 0 THEN
  2880.                lDidAnyMove%=1
  2881.                Entry$=Lot_GetEntryFlag(SectionName$+" Program")
  2882.  
  2883.                notused% = Lot_WriteEntry(Entry$,1)            
  2884.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
  2885.                notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
  2886.             END IF
  2887.          END IF
  2888.       ELSE
  2889.          IF ExistingProgPath$ <> "" AND _
  2890.             ExistingProgPath$ <> WinDir$ AND _
  2891.             MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2892.             lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
  2893.  
  2894.             IF lDidProgramMove% <> 0 THEN
  2895.                lDidAnyMove%=1
  2896.                Entry$=Lot_GetEntryFlag(SectionName$+" Program")
  2897.  
  2898.                notused% = Lot_WriteEntry(Entry$,1)            
  2899.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
  2900.                notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
  2901.             END IF
  2902.          END IF
  2903.      END IF
  2904.  
  2905.       'Processing for Data Path
  2906.       '************************
  2907.       lDidDataMove%=0
  2908.       ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
  2909.       IF ExistingNetCommonDir$ <>"" Then
  2910.          IF ExistingDataPath$ <> "" AND _
  2911.             ExistingDataPath$ <> WinDir$ AND _
  2912.             MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2913.             MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2914.             lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
  2915.     
  2916.             IF lDidDataMove% <> 0 THEN
  2917.                lDidAnyMove%=1
  2918.                Entry$=Lot_GetEntryFlag(SectionName$+" Data")
  2919.  
  2920.                notused% = Lot_WriteEntry(Entry$,1)            
  2921.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
  2922.  
  2923.             ELSEIF Entry$="DATALENSDATA" THEN
  2924.                notused% = Lot_WriteEntry(Entry$,1)            
  2925.             END IF
  2926.          END IF
  2927.       ELSE
  2928.          IF ExistingDataPath$ <> "" AND _
  2929.             ExistingDataPath$ <> WinDir$ AND _
  2930.             MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2931.             lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
  2932.     
  2933.             IF lDidDataMove% <> 0 THEN
  2934.                lDidAnyMove%=1
  2935.                Entry$=Lot_GetEntryFlag(SectionName$+" Data")
  2936.  
  2937.                notused% = Lot_WriteEntry(Entry$,1)            
  2938.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
  2939.  
  2940.             ELSEIF Entry$="DATALENSDATA" THEN
  2941.                notused% = Lot_WriteEntry(Entry$,1)            
  2942.             END IF
  2943.          END IF
  2944.        END IF
  2945.    
  2946.       'Processing for User Path
  2947.       '*************************
  2948.       lDidUserMove%=0
  2949.       ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
  2950.       IF ExistingNetCommonDir$ <>"" Then
  2951.          IF ExistingUserPath$ <> "" AND _
  2952.             ExistingUserPath$ <> WinDir$ AND _
  2953.             MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2954.             MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2955.             lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
  2956.             IF lDidUserMove% <> 0 THEN
  2957.                lDidAnyMove%=1
  2958.                Entry$=Lot_GetEntryFlag(SectionName$+" User")
  2959.                notused% = Lot_WriteEntry(Entry$,1)            
  2960.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
  2961.  
  2962.             END IF
  2963.          END IF
  2964.       ELSE
  2965.          IF ExistingUserPath$ <> "" AND _
  2966.             ExistingUserPath$ <> WinDir$ AND _
  2967.             MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  2968.             lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
  2969.             IF lDidUserMove% <> 0 THEN
  2970.                lDidAnyMove%=1
  2971.                Entry$=Lot_GetEntryFlag(SectionName$+" User")
  2972.                notused% = Lot_WriteEntry(Entry$,1)            
  2973.                notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
  2974.  
  2975.             END IF
  2976.          END IF
  2977.  
  2978.       END IF
  2979.  
  2980.       'Processing for Filter Path
  2981.       '**************************
  2982.       lDidFilterMove%=0
  2983.       ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
  2984.       IF ExistingNetCommonDir$ <>"" Then
  2985.          IF ExistingFilterPath$ = "" AND _
  2986.             SectionName$="Graphics File Filters" AND _
  2987.             GraphicsFileFiltersProgPath$<>"" AND _
  2988.             ExistingFilterPath$ <> NewDestDir$ THEN
  2989.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  2990.          ELSEIF ExistingFilterPath$ <> "" AND _
  2991.             ExistingFilterPath$ <> WinDir$ AND _
  2992.             MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  2993.             ExistingFilterPath$ <> NewDestDir$ THEN
  2994.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  2995.          END IF
  2996.       ELSE
  2997.          IF ExistingFilterPath$ = "" AND _
  2998.             SectionName$="Graphics File Filters" AND _
  2999.             GraphicsFileFiltersProgPath$<>"" AND _
  3000.             MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  3001.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  3002.          ELSEIF ExistingFilterPath$ <> "" AND _
  3003.             ExistingFilterPath$ <> WinDir$ AND _
  3004.             MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
  3005.             lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
  3006.          END IF
  3007.       END IF
  3008.  
  3009.       IF lDidFilterMove% <> 0 THEN
  3010.          lDidAnyMove%=1
  3011.          Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
  3012.          notused% = Lot_WriteEntry(Entry$,1)            
  3013.          notused% = FRemoveDir(Lot_TrimEndSlash(ExistingFilterPath$))
  3014.  
  3015.       END IF
  3016.       
  3017.       SectionNumber% = SectionNumber% + 1
  3018.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3019.       SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3020.     LOOP UNTIL SectionName$ = ""
  3021.  
  3022.    IF lDidAnyMove%=1 THEN
  3023.       'Write common Dir
  3024.       CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  3025.       'If the UserPath for spell is not equal with the common dir make it so
  3026.       SpellUserPath$ = GetIniKeyString(gLotusIniPath$, "Spell Checker", "User Path")
  3027.       IF LCASE$(SpellUserPath$) <> gLotusappDir$+"spell" THEN
  3028.           CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path",gLotusappDir$+"spell",cmoOverwrite
  3029.       END IF
  3030.  
  3031.       ' Delete the old common directory
  3032.       notused% = FRemoveDir(Lot_TrimEndSlash(ExistingCommonDir$))
  3033.  
  3034.       Lot_DoShareConsolidation=1
  3035.    ELSE
  3036.       IF Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR) = "" THEN
  3037.          CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  3038.       END IF
  3039.       Lot_DoShareConsolidation=0
  3040.    END IF
  3041. END FUNCTION
  3042. '*************************************************************************
  3043.  
  3044. FUNCTION Lot_UpdateWinIni(Entry$,NewDestDir$) AS INTEGER
  3045. '** Purpose:   Updates the embedding section in win.ini if multimedia
  3046. '**            was consolidated
  3047. '** Author:    MZ
  3048. '** Arguments: Entry$         entry flag
  3049. '**            NewDestDir$    where the files were moved
  3050. '** Returns:   1 
  3051. '*************************************************************************
  3052.    DIM WinIniDir$, NewDestSubDir$, AnNoteEntry$, AnnoteStr$, SoundEntry$
  3053.    DIM SoundStr$, MediaEntry$, MediaStr$, ScreenCamEntry$, ScreenCamStr$
  3054.  
  3055.    WinIniDir$ = MakePath(GetWindowsDir(), gWININI$)
  3056.    IF Entry$ = "MULTIMEDIAPROGRAM" THEN
  3057.       'IF Lot_IsTheFeatureInstalled("SHRMM") = 1 THEN
  3058.  
  3059.          NewDestSubDir$=NewDestDir$+"multimed\"
  3060.          AnNoteEntry$ = GetIniKeyString(WinIniDir$,"embedding", "LotusAnNote")
  3061.          IF AnNoteEntry$<>"" AND DoesFileExist(NewDestSubDir$+"ANNOTATE.EXE",femExists)=1 THEN
  3062.             AnNoteStr$ = "Lotus Annotator Note,Lotus Annotator Note,"+NewDestSubDir$+"ANNOTATE.EXE,picture"
  3063.             CreateIniKeyValue WinIniDir$, "embedding", "LotusAnNote", AnNoteStr$, cmoOverwrite
  3064.          END IF
  3065.          SoundEntry$ = GetIniKeyString(WinIniDir$,"embedding", "LotusSound")
  3066.          IF SoundEntry$<>"" AND DoesFileExist(NewDestSubDir$+"LOTUSSND.EXE",femExists)=1 THEN
  3067.             SoundStr$ = "Lotus Sound,Lotus Sound,"+NewDestSubDir$+"LOTUSSND.EXE,picture"
  3068.             CreateIniKeyValue WinIniDir$, "embedding", "LotusSound", SoundStr$, cmoOverwrite
  3069.          END IF
  3070.          MediaEntry$ = GetIniKeyString(WinIniDir$,"embedding", "LotusMedia")
  3071.          IF MediaEntry$<>"" AND DoesFileExist(NewDestSubDir$+"MEDMAN.EXE",femExists)=1 THEN
  3072.             MediaStr$ = "Lotus Media,Lotus Media,"+NewDestSubDir$+"MEDMAN.EXE,picture"
  3073.             CreateIniKeyValue WinIniDir$, "embedding", "LotusMedia", MediaStr$, cmoOverwrite
  3074.          END IF
  3075.       'END IF
  3076.       'IF Lot_IsTheFeatureInstalled("SHRSCRNCAM") = 1 THEN
  3077.          ScreenCamEntry$ = GetIniKeyString(WinIniDir$,"embedding", "ScreenCamMovie")
  3078.          IF ScreenCamEntry$<>"" AND DoesFileExist(NewDestSubDir$+"SCRNCAM.EXE",femExists)=1 THEN
  3079.             ScreenCamStr$ = "Lotus ScreenCam Movie,Lotus ScreenCam Movie,"+NewDestSubDir$+"SCRNCAM.EXE,picture"
  3080.             CreateIniKeyValue WinIniDir$, "embedding", "ScreenCamMovie", ScreenCamStr$, cmoOverwrite
  3081.          END IF
  3082.       'END IF
  3083.  
  3084.    END IF
  3085.    Lot_UpdateWinIni=1
  3086. END FUNCTION
  3087. '*************************************************************************
  3088. FUNCTION Lot_IsExistingLotusappDirValid(BYVAL ExistingCommonDir$) AS INTEGER
  3089. '** Purpose:   Determines if the ExistingCommonDir$ exists, is writable
  3090. '**            is not empty 
  3091. '** Author:    MZ
  3092. '** Arguments: ExistingCommonDir$
  3093. '** Returns:   1 or 0 if the dir is valid or not
  3094. '*************************************************************************
  3095.    DIM localValidCommDir%, networkCommDir$, notEmptySpell%, notEmptyDatalens%
  3096.    DIM localExistingCommonDir$
  3097.    
  3098.    if ExistingCommonDir$ <> "" then
  3099.       localExistingCommonDir$ = Lot_TrimEndSlash(ExistingCommonDir$)
  3100.    else
  3101.       localExistingCommonDir$ = ExistingCommonDir$
  3102.    end if 
  3103.  
  3104.    networkCommDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
  3105.    IF localExistingCommonDir$ <> "" THEN
  3106.       IF ValidatePath(localExistingCommonDir$) <> FALSE THEN
  3107.          IF DoesDirExist(localExistingCommonDir$) <> 0 THEN
  3108.             IF DoesDirExist(Lot_TrimEndSlash(localExistingCommonDir$)+"\spell") <> 0 THEN
  3109.                notEmptySpell% = 1
  3110.              '  IF Lot_Dir(Lot_TrimEndSlash(localExistingCommonDir$)+"\spell\*.*") <> "" THEN
  3111.              '     notEmptySpell% = 1
  3112.              '  ELSE
  3113.              '     notEmptySpell% = 0
  3114.              '  END IF
  3115.             ELSE
  3116.                notEmptySpell% = 0
  3117.             END IF
  3118.             IF DoesDirExist(Lot_TrimEndSlash(localExistingCommonDir$)+"\datalens") <> 0 THEN
  3119.                IF Lot_Dir(Lot_TrimEndSlash(localExistingCommonDir$)+"\datalens\*.*") <> "" THEN
  3120.                   notEmptyDatalens% = 1
  3121.                ELSE
  3122.                   notEmptyDatalens% = 0
  3123.                END IF
  3124.             ELSE
  3125.                notEmptyDatalens% = 0
  3126.             END IF
  3127.  
  3128.             IF ExistingCommonDir$ <> networkCommDir$ AND _
  3129.                IsDirWritable(ExistingCommonDir$) <> 0 AND _
  3130.                (Lot_Dir(Lot_TrimEndSlash(localExistingCommonDir$)+"\*.*") <> "" OR _
  3131.                notEmptySpell% = 1 OR _
  3132.                notEmptyDatalens% = 1) THEN
  3133.                localValidCommDir% = 1
  3134.                SetSymbolValue SYM_LOTUSAPPDIR$,LCASE$(localExistingCommonDir$)
  3135.                Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
  3136.                DL_SetNotesDataPath
  3137.                DL_SetOraclePath
  3138.             ELSE
  3139.                localValidCommDir% = 0
  3140.             END IF
  3141.          ELSE
  3142.             localValidCommDir% = 0
  3143.          END IF
  3144.       ELSE
  3145.          localValidCommDir% = 0
  3146.       END IF
  3147.    ELSE
  3148.       localValidCommDir% = 0
  3149.    END IF
  3150.    Lot_IsExistingLotusappDirValid=localValidCommDir% 
  3151. END FUNCTION
  3152.  
  3153. FUNCTION Lot_IsConsolidationNeeded(gLotusIniPath$,NetworkIns$) AS LONG
  3154. '** Purpose:   Determines if the consolidation of the Lotusapp directory
  3155. '**            is needed and looks for the files referenced by lotus.ini 
  3156. '**            that have to be consolidated calculating the total space needed in Kb
  3157. '**            if lotusapp.ini exists it calls Lot_GetSizeOfFilesInLotusappIni
  3158. '** Author:    MZ
  3159. '** Arguments: gLotusIniPath$ where LOTUS.INI file is
  3160. '**            NetworkIns$  
  3161. '** Returns:   gConsolidateSize& the total size of the files to be moved
  3162. '*************************************************************************
  3163.    DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, ExistingNetCommonDir$
  3164.    DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
  3165.    DIM ExistingProgPath$, ExistingDataPath$, ExistingUserPath$, ExistingFilterPath$
  3166.    DIM LotusAppIniPath$
  3167.  
  3168.    'Initialize return value of the size
  3169.    gConsolidateSize&=CLNG(0)
  3170.  
  3171.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  3172.  
  3173.  
  3174.    WinDir$=GetWindowsDir()
  3175.    'print"WinDir$", WinDir$
  3176.  
  3177.    'Get the Common Directory and Net Common Directory from the user lotus.ini
  3178.    ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  3179.    'print "ExistingCommonDir$ in consolidation",ExistingCommonDir$
  3180. '   ExistingCommonDir$ = GetIniKeyString(gLotusIniPath$,"Lotus Applications", "Common Directory")
  3181.  
  3182.    ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
  3183.    'print "ExistingNetCommonDir$ in consol..",ExistingNetCommonDir$
  3184.  
  3185.    'validate the ExistingCommonDir$ and set the global ValidCommDir%
  3186.    'A valid ExistingCommonDir$ is an existing dir with write access
  3187.    ValidCommDir% = Lot_IsExistingLotusappDirValid(ExistingCommonDir$)
  3188.    'print "ValidCommDir",STR(ValidCommDir%)
  3189.    'Initialize the loop
  3190.    SectionPref$="section"
  3191.    SectionNumber%=1
  3192.    SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3193.    SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3194.  
  3195.    'Using the shared.ini as a data driver I find all the files to be consolidate
  3196.    DO
  3197.  
  3198.       '** DND: Path checking can be made a function
  3199.  
  3200.       'Processing for Program Path
  3201.       '***************************
  3202.       ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
  3203.       'print "ExistingProgPath$",ExistingProgPath$
  3204.  
  3205.       IF LEN(ExistingProgPath$) > 0 THEN
  3206.       'print "progpath len > 0"
  3207.          IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
  3208.             IF (ExistingProgPath$ <> WinDir$ AND _
  3209.                MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3210.                MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3211.                ValidCommDir% <> 1 THEN
  3212.                gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
  3213.                'print STR(gConsolidateSize&),"gConsolidateSize& in if",ExistingProgPath$
  3214.             END IF
  3215.          ELSE
  3216.             IF ExistingCommonDir$ <> "" THEN
  3217.                IF (ExistingProgPath$ <> WinDir$ AND _
  3218.                   MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3219.                   ValidCommDir% <> 1 THEN
  3220.                   gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
  3221.                   'print STR(gConsolidateSize&),"gConsolidateSize& in else",ExistingProgPath$
  3222.                END IF
  3223.             ELSE
  3224.                IF (ExistingProgPath$ <> WinDir$ AND _
  3225.                   MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
  3226.                   gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
  3227.                   'print STR(gConsolidateSize&),"gConsolidateSize& in second else",ExistingProgPath$
  3228.                END IF
  3229.             END IF 
  3230.          END IF 
  3231.       END IF
  3232.       'Processing for Data Path
  3233.       '************************
  3234.       ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
  3235.       'print ExistingDataPath$, "ExistingDataPath$"
  3236.       IF LEN(ExistingDataPath$) > 0 THEN
  3237.          'print "datapath len > 0"
  3238.          IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
  3239.             IF (ExistingDataPath$ <> WinDir$ AND _
  3240.                MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3241.                MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3242.                ValidCommDir% <> 1 THEN
  3243.  
  3244.                gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
  3245.                'print STR(gConsolidateSize&),"gConsolidateSize& in if datapath"
  3246.             END IF
  3247.          ELSE
  3248.             IF ExistingCommonDir$ <> "" THEN
  3249.                IF (ExistingDataPath$ <> WinDir$ AND _
  3250.                   MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3251.                   ValidCommDir% <> 1 THEN
  3252.                   gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
  3253.                   'print STR(gConsolidateSize&),"gConsolidateSize& in else datapath"
  3254.                END IF
  3255.             ELSE
  3256.                IF (ExistingDataPath$ <> WinDir$ AND _
  3257.                   MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
  3258.                   gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
  3259.                   'print STR(gConsolidateSize&),"gConsolidateSize& in else datapath"
  3260.                END IF
  3261.             END IF
  3262.          END IF
  3263.       END IF
  3264.       'Processing for User Path
  3265.       '************************
  3266.       ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
  3267.       'print ExistingUserPath$,"ExistingUserPath$"
  3268.       IF LEN(ExistingUserPath$) > 0 THEN
  3269.          'print "userpath len > 0"
  3270.          IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
  3271.             IF (ExistingUserPath$ <> WinDir$ AND _
  3272.                MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3273.                MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3274.                ValidCommDir% <> 1 THEN
  3275.  
  3276.                gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
  3277.                'print STR(gConsolidateSize&),"gConsolidateSize& in if userpath"
  3278.             END IF
  3279.          ELSE
  3280.             IF ExistingCommonDir$ <> "" THEN
  3281.               IF (ExistingUserPath$ <> WinDir$ AND _
  3282.                  MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3283.                  ValidCommDir% <> 1 THEN
  3284.                  gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
  3285.                  'print STR(gConsolidateSize&),"gConsolidateSize& in else userpath"
  3286.               END IF
  3287.            ELSE
  3288.               IF (ExistingUserPath$ <> WinDir$ AND _
  3289.                  MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
  3290.                  gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
  3291.                  'print STR(gConsolidateSize&),"gConsolidateSize& in else userpath"
  3292.               END IF
  3293.             END IF
  3294.          END IF
  3295.       END IF
  3296.       'Processing for Filter Path
  3297.       '*************************** 
  3298.       ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
  3299.       'print ExistingFilterPath$, "ExistingFilterPath$"
  3300.       IF LEN(ExistingFilterPath$) > 0 THEN
  3301.          'print "filterpath len > 0"
  3302.          IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
  3303.             IF (ExistingFilterPath$ <> WinDir$ AND _
  3304.                MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3305.                MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3306.                ValidCommDir% <> 1 THEN
  3307.  
  3308.                gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
  3309.                'print STR(gConsolidateSize&),"gConsolidateSize& in if filterpath"
  3310.             END IF
  3311.          ELSE
  3312.             IF ExistingCommonDir$ <> "" THEN
  3313.                IF (ExistingFilterPath$ <> WinDir$ AND _
  3314.                   MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3315.                   ValidCommDir% <> 1 THEN
  3316.                   gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
  3317.                   'print STR(gConsolidateSize&),"gConsolidateSize& in else filterpath"
  3318.                END IF
  3319.             ELSE
  3320.                IF (ExistingFilterPath$ <> WinDir$ AND _
  3321.                   MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
  3322.                   gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
  3323.                   'print STR(gConsolidateSize&),"gConsolidateSize& in else filterpath"
  3324.                END IF
  3325.             END IF
  3326.          END IF
  3327.       END IF
  3328.       
  3329.       SectionNumber% = SectionNumber% + 1
  3330.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3331.       SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3332.    LOOP UNTIL SectionName$ = ""
  3333.  
  3334.    'If lotusapp.ini exists collect the files sizes referenced in it
  3335.    LotusappIniPath$ = MakePath(ExistingCommonDir$,gLOTUSAPPINI$)
  3336.  
  3337.    IF DoesFileExist(LotusappIniPath$, femExists)=1 THEN
  3338.       gConsolidateSize&=Lot_GetSizeOfFilesInLotusappIni(LotusappIniPath$,ExistingCommonDir$,ExistingNetCommonDir$,gConsolidateSize&)
  3339.    END IF
  3340.  
  3341.    Lot_IsConsolidationNeeded=gConsolidateSize&
  3342. END FUNCTION
  3343. '*************************************************************************
  3344.  
  3345. FUNCTION Lot_ChkLotusIniSizePath(PathToCheck$,ExistingNetCommonDir$,WinDir$,newLotusappDir$) AS INTEGER
  3346. '** Purpose:   Checks the path if it should be added to the size
  3347. '** Author:    MZ
  3348. '** Arguments: PathToCheck$
  3349. '**            ExistingNetCommonDir$
  3350. '**            WinDir$
  3351. '**            newLotusappDir$ the new destination for the files
  3352. '** Returns:   1 if the Lot_GetFileSize() should be called
  3353. '**            0 if should not
  3354. '*************************************************************************
  3355. DIM res%
  3356.       res%=0 
  3357.       IF ExistingNetCommonDir$ <>"" THEN
  3358.          IF PathToCheck$ <> "" AND _
  3359.             PathToCheck$ <> WinDir$ AND _
  3360.             MID$(PathToCheck$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3361.             MID$(PathToCheck$,1,1) <> MID$(newLotusappDir$,1,1) THEN
  3362.             res%=1
  3363.          END IF
  3364.       ELSE
  3365.          IF PathToCheck$ <> "" AND _
  3366.             PathToCheck$ <> WinDir$ AND _
  3367.             MID$(PathToCheck$,1,1) <> MID$(newLotusappDir$,1,1) THEN
  3368.             res%=1
  3369.          END IF
  3370.       END IF 
  3371.       Lot_ChkLotusIniSizePath=res%
  3372. END FUNCTION
  3373. '*************************************************************************
  3374.  
  3375. FUNCTION Lot_GetInLotusIniSizeOfFilesToMove(gLotusIniPath$,newLotusappDir$,gMoveSize&) AS LONG
  3376. '** Purpose:   Reads lotus.ini and calculates the size needed to move the
  3377. '**            found files
  3378. '** Author:    MZ
  3379. '** Arguments: gLotusIniPath$ where LOTUS.INI file is
  3380. '**            newLotusappDir$ the new destination for the files
  3381. '**            gMoveSize&         
  3382. '** Returns:   gMoveSize& the total size of the files to be moved
  3383. '*************************************************************************
  3384.    DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, ExistingNetCommonDir$
  3385.    DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
  3386.    DIM ExistingProgPath$, ExistingDataPath$, ExistingUserPath$, ExistingFilterPath$
  3387.    DIM LotusAppIniPath$,chk%
  3388.  
  3389.    '** DND: Paths should all be lower case!
  3390.  
  3391.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  3392.    'print "The path to shared.ini",gSharedIniFile$
  3393.  
  3394.    WinDir$=GetWindowsDir()
  3395.    'print "WinDir$", WinDir$
  3396.  
  3397.    'print "gLotusIniPath$",gLotusIniPath$
  3398.    'Get the Common Directory and Net Common Directory from the user lotus.ini
  3399.    ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  3400.    'print "ExistingCommonDir$",ExistingCommonDir$ 
  3401.    ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
  3402.    'print "ExistingNetCommonDir$",ExistingNetCommonDir$ 
  3403.  
  3404.    'Initialize the loop
  3405.    SectionPref$="section"
  3406.    SectionNumber%=1
  3407.    SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3408.    'print "SectionTag$",SectionTag$
  3409.    'print "gSharedIniFile$ where used",gSharedIniFile$
  3410.    SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3411.    'print "SectionName$",SectionName$
  3412.  
  3413.    'Using the shared.ini as a data driver I find all the files to be moved
  3414.    DO
  3415.  
  3416.       '** DND: Path checking can be made a function
  3417.  
  3418.       'Processing for Program Path
  3419.       '***************************
  3420.       ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
  3421.       'print ExistingProgPath$,"ExistingProgPath$"
  3422.       chk%=Lot_ChkLotusIniSizePath(ExistingProgPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3423.       IF chk% = 1 THEN
  3424.          gMoveSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3425.          'print STR(gMoveSize&),"gMoveSize& in prog path"
  3426.       END IF 
  3427.  
  3428.       'Processing for Data Path
  3429.       '************************
  3430.       ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
  3431.       'print ExistingDataPath$, "ExistingDataPath$"
  3432.       chk%=Lot_ChkLotusIniSizePath(ExistingDataPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3433.       IF chk% = 1 THEN
  3434.          gMoveSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3435.          'print STR(gMoveSize&),"gMoveSize& in data path"
  3436.       END IF 
  3437.    
  3438.       'Processing for User Path
  3439.       '************************
  3440.       ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
  3441.       'print ExistingUserPath$,"ExistingUserPath$"
  3442.       chk%=Lot_ChkLotusIniSizePath(ExistingUserPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3443.       IF chk% = 1 THEN
  3444.          gMoveSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3445.          'print STR(gMoveSize&),"gMoveSize& in user path"
  3446.       END IF 
  3447.  
  3448.       'Processing for Filter Path
  3449.       '*************************** 
  3450.       ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
  3451.       'print ExistingFilterPath$, "ExistingFilterPath$"
  3452.       chk%=Lot_ChkLotusIniSizePath(ExistingFilterPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3453.       IF chk% = 1 THEN
  3454.          gMoveSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3455.          'print STR(gMoveSize&),"gMoveSize& in filter path"
  3456.       END IF 
  3457.  
  3458.       SectionNumber% = SectionNumber% + 1
  3459.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3460.       SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3461.    LOOP UNTIL SectionName$ = ""
  3462.  
  3463.    Lot_GetInLotusIniSizeOfFilesToMove=gMoveSize&
  3464. END FUNCTION
  3465.  
  3466. '*************************************************************************
  3467. FUNCTION Lot_GetSizeOfFilesInLotusappIni(LotusappIniPath$,ExistingCommonDir$,ExistingNetCommonDir$,gConsolidateSize&) AS LONG
  3468. '** Purpose:   Determines if the consolidation of the Lotusapp directory
  3469. '**            is needed and looks for the files referenced by lotusapp.ini
  3470. '**            that have to be consolidated calculating the total space needed in Kb
  3471. '** Author:    MZ
  3472. '** Arguments: LotusappIniPath$ where LOTUSAPP.INI file is
  3473. '**            ExistingCommonDir$  
  3474. '**            ExistingNetCommonDir$  
  3475. '**            gConsolidateSize& the total size of the files to be moved
  3476. '** Returns:   gConsolidateSize& the total size of the files to be moved
  3477. '*************************************************************************
  3478.    DIM gSharedIniFile$, WinDir$, SectionPref$
  3479.    DIM SectionNumber%, SectionTag$, SectionName$
  3480.      DIM recordedpath$, existingprogpath$, existingdatapath$, existinguserpath$
  3481.      DIM existingfilterpath$
  3482.  
  3483.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  3484.  
  3485.    WinDir$=GetWindowsDir()
  3486.  
  3487.  
  3488.    'Initialize the loop
  3489.    SectionPref$="section"
  3490.    SectionNumber%=1
  3491.    SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3492.    SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3493.  
  3494.    'Using the shared.ini as a data driver I find all the files to be consolidate
  3495.    DO
  3496.  
  3497.       '** DND: Path checking can be made a function
  3498.  
  3499.       'Processing for Program Path
  3500.       '***************************
  3501.       'print SectionName$,"SectionName$ ",LotusappIniPath$,"LotusappIniPath$"
  3502.  
  3503.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
  3504.       'print "RecordedPath$ prog",RecordedPath$
  3505.       ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  3506.  
  3507.       'print ExistingProgPath$,"ExistingProgPath$"
  3508.       IF ExistingNetCommonDir$ <>"" THEN
  3509.          IF (ExistingProgPath$ <> "" AND _
  3510.             ExistingProgPath$ <> WinDir$ AND _
  3511.             MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3512.             MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3513.             ValidCommDir% <> 1 THEN
  3514.             gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
  3515.             'print STR(gConsolidateSize&),"gConsolidateSize&"
  3516.          END IF
  3517.       ELSE
  3518.          IF (ExistingProgPath$ <> "" AND _
  3519.             ExistingProgPath$ <> WinDir$ AND _
  3520.             MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3521.             ValidCommDir% <> 1 THEN
  3522.             gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
  3523.             'print STR(gConsolidateSize&),"gConsolidateSize&"
  3524.          END IF
  3525.       END IF 
  3526.       'Processing for Data Path
  3527.       '************************
  3528.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
  3529.       'print "RecordedPath$ data",RecordedPath$
  3530.       ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  3531.       'print ExistingDataPath$,"ExistingDataPath$"
  3532.  
  3533.       IF ExistingNetCommonDir$ <>"" THEN
  3534.          IF (ExistingDataPath$ <> "" AND _
  3535.             ExistingDataPath$ <> WinDir$ AND _
  3536.             MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3537.             MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3538.             ValidCommDir% <> 1 THEN
  3539.             gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
  3540.          END IF
  3541.       ELSE
  3542.          IF (ExistingDataPath$ <> "" AND _
  3543.             ExistingDataPath$ <> WinDir$ AND _
  3544.             MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3545.             ValidCommDir% <> 1 THEN
  3546.             gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
  3547.          END IF
  3548.       END IF
  3549.    
  3550.       'Processing for User Path
  3551.       '************************
  3552.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "User Path")
  3553.       ExistingUserPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  3554.  
  3555.       IF ExistingNetCommonDir$ <>"" THEN
  3556.          IF (ExistingUserPath$ <> "" AND _
  3557.             ExistingUserPath$ <> WinDir$ AND _
  3558.             MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3559.             MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3560.             ValidCommDir% <> 1 THEN
  3561.             gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
  3562.          END IF
  3563.       ELSE
  3564.          IF (ExistingUserPath$ <> "" AND _
  3565.             ExistingUserPath$ <> WinDir$ AND _
  3566.             MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3567.             ValidCommDir% <> 1 THEN
  3568.             gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
  3569.          END IF
  3570.       END IF
  3571.  
  3572.       'Processing for Filter Path
  3573.       '*************************** 
  3574.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Filter Path")
  3575.       ExistingFilterPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
  3576.  
  3577.       IF ExistingNetCommonDir$ <>"" THEN
  3578.          IF (ExistingFilterPath$ <> "" AND _
  3579.             ExistingFilterPath$ <> WinDir$ AND _
  3580.             MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
  3581.             MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3582.             ValidCommDir% <> 1 THEN
  3583.             gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
  3584.          END IF
  3585.       ELSE
  3586.          IF (ExistingFilterPath$ <> "" AND _
  3587.             ExistingFilterPath$ <> WinDir$ AND _
  3588.             MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
  3589.             ValidCommDir% <> 1 THEN
  3590.             gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
  3591.          END IF
  3592.       END IF
  3593.       
  3594.       SectionNumber% = SectionNumber% + 1
  3595.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3596.       SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3597.    LOOP UNTIL SectionName$ = ""
  3598.  
  3599.    Lot_GetSizeOfFilesInLotusappIni=gConsolidateSize&
  3600. END FUNCTION
  3601. '*************************************************************************
  3602.  
  3603. PUBLIC FUNCTION Lot_GetTheShareToolsSizeToMove (newLotusapp$) AS LONG
  3604. '** Purpose:    Read the lotus.ini and lotusapp.ini 
  3605. '**             Identify what product edition mix (standard server or node) 
  3606. '**             there is in the user environment and adds the sizes of the
  3607. '**             files to be moved
  3608. '** Author:     MZ
  3609. '** Arguments:  newLotusapp$   The new destination
  3610. '** Returns:    gMoveSize&     the size
  3611. '*************************************************************************
  3612.    DIM NetworkIns$, ret%,ret1%, SaveCursor&, ExistingCommonDir$, LotusAppIniPath$
  3613.    DIM result%, secResult%, FLWpath$, ImprovPath$, RC$, notused%,ExistingNetCommonDir$
  3614.  
  3615.    'Initialize return value of the size
  3616.    gMoveSize&=CLNG(0)
  3617.    '** Execute the rest only if there is a registered product that supports 
  3618.    '** share Prods(i%)Share=1
  3619.    IF Lot_AreShareToolsSupported()=1 THEN
  3620.       NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  3621.  
  3622.       IF NetworkIns$ <> gSERVER$ THEN
  3623.          'Find Lotus.ini
  3624.          ret% = DoesFileExist(gLotusIniPath$, femExists)
  3625.  
  3626.          IF ret% <> 0 THEN
  3627.             'Find the size of the move as recorded in the lotus.ini
  3628.             SaveCursor&=ShowWaitCursor()
  3629.             gMoveSize&=Lot_GetInLotusIniSizeOfFilesToMove(gLotusIniPath$,newLotusapp$,gMoveSize&)
  3630.             RestoreCursor SaveCursor&
  3631.  
  3632.             ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  3633.             LotusappIniPath$=MakePath(ExistingCommonDir$,gLOTUSAPPINI$)
  3634.             'print "LotusappIniPath$ after creation",LotusappIniPath$
  3635.  
  3636.             'Find Lotusapp.ini
  3637.             ret1% = DoesFileExist(gLotusappIniPath$, femExists)
  3638.             IF ret1% <> 0 THEN
  3639.                'Find the size of the move as recorded in the lotus.ini
  3640.                SaveCursor&=ShowWaitCursor()
  3641.                ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
  3642.  
  3643.                gMoveSize&=Lot_GetInLotusappIniSizeOfFilesToMove(gLotusIniPath$,ExistingCommonDir$,ExistingNetCommonDir$,newLotusapp$,gMoveSize&)
  3644.                RestoreCursor SaveCursor&
  3645.             END IF 'lotusapp.ini exists
  3646.          END IF 'lotus.ini exists
  3647.       END IF  'not server install
  3648.    End IF  'share tools are supported
  3649. Lot_GetTheShareToolsSizeToMove=gMoveSize&
  3650. END FUNCTION
  3651. '*************************************************************************
  3652. FUNCTION Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$) AS STRING
  3653. '** Purpose:   Builds a path from an entry in lotusapp.ini
  3654. '** Author:    MZ
  3655. '** Arguments: RecordesPath$ recorded in LOTUSAPP.INI
  3656. '**            ExistingCommonDir$  
  3657. '**            WimDir$
  3658. '** Returns:   the resulted path
  3659. '*************************************************************************
  3660. DIM ResultPath$
  3661.       IF RecordedPath$ = "" THEN
  3662.         ResultPath$ =""
  3663.       ELSEIF RecordedPath$ = ".\" THEN
  3664.         ResultPath$ = ExistingCommonDir$
  3665.       ELSEIF LCASE$(RecordedPath$)+"\" = WinDir$ THEN
  3666.         ResultPath$ = WinDir$
  3667.       ELSE 
  3668.         ResultPath$ = ExistingCommonDir$+LCASE$(MID$(RecordedPath$,3))
  3669.       END IF
  3670. Lot_MakeAPathFromLotusappIni=ResultPath$
  3671. END FUNCTION
  3672. '*************************************************************************
  3673.  
  3674. FUNCTION Lot_GetInLotusappIniSizeOfFilesToMove(LotusappIniPath$,ExistingCommDir$,ExistingNetCommonDir$,newLotusappDir$,gMoveSize&) AS LONG
  3675. '** Purpose:   Looks for the files referenced by lotusapp.ini
  3676. '**            that have to be moved calculating the total space needed in Kb
  3677. '** Author:    MZ
  3678. '** Arguments: LotusappIniPath$ where LOTUSAPP.INI file is
  3679. '**            ExistingCommonDir$  
  3680. '**            ExistingNetCommonDir$  
  3681. '**            newLotusappDir$  
  3682. '**            gMoveSize& the total size of the files to be moved
  3683. '** Returns:   gMoveSize& the total size of the files to be moved
  3684. '*************************************************************************
  3685.    DIM gSharedIniFile$, WinDir$, SectionPref$
  3686.    DIM SectionNumber%, SectionTag$, SectionName$
  3687.    DIM recordedpath$, existingprogpath$, existingdatapath$, existinguserpath$
  3688.    DIM existingfilterpath$,chk%
  3689.  
  3690.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  3691.    WinDir$=GetWindowsDir()
  3692.  
  3693.    'Initialize the loop
  3694.    SectionPref$="section"
  3695.    SectionNumber%=1
  3696.    SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3697.    SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3698.  
  3699.    'Using the shared.ini as a data driver I find all the files to be consolidate
  3700.    DO
  3701.  
  3702.       '** DND: Path checking can be made a function
  3703.  
  3704.       'Processing for Program Path
  3705.       '***************************
  3706.       'print SectionName$,"SectionName$ ",LotusappIniPath$,"LotusappIniPath$"
  3707.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
  3708.       'print "RecordedPath$ prog",RecordedPath$
  3709.       ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
  3710.       'print ExistingProgPath$,"ExistingProgPath$"
  3711.       chk%=Lot_ChkLotusIniSizePath(ExistingProgPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3712.       IF chk% = 1 THEN
  3713.          gMoveSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3714.          'print STR(gMoveSize&),"gMoveSize& in prog path"
  3715.       END IF 
  3716.  
  3717.       'Processing for Data Path
  3718.       '************************
  3719.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
  3720.       'print "RecordedPath$ data",RecordedPath$
  3721.       ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
  3722.       'print ExistingDataPath$,"ExistingDataPath$"
  3723.  
  3724.       chk%=Lot_ChkLotusIniSizePath(ExistingDataPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3725.       IF chk% = 1 THEN
  3726.          gMoveSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3727.          'print STR(gMoveSize&),"gMoveSize& in data path"
  3728.       END IF 
  3729.  
  3730.      'Processing for User Path
  3731.       '************************
  3732.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "User Path")
  3733.       ExistingUserPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
  3734.       'print ExistingUserPath$,"ExistingUserPath$"
  3735.       chk%=Lot_ChkLotusIniSizePath(ExistingUserPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3736.       IF chk% = 1 THEN
  3737.          gMoveSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3738.          'print STR(gMoveSize&),"gMoveSize& in user path"
  3739.       END IF 
  3740.  
  3741.       'Processing for Filter Path
  3742.       '*************************** 
  3743.       RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Filter Path")
  3744.       ExistingFilterPath$ =Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
  3745.       chk%=Lot_ChkLotusIniSizePath(ExistingFilterPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
  3746.       IF chk% = 1 THEN
  3747.          gMoveSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
  3748.          'print STR(gMoveSize&),"gMoveSize& in filter path"
  3749.       END IF 
  3750.  
  3751.       SectionNumber% = SectionNumber% + 1
  3752.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  3753.       SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
  3754.    LOOP UNTIL SectionName$ = ""
  3755.  
  3756.    Lot_GetInLotusappIniSizeOfFilesToMove=gMoveSize&
  3757. END FUNCTION
  3758. '************************************************************************
  3759.  
  3760. FUNCTION Lot_AddSectionToNodeList(DestPath$,EntryName$) AS INTEGER
  3761. '** Purpose:   This function finds out if the sections were installed by the 
  3762. '**            network administrator (by reading Install.ini) and adds them
  3763. '**            to the copy list
  3764. '** Author:    MZ
  3765. '** Arguments: SourcePath$,
  3766. '**            gSharedIniFile$,
  3767. '**            EntryName$,
  3768. '**            DestPath$
  3769. '** Symbols Out: REFRESHEDENTRIES
  3770. '** Returns:   success
  3771. '*************************************************************************
  3772.    DIM entryflag$, currchpt$, sharedid$, chapterspec$, source$, dest$
  3773.    DIM FeatureName$,WinDir$,WinSysDir$
  3774.  
  3775.  
  3776.    'Get the EntryFlag$ from the EntryName$
  3777.    WinDir$=GetWindowsDir()
  3778.    WinSysDir$ = GetSymbolValue(SYM_WINSYSDIR$)
  3779.  
  3780.    EntryFlag$=Lot_GetEntryFlag(EntryName$)
  3781.    'print "Source$ in Lot_addSectionToNodeList()", Source$
  3782.    'Do not process the lotus.BCF file
  3783.    IF EntryFlag$ <> "DATALENSDATA" THEN
  3784.  
  3785.      CurrChpt$ = Lot_GetFirst("", F_SHARE) 
  3786.      WHILE (CurrChpt$ <> "")
  3787.          SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE)   
  3788.          FeatureName$ = Lot_GetChapterValStr(CurrChpt$, F_KEYWORD)
  3789.          IF SharedID$ = EntryFlag$ THEN
  3790.             IF Lot_IsTheFeatureInstalled(FeatureName$) = 1 AND _
  3791.                Lot_GetChapterValStr(CurrChpt$, F_DESTDIR) <> WinDir$ AND _
  3792.                Lot_GetChapterValStr(CurrChpt$, F_DESTDIR) <> WinSysDir$  THEN
  3793.                ChapterSpec$ = Lot_GetChapterValStr(CurrChpt$, F_NOTHING)
  3794.                'strip the subdirectories from the path
  3795.                Source$ = Lot_GetNetLotusappSource(CurrChpt$)
  3796.                Dest$ = Lot_GetLocalLotusappDest(EntryFlag$,DestPath$)
  3797.                'print "Source$ in Lot_addSectionToNodeList()", Source$
  3798.                'print "Dest$ in Lot_addSectionToNodeList()", Dest$
  3799.                'print "ChapterSpec$ in Lot_addSectionToNodeList()", ChapterSpec$
  3800.                AddSectionFilesToCopyList ChapterSpec$,Source$,Dest$
  3801.                'This list is needed to write the lotus.ini file
  3802.                AddListItem "REFRESHEDENTRIES", EntryFlag$
  3803.             END IF
  3804.          END IF
  3805.         CurrChpt$ = Lot_GetNext() 
  3806.      WEND
  3807.    END IF
  3808. Lot_AddSectionToNodeList = SUCCESS
  3809. END FUNCTION
  3810.  
  3811. DIM SHARESUBDIR LIST AS STRING
  3812. DIM SHARESUBDIRINIT%
  3813.  
  3814. '*************************************************************************
  3815. FUNCTION Lot_GetLocalLotusappDest(EntryFlag$,DestPath$) AS STRING
  3816. '** Purpose:   This function strips the subdirectory depending on EntryFlag$
  3817. '** Author:    MZ, JMD
  3818. '** Arguments: EntryName$    Share keyword
  3819. '**            DestPath$    Path to be possibly stripped
  3820. '** Returns:   Stripped path
  3821. '** NOTE: DestPath argument has NO trailing backslash
  3822. '*************************************************************************
  3823.    DIM SubDestPath$,lenDest%,lenSub%,ExistingFilterPath$ 
  3824.    DIM s1$,s2$ 
  3825.  
  3826. IF SHARESUBDIRINIT = 0 Then
  3827.     SHARESUBDIRINIT = 1
  3828.     SHARESUBDIR("SPELLCHECKERPROGRAM")=                "spell\"   
  3829.     SHARESUBDIR("SPELLCHECKERDATA") =            "spell\"   
  3830.     SHARESUBDIR("SPELLCHECKERUSER") =            "spell\"   
  3831.     SHARESUBDIR("TOOLSPROGRAM") =                "tools\"   
  3832.     SHARESUBDIR("TOOLSDATA") =                   ""           
  3833.     SHARESUBDIR("CONTAINERFILEPROGRAM") =        ""           
  3834.     SHARESUBDIR("INFOBOXPROGRAM") =              ""           
  3835.     SHARESUBDIR("ICONPALETTEPROGRAM") =          ""           
  3836.     SHARESUBDIR("STATUSBARPROGRAM") =            "" 
  3837.     SHARESUBDIR("DATALENSPROGRAM") =             "datalens\"
  3838.     SHARESUBDIR("DATALENSDATA") =                "datalens\"
  3839.     SHARESUBDIR("DIALOGEDITORPROGRAM") =         "dialoged\"
  3840.     SHARESUBDIR("USERNAMESERVICESPROGRAM") =     "uns\"     
  3841.     SHARESUBDIR("MULTIMEDIAPROGRAM") =           "multimed\"
  3842.     SHARESUBDIR("MULTIMEDIADATA") =              "multimed\"
  3843.     SHARESUBDIR("GRAPHICSFILEFILTERSPROGRAM") =  "filters\" 
  3844.     SHARESUBDIR("GRAPHICSFILEFILTERSFILTER") =  "filters\" 
  3845.     SHARESUBDIR("DOCUMENTFILEFILTERSPROGRAM") =  "excelflt\"
  3846.     SHARESUBDIR("DOCUMENTFILEFILTERSFILTER") =  "docflt\"
  3847.     SHARESUBDIR("HELPPROGRAM") =                 "help\"    
  3848.     SHARESUBDIR("HELPDATA") =                    "help\"    
  3849.     SHARESUBDIR("LOTUSDIALOGSPROGRAM") =             ""
  3850.     SHARESUBDIR("LOTUSSCRIPTPROGRAM") =          "script\"  
  3851.    SHARESUBDIR("MAILENABLINGPROGRAM") =             ""
  3852. End If
  3853.  
  3854.     'Set as default
  3855.    Lot_GetLocalLotusappDest = DestPath$
  3856.  
  3857.     If (ISELEMENT(SHARESUBDIR(EntryFlag$)) = 0 ) Then EXIT FUNCTION
  3858.  
  3859.     SubDestPath$=SHARESUBDIR(EntryFlag$)
  3860.  
  3861. '** Handle exceptions first
  3862.     If EntryFlag$ = "GRAPHICSFILEFILTERSFILTER" Then
  3863.    'If no filter Path entry found, copy the filters to the FILTERS subdirectory
  3864.         ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$, _
  3865.             "Graphics File Filters", "Filter Path",NULLSTROK,INVALIDSTROK)
  3866.         IF ExistingFilterPath$ <> "" THEN SubDestPath$="gphflt\"
  3867.     End If
  3868.  
  3869.     lenDest% = LEN(DestPath$)
  3870.     lenSub%=LEN(SubDestPath$)
  3871. '** Process the share keys that need to be stripped
  3872.     If (SubDestPath$ <> "" AND lenDest% > lenSub%) Then
  3873.         s1$ = Lot_TrimEndSlash(DestPath$)
  3874.         s2$ = LEFT(SubDestPath$, lensub%-1)
  3875.         s1$ = RIGHT(DestPath$, LEN(s2$))
  3876.         if s1$ = s2$ Then
  3877.             Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
  3878.         End If
  3879.     End If
  3880.     'print "Lot_GetLocalLotusappDest: " DestPath$ " -> " Lot_GetLocalLotusappDest
  3881.  
  3882. END FUNCTION
  3883.  
  3884.  
  3885. '*************************************************************************
  3886.  
  3887. FUNCTION Lot_MoveFiles(SourcePath$,gSharedIniFile$,EntryName$,DestPath$) AS INTEGER
  3888. '** Purpose:   This function finds all the files and moves them to 
  3889. '**            the DestPath or its subdirectories
  3890. '** Author:    MZ
  3891. '** Arguments: SourcePath$,
  3892. '**            gSharedIniFile$,
  3893. '**            EntryName$,
  3894. '**            DestPath$
  3895. '** Returns:   1 if success
  3896. '**            0 if error
  3897. '*************************************************************************
  3898.      DIM entryflag$,filepref$,filenumber%,filetag$,filename$,funcret%
  3899.    DIM sourcepathlen%,filepath$,fileexist%,filesize&,subdestpath$,ret%
  3900.    DIM existingfilterpath$, tmpPath$
  3901.  
  3902.    'FileExist% =  DoesFileExist(gSharedIniFile$, femExists)
  3903.  
  3904.    'Get the EntryFlag$ from the EntryName$
  3905.    EntryFlag$=Lot_GetEntryFlag(EntryName$)
  3906.  
  3907.    'Initialize the loop
  3908.    FilePref$ = "file"
  3909.    FileNumber% = 1
  3910.    FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  3911.  
  3912.    FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
  3913.  
  3914.    FuncRet%=0
  3915.  
  3916.    DO
  3917.       SourcePathLen% = LEN(SourcePath$)
  3918.       IF SourcePathLen% > 14 THEN
  3919.          IF UCASE$(RIGHT$(SourcePath$,13)) = "EXCELFLT.FLT\" THEN
  3920.             SourcePath$ = LEFT$(SourcePath$,SourcePathLen%-13)
  3921.          END IF
  3922.       END IF
  3923.       IF SourcePathLen% > 12 THEN
  3924.          IF UCASE$(RIGHT$(SourcePath$,11)) = "ISGDI9.DLL\" THEN
  3925.             SourcePath$ = LEFT$(SourcePath$,SourcePathLen%-11)
  3926.          END IF
  3927.       END IF
  3928.       IF FileName$ <> ""  THEN
  3929.          FilePath$ = MakePath(SourcePath$, FileName$)
  3930.       END IF
  3931.  
  3932.  
  3933.       IF FileName$<>"" AND FilePath$<>"" THEN
  3934.          FileExist% =  DoesFileExist(FilePath$, femExists)
  3935.  
  3936.          IF FileExist% = 1 THEN
  3937.  
  3938.             'Find its size
  3939.             FileSize& = GetSizeOfFile(FilePath$)
  3940.  
  3941.             '** DND/MZ: The call to Lot_DoVerDate... could be moved outside
  3942.             '**         the SELECT, but then things are harder to debug.
  3943.  
  3944.             'Copy it to the new location
  3945.             SELECT CASE EntryFlag$
  3946.                    case "SPELLCHECKERPROGRAM"
  3947.                         SubDestPath$=DestPath$+"spell\"
  3948.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  3949.                         IF ret% = 1 THEN
  3950.                            FuncRet% = 1
  3951.                         END IF
  3952.  
  3953.                    case "SPELLCHECKERDATA"
  3954.                         SubDestPath$=DestPath$+"spell\"
  3955.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  3956.                         IF ret% = 1 THEN
  3957.                            FuncRet% = 1
  3958.                         END IF
  3959.   
  3960.                     case "SPELLCHECKERUSER"
  3961.                         SubDestPath$=DestPath$+"spell\"
  3962.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  3963.                         IF ret% = 1 THEN
  3964.                            FuncRet% = 1
  3965.                         END IF
  3966.  
  3967.  
  3968.                     case "TOOLSPROGRAM"
  3969.                         SubDestPath$=DestPath$+"tools\"
  3970.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  3971.                         IF ret% = 1 THEN
  3972.                            FuncRet% = 1
  3973.                         END IF
  3974.  
  3975.  
  3976.                     case "TOOLSDATA"
  3977.  
  3978.  
  3979.                     case "CONTAINERFILEPROGRAM"
  3980.                         SubDestPath$=DestPath$
  3981.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  3982.                         IF ret% = 1 THEN
  3983.                            FuncRet% = 1
  3984.                         END IF
  3985.  
  3986.  
  3987.                     case "INFOBOXPROGRAM"
  3988.                         SubDestPath$=DestPath$
  3989.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  3990.                         IF ret% = 1 THEN
  3991.                            FuncRet% = 1
  3992.                         END IF
  3993.  
  3994.  
  3995.                     case "ICONPALETTEPROGRAM"
  3996.                         SubDestPath$=DestPath$
  3997.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  3998.                         IF ret% = 1 THEN
  3999.                            FuncRet% = 1
  4000.                         END IF
  4001.  
  4002.  
  4003.                     case "STATUSBARPROGRAM"
  4004.                         SubDestPath$=DestPath$
  4005.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4006.                         IF ret% = 1 THEN
  4007.                            FuncRet% = 1
  4008.                         END IF
  4009.  
  4010.  
  4011.                     case "DATALENSPROGRAM"
  4012.                         SubDestPath$=DestPath$+"datalens\"
  4013.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4014.                         IF ret% = 1 THEN
  4015.                            FuncRet% = 1
  4016.                         END IF
  4017.  
  4018.  
  4019.  
  4020.                     case "DATALENSDATA"
  4021.                         SubDestPath$=DestPath$+"datalens\"
  4022.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4023.                         IF ret% = 1 THEN
  4024.                            FuncRet% = 1
  4025.                         END IF
  4026.  
  4027.  
  4028.                     case "DIALOGEDITORPROGRAM"
  4029.                         SubDestPath$=DestPath$+"dialoged\"
  4030.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4031.                         IF ret% = 1 THEN
  4032.                            FuncRet% = 1
  4033.                         END IF
  4034.  
  4035.  
  4036.  
  4037.                     case "USERNAMESERVICESPROGRAM"
  4038.                         SubDestPath$=DestPath$+"uns\"
  4039.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4040.                         IF ret% = 1 THEN
  4041.                            FuncRet% = 1
  4042.                         END IF
  4043.  
  4044.  
  4045.                     case "MULTIMEDIAPROGRAM"
  4046.                         SubDestPath$=DestPath$+"multimed\"
  4047.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4048.                         IF ret% = 1 THEN
  4049.                            FuncRet% = 1
  4050.                         END IF
  4051.  
  4052.  
  4053.                     case "MULTIMEDIADATA"
  4054.                         SubDestPath$=DestPath$+"multimed\"
  4055.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4056.                         IF ret% = 1 THEN
  4057.                            FuncRet% = 1
  4058.                         END IF
  4059.   
  4060.  
  4061.                     case "GRAPHICSFILEFILTERSPROGRAM"
  4062.                         SubDestPath$=DestPath$+"filters\"
  4063.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4064.                         IF ret% = 1 THEN
  4065.                            FuncRet% = 1
  4066.                         END IF
  4067.   
  4068.  
  4069.                     case "GRAPHICSFILEFILTERSFILTER"
  4070.                         'If no filter Path entry found, copy the filters
  4071.                         ' to the FILTERS subdirectory
  4072.                         ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Graphics File Filters", "Filter Path",NULLSTROK,INVALIDSTROK)
  4073.  
  4074.                         IF ExistingFilterPath$="" THEN
  4075.                            SubDestPath$=DestPath$+"filters\"
  4076.                         ELSE
  4077.                            SubDestPath$=DestPath$+"gphflt\"
  4078.                         END IF
  4079.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4080.                         IF ret% = 1 THEN
  4081.                            FuncRet% = 1
  4082.                         END IF
  4083.  
  4084.                     case "DOCUMENTFILEFILTERSPROGRAM"
  4085.                         SubDestPath$=DestPath$+"excelflt\"
  4086.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4087.                         IF ret% = 1 THEN
  4088.                            FuncRet% = 1
  4089.                         END IF
  4090.  
  4091.                     case "HELPPROGRAM"
  4092.                         SubDestPath$=DestPath$+"help\"
  4093.                         'print "HELPPROGRAM","Before Lot_DoVerDateValidation()"
  4094.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4095.                         IF ret% = 1 THEN
  4096.                            FuncRet% = 1
  4097.                            'print "Lot_DoVerDateValidation returns 1 for HELPPROGRAM"
  4098.                         END IF
  4099.  
  4100.                     case "HELPDATA"
  4101.                         SubDestPath$=DestPath$+"help\"
  4102.                         'print "HELPDATA","Before Lot_DoVerDateValidation()"
  4103.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4104.                         IF ret% = 1 THEN
  4105.                            FuncRet% = 1
  4106.                            'print "Lot_DoVerDateValidation returns 1 for HELPDATA"
  4107.                         END IF
  4108.  
  4109.                     case "LOTUSSCRIPTPROGRAM"
  4110.                         SubDestPath$=DestPath$+"script\"
  4111.                         'print "LOTUSSCRIPTPROGRAM","Before Lot_DoVerDateValidation()"
  4112.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4113.                         IF ret% = 1 THEN
  4114.                            FuncRet% = 1
  4115.                            'print "Lot_DoVerDateValidation returns 1 for LOTUSSCRIPTPROGRAM"
  4116.                         END IF
  4117.  
  4118.                     case "LOTUSDIALOGSPROGRAM"
  4119.                         SubDestPath$=DestPath$
  4120.                         'print ("LOTUSDIALOGSPROGRAM","Before Lot_DoVerDateValidation()"
  4121.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4122.                         IF ret% = 1 THEN
  4123.                            FuncRet% = 1
  4124.                            'print "Lot_DoVerDateValidation returns 1 for LOTUSDIALOGSPROGRAM"
  4125.                         END IF
  4126.  
  4127.                     case "MAILENABLINGPROGRAM"
  4128.                         SubDestPath$=DestPath$
  4129.                         'print ("MAILENABLINGPROGRAM","Before Lot_DoVerDateValidation()"
  4130.                         ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
  4131.                         IF ret% = 1 THEN
  4132.                            FuncRet% = 1
  4133.                            'print "Lot_DoVerDateValidation returns 1 for MAILENABLINGPROGRAM"
  4134.                         END IF
  4135.  
  4136.  
  4137.                     case ""
  4138.  
  4139.              END SELECT
  4140.           ELSE
  4141.           END IF
  4142.        END IF
  4143.  
  4144.        FileNumber% = FileNumber% + 1
  4145.        FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  4146.  
  4147.        FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
  4148.  
  4149.    LOOP UNTIL FileName$ =""
  4150.  
  4151.    Lot_MoveFiles=FuncRet%
  4152. END FUNCTION
  4153. '*************************************************************************
  4154.  
  4155. FUNCTION Lot_GetEntryFlag(EntryName$) AS STRING
  4156. '** Purpose:   This function finds the shared flag from the entry name
  4157. '** Author:    MZ
  4158. '** Arguments: EntryName$
  4159. '** Returns:   EntryFlag$
  4160. '*************************************************************************
  4161. DIM entryflag$
  4162.  
  4163. IF EntryName$="Spell Checker Program" THEN
  4164.    EntryFlag$="SPELLCHECKERPROGRAM"
  4165. ELSEIF EntryName$="Spell Checker Data" THEN
  4166.    EntryFlag$="SPELLCHECKERDATA"
  4167. ELSEIF EntryName$="Spell Checker User" THEN
  4168.    EntryFlag$="SPELLCHECKERUSER"
  4169. ELSEIF EntryName$="TOOLS Program" THEN
  4170.    EntryFlag$="TOOLSPROGRAM"
  4171. ELSEIF EntryName$="TOOLS Data" THEN
  4172.    EntryFlag$="TOOLSDATA"
  4173. ELSEIF EntryName$="Container File Program" THEN
  4174.    EntryFlag$="CONTAINERFILEPROGRAM"
  4175. ELSEIF EntryName$="InfoBox Program" THEN
  4176.    EntryFlag$="INFOBOXPROGRAM"
  4177. ELSEIF EntryName$="Icon Palette Program" THEN
  4178.    EntryFlag$="ICONPALETTEPROGRAM"
  4179. ELSEIF EntryName$="Status Bar Program" THEN
  4180.    EntryFlag$="STATUSBARPROGRAM"
  4181. ELSEIF EntryName$="DataLens Program" THEN
  4182.    EntryFlag$="DATALENSPROGRAM"
  4183. ELSEIF EntryName$="DataLens Data" THEN
  4184.    EntryFlag$="DATALENSDATA"
  4185. ELSEIF EntryName$="Dialog Editor Program" THEN
  4186.    EntryFlag$="DIALOGEDITORPROGRAM"
  4187. ELSEIF EntryName$="User Name Service Program" THEN
  4188.    EntryFlag$="USERNAMESERVICESPROGRAM"
  4189. ELSEIF EntryName$="Multimedia Program" THEN
  4190.    EntryFlag$="MULTIMEDIAPROGRAM"
  4191. ELSEIF EntryName$="Multimedia Data" THEN
  4192.    EntryFlag$="MULTIMEDIADATA"
  4193. ELSEIF EntryName$="Graphics File Filters Program" THEN
  4194.    EntryFlag$="GRAPHICSFILEFILTERSPROGRAM"
  4195. ELSEIF EntryName$="Graphics File Filters Filter" THEN
  4196.    EntryFlag$="GRAPHICSFILEFILTERSFILTER"
  4197. ELSEIF EntryName$="Document File Filters Program" THEN
  4198.    EntryFlag$="DOCUMENTFILEFILTERSPROGRAM"
  4199. ELSEIF EntryName$="Help Program" THEN
  4200.    EntryFlag$="HELPPROGRAM"
  4201.    'print "EntryName$",EntryName$
  4202.    'print "EntryFlag$",EntryFlag$
  4203. ELSEIF EntryName$="Help Data" THEN
  4204.    EntryFlag$="HELPDATA"
  4205.    'print "EntryName$",EntryName$
  4206.    'print "EntryFlag$",EntryFlag$
  4207. ELSEIF EntryName$="LotusScript Program" THEN
  4208.    EntryFlag$="LOTUSSCRIPTPROGRAM"
  4209.    'print "EntryName$",EntryName$
  4210.    'print "EntryFlag$",EntryFlag$
  4211. ELSEIF EntryName$="Lotus Dialogs Program" THEN
  4212.    EntryFlag$="LOTUSDIALOGSPROGRAM"
  4213.    'print "EntryName$",EntryName$
  4214.    'print "EntryFlag$",EntryFlag$
  4215. ELSEIF EntryName$="Mail Enabling Program" THEN
  4216.    EntryFlag$="MAILENABLINGPROGRAM"
  4217.    'print "EntryName$",EntryName$
  4218.    'print "EntryFlag$",EntryFlag$
  4219. ELSE
  4220.    EntryFlag$=""
  4221. END IF
  4222.    Lot_GetEntryFlag=EntryFlag$
  4223. END FUNCTION
  4224. '*************************************************************************
  4225.  
  4226. FUNCTION Lot_DoVerDateValidation(Path$,SubDestPath$,FileName$,FileSize&) AS INTEGER
  4227. '** Purpose:   This function validates the version or dates of the file
  4228. '**            if it exist and calls the copy/delete returning its result
  4229. '** Author:    MZ
  4230. '** Arguments: Path$,
  4231. '**            SubDestPath$,
  4232. '**            FileName$,
  4233. '**            FileSize&
  4234. '** Returns:   1 if Successful
  4235. '**            0 if not success
  4236. '*************************************************************************
  4237.    DIM sourcepath$,destinationpath$,sourcefileversion$,destfileversion$
  4238.    DIM sourcefiledate$,destfiledate$,sourceyear%,sourcemonth%,sourceday%
  4239.    DIM destyear%,destmonth%,destday%,ret%,sourcever1&,sourcever2&,sourcever3&
  4240.    DIM sourcever4&,destver1&,destver2&,destver3&,destver4&, notused%
  4241.  
  4242.    'make the source path
  4243.    SourcePath$ = MakePath(Path$, FileName$)
  4244.  
  4245.    'make the destination path
  4246.    DestinationPath$ = MakePath(SubDestPath$, FileName$)
  4247.  
  4248.  
  4249.    'Create directory if its neccessary
  4250.    IF DoesDirExist(SubDestPath$)=0 THEN
  4251.       CreateDir SubDestPath$, cmoNone
  4252.       IF DoesDirExist(SubDestPath$)=0 THEN
  4253.          ShowPathError SID_ERR_CREATEDIR, 0, SubDestPath$
  4254.          ERROR STFQUIT
  4255.       END IF
  4256.    END IF
  4257.  
  4258.    'Copy the file
  4259.    IF DoesFileExist(DestinationPath$,femExists)=1 THEN
  4260.  
  4261.       'Find the version
  4262.       SourceFileVersion$=GetVersionOfFile(SourcePath$)
  4263.       DestFileVersion$=GetVersionOfFile(DestinationPath$)
  4264.  
  4265.       'If no version found
  4266.       IF SourceFileVersion$="" OR DestFileVersion$="" THEN
  4267.  
  4268.          'Find the dates
  4269.          SourceFileDate$=GetDateOfFile(SourcePath$)
  4270.          DestFileDate$=GetDateOfFile(DestinationPath$)
  4271.  
  4272.          'If the dates are different
  4273.          IF MID$(SourceFileDate$,1,10)<>MID$(DestFileDate$,1,10) THEN
  4274.             SourceYear%=GetYearFromDate(SourceFileDate$)
  4275.             SourceMonth%=GetMonthFromDate(SourceFileDate$)
  4276.             SourceDay%=GetDayFromDate(SourceFileDate$)
  4277.             DestYear%=GetYearFromDate(DestFileDate$)
  4278.             DestMonth%=GetMonthFromDate(DestFileDate$)
  4279.             DestDay%= GetDayFromDate(DestFileDate$)
  4280.  
  4281.             'Compare the dates
  4282.             IF SourceYear% > DestYear% THEN
  4283.                Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4284.             ELSEIF SourceYear% = DestYear% AND _
  4285.                    SourceMonth% > DestMonth% THEN
  4286.                Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4287.             ELSEIF SourceYear% = DestYear% AND _
  4288.                    SourceMonth% = DestMonth% AND _
  4289.                    SourceDay% > DestDay% THEN
  4290.                Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4291.             ELSEIF SourceYear% = DestYear% AND _
  4292.                    SourceMonth% = DestMonth% AND _
  4293.                    SourceDay% = DestDay% THEN
  4294.                Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4295.              ELSE
  4296.                'the dest is newer then the source then I can delete the source
  4297.                notused% = Lot_DoDelete(SourcePath$,FileName$)
  4298.                Ret%=1
  4299.             END IF
  4300.          'If the dates are the same then delete the source
  4301.          ELSE
  4302.             notused% = Lot_DoDelete(SourcePath$,FileName$)
  4303.             Ret%=1
  4304.          END IF
  4305.       'If version found
  4306.       ELSE
  4307.          'Find the version components
  4308.          SourceVer1&=GetVersionNthField(SourceFileVersion$,1)
  4309.          SourceVer2&=GetVersionNthField(SourceFileVersion$,2)
  4310.          SourceVer3&=GetVersionNthField(SourceFileVersion$,3)
  4311.          SourceVer4&=GetVersionNthField(SourceFileVersion$,4)
  4312.          DestVer1&=GetVersionNthField(DestFileVersion$,1)
  4313.          DestVer2&=GetVersionNthField(DestFileVersion$,2)
  4314.          DestVer3&=GetVersionNthField(DestFileVersion$,3)
  4315.          DestVer4&=GetVersionNthField(DestFileVersion$,4)
  4316.  
  4317.          'Compare the version
  4318.          IF SourceVer1& > DestVer1& THEN
  4319.             Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4320.          ELSEIF SourceVer1& = DestVer1& AND _
  4321.                 SourceVer2& > DestVer2& THEN
  4322.             Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4323.          ELSEIF SourceVer1& = DestVer1& AND _
  4324.                 SourceVer2& = DestVer2& AND _
  4325.                 SourceVer3& > DestVer3& THEN
  4326.             Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4327.          ELSEIF SourceVer1& = DestVer1& AND _
  4328.                 SourceVer2& = DestVer2& AND _
  4329.                 SourceVer3& = DestVer3& AND _
  4330.                 SourceVer4& > DestVer4& THEN
  4331.             Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4332.          ELSEIF SourceVer1& = DestVer1& AND _
  4333.                 SourceVer2& = DestVer2& AND _
  4334.                 SourceVer3& = DestVer3& AND _
  4335.                 SourceVer4& = DestVer4& THEN
  4336.             'Version is equal. Delete the source
  4337.             notused% = Lot_DoDelete(SourcePath$,FileName$)
  4338.             Ret%=1
  4339.          ELSE
  4340.             'Source is older. Delete the source
  4341.             notused% = Lot_DoDelete(SourcePath$,FileName$)
  4342.             Ret% = 1
  4343.          END IF
  4344.  
  4345.       END IF
  4346.    'file not found in the destination
  4347.    ELSE
  4348.       Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
  4349.    END IF
  4350.    Lot_DoVerDateValidation=Ret%
  4351. END FUNCTION
  4352. '*************************************************************************
  4353.  
  4354. FUNCTION Lot_DoDelete(SourcePath$,FileName$) AS INTEGER
  4355. '** Purpose:   This function deletes the source returning success or not success
  4356. '** Author:    MZ
  4357. '** Arguments: SourcePath$,
  4358. '**            FileName$,
  4359. '** Returns:   1 if Successful
  4360. '**            0 if not success
  4361. '*************************************************************************
  4362.         DIM fileexist%
  4363.  
  4364.       'Remove the source file
  4365.       IF GetSymbolValue("SYM_MOVE") = "1" THEN
  4366.          RemoveFile SourcePath$, cmoNone
  4367.       END IF
  4368.  
  4369.       'Check if the delete was successful
  4370.       FileExist%=DoesFileExist(SourcePath$,femExists)
  4371.       IF FileExist%=1 THEN
  4372.          'to do!!!!!!
  4373.          'print "remove did not work for filr",SourcePath$
  4374.          'Write a log file for the user when we cannot cleanup
  4375.          Lot_DoDelete=0
  4376.       ELSE
  4377.          Lot_DoDelete=1
  4378.       END IF
  4379. END FUNCTION
  4380. '*************************************************************************
  4381.  
  4382. FUNCTION Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,SourceFileSize&) AS INTEGER
  4383. '** Purpose:   This function copies the files to the new destination and
  4384. '**            delets the source returning success or not success
  4385. '** Author:    MZ
  4386. '** Arguments: SourcePath$,
  4387. '**            DestinationPath$,
  4388. '**            FileName$,
  4389. '**            SourceFileSize&
  4390. '** Returns:   1 if Successful
  4391. '**            0 if not success
  4392. '*************************************************************************
  4393.    DIM sourcefiledate$,destfilesize&,thedateisset%,fileexist%
  4394.  
  4395.    'Get the date of the source
  4396.    SourceFileDate$=GetDateOfFile(SourcePath$)
  4397.  
  4398.    'Copy the file from the source to the destination
  4399.    CopyFile SourcePath$, DestinationPath$, cmoCopy, 0
  4400.    
  4401.    'Check if the copy was successful
  4402.    DestFileSize&=GetSizeOfFile(DestinationPath$)
  4403.  
  4404.    IF DestFileSize&=SourceFileSize& THEN
  4405.       'Set the date to the original date
  4406.       theDateIsSet%=Lot_SetDateOfFile(DestinationPath$, SourceFileDate$)
  4407.  
  4408.       'Log bad date
  4409.       IF theDateIsSet% = 0 THEN
  4410.       ''to Do  write in the log file
  4411.       'print  "the set date failed and the delete is not done"
  4412.       END IF
  4413.  
  4414.       'Delete the source regardless of set date success
  4415.       IF GetSymbolValue("SYM_MOVE") = "1" THEN
  4416.          RemoveFile SourcePath$, cmoNone
  4417.       END IF
  4418.  
  4419.       'Check if the delete was successful
  4420.       FileExist%=DoesFileExist(SourcePath$,femExists)
  4421.       IF FileExist%=1 THEN
  4422.          'to do!!!!!!
  4423.          'print "remove did not work for file",SourcePath$
  4424.          'Write a log file for the user when we cannot cleanup
  4425.       END IF
  4426.       Lot_DoCopyDelete=1
  4427.    ELSE
  4428.       Lot_DoCopyDelete=0
  4429.  
  4430.    END IF
  4431.  
  4432. END FUNCTION
  4433. '*************************************************************************
  4434.  
  4435. FUNCTION Lot_SaveShareConfigInInstallIni() AS INTEGER
  4436. '** Purpose:   Saves the lotusapp dir and same drive flag into install.ini 
  4437. '**            in the section [Server Configuration of Shared Tools];  This 
  4438. '**            is needed at Node install time
  4439. '** Author:    MZ
  4440. '** Arguments: None
  4441. '** Returns:   SUCCESS
  4442. '*************************************************************************
  4443. DIM networkins$,proddir$,ginstallinifile$,commondir$,proddrv$,commdrv$
  4444.  
  4445.    'Identify if I am in server install
  4446.    NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  4447.  
  4448.    IF NetworkIns$=gSERVER$ THEN
  4449.  
  4450.       'Built the path to install.ini
  4451.       prodDir$ = Lot_GetInstallDir()
  4452.       gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
  4453.  
  4454.       'Log the LOTUSAPP directory
  4455.       commonDir$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
  4456.       CreateIniKeyValue gInstallIniFile$, "Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$, commonDir$, cmoOverwrite
  4457.  
  4458.       'Log a flag that tells if the product is in the same drive with lotusapp
  4459.       prodDrv$ = LCASE$(MID$(prodDir$,1,1))
  4460.       commDrv$ = LCASE$(MID$(commonDir$,1,1))
  4461.       IF prodDrv$ = commDrv$ THEN
  4462.          CreateIniKeyValue gInstallIniFile$, "Server Configuration of Shared Tools", "SameDriveFlag", "1", cmoOverwrite
  4463.       ELSE
  4464.          CreateIniKeyValue gInstallIniFile$, "Server Configuration of Shared Tools", "SameDriveFlag", "0", cmoOverwrite
  4465.       END IF
  4466.  
  4467.  
  4468.    END IF
  4469.    Lot_SaveShareConfigInInstallIni = SUCCESS
  4470. END FUNCTION
  4471. '*************************************************************************
  4472.  
  4473.  
  4474. FUNCTION Lot_GetFileSize(Path$,gSharedIniFile$,EntryName$,gConsolidateSize&) AS LONG
  4475. '** Purpose:   This function finds all the files and their size adding 
  4476. '**            it to gConsolidateSize&
  4477. '** Author:    MZ
  4478. '** Arguments: Path$,
  4479. '**            gSharedIniFile$,
  4480. '**            EntryName$,
  4481. '**            gConsolidateSize&
  4482. '** Returns:   gConsolidateSize&
  4483. '*************************************************************************
  4484.    DIM fileexist%,filepref$,filenumber%,filetag$,filename$,filepath$,filesize&
  4485.  
  4486.    FileExist% =  DoesFileExist(gSharedIniFile$, femExists)
  4487.  
  4488.    'Initialize the loop
  4489.    FilePref$ = "file"
  4490.    FileNumber% = 1
  4491.    FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  4492.    FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
  4493.  
  4494.    'gConsolidateSize is set to 0 in Lot_IsConsolidationNeeded
  4495.  
  4496.    DO
  4497.       IF UCASE$(FileName$) = "EXCELFLT.FLT" OR _
  4498.          UCASE$(FileName$) = "ISGDI9.DLL" THEN
  4499.          FilePath$ = Path$
  4500.       ELSEIF FileName$ <> ""  THEN
  4501.          FilePath$ = MakePath(Path$, FileName$)
  4502.       END IF
  4503.  
  4504.  
  4505.       IF FileName$<>"" AND FilePath$<>"" THEN
  4506.          FileExist% =  DoesFileExist(FilePath$, femExists)
  4507.  
  4508.          IF FileExist% = 1 THEN
  4509.             'Find its size
  4510.             FileSize& = GetSizeOfFile(FilePath$)
  4511.             'gConsolidateSize% = gConsolidateSize% + ROUND(FileSize&/1024,0)
  4512.  
  4513.             gConsolidateSize& = gConsolidateSize& + FileSize&
  4514.  
  4515.          ELSE
  4516.             'print "File not found", FilePath$ 
  4517.          END IF
  4518.       END IF
  4519.       FileNumber% = FileNumber% + 1
  4520.       FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  4521.  
  4522.       FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
  4523.  
  4524.    LOOP UNTIL FileName$ =""
  4525.  
  4526.    Lot_GetFileSize=gConsolidateSize&
  4527. END FUNCTION
  4528. '*************************************************************************
  4529.  
  4530. FUNCTION Lot_GetAllSharedInstalled() AS INTEGER
  4531. '** Purpose:    This function searches the copy list and populates the 
  4532. '**             IniEntry list with the entries that have to be updated
  4533. '**             for standalone install and reades the Install.ini for
  4534. '**             node install
  4535. '** Author:     MZ
  4536. '** Arguments:  None
  4537. '** Symbols Out:IniEntry
  4538. '** Returns:    SUCCESS
  4539. '*************************************************************************
  4540.    DIM network$,currchpt$,sharedid$
  4541.  
  4542.    network$ = GetSymbolValue(SYM_NETWORK$)
  4543.    IF network$ = gSTANDARD$ THEN
  4544.       'The call to Lot_GetChapterValStr returns a comment when no value is found
  4545.  
  4546.       CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  4547.       WHILE (CurrChpt$ <> "")
  4548.          SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE)   
  4549.          IF SharedID$ <> "" THEN
  4550.             AddListItem SYM_INIENTRY$,SharedID$
  4551.          END IF
  4552.          CurrChpt$ = Lot_GetNext() 
  4553.       WEND
  4554.       Lot_GetAllSharedInstalled = SUCCESS
  4555.  
  4556.       'End of the processing for STANDARD
  4557.  
  4558.    ELSEIF network$ = gNODE$ THEN
  4559.       IF Lot_IsTheFeatureInstalled("SHRUNS") THEN
  4560.          AddListItem SYM_INIENTRY$,"USERNAMESERVICESPROGRAM"
  4561.       END IF
  4562.       IF Lot_IsTheFeatureInstalled("SHRDLGPRG") THEN
  4563.          AddListItem SYM_INIENTRY$,"DIALOGEDITORPROGRAM"
  4564.       END IF
  4565.       IF Lot_IsTheFeatureInstalled("SHRSPELLPRG") THEN
  4566.          AddListItem SYM_INIENTRY$,"SPELLCHECKERPROGRAM"
  4567.       END IF
  4568.       IF Lot_IsTheFeatureInstalled("SHRSPELLDIC") OR _
  4569.          Lot_IsTheFeatureInstalled("SHRSPELLSPDIC") OR _
  4570.          Lot_IsTheFeatureInstalled("SHRSPELLPODIC") OR _
  4571.          Lot_IsTheFeatureInstalled("SHRSPELLFRDIC") THEN
  4572.          AddListItem SYM_INIENTRY$,"SPELLCHECKERDATA"
  4573.       END IF
  4574.       IF Lot_IsTheFeatureInstalled("SHRSTATUSBAR") THEN
  4575.          AddListItem SYM_INIENTRY$,"STATUSBARPROGRAM"
  4576.       END IF
  4577.       IF Lot_IsTheFeatureInstalled("SHRICONPALETTE") THEN
  4578.          AddListItem SYM_INIENTRY$,"ICONPALETTEPROGRAM"
  4579.       END IF
  4580.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG") OR _
  4581.          Lot_IsTheFeatureInstalled("SHRPARADOXPRG") OR _
  4582.          Lot_IsTheFeatureInstalled("SHRSQLPRG") OR _
  4583.          Lot_IsTheFeatureInstalled("SHRINFORMIXPRG") OR _
  4584.          Lot_IsTheFeatureInstalled("SHRIBMPRG") OR _
  4585.          Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG") OR _
  4586.          Lot_IsTheFeatureInstalled("SHRIBMDB2PRG") OR _
  4587.          Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG") OR _
  4588.          Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG") OR _
  4589.          Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG") OR _
  4590.          Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG") OR _
  4591.          Lot_IsTheFeatureInstalled("SHRODBCWKSPRG") OR _
  4592.          Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG") OR _
  4593.          Lot_IsTheFeatureInstalled("SHRORACLEPRG") OR _
  4594.          Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG") OR _
  4595.          Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG") OR _
  4596.          Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG") OR _
  4597.          Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG") OR _
  4598.          Lot_IsTheFeatureInstalled("SHRODBCDB2PRG") OR _
  4599.          Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG") OR _
  4600.          Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG") OR _
  4601.          Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG") THEN
  4602.          AddListItem SYM_INIENTRY$,"DATALENSPROGRAM"
  4603.          AddListItem SYM_INIENTRY$,"DATALENSDATA"
  4604.       END IF
  4605.       IF Lot_IsTheFeatureInstalled("SHRMM") OR _
  4606.          Lot_IsTheFeatureInstalled("SHRSCRNCAM") THEN
  4607.          AddListItem SYM_INIENTRY$,"MULTIMEDIAPROGRAM"
  4608.          AddListItem SYM_INIENTRY$,"MULTIMEDIADATA"
  4609.       END IF
  4610.       IF Lot_IsTheFeatureInstalled("SHRHELPPRG") THEN
  4611.          AddListItem SYM_INIENTRY$,"HELPPROGRAM"
  4612.       END IF
  4613.       IF Lot_IsTheFeatureInstalled("SHRHELPDATA") THEN
  4614.          AddListItem SYM_INIENTRY$,"HELPDATA"
  4615.       END IF
  4616.       IF Lot_IsTheFeatureInstalled("SHRLOTUSSCRIPTPRG") THEN
  4617.          AddListItem SYM_INIENTRY$,"LOTUSSCRIPTPROGRAM"
  4618.       END IF
  4619.       IF Lot_IsTheFeatureInstalled("SHRLOTUSDIALOGSPRG") THEN
  4620.          AddListItem SYM_INIENTRY$,"LOTUSDIALOGSPROGRAM"
  4621.       END IF
  4622.       IF Lot_IsTheFeatureInstalled("SHRMAILENABLINGPRG") THEN
  4623.          AddListItem SYM_INIENTRY$,"MAILENABLINGPROGRAM"
  4624.       END IF
  4625.       IF Lot_IsTheFeatureInstalled("BENTO") THEN
  4626.          AddListItem SYM_INIENTRY$,"CONTAINERFILEPROGRAM"
  4627.       END IF
  4628.       IF Lot_IsTheFeatureInstalled("DOCFILTERS") THEN
  4629.          AddListItem SYM_INIENTRY$,"DOCUMENTFILEFILTERSPROGRAM"
  4630.       END IF
  4631.       IF Lot_IsTheFeatureInstalled("SHRINFOBOXPRG") THEN
  4632.          AddListItem SYM_INIENTRY$,"INFOBOXPROGRAM"
  4633.       END IF
  4634.       IF Lot_IsTheFeatureInstalled("SHRSTATUSBAR") THEN
  4635.          AddListItem SYM_INIENTRY$,"STATUSBARPROGRAM"
  4636.       END IF
  4637.  
  4638.  
  4639.       'End of the processing for NODE
  4640.    END IF
  4641.  
  4642. END FUNCTION
  4643. '*************************************************************************
  4644.  
  4645. FUNCTION Lot_WriteLotusBcfFile()AS INTEGER
  4646. '** Purpose:    This function writes the lotus.bcf file
  4647. '** Author:     MZ
  4648. '** Arguments:  None
  4649. '** Returns:    SUCCESS
  4650. '*************************************************************************
  4651.    DIM bufdn$,bufdl$,bufdd$,bufdc$,bufac$,sqlservername$,networkinfo$, notused&
  4652.  
  4653.    'print "gLotusBcfDir",gLotusBcfDir
  4654.    IF Lot_IsInformixSelected() = 1 THEN
  4655.      'print "informix is selected"
  4656.      bufDN$ = LdString(SID_DATALENS_INFORMIX_DN)
  4657.      bufDL$ = LdString(SID_DATALENS_INFORMIX_DL)
  4658.      bufDD$ = LdString(SID_DATALENS_INFORMIX_DD)
  4659.      notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4660.    ELSE
  4661.      'print "informix is NOT selected"
  4662.    END IF
  4663.  
  4664.    IF Lot_IsSQLSelected() =1 THEN
  4665.      'print "SQL is selected"
  4666.      bufDN$ = LdString(SID_DATALENS_SQL_DN)
  4667.      bufDL$ = LdString(SID_DATALENS_SQL_DL)
  4668.      bufDC$ = LdString(SID_DATALENS_SQL_DC)
  4669.      bufAC$ = LdString(SID_DATALENS_SQL_AC)
  4670.      bufDD$ = LdString(SID_DATALENS_SQL_DD)
  4671.  
  4672.      sqlServerName$= GetSymbolValue(SYM_SQLSERVERNAME$)
  4673.      bufDN$=bufDN$+sqlServerName$
  4674.      IF LEN(bufDN$) > 80 THEN
  4675.         bufDN$=MID$(bufDN$,1,80)         
  4676.      END IF
  4677.  
  4678.      bufDC$=bufDC$+sqlServerName$
  4679.      IF LEN(bufDC$) > 255 THEN
  4680.         bufDC$=MID$(bufDC$,1,255)
  4681.      END IF
  4682.      notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
  4683.    ELSE
  4684.      'print "SQL is NOT selected"
  4685.    END IF
  4686.  
  4687.    IF Lot_IsParadoxSelected() =1 THEN
  4688.      'print "Paradox is selected"
  4689.      bufDN$ = LdString(SID_DATALENS_PARADOX_DN)
  4690.      bufDL$ = LdString(SID_DATALENS_PARADOX_DL)
  4691.      bufDD$ = LdString(SID_DATALENS_PARADOX_DD)
  4692.      '     bufAC$ = LdString(SID_DATALENS_PARADOX_AC)
  4693.      '     removed AC=UI,PW 
  4694.  
  4695.      bufDC$=GetSymbolValue(SYM_PARADOXNETWORKINFO$)
  4696.      IF LEN(bufDC$) > 255 THEN
  4697.         bufDC$=MID$(bufDC$,1,255)
  4698.      END IF
  4699.      notused& =  BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
  4700.    ELSE
  4701.      'print "Paradox is NOT selected"
  4702.    END IF
  4703.  
  4704.    IF Lot_IsdBaseSelected() =1 THEN
  4705.      'print "dBase is selected"
  4706.      bufDN$ = LdString(SID_DATALENS_DBASE_DN)
  4707.      bufDL$ = LdString(SID_DATALENS_DBASE_DL)
  4708.      bufDC$ = LdString(SID_DATALENS_DBASE_DC)
  4709.      bufDD$ = LdString(SID_DATALENS_DBASE_DD)
  4710.      notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
  4711.    ELSE
  4712.      'print "dBase is NOT selected"
  4713.    END IF
  4714.  
  4715.    IF Lot_IsIBMdBaseManagerSelected() = 1 THEN
  4716.      'print "IBMdBM is selected"
  4717.      bufDN$ = LdString(SID_DATALENS_EEDM_DN)
  4718.      'print bufDN$
  4719.      bufDL$ = LdString(SID_DATALENS_EEDM_DL)
  4720.      bufDC$ = LdString(SID_DATALENS_EEDM_DC)
  4721.      bufDD$ = LdString(SID_DATALENS_EEDM_DD)
  4722.      bufAC$ = LdString(SID_DATALENS_EEDM_AC)
  4723.      notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
  4724.    ELSE
  4725.      'print "IBMdBM is selected"
  4726.    END IF
  4727.    IF Lot_IsNotesSQLSelected() = 1 THEN
  4728.      'print "NotesSQL is selected"
  4729.      bufDN$ = LdString(SID_DATALENS_NOTESSQL_DN)
  4730.      'print bufDN$
  4731.      bufDL$ = LdString(SID_DATALENS_NOTESSQL_DL)
  4732.      bufDC$ = LdString(SID_DATALENS_NOTESSQL_DC)
  4733.      bufDD$ = LdString(SID_DATALENS_NOTESSQL_DD)
  4734. '     bufAC$ = LdString(SID_DATALENS_NOTESSQL_AC)
  4735.      notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
  4736.    ELSE
  4737.      'print "NotesSQL is NOT selected"
  4738.    END IF
  4739.    IF Lot_IsSpreadSheetSelected () = 1 THEN
  4740.       bufDN$ = LdString(SID_DATALENS_SPREADSHEET_DN)
  4741.       'print bufDN$
  4742.       bufDL$ = LdString(SID_DATALENS_SPREADSHEET_DL)
  4743.       bufDC$ = LdString(SID_DATALENS_SPREADSHEET_DC)
  4744.       bufDD$ = LdString(SID_DATALENS_SPREADSHEET_DD)
  4745.       'bufAC$ = LdString(SID_DATALENS_SPREADSHEET_AC)
  4746.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
  4747.    ELSE
  4748.       'print "SPREADSHEET is NOT selected"
  4749.    END IF
  4750.  
  4751.    IF Lot_IsIBM_DB2Selected () = 1 THEN
  4752.       bufDN$ = LdString(SID_DATALENS_IBM_DB2_DN)
  4753.       'print bufDN$
  4754.       bufDL$ = LdString(SID_DATALENS_IBM_DB2_DL)
  4755.       bufDC$ = LdString(SID_DATALENS_IBM_DB2_DC)
  4756.       bufDD$ = LdString(SID_DATALENS_IBM_DB2_DD)
  4757.       bufAC$ = LdString(SID_DATALENS_IBM_DB2_AC)
  4758.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
  4759.    ELSE
  4760.       'print "IBM_DB2 is NOT selected"
  4761.    END IF
  4762.    IF Lot_IsDB2_SQLDS_Selected () = 1 THEN
  4763.       bufDN$ = LdString(SID_DATALENS_DB2_SQLDS_DN)
  4764.       'print bufDN$
  4765.       bufDL$ = LdString(SID_DATALENS_DB2_SQLDS_DL)
  4766.       bufDC$ = LdString(SID_DATALENS_DB2_SQLDS_DC)
  4767.       bufDD$ = LdString(SID_DATALENS_DB2_SQLDS_DD)
  4768.       bufAC$ = LdString(SID_DATALENS_DB2_SQLDS_AC)
  4769.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
  4770.    ELSE
  4771.       'print "DB2_SQLDS is NOT selected"
  4772.    END IF
  4773.    IF Lot_IsDB2_SQL400_Selected () = 1 THEN
  4774.       bufDN$ = LdString(SID_DATALENS_DB2_SQL400_DN)
  4775.       'print bufDN$
  4776.       bufDL$ = LdString(SID_DATALENS_DB2_SQL400_DL)
  4777.       bufDC$ = LdString(SID_DATALENS_DB2_SQL400_DC)
  4778.       bufDD$ = LdString(SID_DATALENS_DB2_SQL400_DD)
  4779.       bufAC$ = LdString(SID_DATALENS_DB2_SQL400_AC)
  4780.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
  4781.    ELSE
  4782.       'print "DB2_SQL400 is NOT selected"
  4783.    END IF
  4784.    IF Lot_IsIBM_DDCS2_Selected () = 1 THEN
  4785.       bufDN$ = LdString(SID_DATALENS_IBM_DDCS_2_DN)
  4786.       'print bufDN$
  4787.       bufDL$ = LdString(SID_DATALENS_IBM_DDCS_2_DL)
  4788.       bufDC$ = LdString(SID_DATALENS_IBM_DDCS_2_DC)
  4789.       bufDD$ = LdString(SID_DATALENS_IBM_DDCS_2_DD)
  4790.       bufAC$ = LdString(SID_DATALENS_IBM_DDCS_2_AC)
  4791.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
  4792.    ELSE
  4793.       'print "IBM_DDCS_2 is NOT selected"
  4794.    END IF
  4795.    IF Lot_IsODBCDriverSelected () = 1 THEN
  4796.       bufDN$ = LdString(SID_DATALENS_ODBCD_DN)
  4797.       'print bufDN$
  4798.       bufDL$ = LdString(SID_DATALENS_ODBCD_DL)
  4799.       '     bufDC$ = LdString(SID_DATALENS_ODBCD_DC)
  4800.       bufDD$ = LdString(SID_DATALENS_ODBCD_DD)
  4801.       '     bufAC$ = LdString(SID_DATALENS_ODBCD_AC)
  4802.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4803.    ELSE
  4804.       'print "ODBCD is NOT selected"
  4805.    END IF
  4806.    IF Lot_IsODBCSpreadSheetSelected () = 1 THEN
  4807.       bufDN$ = LdString(SID_ODBC_SPREADSHEET_DN)
  4808.       'print bufDN$
  4809.       bufDL$ = LdString(SID_ODBC_SPREADSHEET_DL)
  4810.       bufDC$ = LdString(SID_ODBC_SPREADSHEET_DC)
  4811.       bufDD$ = LdString(SID_ODBC_SPREADSHEET_DD)
  4812.       '     bufAC$ = LdString(SID_ODBC_SPREADSHEET_AC)
  4813.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
  4814.    ELSE
  4815.       'print "SPREADSHEET is NOT selected"
  4816.    END IF
  4817.    IF Lot_IsODBCTextDriverSelected () = 1 THEN
  4818.       bufDN$ = LdString(SID_ODBC_TEXTDRVR_DN)
  4819.       'print bufDN$
  4820.       bufDL$ = LdString(SID_ODBC_TEXTDRVR_DL)
  4821.       bufDC$ = LdString(SID_ODBC_TEXTDRVR_DC)
  4822.       bufDD$ = LdString(SID_ODBC_TEXTDRVR_DD)
  4823.       '     bufAC$ = LdString(SID_ODBC_TEXTDRVR_AC)
  4824.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
  4825.    ELSE
  4826.       'print "TEXTDRVR is NOT selected"
  4827.    END IF
  4828.    IF Lot_IsOracleSelected () = 1 THEN
  4829.       bufDN$ = LdString(SID_DATALENS_ORACLE_DN)
  4830.       'print bufDN$
  4831.       bufDL$ = LdString(SID_DATALENS_ORACLE_DL)
  4832.       '     bufDC$ = LdString(SID_DATALENS_ORACLE_DC)
  4833.       bufDD$ = LdString(SID_DATALENS_ORACLE_DD)
  4834.       '     bufAC$ = LdString(SID_DATALENS_ORACLE_AC)
  4835.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4836.    ELSE
  4837.       'print "ORACLE is NOT selected"
  4838.    END IF
  4839.  
  4840.    IF Lot_IsODBCBtrieveSelected () = 1 THEN
  4841.       bufDN$ = LdString(SID_ODBC_BTRIEVE_DN)
  4842.       'print bufDN$
  4843.       bufDL$ = LdString(SID_ODBC_BTRIEVE_DL)
  4844.       '     bufDC$ = LdString(SID_ODBC_BTRIEVE_DC)
  4845.       bufDD$ = LdString(SID_ODBC_BTRIEVE_DD)
  4846.       '     bufAC$ = LdString(SID_ODBC_BTRIEVE_AC)
  4847.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4848.    ELSE
  4849.       'print "BTRIEVE is NOT selected"
  4850.    END IF
  4851.    IF Lot_IsODBCDB2Selected () = 1 THEN
  4852.       bufDN$ = LdString(SID_ODBC_DB2_DN)
  4853.       'print bufDN$
  4854.       bufDL$ = LdString(SID_ODBC_DB2_DL)
  4855.       bufDC$ = LdString(SID_ODBC_DB2_DC)
  4856.       bufDD$ = LdString(SID_ODBC_DB2_DD)
  4857.       '     bufAC$ = LdString(SID_ODBC_DB2_AC)
  4858.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
  4859.    ELSE
  4860.       'print "DB2 is NOT selected"
  4861.    END IF
  4862.    IF Lot_IsODBCFoxbaseSelected () = 1 THEN
  4863.       bufDN$ = LdString(SID_ODBC_FOXBASE_DN)
  4864.       'print bufDN$
  4865.       bufDL$ = LdString(SID_ODBC_FOXBASE_DL)
  4866.       '     bufDC$ = LdString(SID_ODBC_FOXBASE_DC)
  4867.       bufDD$ = LdString(SID_ODBC_FOXBASE_DD)
  4868.       '     bufAC$ = LdString(SID_ODBC_FOXBASE_AC)
  4869.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4870.    ELSE
  4871.       'print "FOXBASE is NOT selected"
  4872.    END IF
  4873.    IF Lot_IsODBCAccessSelected () = 1 THEN
  4874.       bufDN$ = LdString(SID_ODBC_ACCESS_DN)
  4875.       'print bufDN$
  4876.       bufDL$ = LdString(SID_ODBC_ACCESS_DL)
  4877.       '     bufDC$ = LdString(SID_ODBC_ACCESS_DC)
  4878.       bufDD$ = LdString(SID_ODBC_ACCESS_DD)
  4879.       '     bufAC$ = LdString(SID_ODBC_ACCESS_AC)
  4880.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4881.    ELSE
  4882.       'print "ACCESS is NOT selected"
  4883.    END IF
  4884.    IF Lot_IsODBCParadoxSelected () = 1 THEN
  4885.       bufDN$ = LdString(SID_ODBC_PARADOX_DN)
  4886.       'print bufDN$
  4887.       bufDL$ = LdString(SID_ODBC_PARADOX_DL)
  4888.       '     bufDC$ = LdString(SID_ODBC_PARADOX_DC)
  4889.       bufDD$ = LdString(SID_ODBC_PARADOX_DD)
  4890.       '     bufAC$ = LdString(SID_ODBC_PARADOX_AC)
  4891.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4892.    ELSE
  4893.       'print "ODBC PARADOX is NOT selected"
  4894.    END IF
  4895.    IF Lot_IsODBCOracleSelected () = 1 THEN
  4896.       bufDN$ = LdString(SID_ODBC_ORACLE_DN)
  4897.       'print bufDN$
  4898.       bufDL$ = LdString(SID_ODBC_ORACLE_DL)
  4899.       '     bufDC$ = LdString(SID_ODBC_ORACLE_DC)
  4900.       bufDD$ = LdString(SID_ODBC_ORACLE_DD)
  4901.       '     bufAC$ = LdString(SID_ODBC_ORACLE_AC)
  4902.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4903.    ELSE
  4904.       'print "NotesSQL is NOT selected"
  4905.    END IF
  4906.       
  4907.    IF Lot_IsODBCSQLServerSelected () = 1 THEN
  4908.       bufDN$ = LdString(SID_ODBC_SQLSERVER_DN)
  4909.       'print bufDN$
  4910.       bufDL$ = LdString(SID_ODBC_SQLSERVER_DL)
  4911.       '      bufDC$ = LdString(SID_ODBC_SQLSERVER_DC)
  4912.       bufDD$ = LdString(SID_ODBC_SQLSERVER_DD)
  4913.       '      bufAC$ = LdString(SID_ODBC_SQLSERVER_AC)
  4914.       notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
  4915.    ELSE
  4916.       'print "ODBC SQLServer is NOT selected"
  4917.    END IF
  4918.  
  4919. Lot_WriteLotusBcfFile = SUCCESS
  4920. END FUNCTION
  4921. '*************************************************************************
  4922.  
  4923. FUNCTION Lot_BackupLotusBcfFile()AS INTEGER
  4924. '** Purpose:    This function backsup the lotus.bcf file for STANDARD
  4925. '**             and NODE install
  4926. '** Author:     MZ
  4927. '** Arguments:  None
  4928. '** Returns:    SUCCESS
  4929. '*************************************************************************
  4930.    DIM dest$,network$,filepath$,backuppath$
  4931.  
  4932.    Dest$=Lot_TrimEndSlash(GetSymbolValue(SYM_LOTUSAPPDIR$))
  4933.    Dest$=Dest$+"\datalens"
  4934.    network$ = GetSymbolValue(SYM_NETWORK$)
  4935.    FilePath$=MakePath(Dest$,gLOTUSBCF$)
  4936.    BackupPath$=Makepath(Dest$,"lotus.bak")
  4937.  
  4938.    IF network$=gNODE$ THEN
  4939.  
  4940.       IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 OR _
  4941.          Lot_IsTheFeatureInstalled("SHRPARADOXPRG")=1 OR _
  4942.          Lot_IsTheFeatureInstalled("SHRSQLPRG")=1 OR _
  4943.          Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 OR _
  4944.          Lot_IsTheFeatureInstalled("SHRIBMPRG")=1 OR _
  4945.          Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG")=1 OR _
  4946.          Lot_IsTheFeatureInstalled("SHRIBMDB2PRG")=1 OR _
  4947.          Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG")=1 OR _
  4948.          Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG")=1 OR _
  4949.          Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG")=1 OR _
  4950.          Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 OR _
  4951.          Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 OR _
  4952.          Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 OR _
  4953.          Lot_IsTheFeatureInstalled("SHRORACLEPRG")=1 OR _
  4954.          Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 OR _
  4955.          Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 OR _
  4956.          Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 OR _
  4957.          Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 OR _
  4958.          Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 OR _
  4959.          Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 OR _
  4960.          Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 OR _
  4961.          Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 THEN
  4962.  
  4963.  
  4964.          IF DoesFileExist(FilePath$,femExists) =1 THEN
  4965.            CopyFile FilePath$, BackupPath$, cmoCopy, 1
  4966.            RemoveFile FilePath$, cmoNone
  4967.          END IF
  4968.  
  4969.       END IF
  4970.  
  4971.    ELSEIF network$=gSTANDARD$ THEN
  4972.  
  4973.       IF Lot_IsInformixSelected() = 1 OR _
  4974.          Lot_IsSQLSelected() =1 OR _
  4975.          Lot_IsParadoxSelected() =1 OR _
  4976.          Lot_IsdBaseSelected() =1 OR _
  4977.          Lot_IsIBMdBaseManagerSelected() = 1 OR _
  4978.          Lot_IsSpreadSheetSelected () = 1 OR _
  4979.          Lot_IsIBM_DB2Selected () = 1 OR _
  4980.          Lot_IsDB2_SQLDS_Selected () = 1 OR _
  4981.          Lot_IsDB2_SQL400_Selected () = 1 OR _
  4982.          Lot_IsIBM_DDCS2_Selected () = 1 OR _
  4983.          Lot_IsODBCDriverSelected () = 1 OR _
  4984.          Lot_IsODBCSpreadSheetSelected () = 1 OR _
  4985.          Lot_IsODBCTextDriverSelected () = 1 OR _
  4986.          Lot_IsOracleSelected () = 1 OR _
  4987.          Lot_IsODBCBtrieveSelected () = 1 OR _
  4988.          Lot_IsODBCDB2Selected () = 1 OR _
  4989.          Lot_IsODBCFoxbaseSelected () = 1 OR _
  4990.          Lot_IsODBCAccessSelected () = 1 OR _
  4991.          Lot_IsODBCParadoxSelected () = 1 OR _
  4992.          Lot_IsODBCOracleSelected () = 1 OR _
  4993.          Lot_IsODBCSQLServerSelected () = 1 OR _
  4994.          Lot_IsNotesSQLSelected()=1 THEN
  4995.          IF DoesFileExist(FilePath$,femExists) =1 THEN
  4996.            CopyFile FilePath$, BackupPath$, cmoCopy, 1
  4997.            RemoveFile FilePath$, cmoNone
  4998.          END IF
  4999.  
  5000.       END IF
  5001.  
  5002.    END IF
  5003. Lot_BackupLotusBcfFile = SUCCESS
  5004. END FUNCTION
  5005. '*************************************************************************
  5006.  
  5007.  
  5008. FUNCTION Lot_WriteIniFiles() AS INTEGER
  5009. '** Purpose:    This function writes the Ini files
  5010. '** Author:     MZ
  5011. '** Arguments:  None
  5012. '** Symbols In: IniEntry
  5013. '** Returns:    SUCCESS
  5014. '*************************************************************************
  5015.    DIM inientrylistlen%,network$,entrycount%,entry$,notused%
  5016.    
  5017.    ' Find the entry list length
  5018.    IniEntryListLen% = GetListLength(SYM_INIENTRY$)
  5019.  
  5020.    IF IniEntryListLen%<>0 AND _
  5021.       DoesDirExist(gLotusappDir$) <> FALSE  THEN
  5022.       'Write Common directory entry into lotus.ini
  5023.       CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  5024.    END IF
  5025.  
  5026.    network$ = GetSymbolValue(SYM_NETWORK$)
  5027.    IF network$ = gNODE$ THEN
  5028.       'Write Net Common directory entry into lotus.ini
  5029.       CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(GetSymbolValue(SYM_NETLOTUSAPP$)), cmoOverwrite
  5030.    END IF
  5031.  
  5032.    ' For every entry write it in the INI file(s)
  5033.    FOR EntryCount% = 1 TO IniEntryListLen%
  5034.       ' Find if I have to update the lotus.ini/lotusapp.ini files
  5035.       Entry$ = GetListItem(SYM_INIENTRY$,EntryCount%)
  5036.       'print Entry$,STR(EntryCount%)
  5037.       IF Entry$<>"" THEN
  5038.          notused% = Lot_WriteEntry(Entry$,0)
  5039.       END IF
  5040.    Next
  5041.    Lot_WriteIniFiles = SUCCESS
  5042. END FUNCTION
  5043. '*************************************************************************
  5044.  
  5045. FUNCTION Lot_WriteEntry(Entry$,FromPreConfigFlag%) AS INTEGER
  5046. '** Purpose:    This function writes an entry in the INI files 
  5047. '**             and calls the OLE registration when needed
  5048. '** Author:     MZ
  5049. '** Arguments:  Entry$,FromPreConfigFlag%
  5050. '** Returns:    SUCCESS
  5051. '*************************************************************************
  5052.    DIM network$,gnetlotusappdir$,theentrywasrefreshed as integer, retstr$
  5053.    DIM retdatastr$, retuserstr$,notused%,MailApplication$
  5054.  
  5055.    network$ = GetSymbolValue(SYM_NETWORK$)
  5056.    'This is a big case statement for all the entries to write
  5057.    gLotusappDir$=GetSymbolValue(SYM_LOTUSAPPDIR$)
  5058.    gNetLotusappDir$=GetSymbolValue(SYM_NETLOTUSAPP$)
  5059.    'gLotusappIniPath$=GetSymbolValue(SYM_LOTUSAPPDIR$)+gLOTUSAPPINI$
  5060.    'gNetLotusappIniPath$=GetSymbolValue("SYM_NETLOTUSAPP")+gLOTUSAPPINI$
  5061.  
  5062.    IF network$=gNODE$ THEN
  5063.        TheEntryWasRefreshed = Lot_TheEntryWasRefreshed(Entry$)
  5064.    END IF
  5065.  
  5066.    'print gLotusappDir$,"gLotusappDir in WriteEntry"
  5067.    SELECT CASE Entry$
  5068.  
  5069.       case "IVCPROGRAM"
  5070.                 IF network$=gSTANDARD$ OR _
  5071.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5072.                    'Write into lotus.ini
  5073.                    'Write into lotusapp.ini
  5074.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5075.                    'Write into lotus.ini
  5076.                    'Write into lotusapp.ini
  5077.                 END IF
  5078.  
  5079.            case "CONTAINERFILEPROGRAM" 
  5080.                 IF network$=gSTANDARD$ OR _
  5081.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5082.                    'Write into lotus.ini                                                                                            
  5083.                    CreateIniKeyValue gLotusIniPath$, "Container File", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  5084.                    'Write into lotusapp.ini
  5085.                    'CreateIniKeyValue gLotusappIniPath$, "Container File", "Program Path", ".\", cmoOverwrite 
  5086.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5087.                    'Write into lotus.ini
  5088.                    CreateIniKeyValue gLotusIniPath$, "Container File", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
  5089.                    'Write into lotusapp.ini
  5090.                    'CreateIniKeyValue gNetLotusappIniPath$, "Container File", "Program Path", ".\", cmoOverwrite 
  5091.                 END IF
  5092.  
  5093.           case "DATALENSPROGRAM" 
  5094.                 IF network$=gSTANDARD$ OR _
  5095.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5096.                    'Write into lotus.ini
  5097.                    CreateIniKeyValue gLotusIniPath$, "DataLens", "Program Path", gLotusappDir$+"datalens", cmoOverwrite
  5098.                    'Write into lotusapp.ini
  5099.                    'CreateIniKeyValue gLotusappIniPath$, "DataLens", "Program Path", "\datalens", cmoOverwrite 
  5100.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5101.                    'Write into lotus.ini
  5102.                    CreateIniKeyValue gLotusIniPath$, "DataLens", "Program Path", gNetLotusappDir$+"datalens", cmoOverwrite
  5103.                    'Write into lotusapp.ini
  5104.                    'CreateIniKeyValue gNetLotusappIniPath$, "DataLens", "Program Path", "\datalens", cmoOverwrite 
  5105.                 END IF
  5106.  
  5107.           case "DATALENSDATA" 
  5108.                 IF network$=gSTANDARD$ OR _
  5109.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5110.                    'Write into lotus.ini; This is the path of *.BCF 
  5111.                    CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
  5112.                    'Write into lotusapp.ini
  5113.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5114.                    'Write into lotus.ini; This is the path of *.BCF which has to be local
  5115.                    CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
  5116.                    'Write into lotusapp.ini
  5117.                 END IF
  5118.  
  5119.          case "DIALOGEDITORPROGRAM"
  5120.                IF network$=gSTANDARD$ OR _
  5121.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5122.                    'Write into lotus.ini
  5123.                    CreateIniKeyValue gLotusIniPath$, "Dialog Editor", "Program Path", gLotusappDir$+"dialoged", cmoOverwrite
  5124.                    'Write into lotusapp.ini
  5125.                    'CreateIniKeyValue gLotusappIniPath$, "Dialog Editor", "Program Path", "\DIALOGED", cmoOverwrite 
  5126.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5127.                    'Write into lotus.ini
  5128.                    CreateIniKeyValue gLotusIniPath$, "Dialog Editor", "Program Path", _
  5129.                             gNetLotusappDir$+"dialoged", cmoOverwrite
  5130.                    'Write into lotusapp.ini
  5131.                    'CreateIniKeyValue gNetLotusappIniPath$, "Dialog Editor", "Program Path", "\DIALOGED", cmoOverwrite 
  5132.                 END IF
  5133.  
  5134.           case "DESKTOP"
  5135.                IF network$=gSTANDARD$ OR _
  5136.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5137.                    'Write into lotus.ini
  5138.                    'Write into lotusapp.ini
  5139.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5140.                    'Write into lotus.ini
  5141.                    'Write into lotusapp.ini
  5142.                 END IF
  5143.  
  5144.           case "DOCUMENTFILEFILTERSPROGRAM" 
  5145.                IF network$=gSTANDARD$ OR _
  5146.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5147.                    'Write into lotus.ini
  5148.                    CreateIniKeyValue gLotusIniPath$, "Document File Filters", "Program Path", _
  5149.                         gLotusappDir$+"excelflt\excelflt.flt", cmoOverwrite
  5150.                    'Write into lotusapp.ini
  5151.                    'CreateIniKeyValue gLotusappIniPath$, "Document File Filters", "Program Path", "\DOCFLT", cmoOverwrite 
  5152.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5153.                    'Write into lotus.ini
  5154.                    CreateIniKeyValue gLotusIniPath$, "Document File Filters", "Program Path", _
  5155.                         gNetLotusappDir$+"excelflt\excelflt.flt", cmoOverwrite
  5156.                    'Write into lotusapp.ini
  5157.                    'CreateIniKeyValue gNetLotusappIniPath$, "Document File Filters", "Program Path", "\DOCFLT", cmoOverwrite 
  5158.                 END IF
  5159.  
  5160.  
  5161.           case "GRAPHICSFILEFILTERSPROGRAM" 
  5162.                IF network$=gSTANDARD$ OR _
  5163.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5164.                   'Write into lotus.ini
  5165.                    CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Program Path", _
  5166.                         gLotusappDir$+"filters\isgdi9.dll",cmoOverwrite
  5167.                    'Write into lotusapp.ini
  5168.                    'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\FILTERS", cmoOverwrite 
  5169.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5170.                   'Write into lotus.ini
  5171.                    CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Program Path", _
  5172.                          gNetLotusappDir$+"filters\isgdi9.dll",cmoOverwrite
  5173.                    'Write into lotusapp.ini
  5174.                    'CreateIniKeyValue gNetLotusappIniPath$, "Graphics File Filters", "Program Path", "\FILTERS", cmoOverwrite 
  5175.                 END IF
  5176.  
  5177.  
  5178.           case "GRAPHICSFILEFILTERSFILTER" 
  5179.                 IF network$=gSTANDARD$ OR _
  5180.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5181.                    IF FromPreConfigFlag% = 1 THEN
  5182.                       retstr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Graphics File Filters", "Filter Path",NULLSTROK,INVALIDSTROK)
  5183.                       'Write into lotus.ini
  5184.                       IF retstr$<>"" THEN
  5185.                          CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
  5186.                                gLotusappDir$+"gphflt", cmoOverwrite
  5187.                          'Write into lotusapp.ini
  5188.                          'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\GPHFLT", cmoOverwrite 
  5189.                       END IF
  5190.                    ELSE
  5191.                       'Write into lotus.ini
  5192.                       CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
  5193.                             gLotusappDir$+"gphflt", cmoOverwrite
  5194.                       'Write into lotusapp.ini
  5195.                       'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\GPHFLT", cmoOverwrite 
  5196.                    END IF
  5197.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5198.                    'Write into lotus.ini
  5199.                    CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
  5200.                         gLotusappDir$+"gphflt", cmoOverwrite
  5201.                    'Write into lotusapp.ini
  5202.                    'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\GPHFLT", cmoOverwrite 
  5203.                 END IF
  5204.  
  5205.  
  5206.           case "ICONPALETTEPROGRAM" 
  5207.                 IF network$=gSTANDARD$ OR _
  5208.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5209.                    'Write into lotus.ini
  5210.                    CreateIniKeyValue gLotusIniPath$, "Icon Palette", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  5211.                    'Write into lotusapp.ini
  5212.                    'CreateIniKeyValue gLotusappIniPath$, "Icon Palette", "Program Path", ".\", cmoOverwrite 
  5213.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5214.                    'Write into lotus.ini
  5215.                    CreateIniKeyValue gLotusIniPath$, "Icon Palette", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
  5216.                    'Write into lotusapp.ini
  5217.                    'CreateIniKeyValue gNetLotusappIniPath$, "Icon Palette", "Program Path", ".\", cmoOverwrite 
  5218.                 END IF
  5219.  
  5220.           case "INFOBOXPROGRAM" 
  5221.                 IF network$=gSTANDARD$ OR _
  5222.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5223.                    'Write into lotus.ini
  5224.                    CreateIniKeyValue gLotusIniPath$, "InfoBox", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  5225.                    'Write into lotusapp.ini
  5226.                    'CreateIniKeyValue gLotusappIniPath$, "Info Box", "Program Path", ".\", cmoOverwrite 
  5227.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5228.                    'Write into lotus.ini
  5229.                    CreateIniKeyValue gLotusIniPath$, "InfoBox", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
  5230.                    'Write into lotusapp.ini
  5231.                    'CreateIniKeyValue gNetLotusappIniPath$, "Info Box", "Program Path", ".\", cmoOverwrite 
  5232.                 END IF
  5233.  
  5234.           case "SCRIPTPROGRAM" 
  5235.                 IF network$=gSTANDARD$ OR _
  5236.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5237.                    'Write into lotus.ini
  5238.                    CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gLotusappDir$+"script", cmoOverwrite
  5239.                    'Write into lotusapp.ini
  5240.                    'CreateIniKeyValue gLotusappIniPath$, "LotusScript", "Program Path", "\SCRIPT", cmoOverwrite 
  5241.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5242.                    'Write into lotus.ini
  5243.                    CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gNetLotusappDir$+"script", cmoOverwrite
  5244.                    'Write into lotusapp.ini
  5245.                    'CreateIniKeyValue gNetLotusappIniPath$, "LotusScript", "Program Path", "\SCRIPT", cmoOverwrite 
  5246.                 END IF
  5247.  
  5248.           case "MULTIMEDIAPROGRAM" 
  5249.                 IF network$=gSTANDARD$ OR _
  5250.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5251.                    'Write into lotus.ini
  5252.                    CreateIniKeyValue gLotusIniPath$, "Multimedia", "Program Path", gLotusappDir$+"multimed", cmoOverwrite
  5253.                    'CreateIniKeyValue gLotusIniPath$, "Lotus Applications", _
  5254.            '    "SCREENCAM", gLotusappDir$+"mutlimed\scrncam.exe Lotus ScreenCam",cmoOverwrite
  5255.                    'Write into lotusapp.ini
  5256.                    'CreateIniKeyValue gLotusappIniPath$, "Multimedia", "Program Path", "\MULTIMED", cmoOverwrite 
  5257.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5258.                    'Write into lotus.ini
  5259.                    CreateIniKeyValue gLotusIniPath$, "Multimedia", "Program Path", gNetLotusappDir$+"multimed", cmoOverwrite
  5260.                    'CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "SCREENCAM", _
  5261.            '        gNetLotusappDir$+"mutlimed\scrncam.exe Lotus ScreenCam",cmoOverwrite
  5262.                    'Write into lotusapp.ini
  5263.                    'CreateIniKeyValue gNetLotusappIniPath$, "Multimedia", "Program Path", "\MULTIMED", cmoOverwrite 
  5264.                 END IF
  5265.  
  5266.                 IF network$=gSTANDARD$ OR network$=gNODE$ THEN
  5267.                     'Write the OLE Registration
  5268.                    notused%=Lot_WriteOLERegForShare(Entry$,FromPreConfigFlag%) 
  5269.                 END IF
  5270.  
  5271.           case "MULTIMEDIADATA" 
  5272.                 IF network$=gSTANDARD$ OR _
  5273.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5274.                    'Write into lotus.ini
  5275.                    CreateIniKeyValue gLotusIniPath$, "Multimedia", "Data Path", gLotusappDir$+"multimed", cmoOverwrite
  5276.                    'Write into lotusapp.ini
  5277.                    'CreateIniKeyValue gLotusappIniPath$, "Multimedia", "Data Path", "\MULTIMED", cmoOverwrite
  5278.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5279.                    'Write into lotus.ini
  5280.                    CreateIniKeyValue gLotusIniPath$, "Multimedia", "Data Path", gNetLotusappDir$+"multimed", cmoOverwrite
  5281.                    'Write into lotusapp.ini
  5282.                    'CreateIniKeyValue gNetLotusappIniPath$, "Multimedia", "Data Path", "\MULTIMED", cmoOverwrite
  5283.                 END IF
  5284.  
  5285.           case "SPELLCHECKERPROGRAM" 
  5286.                 IF network$=gSTANDARD$ OR _
  5287.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5288.                   'Write into lotus.ini
  5289.                    CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Program Path", gLotusappDir$+"spell", cmoOverwrite
  5290.                    'Write into lotusapp.ini
  5291.                    'CreateIniKeyValue gLotusappIniPath$, "Spell Checker", "Program Path", "\SPELL", cmoOverwrite 
  5292.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5293.                    'Write into lotus.ini
  5294.                    CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Program Path", gNetLotusappDir$+"spell", cmoOverwrite
  5295.                    'Write into lotusapp.ini
  5296.                    'CreateIniKeyValue gNetLotusappIniPath$, "Spell Checker", "Program Path", "\SPELL", cmoOverwrite 
  5297.                 END IF
  5298.  
  5299.           case "SPELLCHECKERDATA" 
  5300.                 IF network$=gSTANDARD$ OR _
  5301.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5302.                    'Write into lotus.ini
  5303.                    CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Data Path", gLotusappDir$+"spell", cmoOverwrite
  5304.                    'Write into lotusapp.ini
  5305.                    'CreateIniKeyValue gLotusappIniPath$, "Spell Checker", "Data Path", "\SPELL", cmoOverwrite
  5306.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5307.                    'Write into lotus.ini
  5308.                    CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Data Path", gNetLotusappDir$+"spell", cmoOverwrite
  5309.                    'Write into lotusapp.ini
  5310.                    'CreateIniKeyValue gNetLotusappIniPath$, "Spell Checker", "Data Path", "\SPELL", cmoOverwrite
  5311.                 END IF
  5312.  
  5313.           case "SPELLCHECKERUSER" 
  5314.                 IF FromPreConfigFlag% = 0 THEN
  5315.                    'Write into lotus.ini
  5316.                    retstr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Spell Checker", "User Path",NULLSTROK,INVALIDSTROK)
  5317.  
  5318.                    IF retstr$="" THEN
  5319.                        CreateDir gLotusappDir$+"spell", cmoNone
  5320.                        CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path", gLotusappDir$+"spell", cmoOverwrite
  5321.                    END IF
  5322.                 ELSE
  5323.                    'Write into lotus.ini
  5324.                    CreateDir gLotusappDir$+"spell", cmoNone
  5325.                    CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path", gLotusappDir$+"spell", cmoOverwrite
  5326.                 END IF
  5327.  
  5328.           case "STATUSBARPROGRAM" 
  5329.                 IF network$=gSTANDARD$ OR _
  5330.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5331.                    'Write into lotus.ini
  5332.                    CreateIniKeyValue gLotusIniPath$, "Status Bar", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  5333.                    'Write into lotusapp.ini
  5334.                    'CreateIniKeyValue gLotusappIniPath$, "Status Bar", "Program Path", ".\", cmoOverwrite 
  5335.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5336.                    'Write into lotus.ini
  5337.                    CreateIniKeyValue gLotusIniPath$, "Status Bar", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
  5338.                    'Write into lotusapp.ini
  5339.                    'CreateIniKeyValue getLotusappIniPath$, "Status Bar", "Program Path", ".\", cmoOverwrite 
  5340.                 END IF
  5341.  
  5342.  
  5343.           case "TOOLSPROGRAM" 
  5344.                 IF network$=gSTANDARD$ OR _
  5345.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5346.                    'Write into lotus.ini
  5347.                    CreateIniKeyValue gLotusIniPath$, "TOOLS", "Program Path", gLotusappDir$+"tools", cmoOverwrite
  5348.                    'Write into lotusapp.ini
  5349.                    'CreateIniKeyValue gLotusappIniPath$, "TOOLS", "Program Path", "\TOOLS", cmoOverwrite 
  5350.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5351.                    'Write into lotus.ini
  5352.                    CreateIniKeyValue gLotusIniPath$, "TOOLS", "Program Path", gNetLotusappDir$+"tools", cmoOverwrite
  5353.                    'Write into lotusapp.ini
  5354.                    'CreateIniKeyValue gNetLotusappIniPath$, "TOOLS", "Program Path", "\TOOLS", cmoOverwrite 
  5355.                 END IF
  5356.  
  5357.           case "TOOLSDATA" 
  5358.                 IF network$=gSTANDARD$ OR _
  5359.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5360.                    'Write into lotus.ini
  5361.                    CreateIniKeyValue gLotusIniPath$, "TOOLS", "Data Path", Lot_TrimEndSlash(GetSymbolValue(SYM_WINDIR$)), cmoOverwrite
  5362.                    'Write into lotusapp.ini
  5363.                    'CreateIniKeyValue gLotusappIniPath$, "TOOLS", "Data Path", ".\", cmoOverwrite
  5364.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5365.                    'Write into lotus.ini
  5366.                    CreateIniKeyValue gLotusIniPath$, "TOOLS", "Data Path", Lot_TrimEndSlash(GetSymbolValue(SYM_WINDIR$)), cmoOverwrite
  5367.                    'Write into lotusapp.ini
  5368.                    'CreateIniKeyValue gNetLotusappIniPath$, "TOOLS", "Data Path", ".\", cmoOverwrite
  5369.                 END IF
  5370.  
  5371.           case "USERNAMESERVICESPROGRAM" 
  5372.                 IF network$=gSTANDARD$ OR _
  5373.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5374.                    'Write into lotus.ini
  5375.                    CreateIniKeyValue gLotusIniPath$, "User Name Service", "Program Path", gLotusappDir$+"uns", cmoOverwrite
  5376.                    'Write into lotusapp.ini
  5377.                    'CreateIniKeyValue gLotusappIniPath$, "User Name Service", "Program Path", "\UNS", cmoOverwrite 
  5378.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5379.                    'Write into lotus.ini
  5380.                    CreateIniKeyValue gLotusIniPath$, "User Name Service", "Program Path", gNetLotusappDir$+"uns", cmoOverwrite
  5381.                    'Write into lotusapp.ini
  5382.                    'CreateIniKeyValue gNetLotusappIniPath$, "User Name Service", "Program Path", "\UNS", cmoOverwrite 
  5383.                 END IF
  5384.  
  5385.                 'Write Alias User if does not exist
  5386.                 retstr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "User Name Service", "AliasUser",NULLSTROK,INVALIDSTROK)
  5387.                 IF retstr$="" THEN
  5388.                    CreateIniKeyValue gLotusIniPath$, "User Name Service", "AliasUser", GetSymbolValue(SYM_NAME$), cmoOverwrite
  5389.                 END IF
  5390.  
  5391.           case "FILTERS" 
  5392.                 IF network$=gSTANDARD$ OR _
  5393.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5394.                    'Write into lotus.ini
  5395.                    'Write into lotusapp.ini
  5396.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5397.                    'Write into lotus.ini
  5398.                    'Write into lotusapp.ini
  5399.                  END IF
  5400.  
  5401.           case "EXCELFLT" 
  5402.                 IF network$=gSTANDARD$ OR _
  5403.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5404.                    'Write into lotus.ini
  5405.                    'Write into lotusapp.ini
  5406.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5407.                    'Write into lotus.ini
  5408.                    'Write into lotusapp.ini
  5409.                  END IF
  5410.  
  5411.           case "HELPPROGRAM" 
  5412.                 IF network$=gSTANDARD$ OR _
  5413.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5414.                    'Write into lotus.ini
  5415.                    CreateIniKeyValue gLotusIniPath$, "Help", "Program Path", gLotusappDir$+"help", cmoOverwrite
  5416.                    'Write into lotusapp.ini
  5417.                    'CreateIniKeyValue gLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite 
  5418.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5419.                    'Write into lotus.ini
  5420.                    CreateIniKeyValue gLotusIniPath$, "Help", "Program Path", gNetLotusappDir$+"help", cmoOverwrite
  5421.                    'Write into lotusapp.ini
  5422.                    'CreateIniKeyValue gNetLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite 
  5423.                 END IF
  5424.  
  5425.           case "HELPDATA" 
  5426.                 IF network$=gSTANDARD$ OR _
  5427.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5428.                    'Write into lotus.ini
  5429.                    CreateIniKeyValue gLotusIniPath$, "Help", "Data Path", gLotusappDir$+"help", cmoOverwrite
  5430.                    'Write into lotusapp.ini
  5431.                    'CreateIniKeyValue gLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite 
  5432.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5433.                    'Write into lotus.ini
  5434.                    CreateIniKeyValue gLotusIniPath$, "Help", "Data Path", gNetLotusappDir$+"help", cmoOverwrite
  5435.                    'Write into lotusapp.ini
  5436.                    'CreateIniKeyValue gNetLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite 
  5437.                 END IF
  5438.  
  5439.          case "LOTUSSCRIPTPROGRAM"
  5440.                IF network$=gSTANDARD$ OR _
  5441.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5442.                    'Write into lotus.ini
  5443.                    CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gLotusappDir$+"script", cmoOverwrite
  5444.                    'Write into lotusapp.ini
  5445.                    'CreateIniKeyValue gLotusappIniPath$, "LotusScript", "Program Path", "\script", cmoOverwrite 
  5446.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5447.                    'Write into lotus.ini
  5448.                    CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", _
  5449.                             gNetLotusappDir$+"script", cmoOverwrite
  5450.                    'Write into lotusapp.ini
  5451.                    'CreateIniKeyValue gNetLotusappIniPath$, "LotusScript", "Program Path", "\script", cmoOverwrite 
  5452.                 END IF
  5453.  
  5454.          case "LOTUSDIALOGSPROGRAM"
  5455.                IF network$=gSTANDARD$ OR _
  5456.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5457.                    'Write into lotus.ini
  5458.                    CreateIniKeyValue gLotusIniPath$, "Lotus Dialogs", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  5459.                    'Write into lotusapp.ini
  5460.                    'CreateIniKeyValue gLotusappIniPath$, "Lotus Dialogs", "Program Path", ".\", cmoOverwrite 
  5461.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5462.                    'Write into lotus.ini
  5463.                    CreateIniKeyValue gLotusIniPath$, "Lotus Dialogs", "Program Path", _
  5464.                             Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
  5465.                    'Write into lotusapp.ini
  5466.                    'CreateIniKeyValue gNetLotusappIniPath$, "Lotus Dialogs", "Program Path", ".\", cmoOverwrite 
  5467.                 END IF
  5468.  
  5469.          case "MAILENABLINGPROGRAM"
  5470.                IF network$=gSTANDARD$ OR _
  5471.                    (network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
  5472.                    'Write into lotus.ini
  5473.                    CreateIniKeyValue gLotusIniPath$, "Mail Enabling", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
  5474.                    'Write into lotusapp.ini
  5475.                    'CreateIniKeyValue gLotusappIniPath$, "Mail Enabling", "Program Path", ".\", cmoOverwrite 
  5476.                 ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
  5477.                    'Write into lotus.ini
  5478.                    CreateIniKeyValue gLotusIniPath$, "Mail Enabling", "Program Path", _
  5479.                             Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
  5480.                    'Write into lotusapp.ini
  5481.                    'CreateIniKeyValue gNetLotusappIniPath$, "Mail Enabling", "Program Path", ".\", cmoOverwrite 
  5482.                 END IF
  5483.  
  5484.  
  5485.            END SELECT
  5486.  
  5487.    ' If the spell checker was installed and does not existe user path
  5488.    ' add the user path to point to the local lotusapp\spell dir
  5489.    retDataStr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Spell Checker", "Data Path",NULLSTROK,INVALIDSTROK)
  5490.    retUserStr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Spell Checker", "User Path",NULLSTROK,INVALIDSTROK)
  5491.  
  5492.    IF retDataStr$ <> "" AND retUserStr$ = "" THEN
  5493.       CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path", gLotusappDir$+"spell", cmoOverwrite
  5494.       CreateDir gLotusappDir$+"spell", cmoNone
  5495.    END IF
  5496.  
  5497.    Lot_WriteEntry = SUCCESS
  5498. END FUNCTION
  5499. '*************************************************************************
  5500.  
  5501. FUNCTION Lot_TheEntryWasRefreshed(Entry$) AS INTEGER
  5502. '** Purpose:    This function checks "REFRESHEDENTRIES" list and returns 
  5503. '**             1 if finds Entry$ and 0 if does not
  5504. '** Author:     MZ
  5505. '** Arguments:  Entry$
  5506. '** Symbols In: REFRESHEDENTRIES
  5507. '** Returns:    0 = NO
  5508. '**             1 = YES
  5509. '*************************************************************************
  5510.    DIM RefreshListLen%,EntryCount%,RefreshEntry$
  5511.  
  5512.    ' Find the entry list length
  5513.    RefreshListLen% = GetListLength("REFRESHEDENTRIES")
  5514.  
  5515.    IF RefreshListLen%=0  THEN
  5516.       'No entries were refreshed
  5517.       Lot_TheEntryWasRefreshed = 0
  5518.    ELSE
  5519.        FOR EntryCount%=1 TO RefreshListLen%
  5520.            RefreshEntry$ = GetListItem("REFRESHEDENTRIES",EntryCount%)
  5521.            IF RefreshEntry$=Entry$ THEN
  5522.                Lot_TheEntryWasRefreshed = 1
  5523.                Exit Function
  5524.            END IF
  5525.        Next
  5526.        Lot_TheEntryWasRefreshed = 0
  5527.    END IF
  5528.  
  5529. END FUNCTION
  5530. '*************************************************************************
  5531.  
  5532.  
  5533. FUNCTION Lot_WriteOLERegForShare(Entry$,FromPreConfigFlag%) AS INTEGER
  5534. '** Purpose:    This function writes OLE registration needed
  5535. '** Author:     MZ
  5536. '** Arguments:  Entry$,FromPreConfigFlag%
  5537. '** Returns:    SUCCESS
  5538. '*************************************************************************
  5539.    DIM LotusAppDir$,NetLotusAppDir$,NetworkIns$
  5540.  
  5541.    'This is a big case statement for all the OLE Registration to write
  5542.    LotusAppDir$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
  5543.    NetLotusAppDir$ = GetSymbolValue(SYM_NETLOTUSAPP$)
  5544.    NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  5545.  
  5546.  
  5547.    SELECT CASE Entry$
  5548.  
  5549.      case "IVCPROGRAM"
  5550.      case "CONTAINERFILEPROGRAM" 
  5551.      case "DATALENSPROGRAM" 
  5552.      case "DATALENSDATA" 
  5553.      case "DIALOGEDITORPROGRAM"
  5554.      case "DESKTOP"
  5555.      case "DOCUMENTFILEFILTERSPROGRAM" 
  5556.  
  5557.       case "GRAMMARCHECKERPROGRAM" 
  5558.       case "GRAMMARCHECKERDATA" 
  5559.       case "GRAPHICSFILEFILTERSPROGRAM" 
  5560.       case "GRAPHICSFILEFILTERSFILTER" 
  5561.       case "HYPHENATIONPROGRAM" 
  5562.       case "HYPHENATIONDATA" 
  5563.       case "ICONPALETTEPROGRAM" 
  5564.       case "INFOBOXPROGRAM" 
  5565.       case "SCRIPTPROGRAM" 
  5566.       case "MULTIMEDIAPROGRAM" 
  5567.  
  5568.             'Write the OLE Registration
  5569.  
  5570.             'Lotus Sound
  5571.             '***********
  5572.             'If standard install
  5573.             IF  NetworkIns$ = gSTANDARD THEN
  5574.                IF  DoesFileExist(LotusAppDir$+"MULTIMED\LOTUSSND.EXE",femExists)=1 THEN
  5575.                   SetRegKeyValue LdString(SID_LOTUSSOUND_STR), LdString(SID_LOTUSSOUND_VAL)
  5576.                   SetRegKeyValue LdString(SID_LOTUSSOUND_SHELL_STR), LdString(SID_LOTUSSOUND_SHELL_VAL)
  5577.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V2_STR), LdString(SID_LOTUSSOUND_PROT_V2_VAL)
  5578.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V1_STR), LdString(SID_LOTUSSOUND_PROT_V1_VAL)
  5579.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V0_STR), LdString(SID_LOTUSSOUND_PROT_V0_VAL)
  5580.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSSOUND_PROT_SRV_VAL)
  5581.                END IF
  5582.             'If node install
  5583.             ELSEIF NetworkIns$ = gNODE THEN
  5584.                IF  DoesFileExist(NetLotusAppDir$+"MULTIMED\LOTUSSND.EXE",femExists)=1 THEN
  5585.                   SetRegKeyValue LdString(SID_LOTUSSOUND_STR), LdString(SID_LOTUSSOUND_VAL)
  5586.                   SetRegKeyValue LdString(SID_LOTUSSOUND_SHELL_STR), LdString(SID_LOTUSSOUND_SHELL_VAL)
  5587.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V2_STR), LdString(SID_LOTUSSOUND_PROT_V2_VAL)
  5588.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V1_STR), LdString(SID_LOTUSSOUND_PROT_V1_VAL)
  5589.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V0_STR), LdString(SID_LOTUSSOUND_PROT_V0_VAL)
  5590.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_SRV_STR), NetLotusAppDir$+LdString(SID_LOTUSSOUND_PROT_SRV_VAL)
  5591.                ELSEIF  DoesFileExist(LotusAppDir$+"MULTIMED\LOTUSSND.EXE",femExists)=1 THEN
  5592.                   SetRegKeyValue LdString(SID_LOTUSSOUND_STR), LdString(SID_LOTUSSOUND_VAL)
  5593.                   SetRegKeyValue LdString(SID_LOTUSSOUND_SHELL_STR), LdString(SID_LOTUSSOUND_SHELL_VAL)
  5594.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V2_STR), LdString(SID_LOTUSSOUND_PROT_V2_VAL)
  5595.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V1_STR), LdString(SID_LOTUSSOUND_PROT_V1_VAL)
  5596.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V0_STR), LdString(SID_LOTUSSOUND_PROT_V0_VAL)
  5597.                   SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSSOUND_PROT_SRV_VAL)
  5598.                END IF
  5599.             END IF
  5600.             'Lotus Multimedia
  5601.             '****************
  5602.             'If standard install
  5603.             IF  NetworkIns$ = gSTANDARD THEN
  5604.                IF  DoesFileExist(LotusAppDir$+"MULTIMED\MEDMAN.EXE",femExists)=1 THEN
  5605.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_STR), LdString(SID_LOTUSMEDIA_VAL)
  5606.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_SHELL_STR), LotusAppDir$+"MULTIMED\"+LdString(SID_LOTUSMEDIA_SHELL_VAL)
  5607.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_HDLR_STR),LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_HDLR_VAL)
  5608.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V1_STR), LdString(SID_LOTUSMEDIA_PROT_V1_VAL)
  5609.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V0_STR), LdString(SID_LOTUSMEDIA_PROT_V0_VAL)
  5610.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_SRV_VAL)
  5611.                END IF
  5612.             'If node install
  5613.             ELSEIF NetworkIns$ = gNODE THEN
  5614.                IF  DoesFileExist(NetLotusAppDir$+"MULTIMED\MEDMAN.EXE",femExists)=1 THEN
  5615.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_STR), LdString(SID_LOTUSMEDIA_VAL)
  5616.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_SHELL_STR), NetLotusAppDir$+"MULTIMED\"+LdString(SID_LOTUSMEDIA_SHELL_VAL)
  5617.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_HDLR_STR),NetLotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_HDLR_VAL)
  5618.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V1_STR), LdString(SID_LOTUSMEDIA_PROT_V1_VAL)
  5619.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V0_STR), LdString(SID_LOTUSMEDIA_PROT_V0_VAL)
  5620.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_SRV_STR), NetLotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_SRV_VAL)
  5621.                ELSEIF DoesFileExist(LotusAppDir$+"MULTIMED\MEDMAN.EXE",femExists)=1 THEN
  5622.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_STR), LdString(SID_LOTUSMEDIA_VAL)
  5623.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_SHELL_STR), LotusAppDir$+"MULTIMED\"+LdString(SID_LOTUSMEDIA_SHELL_VAL)
  5624.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_HDLR_STR),LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_HDLR_VAL)
  5625.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V1_STR), LdString(SID_LOTUSMEDIA_PROT_V1_VAL)
  5626.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V0_STR), LdString(SID_LOTUSMEDIA_PROT_V0_VAL)
  5627.                   SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_SRV_VAL)
  5628.                END IF
  5629.             END IF
  5630.             'Lotus annotator
  5631.             '***************
  5632.             'If standard install
  5633.             IF  NetworkIns$ = gSTANDARD THEN
  5634.                 IF  DoesFileExist(LotusAppDir$+"MULTIMED\ANNOTATE.EXE",femExists)=1 THEN
  5635.                    SetRegKeyValue LdString(SID_LOTANNOTE_STR), LdString(SID_LOTANNOTE_VAL)
  5636.                    SetRegKeyValue LdString(SID_LOTANNOTE_PROT_V0_STR), LdString(SID_LOTANNOTE_PROT_V0_VAL)
  5637.                    SetRegKeyValue LdString(SID_LOTANNOTE_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTANNOTE_PROT_SRV_VAL)
  5638.                 END IF
  5639.             'If node install
  5640.             ELSEIF NetworkIns$ = gNODE THEN
  5641.                 IF  DoesFileExist(NetLotusAppDir$+"MULTIMED\ANNOTATE.EXE",femExists)=1 THEN
  5642.                    SetRegKeyValue LdString(SID_LOTANNOTE_STR), LdString(SID_LOTANNOTE_VAL)
  5643.                    SetRegKeyValue LdString(SID_LOTANNOTE_PROT_V0_STR), LdString(SID_LOTANNOTE_PROT_V0_VAL)
  5644.                    SetRegKeyValue LdString(SID_LOTANNOTE_PROT_SRV_STR), NetLotusAppDir$+LdString(SID_LOTANNOTE_PROT_SRV_VAL)
  5645.                 ELSEIF  DoesFileExist(LotusAppDir$+"MULTIMED\ANNOTATE.EXE",femExists)=1 THEN
  5646.                    SetRegKeyValue LdString(SID_LOTANNOTE_STR), LdString(SID_LOTANNOTE_VAL)
  5647.                    SetRegKeyValue LdString(SID_LOTANNOTE_PROT_V0_STR), LdString(SID_LOTANNOTE_PROT_V0_VAL)
  5648.                    SetRegKeyValue LdString(SID_LOTANNOTE_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTANNOTE_PROT_SRV_VAL)
  5649.                 END IF
  5650.             END IF
  5651.  
  5652.       case "MULTIMEDIADATA" 
  5653.       case "SPELLCHECKERPROGRAM" 
  5654.       case "SPELLCHECKERDATA" 
  5655.       case "SPELLCHECKERUSER" 
  5656.       case "STATUSBARPROGRAM" 
  5657.       case "THESAURUSPROGRAM" 
  5658.       case "THESAURUSDATA" 
  5659.       case "TOOLSPROGRAM" 
  5660.       case "TOOLSDATA" 
  5661.       case "USERNAMESERVICESPROGRAM" 
  5662.       case "FILTERS" 
  5663.       case "EXCELFLT" 
  5664.       case "HELPPROGRAM" 
  5665.       case "HELPDATA" 
  5666.       case "LOTUSSCRIPTPROGRAM" 
  5667.       case "LOTUSDIALOGSPROGRAM" 
  5668.       case "MAILENABLINGPROGRAM" 
  5669.  
  5670.    END SELECT
  5671.    Lot_WriteOLERegForShare = SUCCESS
  5672. END FUNCTION
  5673. '*************************************************************************
  5674.  
  5675.  
  5676. SUB CONSOLIDATELOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  5677. '** Purpose:   Processing  for DBM_CONSOLIDATE_LOTUSAPPDIR
  5678. '** Author:    MZ
  5679. '** Arguments: hDlg&, CtrlId&, Classes$, Inst&
  5680. '** Returns:
  5681. '*************************************************************************
  5682. STATIC gDriveIndex%, dirChanged%
  5683. DIM display$,dirToChange$,drive$,yesno&
  5684. ' unc start
  5685.    DIM    uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo&  '** MZ
  5686.    DIM    drvSel%, DriveChangedFlag%, i%, Inst%  '** MZ
  5687.    DIM    curCombo$, uncOff&, unusedPath$, NumDirs%
  5688.  
  5689.    Inst% = CINT(LInst&)
  5690.  
  5691.    IF INSTR(Classes$, "IDC_COMBO") THEN
  5692.       i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
  5693.       gDriveIndex% = Inst%
  5694.       dirChanged%   = TRUE
  5695.       curCombo$ = GetListItem("IDC_COMBO1", Inst%)
  5696.       fullPath$ = GetListItem("IDC_EDIT",1)
  5697.       Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
  5698.       uncOff& = INSTR(1, curCombo$, "\\") 
  5699.       IF uncOff > 0 THEN
  5700.     Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
  5701.       ELSE
  5702.     uncPath$ = ""
  5703.       END IF
  5704.       SetListItem "IDC_EDIT", 1, uncPath$ + dirPath$
  5705.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  5706.       EXIT SUB
  5707.    END IF
  5708. 'unc end
  5709.  
  5710.   SELECT CASE Classes$
  5711.     case "__DLGINIT"
  5712.        dirChanged%=FALSE
  5713.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)      
  5714.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)      
  5715.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  5716.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
  5717.        AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  5718.  
  5719.        display$ ="("+LdString(SID_SPACENEEDED)+STR$(gConsolidateSize&\1024)+gStrK$+")"
  5720.        SetListItem "IDC_TEXT", 6, display$
  5721.        AddListItem SYM_UPDATELIST$, "IDC_TEXT6"
  5722.  
  5723.        Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  5724.        AddListItem "UPDATELIST","IDC_COMBO1"
  5725.        dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
  5726.        SetListItem "IDC_EDIT", 1, dirToChange$
  5727.        gDriveIndex% = ValidateEditBox(hDlg& , 1)
  5728.  
  5729.        AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  5730.  
  5731.  
  5732.    case "IDC_COMBO1"
  5733.        dirChanged%=TRUE
  5734.        gDriveIndex% = CInt(Inst%)
  5735.  
  5736.    case "IDC_EDIT"
  5737.       dirChanged% = TRUE
  5738.  
  5739.    case "IDC_BRWSDIR"
  5740.     drvSel% = ValidateBrowse(hDlg& , Inst%) 
  5741.         dirChanged% = TRUE
  5742.  
  5743.  
  5744.    case "IDC_OK"
  5745.  
  5746. '    IF dirChanged% = TRUE THEN
  5747.        IF Lot_IsUnvalidatedUNCPath(GetListItem("IDC_EDIT",1)) = TRUE THEN
  5748.      ErrorMsgNoDlgExit SID_ERR_SHARED_NO_UNC, ""
  5749.          GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5750.        ELSE
  5751.          drvSel% = ValidateEditBox(hDlg& , 1)
  5752.          IF drvSel% = 0 THEN
  5753.            SetListItem "__LASTSTATUS", 1, "Q"
  5754.            EXIT SUB
  5755.          ELSE 
  5756.            gDriveIndex% = drvSel%
  5757.          END IF
  5758.        END IF
  5759.        dirToChange$ = LCASE$(MID$(GetListItem("IDC_COMBO1",gDriveIndex%), 1, 2)+ _
  5760.                        GetListItem("IDC_EDIT", 1))
  5761.        IF ValidatePath(dirToChange$) = FALSE THEN
  5762.          SetListItem "__LASTSTATUS", 1, "Q"
  5763.          GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5764.        END IF
  5765.        IF IsLongDirPath(dirToChange$) = TRUE THEN
  5766.          '** output "FAT path only" dialog
  5767.          ErrorMsgNoDlgExit SID_ERR_SHARED_NO_LONG, ""
  5768.          GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5769.        END IF
  5770. '    END IF
  5771.      'Validate the space
  5772.      IF GetFreeSpaceForDrive(dirToChange$) < (gConsolidateSize& \ 1024) THEN
  5773.        ShowPathError SID_DRV_NOTENOUGHSPACE, 0, dirToChange$
  5774.        SetListItem "__LASTSTATUS", 1, "Q"
  5775.        GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5776.      END IF
  5777.      'Validate the path against net lotus app
  5778.      IF dirToChange$ = GetSymbolValue(SYM_EXISTINGNETCOMMDIR$) THEN
  5779.        ShowPathError SID_ERR_SHARE_NETEQLOCAL1, SID_ERR_SHARE_NETEQLOCAL2, dirToChange$
  5780.        SetListItem "__LASTSTATUS", 1, "Q"
  5781.        GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5782.      END IF
  5783.      'Confirmation box
  5784.      yesno& = DoMsgBox(LdString(SID_SHAREDCONFIRMATION1) + "     " + dirToChange$ + _
  5785.             LdString(SID_SHAREDCONFIRMATION2),LdString(SID_SHAREDCONFIRMATION0), _
  5786.             MB_YESNO)
  5787.      If yesno& = CLNG(7) Then ''NO
  5788.        SetListItem "__LASTSTATUS", 1, "Q"
  5789.        GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5790.      End if
  5791.      'Set the symbol to move
  5792.      SetSymbolValue "SYM_MOVE", "1"
  5793.      SetSymbolValue "SYM_COPY", "0"
  5794.      'print "move"
  5795.      'Set the symbol to the new path
  5796.      SetSymbolValue SYM_LOTUSAPPDIR$, dirToChange$
  5797.      SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
  5798.      CreateDir dirToChange$, cmoNone
  5799.      Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
  5800.      DL_SetNotesDataPath
  5801.      DL_SetOraclePath
  5802.      GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5803.  
  5804.    case "IDC_CONTINUE"
  5805.      'Is a Copy
  5806. '    IF dirChanged% = TRUE THEN
  5807.        IF Lot_IsUnvalidatedUNCPath(GetListItem("IDC_EDIT",1)) = TRUE THEN
  5808.          ErrorMsgNoDlgExit SID_ERR_SHARED_NO_UNC, ""
  5809.          GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5810.        ELSE
  5811.          drvSel% = ValidateEditBox(hDlg& , 1)
  5812.          IF drvSel% = 0 THEN
  5813.            SetListItem "__LASTSTATUS", 1, "Q"
  5814.            EXIT SUB
  5815.          ELSE 
  5816.            gDriveIndex% = drvSel%
  5817.          END IF
  5818.        END IF
  5819.        dirToChange$ = LCASE$(MID$(GetListItem("IDC_COMBO1",gDriveIndex%), 1, 2)+ _
  5820.                        GetListItem("IDC_EDIT", 1))
  5821.  
  5822.        IF ValidatePath(dirToChange$) = FALSE THEN
  5823.          SetListItem "__LASTSTATUS", 1, "Q"
  5824.          GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5825.        END IF
  5826.        IF IsLongDirPath(dirToChange$) = TRUE THEN
  5827.          '** output "FAT path only" dialog
  5828.          ErrorMsgNoDlgExit SID_ERR_SHARED_NO_LONG, ""
  5829.          GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5830.        END IF
  5831. '    END IF
  5832.      'IF dirChanged% = TRUE THEN
  5833.         'Validate the space
  5834.         IF GetFreeSpaceForDrive(dirToChange$) < (gConsolidateSize& \ 1024) THEN
  5835.           ShowPathError SID_DRV_NOTENOUGHSPACE, 0, dirToChange$
  5836.           SetListItem "__LASTSTATUS", 1, "Q"
  5837.           GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5838.         END IF
  5839.         'Validate the path against net lotus app
  5840.         IF dirToChange$ = GetSymbolValue(SYM_EXISTINGNETCOMMDIR$) THEN
  5841.           ShowPathError SID_ERR_SHARE_NETEQLOCAL1, SID_ERR_SHARE_NETEQLOCAL2, dirToChange$
  5842.           SetListItem "__LASTSTATUS", 1, "Q"
  5843.           GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5844.         END IF
  5845.      'END IF
  5846.      'Confirmation box
  5847.      yesno& = DoMsgBox(LdString(SID_SHAREDCONFIRMATION1) + "     " + dirToChange$ + _
  5848.      LdString(SID_SHAREDCONFIRMATION2),LdString(SID_SHAREDCONFIRMATION0), _
  5849.             MB_YESNO)
  5850.  
  5851.      If yesno& = CLNG(7) Then ''NO
  5852.        SetListItem "__LASTSTATUS", 1, "Q"
  5853.        GOTO EXIT_CONSOLIDATELOTUSAPPDIR
  5854.      End if
  5855.  
  5856.      'Set the symbol to the new path
  5857.      SetSymbolValue "SYM_MOVE", "0"
  5858.      SetSymbolValue "SYM_COPY", "1"
  5859.  
  5860.      SetSymbolValue SYM_LOTUSAPPDIR$, dirToChange$
  5861.      SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
  5862.      CreateDir dirToChange$, cmoNone
  5863.      Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
  5864.      DL_SetNotesDataPath
  5865.      DL_SetOraclePath
  5866.   END SELECT    
  5867. EXIT_CONSOLIDATELOTUSAPPDIR:
  5868.  
  5869. END SUB
  5870.  
  5871. '*************************************************************************
  5872. SUB CONSOLIDATEMOVECOPYCB (hDlg&, CtrlId%, Classes$, Inst&)
  5873. '** Purpose:   Processing  for  DBM_CONSOLIDATE_MOVECOPY
  5874. '** Author:    MZ
  5875. '** Arguments: hDlg&, CtrlId&, Classes$, Inst&
  5876. '** Returns:
  5877. '*************************************************************************
  5878. STATIC gDriveIndex%, dirChanged%
  5879. DIM display$,dirToChange$,drive$
  5880.  
  5881.   SELECT CASE Classes$
  5882.     case "__DLGINIT"
  5883.        dirChanged%=FALSE
  5884.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)      
  5885.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)      
  5886.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  5887.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
  5888.        AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  5889.  
  5890.        display$ ="("+LdString(SID_SPACENEEDED)+STR$(gConsolidateSize&\1024)+gStrK$+")"
  5891.        SetListItem "IDC_TEXT", 6, display$
  5892.        AddListItem SYM_UPDATELIST$, "IDC_TEXT6"
  5893.  
  5894.  
  5895.     case "IDC_OK"
  5896.          ' is a MOVE
  5897.          'print "move"     
  5898.          SetSymbolValue "SYM_MOVE", "1"
  5899.          SetSymbolValue "SYM_COPY", "0"
  5900.          GOTO EXIT_CONSOLIDATEMOVECOPY
  5901.  
  5902.     case "IDC_CONTINUE"
  5903.           ' Is a copy
  5904.           'print "copy"     
  5905.          SetSymbolValue "SYM_MOVE", "0"
  5906.          SetSymbolValue "SYM_COPY", "1"
  5907.          GOTO EXIT_CONSOLIDATEMOVECOPY
  5908.  
  5909.   END SELECT    
  5910. EXIT_CONSOLIDATEMOVECOPY:
  5911.  
  5912. END SUB
  5913. '*************************************************************************
  5914.  
  5915. '*************************************************************************
  5916. SUB ISTHISNETLOTUSAPPCB (hDlg&, CtrlId%, Classes$, Inst&)
  5917. '** Purpose:   Processing  for  DBM_ISTHISNETLOTUSAPP
  5918. '** Author:    MZ
  5919. '** Arguments: hDlg&, CtrlId&, Classes$, Inst&
  5920. '** Returns:
  5921. '*************************************************************************
  5922. STATIC gDriveIndex%, dirChanged%, ExistingCommonDir$
  5923. DIM display$,dirToChange$,drive$
  5924.  
  5925.   SELECT CASE Classes$
  5926.     case "__DLGINIT"
  5927.        ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
  5928.        SetListItem "IDC_TEXT", 3, ExistingCommonDir$
  5929.        AddListItem SYM_UPDATELIST$, "IDC_TEXT3"
  5930.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)      
  5931.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  5932.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
  5933.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
  5934.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT7)
  5935.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT8)
  5936.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT9)
  5937.        AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT10)
  5938.        AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  5939.  
  5940.  
  5941.     case "IDC_CONTINUE"
  5942.          ' is not a network lotusapp
  5943.          'print "is not network lotusapp"     
  5944.          GOTO EXIT_ISTHISNETLOTUSAPP
  5945.  
  5946.     case "IDC_OK"
  5947.           ' Is a network lotusapp
  5948.          ' print "is a network lotusapp"     
  5949.           CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(ExistingCommonDir$), cmoOverwrite
  5950.           RemoveIniKey gLotusIniPath$, "Lotus Applications", "Common Directory", cmoVital
  5951.           GOTO EXIT_ISTHISNETLOTUSAPP
  5952.  
  5953.   END SELECT    
  5954. EXIT_ISTHISNETLOTUSAPP:
  5955.  
  5956. END SUB
  5957. '*************************************************************************
  5958.  
  5959.  
  5960.  
  5961. SUB SQLSERVERNAMECB (hDlg&, CtrlId%, Classes$, Inst&)
  5962. '** Purpose:
  5963. '** Author:    MZ
  5964. '** Arguments: hDlg&, CtrlId&, Classes$, Inst&
  5965. '** Returns:
  5966. '*************************************************************************
  5967.   DIM tempbuf$
  5968.  
  5969.   SELECT CASE Classes$
  5970.     case "__DLGINIT"
  5971.           AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  5972.           AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  5973.  
  5974.           tempbuf$ = GetSymbolValue (SYM_SQLSERVERNAME$)
  5975.           SetListItem "IDC_EDIT",1,tempbuf$
  5976.           AddListItem "UPDATELIST","IDC_EDIT1"
  5977.       
  5978.     case "IDC_OK"
  5979.       IF LEN( GetListItem ("IDC_EDIT", 1)) > 0 THEN
  5980.          SetSymbolValue SYM_SQLSERVERNAME$, GetListItem ("IDC_EDIT", 1)
  5981.       END IF
  5982.  
  5983.     END SELECT    
  5984. END SUB
  5985. '*************************************************************************
  5986.  
  5987. SUB PARADOXNETWORKINFOCB (hDlg&, CtrlId%, Classes$, Inst&)
  5988. '** Purpose:
  5989. '** Author:    MZ
  5990. '** Arguments: hDlg&, CtrlId&, Classes$, Inst&
  5991. '** Returns:
  5992. '*************************************************************************
  5993.   DIM tempbuf$,buttonsetting$, notused%
  5994.  
  5995.   SELECT CASE Classes$
  5996.     case "__DLGINIT"
  5997.          AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  5998.          AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  5999.          AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  6000.  
  6001.          tempbuf$ = GetSymbolValue (SYM_PARADOXNETWORKINFO$)
  6002.          If tempbuf$ = "" Then
  6003.             SetListItem "IDC_B", 1, "F"
  6004.             SetListItem "IDC_B", 2, "F"
  6005.  
  6006.             notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),0)
  6007.             notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),0)
  6008.             notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),0)
  6009.             notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),0)
  6010.  
  6011.           else
  6012.              SetListItem "IDC_B", 1, "T"
  6013.              SetListItem "IDC_B", 2, "T"
  6014.              notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),1)
  6015.              notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),1)
  6016.              notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),1)
  6017.              notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),1)
  6018.              SetListItem "IDC_EDIT",1,tempbuf$
  6019.           end if 
  6020.  
  6021.          AddListItem "UPDATELIST", "IDC_B1"
  6022.          AddListItem "UPDATELIST", "IDC_B2"
  6023.          AddListItem "UPDATELIST", "IDC_EDIT1"
  6024.  
  6025.     case "IDC_B"
  6026.         ButtonSetting$ = GetListItem ("IDC_B", 1)
  6027.         IF Inst&=1 THEN
  6028.            IF ButtonSetting$ = "T" THEN
  6029.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),1)
  6030.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),1)
  6031.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),1)
  6032.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),1)
  6033.  
  6034.            ELSEIF ButtonSetting$ = "F" THEN
  6035.               SetListItem "IDC_B", 2, "F"
  6036.               SetListItem "IDC_EDIT",1, " "
  6037.               AddListItem "UPDATELIST", "IDC_B2"
  6038.               AddListItem "UPDATELIST", "IDC_EDIT1"
  6039.  
  6040.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),0)
  6041.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),0)
  6042.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),0)
  6043.               notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),0)
  6044.  
  6045.             END IF
  6046.  
  6047.         ELSEIF Inst&=2 THEN
  6048.         END IF
  6049.  
  6050.     case "IDC_OK"
  6051.          IF LEN( GetListItem ("IDC_EDIT", 1)) > 0 AND _
  6052.             GetListItem ("IDC_B", 1) ="T" AND _
  6053.             GetListItem ("IDC_B", 2) ="T" THEN
  6054.             SetSymbolValue SYM_PARADOXNETWORKINFO$, GetListItem ("IDC_EDIT", 1)
  6055.          ELSEIF LEN( GetListItem ("IDC_EDIT", 1)) = 0 OR _
  6056.             GetListItem ("IDC_B", 1) ="F" OR _
  6057.             GetListItem ("IDC_B", 2) ="F" THEN
  6058.             SetSymbolValue SYM_PARADOXNETWORKINFO$, ""
  6059.          END IF
  6060.  
  6061.     END SELECT    
  6062. END SUB
  6063. '*************************************************************************
  6064.  
  6065. FUNCTION Lot_WriteODBCINST() AS INTEGER
  6066. '** Purpose:    This function writes the ODBCINST.INI file
  6067. '** Author:     PJT
  6068. '** Arguments:  None
  6069. '** Returns:    SUCCESS
  6070. '*************************************************************************
  6071.    DIM DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6072.    DIM ODBC20_SQLLvl$, ODBC20_APILvl$, ODBC20_FUsage$, ODBC20_FExtns$
  6073.    DIM ODBC20_DrvVer$, ODBC20_Connct$
  6074.    DIM DL_AdminPath$, DL_AdminSect$, DL_AdminKey$, DL_AdminVal$ 
  6075.    DIM TmpWinSysPath$, TmpWinPath$, TmpIniPath$
  6076.    DIM ODBCInstalled%
  6077.    DIM XLAT_Sect$, XLAT_Inst$, XLAT_KEY$, XLAT_Name$, XLAT_DLL$
  6078.    DIM XLAT_Setup$, XLAT_SetupKey$
  6079.    DIM notused%
  6080.    
  6081.    TmpWinPath$ = GetWindowsDir()
  6082.    TmpWinSysPath$ = GetSymbolValue(SYM_WINSYSDIR$)
  6083.    
  6084.    ODBCInstalled% = 0
  6085.  
  6086.    IF Lot_IsTheFeatureInstalled("SHRDBASEPRG") = 1 THEN
  6087.       DL_DriverDesc$ = LdString( SID_DATALENS_DBDESC )
  6088.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_DATALENS_DBPATH )
  6089.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_DATALENS_DBSETUP )
  6090.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6091.       notused% = Lot_ModifyODBC()
  6092.       notused% = Lot_ModifyDataLensIni()
  6093.       ODBCInstalled% = 1
  6094.    END IF
  6095.  
  6096.    IF Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG") = 1 THEN
  6097.       DL_DriverDesc$ = LdString( SID_DATALENS_NSQLDESC )
  6098.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_DATALENS_NSQLPATH )
  6099.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_DATALENS_NSQLSETU )
  6100.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6101.       ODBCInstalled% = 1
  6102.    END IF
  6103.    '** ODBC SPECIFIC STRINGS
  6104.    '**  SPREADSHEET SPECIFIC STRINGS
  6105.    IF Lot_IsTheFeatureInstalled("SHRODBCWKSPRG") = 1 THEN
  6106.       DL_DriverDesc$ = LdString( SID_ODBC_SSDESC )
  6107.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_SSPATH )
  6108.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_SSSETUP )
  6109.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6110.       ODBCInstalled% = 1
  6111.    END IF
  6112.  
  6113.    '** ODBC TEXT SPECIFIC STRINGS
  6114.    IF Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG") = 1 THEN
  6115.       DL_DriverDesc$ = LdString( SID_ODBC_TEXTDESC )
  6116.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_TEXTPATH )
  6117.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_TEXTSETUP )
  6118.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6119.       ODBC20_SQLLvl$ = LdString( SID_ODBC_TEXT_SQLLVL )
  6120.       ODBC20_APILvl$ = LdString( SID_ODBC_TEXT_APILVL )
  6121.       ODBC20_FUsage$ = LdString( SID_ODBC_TEXT_USAGE )
  6122.       ODBC20_FExtns$ = LdString( SID_ODBC_TEXT_EXT )
  6123.       ODBC20_DrvVer$ = LdString( SID_ODBC_TEXT_VER )
  6124.       ODBC20_Connct$ = LdString( SID_ODBC_TEXT_CONNECT )
  6125.       WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
  6126.                       ODBC20_FUsage$, ODBC20_FExtns$, _
  6127.                       ODBC20_DrvVer$, ODBC20_Connct$
  6128.       ODBCInstalled% = 1
  6129.    END IF
  6130.  
  6131.    '** ODBC BTRIEVE SPECIFIC STRINGS
  6132.    IF Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG") = 1 THEN
  6133.       DL_DriverDesc$ = LdString( SID_ODBC_BTRIEVEDESC )
  6134.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_BTRIEVEPATH )
  6135.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_BTRIEVESETUP )
  6136.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6137.       ODBC20_SQLLvl$ = LdString( SID_ODBC_BTRIEVE_SQLLVL )
  6138.       ODBC20_APILvl$ = LdString( SID_ODBC_BTRIEVE_APILVL )
  6139.       ODBC20_FUsage$ = LdString( SID_ODBC_BTRIEVE_USAGE )
  6140.       ODBC20_FExtns$ = LdString( SID_ODBC_BTRIEVE_EXT )
  6141.       ODBC20_DrvVer$ = LdString( SID_ODBC_BTRIEVE_VER )
  6142.       ODBC20_Connct$ = LdString( SID_ODBC_BTRIEVE_CONNECT )
  6143.       WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
  6144.                       ODBC20_FUsage$, ODBC20_FExtns$, _
  6145.                       ODBC20_DrvVer$, ODBC20_Connct$
  6146.       ODBCInstalled% = 1
  6147.     END IF
  6148.  
  6149.    '** ODBC FOXBASE SPECIFIC STRINGS
  6150.     IF Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG") = 1 THEN
  6151.        DL_DriverDesc$ = LdString( SID_ODBC_FOXBASEDESC )
  6152.        DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_FOXBASEPATH )
  6153.        DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_FOXBASESETUP )
  6154.        WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6155.        ODBC20_SQLLvl$ = LdString( SID_ODBC_FOXBASE_SQLLVL )
  6156.        ODBC20_APILvl$ = LdString( SID_ODBC_FOXBASE_APILVL )
  6157.        ODBC20_FUsage$ = LdString( SID_ODBC_FOXBASE_USAGE )
  6158.        ODBC20_FExtns$ = LdString( SID_ODBC_FOXBASE_EXT )
  6159.        ODBC20_DrvVer$ = LdString( SID_ODBC_FOXBASE_VER )
  6160.        ODBC20_Connct$ = LdString( SID_ODBC_FOXBASE_CONNECT )
  6161.        WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
  6162.                        ODBC20_FUsage$, ODBC20_FExtns$, _
  6163.                        ODBC20_DrvVer$, ODBC20_Connct$
  6164.        ODBCInstalled% = 1
  6165.    END IF
  6166.  
  6167.    '** ODBC  ACCESS SPECIFIC STRINGS
  6168.    IF Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG") = 1 THEN
  6169.       DL_DriverDesc$ = LdString( SID_ODBC_ACCESSDESC )
  6170.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_ACCESSPATH )
  6171.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_ACCESSSETUP )
  6172.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6173.       ODBC20_SQLLvl$ = LdString( SID_ODBC_ACCESS_SQLLVL )
  6174.       ODBC20_APILvl$ = LdString( SID_ODBC_ACCESS_APILVL )
  6175.       ODBC20_FUsage$ = LdString( SID_ODBC_ACCESS_USAGE )
  6176.       ODBC20_FExtns$ = LdString( SID_ODBC_ACCESS_EXT )
  6177.       ODBC20_DrvVer$ = LdString( SID_ODBC_ACCESS_VER )
  6178.       ODBC20_Connct$ = LdString( SID_ODBC_ACCESS_CONNECT )
  6179.       WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
  6180.                       ODBC20_FUsage$, ODBC20_FExtns$, _
  6181.                       ODBC20_DrvVer$, ODBC20_Connct$
  6182.     ODBCInstalled% = 1
  6183.     END IF
  6184.  
  6185.    '** ODBC PARADOX SPECIFIC STRINGS
  6186.    IF Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG") = 1 THEN
  6187.       DL_DriverDesc$ = LdString( SID_ODBC_PARADOXDESC )
  6188.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_PARADOXPATH )
  6189.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_PARADOXSETUP )
  6190.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6191.       ODBC20_SQLLvl$ = LdString( SID_ODBC_PARADOX_SQLLVL )
  6192.       ODBC20_APILvl$ = LdString( SID_ODBC_PARADOX_APILVL )
  6193.       ODBC20_FUsage$ = LdString( SID_ODBC_PARADOX_USAGE )
  6194.       ODBC20_FExtns$ = LdString( SID_ODBC_PARADOX_EXT )
  6195.       ODBC20_DrvVer$ = LdString( SID_ODBC_PARADOX_VER )
  6196.       ODBC20_Connct$ = LdString( SID_ODBC_PARADOX_CONNECT )
  6197.       WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
  6198.                       ODBC20_FUsage$, ODBC20_FExtns$, _
  6199.                       ODBC20_DrvVer$, ODBC20_Connct$
  6200.       ODBCInstalled% = 1
  6201.    END IF
  6202.   
  6203.    '** ODBC DB2 SPECIFIC STRINGS
  6204.    IF Lot_IsTheFeatureInstalled("SHRODBCDB2PRG") = 1 THEN
  6205.       DL_DriverDesc$ = LdString( SID_ODBC_DB2DESC )
  6206.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_DB2PATH )
  6207.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_DB2SETUP )
  6208.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6209.       ODBCInstalled% = 1
  6210.    END IF
  6211.  
  6212.    '**  ODBC ORACLE SPECIFIC STRINGS
  6213.    IF Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG") = 1 THEN
  6214.       DL_DriverDesc$ = LdString( SID_ODBC_ORADESC )
  6215.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_ORAPATH )
  6216.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_ORASETUP )
  6217.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6218.       ODBCInstalled% = 1
  6219.    END IF
  6220.  
  6221.    '**  ODBC SQLServer SPECIFIC STRINGS
  6222.    IF Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG") = 1 THEN
  6223.       DL_DriverDesc$ = LdString( SID_ODBC_SQLDESC )
  6224.       DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_SQLPATH )
  6225.       DL_SetupPath$ =  TmpWinSysPath$ + LdString( SID_ODBC_SQLSETUP )
  6226.       WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
  6227.       ODBCInstalled% = 1
  6228.       XLAT_Sect$ = LdString( SID_ODBC_XLAT_SECTION )
  6229.       XLAT_Inst$ = LdString( SID_ODBC_XLAT_INSTALLED )
  6230.       XLAT_Name$ = LdString( SID_ODBC_XLAT_NAME )
  6231.       XLAT_KEY$  = LdString( SID_ODBC_XLAT_KEYWORD )
  6232.       XLAT_DLL$ = TmpWinSysPath$ + LdString( SID_ODBC_XLAT_DLL )
  6233.       XLAT_Setup$ = TmpWinSysPath$ + LdString( SID_ODBC_XLAT_SETUP )
  6234.       XLAT_SetupKey$ = LdString( SID_DATALENS_ODBCINST_SET )
  6235.       TmpIniPath$ = GetWindowsDir() + LdString(SID_DATALENS_ODBCINST_PATH)
  6236.       CreateIniKeyValue TmpIniPath$, XLAT_Sect$, XLAT_Name$, _
  6237.                      XLAT_Inst$, cmoOverwrite
  6238.       CreateIniKeyValue TmpIniPath$, XLAT_Name$, XLAT_KEY$, XLAT_DLL$, _
  6239.                      cmoOverwrite
  6240.       CreateIniKeyValue TmpIniPath$, XLAT_Name$, XLAT_SetupKey$, _
  6241.                      XLAT_Setup$,  cmoOverwrite
  6242.    END IF
  6243.    
  6244.    IF ODBCInstalled% = 1 THEN
  6245.       DL_AdminPath$ = TmpWinPath$ + LdString( SID_ODBC_ADMIN_INIFILE )
  6246.       'print "Admin Path: " & DL_AdminPath$
  6247.       DL_AdminSect$ = LdString( SID_ODBC_ADMIN_SECTION )
  6248.       'print "Admin Section: " & DL_AdminSect$
  6249.       DL_AdminKey$  = LdString( SID_ODBC_ADMIN_KEYWORD )
  6250.       'print "Admin Keyword: " & DL_AdminKey$
  6251.       DL_AdminVal$  = TmpWinSysPath$ + LdString( SID_ODBC_ADMIN_PRG )
  6252.       'print "Admin Value: " & DL_AdminVal$
  6253.       CreateIniKeyValue DL_AdMinPath$, DL_AdminSect$, DL_AdminKey$, _
  6254.                         DL_AdminVal$, cmoOverwrite
  6255.    END IF
  6256.    
  6257. Lot_WriteODBCINST = SUCCESS
  6258. END FUNCTION
  6259.  
  6260. SUB WriteODBCINST ( DriverDesc$, DriverPath$, SetupPath$ )
  6261. '** Purpose:   Write the Driver Entries to the ODBCINST.INI
  6262. '** Author:    PJT
  6263. '** Arguments: DriverDesc$, DriverPath$, SetupPath$
  6264. '** Returns:
  6265. '*************************************************************************
  6266.    DIM TmpIniPath$
  6267.    DIM ODBCINSTPath$, ODBCDriverSection$, ODBCInstallKeyword$
  6268.    DIM ODBCDriverKeyword$, ODBCSetupKeyword$
  6269.  
  6270.    ODBCINSTPath$ = LdString(SID_DATALENS_ODBCINST_PATH)
  6271.    ODBCDriverSection$ = LdString(SID_DATALENS_ODBCINST_ODBC)
  6272.    ODBCInstallKeyword$ = LdString(SID_DATALENS_ODBCINST_INST)
  6273.    ODBCDriverKeyword$ = LdString(SID_DATALENS_ODBCINST_DRVR)
  6274.    ODBCSetupKeyword$ = LdString(SID_DATALENS_ODBCINST_SET)
  6275.  
  6276.    TmpIniPath$ = GetWindowsDir() + ODBCINSTPath$
  6277.    
  6278.    CreateIniKeyValue TmpIniPath$, ODBCDriverSection$, DriverDesc$, _
  6279.                      ODBCInstallKeyword$, cmoOverwrite
  6280.    CreateIniKeyValue TmpIniPath$, DriverDesc$, ODBCDriverKeyword$, _
  6281.                      DriverPath$,  cmoOverwrite
  6282.    CreateIniKeyValue TmpIniPath$, DriverDesc$, ODBCSetupKeyword$, _
  6283.                      SetupPath$,  cmoOverwrite
  6284.  
  6285. END SUB
  6286. '*************************************************************************
  6287. 'NEW!!
  6288. SUB WriteODBC20INST ( DriverDesc$, SQLLvl$, APILvl$,  Usage$, Ext$, DrvVer$, Cnnct$ )
  6289. '** Purpose:   Write the ODBC 2.0 Driver Entries to the ODBCINST.INI
  6290. '** Author:    PJT
  6291. '** Arguments: DriverDesc$, DriverPath$, SetupPath$
  6292. '** Returns:
  6293. '*************************************************************************
  6294.    DIM TmpIniPath$
  6295.    DIM ODBCINSTPath$, ODBCDriverSection$
  6296.    
  6297.    DIM ODBCSQLLevelKeyword$, ODBCAPILevelKeyword$
  6298.    DIM ODBCFileUsageKeyword$, ODBCFileExtnsKeyword$
  6299.    DIM ODBCDriverVerKeyword$, ODBCConnectKeyword$
  6300.  
  6301.    ODBCINSTPath$ = LdString(SID_DATALENS_ODBCINST_PATH)
  6302.    ODBCDriverSection$ = LdString(SID_DATALENS_ODBCINST_ODBC)
  6303.  
  6304.    ODBCSQLLevelKeyword$ = LdString(SID_DATALENS_ODBCINST_SQLLVL)
  6305.    ODBCAPILevelKeyword$ = LdString(SID_DATALENS_ODBCINST_APILVL)
  6306.    ODBCFileUsageKeyword$ = LdString(SID_DATALENS_ODBCINST_USAGE)
  6307.    ODBCFileExtnsKeyword$ = LdString(SID_DATALENS_ODBCINST_EXT)
  6308.    ODBCDriverVerKeyword$ = LdString(SID_DATALENS_ODBCINST_VER)
  6309.    ODBCConnectKeyword$ = LdString(SID_DATALENS_ODBCINST_CONNECT)
  6310.  
  6311.    TmpIniPath$ = GetWindowsDir() + ODBCINSTPath$
  6312.    CreateIniKeyValue TmpIniPath$, DriverDesc$, _
  6313.                      ODBCSQLLevelKeyword$, _
  6314.                      SQLLvl$, _
  6315.                      cmoOverwrite
  6316.    CreateIniKeyValue TmpIniPath$, DriverDesc$, _
  6317.                      ODBCAPILevelKeyword$, _
  6318.                      APILvl$, _
  6319.                      cmoOverwrite
  6320.    CreateIniKeyValue TmpIniPath$, DriverDesc$, _
  6321.                      ODBCFileUsageKeyword$, _
  6322.                      Usage$, _
  6323.                      cmoOverwrite
  6324.    CreateIniKeyValue TmpIniPath$, DriverDesc$, _
  6325.                      ODBCFileExtnsKeyword$, _
  6326.                      Ext$, _
  6327.                      cmoOverwrite
  6328.    CreateIniKeyValue TmpIniPath$, DriverDesc$, _
  6329.                      ODBCDriverVerKeyword$, _
  6330.                      DrvVer$, _
  6331.                      cmoOverwrite
  6332.    CreateIniKeyValue TmpIniPath$, DriverDesc$, _
  6333.                      ODBCConnectKeyword$, _
  6334.                      Cnnct$, _
  6335.                      cmoOverwrite
  6336. END SUB
  6337. '*************************************************************************
  6338. 'End NEW!!
  6339.  
  6340. FUNCTION Lot_ModifyODBC() AS INTEGER
  6341. '** Purpose:    This modifies the ODBC.INI file.  Changing the QODBF entries
  6342. '**             to LODBF04 entries, and changing "DataLens" entries to
  6343. '**             "Lotus Q+E dBASE" entries.
  6344. '** Author:     PJT
  6345. '** Arguments:  None
  6346. '** Returns:    SUCCESS
  6347. '*************************************************************************
  6348.    DIM TmpIniPath$
  6349.    DIM ODBCPath$, ODBCSection1$, ODBCKeyword1$, ODBCReplacement1$
  6350.    DIM ODBCSection2$, ODBCKeyword2$, ODBCReplacement2$
  6351.    DIM notused&
  6352.        
  6353.    ODBCPath$ = LdString(SID_DATALENS_ODBCINI_PATH)
  6354.    ODBCSection1$ = LdString(SID_DATALENS_ODBCINI_SECT1)
  6355.    ODBCKeyword1$ = LdString(SID_DATALENS_ODBCINI_KEY1)
  6356.    ODBCReplacement1$ = LdString(SID_DATALENS_ODBCINI_REPL1)
  6357.    ODBCSection2$ = LdString(SID_DATALENS_ODBCINI_SECT2)
  6358.    ODBCKeyword2$ = LdString(SID_DATALENS_ODBCINI_KEY2)
  6359.    ODBCReplacement2$ = LdString(SID_DATALENS_ODBCINI_REPL2)
  6360.  
  6361.    TmpIniPath$ = GetWindowsDir() + ODBCPath$
  6362. '  This is commented out because the BCFMOD.DLL was not ported to 32 bit
  6363.    notused& = FixODBCiniSources( TmpIniPath$, _
  6364.                      ODBCSection1$, ODBCKeyword1$, ODBCReplacement1$, _
  6365.               ODBCSection2$, ODBCKeyword2$, ODBCReplacement2$ )
  6366.    Lot_ModifyODBC = SUCCESS
  6367.  
  6368. END FUNCTION
  6369. '*************************************************************************
  6370.  
  6371. '*************************************************************************
  6372. FUNCTION Lot_ModifyDataLensIni() AS INTEGER
  6373. '** Purpose:    This modifies the DATALENS.INI file.  Changing the QODBF entries
  6374. '**             to LODBF04 entries
  6375. '** Author:     PJT
  6376. '** Arguments:  None
  6377. '** Returns:    SUCCESS
  6378. '*************************************************************************
  6379.     DIM    InFileNum, OutFileNum, n as Integer
  6380.     DIM    nextline as string
  6381.     DIM tmp$, OldDll$, NewDll$, IniFile$, BakFile$, IniPath$
  6382.  
  6383.     ON ERROR GOTO MOD_DL_ErrHandler
  6384.     
  6385.     OldDLL$ = LdString(SID_DATALENS_ODBCINI_KEY2)     '"QODBF.DLL"
  6386.     NewDLL$ = LdString(SID_DATALENS_ODBCINI_REPL2)     '"LODBF04.DLL"
  6387.     IniFile$ = "DATALENS.INI"
  6388.     BakFile$ = "DATALENS.BAK"
  6389.     IniPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"DataLens", "Data Path",NULLSTROK,INVALIDSTRERR)
  6390.  
  6391.     If IniPath$ = "" Then goto MOD_DL_EndFunction
  6392.     
  6393.     'print "IniPath$ = " & IniPath$
  6394.     filecopy IniPath$ & IniFile$, IniPath$ & BakFile$
  6395.     ' copy "DATALENS.INI" to "DATALENS.BAK"
  6396.     InFileNum = FREEFILE
  6397.     OPEN IniPath$ & BakFile$ For INPUT AS InFileNum
  6398.     OutFileNum = FREEFILE
  6399.     OPEN IniPath$ & IniFile$ For Output AS OutFileNum
  6400.     DO UNTIL EOF(InFileNum)
  6401.     LINE INPUT #InFileNum, nextline
  6402.         n = instr( 1, nextline, OldDLL$, 1 )
  6403.         If n > 0 Then 
  6404.                'print "Found - ""QODBF"" "; str( n )
  6405.             tmp$ = left$( nextline, n - 1 )
  6406.             tmp$ = tmp$ & NewDLL$
  6407.             tmp$ = tmp$ & mid$( nextline, n + len(OldDLL$) , len( nextline ) - n )
  6408.             print #OutFileNum, tmp$
  6409.         else
  6410.             print #OutFileNum, nextline
  6411.         End If
  6412.     LOOP
  6413.     'Print "End Of File found"
  6414.     CLOSE 
  6415.     
  6416.     goto MOD_DL_EndFunction
  6417. MOD_DL_ErrHandler:
  6418.     'print "Error: " & str( ERR ) & " on Line: " & str( ERL ) & " Msg: " & Error$
  6419.     exit function
  6420.     
  6421. MOD_DL_EndFunction:
  6422.    Lot_ModifyDataLensIni = SUCCESS
  6423.  
  6424. END FUNCTION
  6425.  
  6426.  
  6427.  
  6428.