home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 April A
/
Pcwk4a98.iso
/
Lotus
/
Notes46
/
INSTALL.DSK
/
SHARE.LSS
< prev
next >
Wrap
Text File
|
1995-11-15
|
291KB
|
6,428 lines
''/*********************************************************************
''
'' Module Name: share.lss
''
'' Module Code: TOOLKIT
''
'' Author: MZ
''
'' Creation Date: Aug 31, 1993
''
'' Copyright Lotus Development Corporation, (c) 1991
''
''
''
'' Description:
'' Lotus script file for common install
''
''
'' Additional authors:
''
'' Change History:
'' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/share__@.lss $
''
'' Rev 1.101.1.0 15 Nov 1995 17:19:34 mhishinu
'' Merged GC5 into FE5
''
'' Rev 1.101 11 Oct 1995 17:15:32 jdonohue
'' Dialog editor folder under "Lotus Accessories"
''
'' Rev 1.100 10 Oct 1995 15:45:22 jdonohue
'' Fixed error in automation logic for LOTUSAPP symbol (SPR KHAN2WRPHC)
''
'' Rev 1.99 22 Sep 1995 17:03:14 glutz
'' Lot_WriteIniFiles does not create an ini ley for lotusapp unless the
'' directory exists.
''
'' Rev 1.98 22 Sep 1995 15:31:28 tveerapp
'' Added checks for UNC path/LongDir names for lotusapp. Part of the fix for
'' spr#LSCR2VZVGB
''
'' Rev 1.97 19 Sep 1995 16:33:00 glutz
'' Added checks for long dir names and UNC in ConsolidateLotusAppDirCb.
''
'' Rev 1.96 09 Sep 1995 16:39:18 tveerapp
'' Fixed a problem for the suite node fix. Set the SYM_NETLOTUSAPP if
'' a cleanpath is found with the mapped rive.
''
'' Rev 1.95 08 Sep 1995 16:11:24 glutz
'' SPR KHAN2SHNAN: Put GOTO EXIT_CONSOLIDATELOTUSAPPDIR statement in continue
'' case if path validation fails in CONSOLIDATELOTUSAPPDIRCB.
''
'' Rev 1.94 06 Sep 1995 09:27:32 tveerapp
'' Fixed suite node install problem.
''
'' Rev 1.93 31 Aug 1995 14:58:04 jdonohue
'' Take out print statement for Invalid Share Keyword
''
'' Rev 1.92 31 Aug 1995 14:17:00 jdonohue
'' Fixed share keys in SHARESUBDIR list
''
'' Rev 1.91 30 Aug 1995 11:31:46 jdonohue
'' Added LOTUSDIALOGSPROGRAM to share names
''
'' Rev 1.90 07 Aug 1995 17:35:10 jdonohue
'' Replaced Lot_GetLocalLotusappDest to fix bug in directory naming
''
'' Rev 1.89 03 Aug 1995 10:11:18 mmeth
'' Fix for SPR# KHAN2UJMFN:
'' Fix is in share.lss:InitSHARE
'' the problem was that under the automation else clause we were not checking
'' calling ValidatePath(AutoLotusApp$).
'' The fix is to call the validate and in case of a bad return code
'' put up an error message and quit.
''
'' Rev 1.88 02 Aug 1995 15:00:18 jdonohue
'' Remove SID_ERR_SHARE_CONSOLID1 resource
''
'' Rev 1.87 01 Aug 1995 16:29:26 jdonohue
'' Allow lotusapp dir to be on UNC volume
''
'' Rev 1.86 20 Jul 1995 10:56:16 glutz
'' GetFreeSpaceForDrive now returns K bytes so I made changes accordingly.
''
'' Rev 1.85 20 Jul 1995 08:37:52 jdonohue
'' CONSOLIDATELOTUSAPPDIRCB
'' was not setting directory if no changes were made
''
'' Rev 1.84 17 Jul 1995 17:09:08 amontalv
'' Commented out Register code for 16 bit.
''
'' Rev 1.83 17 Jul 1995 16:49:14 amontalv
'' Added some code for Greg Lutz. Also changed the code for registering dlgedit.
''
'' Rev 1.82 17 Jul 1995 16:36:40 amontalv
'' Added registration for dlg editor
''
'' Rev 1.81 17 Jul 1995 15:35:18 amontalv
'' Added Lot_AddLinkToFolder to add Dialog Editor in correct location.
''
'' Rev 1.80 30 Jun 1995 09:13:20 glutz
'' Added browse feature to CONSOLIDATELOTUSAPPDIRCB.
''
'' Rev 1.79 28 Jun 1995 12:35:30 mzgripce
'' change Lot_BackupLotusBcfFile() to trim the backslash of the lotusappdir
'' before adding the datalens subdir
''
'' Rev 1.78 26 Jun 1995 13:36:44 mzgripce
'' DoMsgBox returns a long in Win95 so I changed the yesno and and I compare
'' with CLNG(7) for NO on confirmation
''
'' Rev 1.77 19 Jun 1995 18:47:54 mzgripce
'' check if the shared tools are supported before executing any share operation
''
'' Rev 1.76 06 Jun 1995 15:58:54 amontalv
'' We are experiencing problems with LotusScript when we fill buffers with
'' nulls and then pass them to C routines. For the time being, it is suggested
'' that we fill our buffers with spaces. To this end (and to make it
'' easier to change back later) I have created a small LotusScript routine
'' named CreateBuffer. You use it any time you ordinarily would use
'' STRING$(num, 0). CreateBuffer() just needs the num, it decides what to
'' fill the buffer with (sorry about the grammer). Right now it fill the
'' buffer with spaces. Later we will change it back to nulls. Also look
'' at the routine NullTrim(). It will get rid of final nulls and spaces.
'' You can use this when getting a buffer that has been changed or filled
'' in a external C routine.
''
'' Rev 1.75 01 Jun 1995 15:39:34 mzgripce
'' enable share32 init and config and reintroduce bcf processing
''
'' Rev 1.74 22 May 1995 19:15:10 mzgripce
'' rewrite InitShare for SYM_LOTUSAPP
''
'' Rev 1.73 21 May 1995 17:24:10 mzgripce
'' redefine the init value for lotusapp
''
'' Rev 1.72 13 May 1995 16:56:24 mzgripce
'' separate Lot_SaveShareConfig from saving the 32share config
''
'' Rev 1.71 03 May 1995 18:15:26 mzgripce
'' move some functions to share32.lss
''
'' Rev 1.70 02 May 1995 12:53:08 cmoy
'' Merged c2 into cf build
''
'' Rev 1.70 28 Apr 1995 17:17:14 mzgripce
'' Comment out the call to FixODBCiniSources() because BCFMOD.DLL was not ported
'' to 32 bit.
'' Rev 1.69F 17 Apr 1995 16:46:06 mzgripce
'' change Lot_SaveShareConfigInInstallIni to record component directory
''
'' Rev 1.69 10 Apr 1995 17:57:16 amontalv
'' Had to change the definition of some callback functions so that they would
'' work correctly going from C to Script.
'' Rev 1.68F 13 Apr 1995 10:57:16 mzgripce
'' change InitSHARE() to call InitSHARE32()
''
'' Rev 1.68 07 Apr 1995 19:36:48 amontalv
'' LSS 32 bit port merge changes.
''
'' Rev 1.66 30 Mar 1995 14:47:06 mheerman
'' Removed remed out code blocks
''
'' Rev 1.65 18 Jan 1995 15:56:30 mzgripce
''
'' Fix the NODE over NODE bug by casting LCASE when commpating the result of a MID$ call with a strin
'' g in Refresh function.
'' Change the validation of the common directory to not check for the files in the spell
'' directory because a node creates that directory for the user path, but
'' if the user does not add any words to its private spell dictionary the
'' directory is empty.
''
'' Rev 1.64 12 Dec 1994 14:50:26 tveerapp
'' Check for trailing backslash in lotusapp section in the response file.
''
'' Rev 1.63 12 Dec 1994 12:14:22 mzgripce
''
'' added automation around the callbacks and read the needed setings in
'' initSHARE()
''
'' Rev 1.62 28 Nov 1994 15:33:16 jplump
'' No change.
''
'' Rev 1.61 13 Oct 1994 13:58:50 mzgripce
''
'' in validate the common dir do not trim an empty string
''
'' Rev 1.60 04 Oct 1994 15:37:28 mzgripce
'' fix Banyan vines bug already tested by CIT QE
''
'' Rev 1.59 04 Aug 1994 17:50:56 tveerapp
'' in Lot_refresh I replaced the call to Lot_LocalGetPathFromIni()
'' with a call to GetIniKeyString()-MZ.
''
'' Rev 1.58 14 Jul 1994 19:10:06 mzgripce
''
'' add LCASE$ to stringcompare in initSHARE
''
'' Rev 1.57 14 Jul 1994 18:18:14 mzgripce
''
'' fix the algorithm for flw node in initSHARE
'' Rev 1.56 14 Jul 1994 11:24:56 mzgripce
''
'' change in initSHARE for the conditions when I prompt to use the existing
'' common directory in a network and when to create a new one
''
'' Rev 1.55 11 Jul 1994 15:32:08 mzgripce
'' before moving and deleting lotusapp.ini I check if the source is the sameth
''
'' Rev 1.54 01 Jul 1994 17:13:58 mzgripce
''
'' create a function Lot_LocalGetPathFromIni() and replac
'' FromIni with the new call
''
'' Rev 1.53 30 Jun 1994 18:20:02 ptilton
'' Added Lot_ModifyDatalensIni function that updates a users DATALENS.INI
'' changing QODBF.DLL to LODBF04.DLL. The changes are only made when the
'' LODBF04 DataLens driver is installed.
''
'' Rev 1.52 24 Jun 1994 14:53:28 thangv
''
'' Changed NetLotusApp to use the server path in Lot_WriteOLEReg
'' line 5663.
''
'' Rev 1.51 24 Jun 1994 11:39:58 thangv
''
'' Added Lot_TrimEndSlash to args toFremoveDir to remove the trailing back
'' slash. This fixes spr#31431. there were 16 calls to FremoveDir in this
'' module.
''
'' Rev 1.50 21 Jun 1994 20:48:06 mzgripce
'' in Lot_UpdateWinIni() commented out the calls to Lot_IsTheFeatureInstalled(
'' lines 2626,2644,2645 and 2651.
''
'' Rev 1.49 19 Jun 1994 09:43:34 mzgripce
'' change in Lot_GetEntryFlag() from MAILINABLINGPROGRAM to MAILENABLINGPROGRA
''
'' Rev 1.48 17 Jun 1994 12:17:02 mzgripce
''
'' replace FatalErrorMessage() call with 3 calls: ErrorMsg(); set flag gEndSta
''
'' Rev 1.47 16 Jun 1994 18:12:40 mzgripce
'' in InitShare add check for writable lotus.ini and if failes quit.
''
'' Rev 1.46 15 Jun 1994 12:19:00 thangv
'' change function: Lot_IsExistingLotusappDirValid() to check for subdirectori
'' and strip last slash from the path entry in lotus.ini for LotusDialogs and
'' MailEnabling
''
'' Rev 1.45 14 Jun 1994 14:46:16 mzgripce
'' check the path and the space on default in consolidatelotusappdircb and cre
''
'' Rev 1.44 10 Jun 1994 17:11:28 mzgripce
''
'' take out comment
''
'' Rev 1.43 10 Jun 1994 16:53:40 mzgripce
'' do not check if directory is valid if the entry does not exist in lotus.ini
''
'' Rev 1.42 09 Jun 1994 15:07:50 mzgripce
'' fixed OLE reg for multimedia
''
'' Rev 1.41 08 Jun 1994 17:24:54 mzgripce
''
'' comment out Grammar checker, Thesaurus and Hyph. processing
''
'' Rev 1.40 08 Jun 1994 10:16:24 thangv
'' added createdir in Lot_WriteEntry for case SPELLCHECKERUSER path.
''
'' Rev 1.39 06 Jun 1994 18:41:40 mzgripce
''
'' added prompt and processing for DBM_ISTHISNETLOTUSAPP
''
'' Rev 1.38 05 Jun 1994 20:43:10 ptilton
''
'' Added calls to Set OracleHomeDir and NotesDataDir Symbols. Removed
'' Functions to determine symbol values and inserted them into TOOLKIT.LSS
''
'' Rev 1.37 03 Jun 1994 19:47:08 ptilton
'' Moved Modifying of ODBC.INI to only when dBASE DataLens Driver is installed
''
'' Rev 1.36 01 Jun 1994 14:45:06 mzgripce
'' correct the the misspeling for GRAMMERCHECKERPROGRAM
''
'' Rev 1.35 27 May 1994 16:25:54 mzgripce
'' check if the common dir is EQ with netcommondir
''
'' Rev 1.34 26 May 1994 15:45:40 thangv
'' Added LCASE$ for dirToChange in CONSOLIDATELOTUSAPPDIRCB to fix bug.
''
'' Rev 1.33 25 May 1994 17:52:58 ihachem
'' fixed spr 30227; do not write screencam config and make infobox work for
'' node (check-in for mzgripce).
''
''
'' Rev 1.32 24 May 1994 14:54:24 mzgripce
''
'' change consolidatelotusappdircb and write consolidatemovecopycb
''
'' Rev 1.31 19 May 1994 23:47:40 ptilton
''
'' Added Updating of ODBCINST.INI with Codepage Translation information
'' for ODBC SQL Server Driver.
''
'' Rev 1.30 13 May 1994 18:09:18 ptilton
'' Added ODBC 2.0 Subroutine and Substitue Oracle & Notes Directories
''
'' Rev 1.29 09 May 1994 15:16:56 mzgripce
''
'' fixed for spr # 29358
''
'' Rev 1.28 05 May 1994 14:11:18 ptilton
''
'' Fixed SPR 28491 Added IsSQLSelected
''
'' Rev 1.27 02 May 1994 18:13:42 mzgripce
'' add AddSHAREIcons() function
''
'' Rev 1.26 27 Apr 1994 18:12:50 mzgripce
'' fixed spr# 27621
''
'' Rev 1.25 26 Apr 1994 10:55:34 mzgripce
'' fixed SPR # 28669
''
'' Rev 1.24 21 Apr 1994 16:47:40 mzgripce
''
'' fix for SPR 27387
''
'' Rev 1.23 14 Apr 1994 15:25:36 mzgripce
'' set gDatalensInstalled in config
''
'' Rev 1.21 13 Apr 1994 16:53:44 mmeth
'' fixed datalens strings
''
'' Rev 1.20 13 Apr 1994 14:27:04 cmoy
''
'' Unbolded text in SQLSERVERNAMECB and PARADOXNETWORKINFOCB
''
'' Rev 1.19 13 Apr 1994 14:20:30 ptilton
'' Added Support for All DataLens and ODBC available drivers.
''
'' Rev 1.16 13 Apr 1994 13:34:58 mzgripce
'' changes made by Corinne
''
'' Rev 1.18 07 Apr 1994 17:56:46 mzgripce
'' add mail enabling and take out lotus mail
''
'' Rev 1.17 06 Apr 1994 10:48:30 mzgripce
'' put processing for Lotus Dialogs, LotusScript and LotusMail
''
'' Rev 1.16 05 Apr 1994 09:30:52 mzgripce
'' fixed SPR #27685
''
'' Rev 1.15 04 Apr 1994 18:40:12 mmeth
''
'' CheckIn for MMETH by vts
''
'' Rev 1.14 04 Apr 1994 14:58:32 mzgripce
'' update OLE registration on consolidation and refresh
''
'' Rev 1.13 31 Mar 1994 16:30:34 mzgripce
'' change initSHARE
''
'' Rev 1.12 31 Mar 1994 14:20:10 mzgripce
'' merge the raptor beta changes and fix 2 bugs: suppress share move prompt
'' when not needed and change the netcommon dir drive if node maps with
'' the network with different drive then the admin.
''
'' Rev 1.11 28 Mar 1994 16:55:50 mzgripce
'' overwrite the shared icons
''
'' Rev 1.10 28 Mar 1994 14:28:36 mmeth
'' Changes with Christopher, obsoleteing dialosg
''
'' Rev 1.9 26 Mar 1994 16:33:22 pjt
'' Datalens Install changes for ODBC driver
''
'' Rev 1.8 25 Mar 1994 14:53:06 mzgripce
'' change initShare to account for suit; change consolidate call back; write
'' function Lot_IsExistingLotusappDirValid(); change the lotusapp destination
''
'' Rev 1.7 24 Mar 1994 17:54:30 mmeth
'' Pete's datalens
''
'' Rev 1.6 22 Mar 1994 18:23:26 mzgripce
'' added notesSQL
''
'' Rev 1.5 22 Mar 1994 17:53:54 mzgripce
'' added help section and Help Program /Help Data path
''
'' Rev 1.4 21 Mar 1994 18:42:24 mzgripce
'' put the dialogeditor icon
''
'' Rev 1.3 15 Mar 1994 13:56:36 jbrodeur
'' Added French Canadian Dictionary
''
'' Rev 1.2 10 Mar 1994 21:02:44 amello
'' Added Shared Icon Palette
''
'' Rev 1.1 10 Mar 1994 17:31:30 mzgripce
'' add comments in Lot_AreShareToolsSupported() and remove seting of win and
'' winsys symbols from InitSHARE() (I move it in toolkit.lss and call it in
'' main.lss
''
'' Rev 1.0 11 Feb 1994 10:56:46 jbrodeur
'' Initial Revision
''----------------------------------------------------------------------
'' Date Vers. Pgmr SPR# Change
''----------------------------------------------------------------------
'' 02-07-94 0100 MZ Update win.ini only if the feature was installed
'' change Lot_WriteOLERegForShare()
''!
'' 02-07-94 0099 MZ Add replace isTheChapterInstalled call with
'' isTheFeature... in Lot_AddSectionToNodeList()
'' 02-07-94 0098 MZ move Lot_SaveFeaturesInstaledInInstallIni()
'' and Lot_GetLastFeatureNumber() to toolkit.lss
'' 02-03-94 0097 MMETH In Lot_SaveFeaturesInstaledInInstallIni()
'' save for gSTANDARD as well and call
'' Lot_SaveFeaturesInstaledInInstallIni() for std also
'' also moved Lot_IstheFeatureInstall to toolkit.lss
'' 02-01-94 0096 JMB Added return for Functions that return values
'' 01-28-94 0095 MZ set SYM_LOTUSAPPEXISTS$
'' 01-27-94 0094 MZ/DND Change all the paths in here
'' 01-26-94 0093 MZ Add the function Lot_DoMoveSHARE
'' Set "" in Lot_GetLocalHardDrive for the root
'' 01-25-94 0092 MZ Add the functions:
'' Lot_GetTheShareToolsSizeToMove
'' Lot_MakeAPathFromLotusappIni
'' Lot_GetInLotusappIniSizeOfFilesToMove
'' Lot_GetInLotusIniSizeOfFilesToMove
'' Lot_GetSharedIniPath
'' Lot_ChkLotusIniSizePath
'' 01-25-94 0091 MMETH add "\" wherever we are using gLOTUSAPP$
'' 01-25-94 0090 MMETH changed almost all CreateIniKeyValue:
'' Took off LCASE$ and where needed added
'' Lot_TrimEndSlash. Also removed double \\
'' between dir & filename in CreateIniKeyValues
'' 01-24-94 0089 MZ Change CONSOLIDATELOTUSAPPDIRCB
'' 01-24-94 0089 TQI Capture all function returns (lsi36)
'' 01-24-94 0088 MMETH Move GetTheReal Prod to Toolkit.lss &
'' changed the refernce to in to Lot_GetInstallDIr
'' 01-21-94 0087 MZ Set SYM_LOTUSAPPDIR+gNAME needed for UI
'' 01-20-94 0086 MZ Add processing in InitSHARE(),PreConfigSHARE()
'' ConfigSHARE(),Lot_RefreshLocalLotusapp() to
'' execute only if any registered product supports
'' share and add func. Lot_AreShareToolsSupported()
'' 01-19-94 0085 MZ Make it work again
'' 01-19-94 0084 TQI option declare
'' 01-18-94 0083 DND No longer call FCleanFatPath
'' 01-18-94 0082 JMB Added StatusBar to Lot_GetAllSharedInstalled()
'' 01-12-94 0081 TQI option declare DIMs (not done)
'' 01-10-94 0080 MZ Make all symbols Constants and put them
'' in GLOBALS.LSS
'' 01-07-94 0079 DND/MZ Use TOOLKIT
'' 12-27-93 0078 MZ Change Lot_RefreshLocalLotusapp; put the call
'' to DoesDirExist by itself in an IF
'' 12-22-93 0077 MZ Cleanup the commented code
'' 12-20-93 0076 TQI Changes for lsi34
'' 12-17-93 0075 MZ 25868 Backup lotus.bcf in node install; in standard
'' install the call into datalens DLL creates a backup
'' if there is a lotus.bcf in the destination.
'' 12-16-93 0074 MZ 25770 replace DoesDirExist with DoesFileExist
'' call in the switch for lotusapp.ini processing
'' 12-16-93 0073 MZ add to the copy list the files needed
'' for the datalens drivers
'' 12-13-93 0072 MZ put an extera IF/ELSE when commondir is ""
'' 12-10-93 0071 MZ 25819 check if the lotusapp.ini exist
'' 12-09-93 0070 MZ 25771 change Lot_IsConsolidationNeeded
'' 25660 add Lot_GetSizeOfFilesInLotusappIni and
'' 25768 Lot_DoConsolidateFilesInLotusappIni
'' 12-08-93 0069 MZ 25721 update win.ini after consolidation
'' 12-07-93 0068 MZ 25580 delete the old common dir after consolidation
'' and replace the removedir function
'' 12-03-93 0067 MZ add a box with SID_SHARE_INFO_TEXT
'' 12-03-93 0066 MZ Add SID_ERR_SHARE_CONSOLID0
'' 12-03-93 0065 MZ 25660 Correct the process for paths with filenames
'' 12-02-93 0064 MZ Take out \ from makepath call
'' 12-02-93 0064 DND 25449 Make sure all strings are resourced
'' 12-01-93 0036 MZ change combo3 to combo1 in consotidate box
'' 12-01-93 0035 DND/MZ 25446 Handle errors consistently and some cleanup
'' 12-01-93 0034 MZ 25652 verify if I am in the dir before remove it
'' 11-29-93 0033 MZ Write the lotus.ini for node
'' 11-24-93 0033 MMETH Moved GetTheReal123Dir to share.lss from 123.lss
'' and renamed it to GetTheRealProdDir
'' 11-24-93 0032 MZ Make Lot_IsTheFeatureInstalled() public
'' 11-22-93 0031 MZ Add Lot_IsTheFeatureInstalled(s$)
'' Lot_GetLastFeatureNumber() and
'' Lot_SaveFeaturesInstaledInInstallIni()
'' to record F_KEYWORD
'' 11-22-93 0030 MZ fixed spr 25310
'' 11-22-93 0029 MZ Change Graphic to graphics
'' 11-19-93 0028 MZ fixed 25568, 25580, 25594 and 25595
'' 11-17-93 0026 JKK FIXED SPR 25544 & 25545.
'' 11-17-93 0025 MZ fix 25434
'' 11-15-93 0024 MZ Change Lot_GetNetLotusappSource to use NETLOTUSAPP
'' symbol value and replace Dir$() call with Lot_Dir()
'' to fix 25531
'' 11-15-93 0024 JKK Called GetAbsPathFrom ini instead of GetIniKeyString.
'' 11-14-93 0023 MZ fix for spr# 25433
'' 11-12-93 0022 MZ fix spr 25268
'' 11-10-93 0021 MZ -disable the writing of lotusapp.ini because it is
'' not in lotus.ini database spr#25414
'' -reset the LOTUSAPP symbol if I found a valid one
'' change the init for consolidation dialog box spr# 25443
''
'' 11-10-93 0020 MZ put sid_err messages
'' 11-10-93 0019 MZ comment out OLE reg for multimedia and populate
'' NETLOTUSAPP symbol
'' 11-09-93 0018 MZ correction to the screen cam name
'' 11-08-93 0017 MZ add OLE reg for ScreenCamMovie and its entry in lotus.ini
'' 10-27-93 0016 MZ Correction in Lot_SaveShareConfigInInstallIni()
'' For server set lotus .bcf dest to 123DIR
'' add Lot_RefreshLocalLotusapp(),Lot_AddSectionToNodeList(),
'' Lot_IsTheChapterInstalled(),Lot_GetNetLotusappSource()
'' Lot_GetLocalLotusappDest()
'' 10-26-93 0015 MZ Initialize LOTUSAPP to \LOTUS\LOTUSAPP for
'' server install
'' 10-25-93 0014 MZ Fix Previous in consolidate prompt
'' 10-21-93 0013 MZ Add Confirm directory box in Consolidate prompt
'' 10-21-93 0012 MZ Add processing for DBM_CONSOLIDATE_LOTUSAPP
'' 19-20-93 0011 MZ Add a switch depending on the copyMode flag
'' and dBase,Informix and EEDM funcs
'' 10-19-93 0010 MZ Add the processing for SQL and PARADOX server
'' and set symbols:SQLSERVERNAME,PARADOXNETWORKINFO
'' 10-01-93 0002 MZ Add Lot_SaveShareConfigInInstallIni()
'' 9-29-93 0005 JKK/TV/DND Removed unneeded dialog code
'' 9-22-93 0004 MZ Add OLE registration
'' 9-10-93 0003 MZ Finish the consolidation
'' 9-09-93 0002 MZ Move the consolidation in preconfig
'' from init and debug
'' 9-08-93 0001 MZ Put the consolidation code in
'' 8-12-93 0000 Initial Check-In
''----------------------------------------------------------------------
''
''*********************************************************************/
USE "SHARE32"
OPTION DECLARE
'Global Functions
DECLARE PUBLIC FUNCTION InitSHARE () AS INTEGER
DECLARE PUBLIC FUNCTION ConfigSHARE () AS INTEGER
DECLARE PUBLIC FUNCTION PreConfigSHARE () AS INTEGER
DECLARE PUBLIC FUNCTION AddSHAREIcons () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsSQLSelected() AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsParadoxSelected AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsdBaseSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsInformixSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsIBMdBaseManagerSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsNotesSQLSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsSpreadSheetSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsIBM_DB2Selected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsDB2_SQLDS_Selected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsDB2_SQL400_Selected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsIBM_DDCS2_Selected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCDriverSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCSpreadSheetSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCTextDriverSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsOracleSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCBtrieveSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCDB2Selected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCFoxbaseSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCAccessSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCParadoxSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCOracleSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsODBCSQLServerSelected () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_RefreshLocalLotusapp () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_GetTheShareToolsSizeToMove (s$) AS LONG
DECLARE PUBLIC FUNCTION Lot_DoMoveSHARE (s$) AS INTEGER
'Local Functions
DECLARE FUNCTION Lot_UpdateWinIni(s1$,s2$) AS INTEGER
DECLARE FUNCTION Lot_TheEntryWasRefreshed(s$) AS INTEGER
DECLARE FUNCTION Lot_GetAllSharedInstalled () AS INTEGER
DECLARE FUNCTION Lot_WriteIniFiles () AS INTEGER
DECLARE FUNCTION Lot_WriteLotusBcfFile()AS INTEGER
DECLARE FUNCTION Lot_BackupLotusBcfFile()AS INTEGER
DECLARE FUNCTION Lot_WriteEntry (s$,i%) AS INTEGER
DECLARE FUNCTION Lot_WriteOLERegForShare(s$,i%) AS INTEGER
'DECLARE FUNCTION Lot_PutFilesInTheMoveList (s1$,s2$,s3$,s4$) AS INTEGER
DECLARE FUNCTION Lot_GetNetCommDirPath (s1$,s2$) AS STRING
DECLARE FUNCTION Lot_GetFileSize (s1$,s2$,s3$,i&) AS LONG
DECLARE FUNCTION Lot_MoveFiles(s1$,s2$,s3$,s4$) AS INTEGER
DECLARE FUNCTION Lot_IsConsolidationNeeded (s1$, s2$) AS LONG
DECLARE FUNCTION Lot_GetSizeOfFilesInLotusappIni(s1$,s2$,s3$,size&) AS LONG
DECLARE FUNCTION Lot_DoShareConsolidation(s1$, s2$, s3$) AS INTEGER
DECLARE FUNCTION Lot_DoConsolidateFilesInLotusappIni(s1$, s2$) AS INTEGER
DECLARE FUNCTION Lot_AddSectionToNodeList(s1$,s2$) AS INTEGER
DECLARE FUNCTION Lot_GetEntryFlag(s1$) AS STRING
DECLARE FUNCTION Lot_DoVerDateValidation(s1$,s2$,s3$,l&) AS INTEGER
DECLARE FUNCTION Lot_DoCopyDelete(s1$,s2$,s3$,l&) AS INTEGER
DECLARE FUNCTION Lot_DoDelete(s1$,s2$) AS INTEGER
DECLARE FUNCTION Lot_IsTheChapterInstalled(s1$) AS INTEGER
DECLARE SUB CONSOLIDATELOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
DECLARE SUB CONSOLIDATEMOVECOPYCB (hDlg&, CtrlId%, Classes$, Inst&)
DECLARE SUB ISTHISNETLOTUSAPPCB (hDlg&, CtrlId%, Classes$, Inst&)
DECLARE SUB SQLSERVERNAMECB (hDlg&, CtrlId%, Classes$, Inst&)
DECLARE SUB PARADOXNETWORKINFOCB (hDlg&, CtrlId%, Classes$, Inst&)
DECLARE FUNCTION Lot_GetNetLotusappSource(s1$) AS STRING
DECLARE FUNCTION Lot_GetLocalLotusappDest(s1$,s2$) AS STRING
DECLARE FUNCTION Lot_MakeAPathFromLotusappIni(s1$,s2$,s3$) AS STRING
DECLARE FUNCTION Lot_GetInLotusappIniSizeOfFilesToMove(s1$,s2$,s3$,s4$,l&) AS LONG
DECLARE FUNCTION Lot_GetInLotusIniSizeOfFilesToMove(s1$,s2$,l&) AS LONG
DECLARE FUNCTION Lot_ChkLotusIniSizePath(s1$,s2$,s3$,s4$) AS INTEGER
DECLARE FUNCTION Lot_WriteShareInProgMan(Network$) AS INTEGER
DECLARE FUNCTION Lot_IsExistingLotusappDirValid(BYVAL ExistingCommonDir$) AS INTEGER
DECLARE SUB WriteODBCINST ( DriverDesc$, DriverPath$, SetupPath$ )
DECLARE FUNCTION Lot_WriteODBCINST() AS INTEGER
DECLARE FUNCTION Lot_ModifyODBC() AS INTEGER
DECLARE FUNCTION Lot_ModifyDataLensIni() AS INTEGER
DECLARE SUB WriteODBC20INST ( Driver$, SQLLvl$, APILvl$, Usage$, Ext$, DrvVer$, Cnnct$ )
DECLARE FUNCTION Lot_SaveShareConfigInInstallIni() AS INTEGER
'Global variables
PUBLIC gNetCommDirPath AS STRING
PUBLIC gConsolidateSize AS LONG
PUBLIC gMoveSize AS LONG
'Local variables
PUBLIC ProgramPath$
PUBLIC DataPath$
PUBLIC UserPath$
PUBLIC FilterPath$
PUBLIC lDidAnyMove%
PUBLIC GraphicsFileFiltersProgPath$
PUBLIC DocFileFiltersProgPath$
PUBLIC gDataLensInstalled AS INTEGER
PUBLIC gODBCOnly AS INTEGER
PUBLIC gODBCSelected AS INTEGER
DECLARE SUB INITIALIZE
DIM ValidCommDir%
SUB INITIALIZE
ProgramPath$="Program Path"
DataPath$="Data Path"
UserPath$="User Path"
FilterPath$="Filter Path"
END SUB
PUBLIC FUNCTION InitSHARE () AS INTEGER
'** Purpose: Initialize WINDIR, WINSYSDIR, default LOTUSAPPDIR
'** symbols
'** and for automated install
'** sets SYM_AUTO_CONSOLIDATION$
'** SYM_DEFAULT_LOTUSAPP$
'** SYM_AUTO_SQLSERVER$
'** SYM_AUTO_PARADOXINFO$
'** Author: MZ
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM lbLotusAppsize&, shareDir$, shareDrv$, possibleDrv$
DIM availSpace&, network$, cwd$, gInstallIniFile$, rc%, netLotusapp$
DIM rv%, ExistingCommonDir$, ExistingNetCommonDir$, notused%, SameFlag$
DIM source$, FLWPath$, drive$, RCDialog$, AutoLotusapp$
DIM NetLotappFromIni$
notused%=InitSHARE32()
'** Execute the rest only if there is a registered product that supports
'** share Prods(i%)Share=1
IF Lot_AreShareToolsSupported()=1 THEN
'** MZ: Available space returns bytes
lbLotusAppSize& = CLNG(10485760) ''10Mb
network$ = GetSymbolValue(SYM_NETWORK$)
'Initialize global gLotusIniPath$
gLotusIniPath$ = CreateBuffer(256)
notused% = Lot_GetLotusiniPath(gLotusIniPath$)
'print gLotusIniPath$,"gLotusIniPath$"
gLotusappIniPath$=CreateBuffer(256)
gLotusBcfDir$=CreateBuffer(256)
'Check if Lotus.ini is write protected
IF network$ = gNODE$ OR network$ = gSTANDARD$ THEN
notused% = IsFileWritable(gLotusIniPath$)
IF notused% <> 1 THEN
ErrorMsg SID_ERR_INIREADONLY, CHR$(10) + CHR$(10)+gLotusIniPath$
gEndStatementEncountered% = TRUE
EXIT FUNCTION
END IF
END IF
'Check the entries in <windir>\lotus.ini
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTRERR)
' print ExistingCommonDir$,"ExistingCommonDir$ share.lss"
SetSymbolValue SYM_EXISTINGCOMMDIR$, ExistingCommonDir$
SetSymbolValue SYM_EXISTINGNETCOMMDIR$, ExistingNetCommonDir$
IF ExistingCommonDir$ <> "" THEN
SetSymbolValue SYM_LOTUSAPPEXISTS$, "1"
ELSE
SetSymbolValue SYM_LOTUSAPPEXISTS$, "0"
END IF
ValidCommDir% = Lot_IsExistingLotusappDirValid(ExistingCommonDir$)
shareDir$ = GetWindowsDir()+gLOTUSAPP$+"\"
SetSymbolValue SYM_DEFAULT_LOTUSAPP$, shareDir$
'Built the default lotusapp directory location
'*********************************************
'For single product
' for standalone or node
' preexisting one OR
' if parent dir not UNC
' Parent+ components+LOTUSAPP
' if parent dir IS UNC
' winDir+LOTUSAPP
' for server
' if parent dir not UNC
' Parent + LOTUSAPP
' if Parent dir IS UNC
' first not UNC drive with space+lotus+LOTUSAPP (tv: added lotus)
'For SUITE
' for standalone or node
' preexisting one OR
' if base dir not UNC
' Base+ components+LOTUSAPP
' if Base dir IS UNC
' winDir+LOTUSAPP
' for server
' if Base dir not UNC
' Base + LOTUSAPP
' if Base dir IS UNC
' first not UNC drive with space+lotus+LOTUSAPP
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
IF (network$ = gSTANDARD$ OR network$ = gNODE$) THEN
IF ValidCommDir% = 1 THEN
SetSymbolValue SYM_LOTUSAPPDIR$,ExistingCommonDir$
ELSE
IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_PARENTDIR$)) = 0 AND _
IsLongDirPath(GetSymbolValue(SYM_PARENTDIR$)) = FALSE THEN
shareDir$ = GetSymbolValue(SYM_PARENTDIR$)+gCOMPONENTS+"\"+gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
ELSE
SetSymbolValue SYM_LOTUSAPPDIR$,GetWindowsDir()+gLOTUSAPP$+"\"
END IF
END IF
ELSE 'not standard or node
IF network$ = gSERVER THEN
IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_PARENTDIR$)) = 0 AND _
IsLongDirPath(GetSymbolValue(SYM_PARENTDIR$)) = FALSE THEN
shareDir$ = GetSymbolValue(SYM_PARENTDIR$)+gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
ELSE
possibleDrv$ = Lot_GetLocalHardDrive(lbLotusAppSize&,"")
IF possibleDrv$ <> "" THEN
shareDir$ = possibleDrv$+ "lotus\"+ gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
'print shareDir$,"shareDir$"
ELSE
possibleDrv$ = Lot_GetLocalHardDrive(CLNG(1),"")
shareDir$ = possibleDrv$+ "lotus\" + gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
'print shareDir$,"shareDir$"
END IF
END IF
END IF
END IF
ELSE 'is smartsuite
IF (network$ = gSTANDARD$ OR network$ = gNODE$) THEN
IF ValidCommDir% = 1 THEN
SetSymbolValue SYM_LOTUSAPPDIR$,ExistingCommonDir$
ELSE
IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_BASEDIR$)) = 0 AND _
IsLongDirPath(GetSymbolValue(SYM_BASEDIR$)) = FALSE THEN
shareDir$ = GetSymbolValue(SYM_BASEDIR$)+gCOMPONENTS+"\"+gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
ELSE
SetSymbolValue SYM_LOTUSAPPDIR$,GetWindowsDir()+gLOTUSAPP$+"\"
END IF
END IF
ELSE 'not standard or node
IF network$ = gSERVER THEN
IF Lot_IsUnvalidatedUNCPath(GetSymbolValue(SYM_BASEDIR$)) = 0 AND _
IsLongDirPath(GetSymbolValue(SYM_BASEDIR$)) = FALSE THEN
shareDir$ = GetSymbolValue(SYM_BASEDIR$)+gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
ELSE
possibleDrv$ = Lot_GetLocalHardDrive(lbLotusAppSize&,"")
IF possibleDrv$ <> "" THEN
shareDir$ =possibleDrv$+"lotus\"+gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
'print shareDir$,"shareDir$"
ELSE
possibleDrv$ = Lot_GetLocalHardDrive(CLNG(1),"")
shareDir$ =possibleDrv$+"lotus\"+gLOTUSAPP$+"\"
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
'print shareDir$,"shareDir$"
END IF
END IF
END IF
END IF
END IF
ELSE ' in automation
shareDir$ = GetWindowsDir()+gLOTUSAPP$+"\"
AutoLotusapp$ = Lot_GetKeyValFromResponseFile("Lotusapp","LOTUSAPPDIR")
IF ValidatePath(AutoLotusapp$) <> FALSE THEN
IF AutoLotusapp$ <> "" AND _
IsLongDirPath(AutoLotusapp$) = FALSE AND _
Lot_IsUnvalidatedUNCPath(AutoLotusapp$) = 0 THEN
IF RIGHT$(AutoLotusapp$, 1) <> "\" THEN
AutoLotusapp$ = AutoLotusapp$+ "\"
'print AutoLotusapp$
END IF
SetSymbolValue SYM_LOTUSAPPDIR$,AutoLotusapp$
SetSymbolValue SYM_DEFAULT_LOTUSAPP$, shareDir$
ELSE
IF network$ = gSERVER THEN
possibleDrv$ = Lot_GetLocalHardDrive(lbLotusAppSize&,"")
IF possibleDrv$ <> "" THEN
shareDir$ = possibleDrv$+ "lotus\"+ gLOTUSAPP$+"\"
END IF
END IF
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
END IF
ELSE
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_PRODDIR) + " " + "Lotusapp"
ERROR STFQUIT
END IF
END IF
'print GetSymbolValue(SYM_LOTUSAPPDIR$),"GetSymbolValue(SYM_LOTUSAPPDIR$)in share.lss: INIT"
'Set the name of the lotusapp dir
SetSymbolValue SYM_LOTUSAPPDIR$+gNAME$, LdString(SID_SHARED_LOTUS_TOOLS)
'Set NETLOTUSAPP symbol
IF network$ = gNODE$ THEN
'Get the current working directory
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
source$ = GetSymbolValue(SYM_STF_SRCDIR$)
gInstallIniFile$ = cwd$+gINSTALLINI$
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
netLotusapp$ = Lot_LocalGetPathFromIni(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$,NULLSTROK,INVALIDSTROK)
SameFlag$ = GetIniKeyString(gInstallIniFile$, _
"Server Configuration of Shared Tools", _
"SameDriveFlag")
IF netLotusapp$ = "" THEN
'** TV: netLotusapp comes back empty (win32) beacuse FValidPath fails
'** if the drive does not exist
rv% = 0
netLotusapp$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$)
NetLotappFromIni$ = netLotusapp$
IF netLotusapp$ <> "" THEN
IF SameFlag$ = "1" AND NOT Lot_IsUnvalidatedUNCPath(source$) THEN
netLotusapp$ = MID$(source$,1,1)+MID$(netLotusapp$,2)
rv% = Lot_CleanPath(netLotusapp$)
END IF
ELSE
'print "0", gInstallIniFile$
ErrorMsg SID_ERR_INSTALLINI_CORRUPT, CHR$(10) + CHR$(10)+NetLotappFromIni$
gEndStatementEncountered% = TRUE
EXIT FUNCTION
END IF
IF rv% = 0 THEN
'ErrorMsg SID_NODENONEXISTLOTUSAPPDIR1, CHR$(10) + CHR$(10)+NetLotappFromIni$
'gEndStatementEncountered% = TRUE
'EXIT FUNCTION
SetSymbolValue SYM_NETLOTUSAPP$, NetLotappFromIni$
ELSE
SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
END IF
ELSE
IF SameFlag$ = "1" AND NOT Lot_IsUnvalidatedUNCPath(source$) THEN
SetSymbolValue SYM_NETLOTUSAPP$, MID$(source$,1,1)+MID$(netLotusapp$,2)
ELSE
SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
END IF
END IF
ELSE
'print "1", gInstallIniFile$
ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
gEndStatementEncountered% = TRUE
EXIT FUNCTION
'FatalErrorMsg SID_ERR_INSTALLINI_MISSING, gInstallIniFile$, STFQUIT
END IF
END IF
'** AUTOMATE: read the response file for the shared entries
'** and set SYM_AUTO_CONSOLIDATION$
'** SYM_AUTO_SQLSERVER$
'** SYM_AUTO_PARADOXINFO$
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
SetSymbolValue SYM_AUTO_CONSOLIDATION$, Lot_GetKeyValFromResponseFile("Lotusapp","Consolidation")
SetSymbolValue SYM_AUTO_SQLSERVER$,Lot_GetKeyValFromResponseFile("Datalens","SQLServerName")
SetSymbolValue SYM_AUTO_PARADOXINFO$,Lot_GetKeyValFromResponseFile("DataLens","PARADOXNetInfo")
END IF
'Initialize global gLotusappIniPath$
notused% = Lot_GetLotusappiniPath(gLotusappIniPath$, GetSymbolValue(SYM_LOTUSAPPDIR$),gLotusBcfDir$)
'print gLotusappIniPath$,"gLotusappIniPath"
'print gLotusBcfDir$,"gLotusBcfDir$"
'**Prompt for the clarification if:
'- FLW is installed
'- NetCommonDirectory does not exist
'- CommonDirectory exists
'- CommonDirectory drive is a network drive
'** if the existing Common directory is the same as the SYM_NETLOTUSAPPDIR
'** assume that Common Directory is the Net Common Directory and
'** change that in lotus.ini whitouth prompt
FLWPath$ = GetIniKeyString(gLotusIniPath$,"Lotus Applications", "FLW")
drive$ = MID$(ExistingCommonDir$,1,1)
IF network$ = gNODE$ AND _
FLWPath$ <> "" AND _
ExistingNetCommonDir$ = "" AND _
ExistingCommonDir$ <> "" THEN
IF DoesDirExist(ExistingCommonDir$) = 1 AND _
IsDriveNetwork(UCASE$(drive$)) = 1 AND _
LCASE$(GetSymbolValue(SYM_NETLOTUSAPP$)) = LCASE$(ExistingCommonDir$) THEN
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(ExistingCommonDir$), cmoOverwrite
RemoveIniKey gLotusIniPath$, "Lotus Applications", "Common Directory", cmoVital
ELSE
IF DoesDirExist(ExistingCommonDir$) = 1 AND _
IsDriveNetwork(UCASE$(drive$)) = 1 THEN
'** AUTOMATE: comment out the "PopupModalDlg" stmts and
'** and change lotus.ini like the user selected YES
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
notused% = RegisterCallback("SHARE","ISTHISNETLOTUSAPPCB")
RCDialog$=PopupModalDlg (DBM_ISTHISNETLOTUSAPP, DBM_ISTHISNETLOTUSAPP)
ELSE
notused% = Lot_AutoIsThisNetLotusApp(gLotusIniPath$, ExistingCommonDir$)
END IF
END IF
END IF
ELSE
IF network$ = gSTANDARD$ AND _
FLWPath$ <> "" AND _
ExistingNetCommonDir$ = "" AND _
ExistingCommonDir$ <> "" THEN
IF DoesDirExist(ExistingCommonDir$) = 1 AND _
IsDriveNetwork(UCASE$(drive$)) = 1 THEN
'** AUTOMATE: comment out the "PopupModalDlg" stmts and
'** and change lotus.ini like the user selected YES
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
notused% = RegisterCallback("SHARE","ISTHISNETLOTUSAPPCB")
RCDialog$=PopupModalDlg (DBM_ISTHISNETLOTUSAPP, DBM_ISTHISNETLOTUSAPP)
ELSE
notused% = Lot_AutoIsThisNetLotusApp(gLotusIniPath$,ExistingCommonDir$)
END IF
END IF
END IF
END IF
'Initialize the symbols for SQL and Paradox
SetSymbolValue SYM_SQLSERVERNAME$, ""
SetSymbolValue SYM_PARADOXNETWORKINFO$, ""
'Initialize the symbols for Notes Data and ORACLE Home directories
DL_SetNotesDataPath
DL_SetOraclePath
END IF
InitSHARE = SUCCESS
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_RefreshLocalLotusapp () AS INTEGER
'** Purpose: Read the lotus.ini and if there are local features it
'** will add those sections to the copyList ; In the same time
'** if any of the datalenses were installed BCF section is added
'** to the copyList and lotus.bcf is backedup in lotus.bak
'** Author: MZ
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM cwd$, gSharedIniFile$, WinDir$, dBaseWinSysChapter$, dBaseWinSysChapterSpec$
DIM Source$, Dest$, dbaseWinChapter$,dbaseWinChapterSpec$
DIM dbaseDataChapter$, dbaseDataChapterSpec$, InformixWinChapter$, InformixWinChapterSpec$
DIM BcfChapter$, BcfChapterSpec$, ExistingCommonDir$, ExistingNetCommonDir$
DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
DIM lDidProgramRefresh%, ExistingProgPath$, lDidAnyRefresh%, Entry$
DIM lDidDataRefresh%, ExistingDataPath$, lDIdUserRefresh%, ExistingUserPath$
DIM lDidFilterRefresh%, ExistingFilterPath$, notused%, lenNet%
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
'** Execute the rest only if there is a registered product that supports
'** share Prods(i%)Share=1
IF Lot_AreShareToolsSupported()=1 THEN
'If datalens drivers are installed install the win/winsys files
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRDBASEWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRDBASEWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRDBASEWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRDBASEWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRDBASEDATA")=1 THEN
dBaseDataChapter$ = Lot_GetChapterFromKeyword("SHRDBASEDATA")
dBaseDataChapterSpec$ = Lot_GetChapterValStr(dBaseDataChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseDataChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRDBASEDATAL")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRDBASEDATAL")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRDBASEDATALWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRDBASEDATALWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRINFORMIXWIN")=1 THEN
InformixWinChapter$ = Lot_GetChapterFromKeyword("SHRINFORMIXWIN")
InformixWinChapterSpec$ = Lot_GetChapterValStr(InformixWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList InformixWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBMPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRPARADOXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBMDB2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRORACLEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 THEN
BcfChapter$ = Lot_GetChapterFromKeyword("SHRDLENSDATA")
BcfChapterSpec$ = Lot_GetChapterValStr(BcfChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_NETLOTUSAPP$)
Dest$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
AddSectionFilesToCopyList BcfChapterSpec$,Source$,Dest$
'Backup lotus.bcf file (into lotus.bak)
notused% = Lot_BackupLotusBcfFile()
END IF
IF Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRNOTESSQLWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRNOTESSQLWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRNOTESSQLWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRNOTESSQLWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCDRVRWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCDRVRWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCDRVRWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCDRVRWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCWKSWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCWKSWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCWKSWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCWKSWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCTEXTWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCTEXTWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCTEXTWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCTEXTWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCBTRIEVEWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCBTRIEVEWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCFOXBASEWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCFOXBASEWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCFOXBASEWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCFOXBASEWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCACCESSWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCACCESSWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCACCESSWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCACCESSWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCPARADOXWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCPARADOXWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCPARADOXWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCPARADOXWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCDB2WIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCDB2WIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCDB2WINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCDB2WINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCORACLEWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCORACLEWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCORACLEWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCORACLEWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCSQLSVRWIN")=1 THEN
dBaseWinChapter$ = Lot_GetChapterFromKeyword("SHRODBCSQLSVRWIN")
dBaseWinChapterSpec$ = Lot_GetChapterValStr(dBaseWinChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINDIR$)
AddSectionFilesToCopyList dBaseWinChapterSpec$,Source$,Dest$
END IF
IF Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 AND _
Lot_IsTheFeatureInstalled("SHRODBCSQLSVRWINSYS")=1 THEN
dBaseWinSysChapter$ = Lot_GetChapterFromKeyword("SHRODBCSQLSVRWINSYS")
dBaseWinSysChapterSpec$ = Lot_GetChapterValStr(dBaseWinSysChapter$, F_NOTHING)
Source$ = GetSymbolValue(SYM_STF_SRCDIR$)
Dest$ = GetSymbolValue(SYM_WINSYSDIR$)
AddSectionFilesToCopyList dBaseWinSysChapterSpec$,Source$,Dest$
END IF
'Get the Common Directory and Net Common Directory from the user lotus.ini
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
'print "ExistingCommonDir$",ExistingCommonDir$
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
IF ExistingNetCommonDir$ <> "" THEN
lenNet% = LEN(ExistingNetCommonDir$) - 1
'print "lenNet%",lenNet%
ELSE
lenNet% = 0
'print "lenNet%",lenNet%
END IF
'print "ExistingNetCommonDir$",ExistingNetCommonDir$
'Initialize the loop
SectionPref$="Section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
'Using the shared.ini as a data driver I find all the files to be Refreshed
'
DO
'Processing for Program Path
'***************************
lDidProgramRefresh%=0
ExistingProgPath$ = GetIniKeyString(gLotusIniPath$,SectionName$,"Program Path")
'print "SectionName$", SectionName$
'print "ExistingProgPath$",ExistingProgPath$
'If the sectionName if Graphics File Filters or Document File Filters save it
'because now FLW installs the graphics filters in the \FILTERS subdirectory
'and does not use Filter Path to find them and I have to preserve this
IF SectionName$="Graphics File Filters" AND ExistingProgPath$ <> "" THEN
GraphicsFileFiltersProgPath$=LCASE$(MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-11))
ExistingProgPath$ = GraphicsFileFiltersProgPath$
ELSEIF SectionName$="Document File Filters" AND ExistingProgPath$ <> "" THEN
DocFileFiltersProgPath$=LCASE$(MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-13))
ExistingProgPath$ = DocFileFiltersProgPath$
END IF
'** DND: For toolkit we should do LCASE once.
'** DND: Make the dir questions a function.
'The extra nested IF is due to a bug in LotusScript
IF ExistingNetCommonDir$ <> "" THEN
IF ExistingProgPath$ <> "" THEN
IF DoesDirExist(ExistingProgPath$) = 1 THEN
'print "the ExistingProgPath dir exists"
'print "MID$(ExistingProgPath$,1,lenNet%) compare with",LCASE$(MID$(ExistingProgPath$,1,lenNet%))
'print "ExistingNetCommonDir$",ExistingNetCommonDir$
'print "IsDirWritable(ExistingProgPath$)",IsDirWritable(ExistingProgPath$)
'print "IsDriveLocalHard(MID$(ExistingProgPath$,1,1))",IsDriveLocalHard(MID$(ExistingProgPath$,1,1))
'print "Lot_Dir(ExistingProgPath$+\*.*)",Lot_Dir(ExistingProgPath$+"\*.*")
IF ExistingProgPath$ <> WinDir$ AND _
LCASE$(MID$(ExistingProgPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
IsDirWritable(ExistingProgPath$) = 1 AND _
IsDriveLocalHard(LCASE$(MID$(ExistingProgPath$,1,1))) = 1 AND _
Lot_Dir(ExistingProgPath$+"\*.*") <> "" THEN
lDidProgramRefresh%=Lot_AddSectionToNodeList(ExistingProgPath$,SectionName$+" Program")
'print "1 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidProgramRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
'Write the Entry to remember when updating the lotus.ini
END IF
END IF
END IF
END IF
ELSE
IF ExistingProgPath$ <> "" THEN
IF DoesDirExist(ExistingProgPath$) = 1 THEN
IF ExistingProgPath$ <> WinDir$ AND _
IsDirWritable(ExistingProgPath$) = 1 AND _
IsDriveLocalHard(LCASE$(MID$(ExistingProgPath$,1,1))) = 1 AND _
Lot_Dir(ExistingProgPath$+"\*.*") <> "" THEN
lDidProgramRefresh%=Lot_AddSectionToNodeList(ExistingProgPath$,SectionName$+" Program")
'print "2 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidProgramRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
'Write the Entry to remember when updating the lotus.ini
END IF
END IF
END IF
END IF
END IF
'Processing for Data Path
'************************
lDidDataRefresh%=0
ExistingDataPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "Data Path")
'print "ExistingDataPath$",ExistingDataPath$
IF ExistingNetCommonDir$ <> "" THEN
IF ExistingDataPath$ <> "" THEN
IF DoesDirExist(ExistingDataPath$) = 1 THEN
IF ExistingDataPath$ <> WinDir$ AND _
LCASE$(MID$(ExistingDataPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
IsDirWritable(ExistingDataPath$) = 1 AND _
IsDriveLocalHard(LCASE$(MID$(ExistingDataPath$,1,1))) = 1 AND _
Lot_Dir(ExistingDataPath$+"\*.*") <> "" THEN
lDidDataRefresh%=Lot_AddSectionToNodeList(ExistingDataPath$,SectionName$+" Data")
'print "3 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidDataRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Data")
END IF
END IF
END IF
END IF
ELSE
IF ExistingDataPath$ <> "" THEN
IF DoesDirExist(ExistingDataPath$) = 1 THEN
IF ExistingDataPath$ <> WinDir$ AND _
IsDirWritable(ExistingDataPath$) = 1 AND _
IsDriveLocalHard(LCASE$(MID$(ExistingDataPath$,1,1))) = 1 AND _
Lot_Dir(ExistingDataPath$+"\*.*") <> "" THEN
lDidDataRefresh%=Lot_AddSectionToNodeList(ExistingDataPath$,SectionName$+" Data")
'print "4 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidDataRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Data")
END IF
END IF
END IF
END IF
END IF
'Processing for User Path
'************************
lDidUserRefresh%=0
ExistingUserPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "User Path")
'print "ExistingUserPath$",ExistingUserPath$
'print "SectionName$", SectionName$
IF ExistingNetCommonDir$ <> "" THEN
IF ExistingUserPath$ <> "" THEN
IF DoesDirExist(ExistingUserPath$) = 1 THEN
IF ExistingUserPath$ <> WinDir$ AND _
LCASE$(MID$(ExistingUserPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
IsDirWritable(ExistingUserPath$) = 1 AND _
Lot_Dir(ExistingUserPath$+"\*.*") <> "" THEN
lDidUserRefresh%=Lot_AddSectionToNodeList(ExistingUserPath$,SectionName$+" User")
'print "5 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidUserRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" User")
END IF
END IF
END IF
END IF
ELSE
IF ExistingUserPath$ <> "" THEN
IF DoesDirExist(ExistingUserPath$) = 1 THEN
IF ExistingUserPath$ <> WinDir$ AND _
IsDirWritable(ExistingUserPath$) = 1 AND _
Lot_Dir(ExistingUserPath$+"\*.*") <> "" THEN
lDidUserRefresh%=Lot_AddSectionToNodeList(ExistingUserPath$,SectionName$+" User")
'print "6 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidUserRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" User")
END IF
END IF
END IF
END IF
END IF
'Processing for Filter Path
'**************************
lDidFilterRefresh%=0
ExistingFilterPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "Filter Path")
'print "SectionName$", SectionName$
'print "ExistingFilterPath$",ExistingFilterPath$
IF ExistingNetCommonDir$ <> "" THEN
IF ExistingFilterPath$ <> "" THEN
IF DoesDirExist(ExistingFilterPath$) = 1 THEN
IF ExistingFilterPath$ <> WinDir$ AND _
LCASE$(MID$(ExistingFilterPath$,1,lenNet%)) <> LCASE$(MID$(ExistingNetCommonDir$,1,lenNet%)) AND _
IsDirWritable(ExistingFilterPath$) = 1 AND _
IsDriveLocalHard(LCASE$(MID$(ExistingFilterPath$,1,1))) = 1 AND _
Lot_Dir(ExistingFilterPath$+"\*.*") <> "" THEN
lDidFilterRefresh%=Lot_AddSectionToNodeList(ExistingFilterPath$,SectionName$+" Filter")
'print "7 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidFilterRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
END IF
END IF
END IF
END IF
ELSE
IF ExistingFilterPath$ <> "" THEN
IF DoesDirExist(ExistingFilterPath$) = 1 THEN
IF ExistingFilterPath$ <> WinDir$ AND _
IsDirWritable(ExistingFilterPath$) = 1 AND _
IsDriveLocalHard(LCASE$(MID$(ExistingFilterPath$,1,1))) = 1 AND _
Lot_Dir(ExistingFilterPath$+"\*.*") <> "" THEN
lDidFilterRefresh%=Lot_AddSectionToNodeList(ExistingFilterPath$,SectionName$+" Filter")
'print "8 lDidProgramRefresh% is",STR$(lDidProgramRefresh%)
IF lDidFilterRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
END IF
END IF
END IF
END IF
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
END IF
Lot_RefreshLocalLotusapp = SUCCESS
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION PreConfigSHARE () AS INTEGER
'** Purpose: Read the lotus.ini and lotusapp.ini
'** check the paths and validate the lotusapp dir
'** Identify what product edition mix (standard server or node)
'** there is in the user environment
'** Build the appropriate move list
'** Interact with the user if I do not have place to move the files
'** Author: MZ
'** Arguments: None
'** Returns: SUCCESS
'** 2 for Previous
'*************************************************************************
DIM NetworkIns$, ret%, SaveCursor&, ExistingCommonDir$, LotusAppIniPath$
DIM result%, secResult%, FLWpath$, ImprovPath$, RC$, notused%
'print "5 share"
'** Execute the rest only if there is a registered product that supports
'** share Prods(i%)Share=1
IF Lot_AreShareToolsSupported()=1 THEN
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$ <> gSERVER$ THEN
'Find Lotus.ini
gLotusIniPath$ = GetWindowsDir()+gLOTUSINI$
ret% = DoesFileExist(gLotusIniPath$, femExists)
IF ret% <> 0 THEN
'Find if I have to consolidate local LOTUSAPP dir
SaveCursor&=ShowWaitCursor()
gConsolidateSize&=Lot_IsConsolidationNeeded(gLotusIniPath$,NetworkIns$)
RestoreCursor SaveCursor&
IF gConsolidateSize& <> CLNG(0) THEN
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
LotusappIniPath$=MakePath(ExistingCommonDir$,gLOTUSAPPINI$)
'print "LotusappIniPath$ after creation",LotusappIniPath$
'If the common directory exists, it is valid and has space put a message
IF ValidCommDir% = 1 THEN
IF GetFreeSpaceForDrive(ExistingCommonDir$) > (gConsolidateSize& \ 1024) THEN
'ErrorMsg SID_MOVE_SHARE_INFO_TEXT, ""
'I prompt the user for move/copy or exit
'** AUTOMATE: comment out the "PopupModalDlg" stmts and
'** and assume that the user chose MOVE
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
notused% = RegisterCallback("SHARE","CONSOLIDATEMOVECOPYCB")
RC$=PopupModalDlg (DBM_CONSOLIDATE_MOVECOPY, DBM_CONSOLIDATE_MOVECOPY)
ELSE
notused% = Lot_AutoConsolidateMoveCopy()
END IF
'Do the Consolidation
lDidAnyMove%=0
SaveCursor&=ShowWaitCursor()
result%=Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,GetSymbolValue( SYM_LOTUSAPPDIR$))
IF DoesFileExist(LotusappIniPath$,femExists)=1 THEN
secResult%=Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,GetSymbolValue( SYM_LOTUSAPPDIR$))
ELSE
secResult%=0
END IF
RestoreCursor SaveCursor&
IF result%=1 OR secResult%=1 THEN
'If Freelance or improv was already installed put a message TO UPDATE ICONS
FLWPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "FLW")
ImprovPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "IMPROV")
IF FLWPath$ <> "" OR ImprovPath$ <> "" THEN
IF GetSymbolValue("SYM_MOVE") = "1" THEN
ErrorMsg SID_ERR_SHARE_CONSOLID, _
GetSymbolValue(SYM_LOTUSAPPDIR$)+_
LdString(SID_ERR_SHARE_CONSOLID0)
END IF
END IF
END IF
ELSE
'** AUTOMATE: comment out the "PopupModalDlg" stmts and
'** and assume that the user chose MOVE
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
'I prompt the user for the location to consolidate into
notused% = RegisterCallback("SHARE","CONSOLIDATELOTUSAPPDIRCB")
RC$=PopupModalDlg (DBM_CONSOLIDATE_LOTUSAPPDIR, DBM_CONSOLIDATE_LOTUSAPPDIR)
ELSE
notused% = Lot_AutoConsolidateLotusAppDir(gConsolidateSize&)
END IF
IF RC$ = gBACK$ Then
PreConfigSHARE = 2
Exit Function
End IF
'Do the Consolidation
lDidAnyMove%=0
SaveCursor&=ShowWaitCursor()
result%=Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,GetSymbolValue( SYM_LOTUSAPPDIR$))
IF DoesFileExist(LotusappIniPath$,femExists)=1 THEN
secResult%=Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,GetSymbolValue( SYM_LOTUSAPPDIR$))
ELSE
secResult%=0
END IF
RestoreCursor SaveCursor&
IF result%=1 OR secResult%=1 THEN
'If Freelance or improv was already installed put a message TO UPDATE ICONS
FLWPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "FLW")
ImprovPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "IMPROV")
IF FLWPath$ <> "" OR ImprovPath$ <> "" THEN
IF GetSymbolValue("SYM_MOVE") = "1" THEN
ErrorMsg SID_ERR_SHARE_CONSOLID, _
GetSymbolValue(SYM_LOTUSAPPDIR$)+_
LdString(SID_ERR_SHARE_CONSOLID0)
END IF
END IF
END IF
END IF
ELSE
'no valid lotusappdir
'I prompt the user for the location to consolidate into
'** AUTOMATE: comment out the "PopupModalDlg" stmts and
'** and assume that the user chose MOVE
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
'I prompt the user for the location to consolidate into
notused% = RegisterCallback("SHARE","CONSOLIDATELOTUSAPPDIRCB")
RC$=PopupModalDlg (DBM_CONSOLIDATE_LOTUSAPPDIR, DBM_CONSOLIDATE_LOTUSAPPDIR)
ELSE
notused% = Lot_AutoConsolidateLotusAppDir(gConsolidateSize&)
END IF
'notused% = RegisterCallback("CALLBACK","GETLOTUSAPPDIRCB")
'RC$=PopupModalDlg (DBM_SPECIFY_LOTUSAPPDIR, DBM_SPECIFY_LOTUSAPPDIR)
IF RC$ = gBACK$ Then
PreConfigSHARE = 2
Exit Function
End IF
'Do the Consolidation
lDidAnyMove%=0
SaveCursor&=ShowWaitCursor()
result%=Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,GetSymbolValue( SYM_LOTUSAPPDIR$))
IF DoesFileExist(LotusappIniPath$,femExists)=1 THEN
secResult%=Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,GetSymbolValue( SYM_LOTUSAPPDIR$))
ELSE
secResult%=0
END IF
RestoreCursor SaveCursor&
IF result%=1 OR secResult%=1 THEN
'If Freelance or improv was already installed put a message TO UPDATE ICONS
FLWPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "FLW")
ImprovPath$ = GetIniKeyString(gLotusIniPath$, "Lotus Applications", "IMPROV")
IF FLWPath$ <> "" OR ImprovPath$ <> "" THEN
IF GetSymbolValue("SYM_MOVE") = "1" THEN
ErrorMsg SID_ERR_SHARE_CONSOLID, _
GetSymbolValue(SYM_LOTUSAPPDIR$)+_
LdString(SID_ERR_SHARE_CONSOLID0)
END IF
END IF
END IF 'result%=1 OR secResult%=1
END IF
END IF 'gConsolidateSize& <> CLNG(0)
ELSE
'no move is necessary because no lotus.ini found
gConsolidateSize&=CLNG(0)
END IF 'lotus.ini found or not
END IF 'if not server
END IF 'if share are supported
PreConfigSHARE = SUCCESS
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetNetLotusappSource(Chapter$) AS STRING
'** Purpose: Reads [Server Configuration of Shared Tools]
'** LOTUSAPPDIR=D:\lotus\lotusapp
'** SameDriveFlag=1
'** from install.ini
'** Author: MZ
'** Arguments: Chapter$
'** Returns: the lotusapp dir
'*************************************************************************
DIM NetworkIns$, prodDir$, DestSpec$
'print "6 share"
'Identify if I am in node install
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = GetSymbolValue(SYM_STF_SRCDIR$)
DestSpec$ = Lot_GetChapterValStr(Chapter$, F_DESTDIR)
'If the section is intended to go in Win dir it was installed
' by the administrator into 123r4w directory
IF LCASE$(DestSpec$) <> GetWindowsDir() Then
Lot_GetNetLotusappSource=GetSymbolValue(SYM_NETLOTUSAPP$)
ELSE
Lot_GetNetLotusappSource = prodDir$
END IF
END IF
END FUNCTION
'*************************************************************************
FUNCTION Lot_IsTheChapterInstalled(ChapterToFind$) AS INTEGER
'** Purpose: Reads the chapters installed by the network administrator
'** during server install into install.ini in the section
'** [Server Configuration of 123w] and if the chapter
'** was installed returns 1 if not returns 0
'** Author: MZ
'** Arguments: chapter$
'** Returns: 1 YES
'** 0 NO
'*************************************************************************
DIM NetworkIns$, cwd$, gInstallIniFile$, ChapterPref$, ChapterNumber%
DIM ChapterTag$, ChapterID$, rc%
'print "7 share"
'Identify if I am in node install
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
'Get the current working directory
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
gInstallIniFile$ = MakePath(cwd$,gINSTALLINI$)
ChapterPref$ = "Chapter"
ChapterNumber%=1
ChapterTag$=ChapterPref$+LTRIM$(STR$(ChapterNumber%))
ChapterID$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of 123w", ChapterTag$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
DO
IF ChapterID$ = ChapterToFind$ THEN
Lot_IsTheChapterInstalled = 1
EXIT FUNCTION
END IF
ChapterNumber% = ChapterNumber% + 1
ChapterTag$=ChapterPref$+LTRIM$(STR$(ChapterNumber%))
ChapterID$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of 123w", ChapterTag$)
LOOP UNTIL ChapterID$ = ""
ELSE
'print "2", gInstallIniFile$
ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
gEndStatementEncountered% = TRUE
EXIT FUNCTION
'FatalErrorMsg SID_ERR_INSTALLINI_MISSING, gInstallIniFile$, STFQUIT
END IF
END IF
Lot_IsTheChapterInstalled = 0
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetNetCommDirPath (gLotusIniPath$,gNetCommDirPath$) AS STRING
'** Purpose: This function investigates the users environment and
'** find if Lotus.ini exists and if it has [Lotus Applications]
'** Section and Net Common Directory entry
'** Author: MZ
'** Arguments: gLotusIniPath$,gNetCommDir$
'** Returns: gNetCommDirPath$
'*************************************************************************
DIM gLotusIniExist%
'print "8 share"
gNetCommDirPath$=""
gLotusIniExist% = DoesFileExist(gLotusIniPath$, femExists)
IF gLotusIniExist% <>0 THEN
gNetCommDirPath$=Lot_LocalGetPathFromIni(gLotusIniPath$, "Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
END IF
Lot_GetNetCommDirPath = gNetCommDirPath$
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsSQLSelected () AS INTEGER
'** Purpose: Read the copy list and determines if SQL was selected to
'** be installed
'** Author: MZ
'** Arguments: None
'** Returns: 1 if SQL was selected or
'** 0 if SQL was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "9 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_SQL)
Lot_IsSQLSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsSQLSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsParadoxSelected () AS INTEGER
'** Purpose: Read the copy list and determines if Paradox was selected to
'** be installed
'** Author: MZ
'** Arguments: None
'** Returns: 1 if Paradox was selected or
'** 0 if Paradox was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "10 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_PARADOX)
Lot_IsParadoxSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsParadoxSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsdBaseSelected () AS INTEGER
'** Purpose: Read the copy list and determines if dBase was selected to
'** be installed
'** Author: MZ
'** Arguments: None
'** Returns: 1 if dBase was selected or
'** 0 if dBase was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "11 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_DBASE)
Lot_IsdBaseSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsdBaseSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsInformixSelected () AS INTEGER
'** Purpose: Read the copy list and determines if Informix was selected to
'** be installed
'** Author: MZ
'** Arguments: None
'** Returns: 1 if Informix was selected or
'** 0 if Informix was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "12 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_INFORMIX)
Lot_IsInformixSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsInformixSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsIBMdBaseManagerSelected () AS INTEGER
'** Purpose: Read the copy list and determines if IBMdBaseManager was selected to
'** be installed
'** Author: MZ
'** Arguments: None
'** Returns: 1 if IBMdBaseManager was selected or
'** 0 if IBMdBaseManager was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "13 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DBM)
Lot_IsIBMdBaseManagerSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsIBMdBaseManagerSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
'*************************************************************************
PUBLIC FUNCTION Lot_IsNotesSQLSelected () AS INTEGER
'** Purpose: Read the copy list and determines if NotesSQL was selected to
'** be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if NotesSQL was selected or
'** 0 if NotesSQL was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "14 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_NOTESSQL)
Lot_IsNotesSQLSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsNotesSQLSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsSpreadSheetSelected () AS INTEGER
'** Purpose: Read the copy list and determines if DataLens SpreadSheet
'** driver was selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if SpreadSheet was selected or
'** 0 if SpreadSheet was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "15 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_SPREADSHEET)
Lot_IsSpreadSheetSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsSpreadSheetSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsIBM_DB2Selected () AS INTEGER
'** Purpose: Read the copy list and determines if IBM DB2 was selected
'** to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if IBM DB2 was selected or
'** 0 if IBM DB2 was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
'print "16 share"
buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DB2)
Lot_IsIBM_DB2Selected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsIBM_DB2Selected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsDB2_SQLDS_Selected () AS INTEGER
'** Purpose: Read the copy list and determines if IBM DB2 SQLDS was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if DB2_SQLDS was selected or
'** 0 if DB2_SQLDS was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_DB2_SQLDS)
Lot_IsDB2_SQLDS_Selected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsDB2_SQLDS_Selected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsDB2_SQL400_Selected () AS INTEGER
'** Purpose: Read the copy list and determines if IBM SQL400
'** was selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if DB2SQL400 was selected or
'** 0 if DB2 SQL400 was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_DB2_SQL400)
Lot_IsDB2_SQL400_Selected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsDB2_SQL400_Selected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsIBM_DDCS2_Selected () AS INTEGER
'** Purpose: Read the copy list and determines if IBM DB2 through
'** DDCS2 Gateway was selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if IBM_DDCS2 was selected or
'** 0 if IBM_DDCS2 was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DDCS_2)
Lot_IsIBM_DDCS2_Selected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsIBM_DDCS2_Selected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCDriverSelected () AS INTEGER
'** Purpose: Read the copy list and determines if DataLENS ODBC Driver
'** was selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBCDriver was selected or
'** 0 if ODBCDriver was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_ODBCD)
Lot_IsODBCDriverSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCDriverSelected=1
gODBCSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCSpreadSheetSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBC SpreadSheet was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBC SpreadSheet was selected or
'** 0 if ODBC SpreadSheet was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_SPREADSHEET)
Lot_IsODBCSpreadSheetSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCSpreadSheetSelected=1
gODBCSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCTextDriverSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBC Text Driver was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBC Text Driver was selected or
'** 0 if ODBC Text Driver was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_TEXTDRVR)
Lot_IsODBCTextDriverSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCTextDriverSelected=1
gODBCSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsOracleSelected () AS INTEGER
'** Purpose: Read the copy list and determines if Oracle was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if Oracle was selected or
'** 0 if Oracle was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_ORACLE)
Lot_IsOracleSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsOracleSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCBtrieveSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBCBtrieve was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBC Btrieve was selected or
'** 0 if ODBC Btrieve was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_Btrieve)
Lot_IsODBCBtrieveSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCBtrieveSelected=1
gODBCSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCDB2Selected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBC DB2 was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBC DB2 was selected or
'** 0 if ODBC DB2 was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_DB2)
Lot_IsODBCDB2Selected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCDB2Selected=1
gODBCSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCFoxbaseSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBCFoxbase was selected to
'** be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBCFoxbase was selected or
'** 0 if ODBCFoxbase was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_FOXBASE)
Lot_IsODBCFoxbaseSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCFoxbaseSelected=1
gODBCSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCAccessSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBCAccess was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBCAccess was selected or
'** 0 if ODBCAccess was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_ACCESS)
Lot_IsODBCAccessSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCAccessSelected=1
gODBCSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCParadoxSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBC Paradox was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBC Paradox was selected or
'** 0 if ODBC Paradox was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_PARADOX)
Lot_IsODBCParadoxSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCParadoxSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCOracleSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBCOracle was selected to
'** be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBCOracle was selected or
'** 0 if ODBCOracle was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_Oracle)
Lot_IsODBCOracleSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCOracleSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_IsODBCSQLServerSelected () AS INTEGER
'** Purpose: Read the copy list and determines if ODBC SQL Server was
'** selected to be installed
'** Author: PJT
'** Arguments: None
'** Returns: 1 if ODBCSQLServer was selected or
'** 0 if ODBCSQLServer was not selected
'*************************************************************************
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_SQLSERVER)
Lot_IsODBCSQLServerSelected=0
IF Lot_AreShareToolsSupported()=1 THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
ChapterName$ = Lot_GetChapterValStr(CurrChpt$, F_NAME)
IF ChapterName$ = buf1$ THEN
Lot_IsODBCSQLServerSelected=1
EXIT FUNCTION
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION ConfigSHARE () AS INTEGER
'** Purpose: Read the copy list and depending on the Shared tools
'** installed update lotus.ini and lotusapp.ini
'** Author: MZ
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM NetworkIns$, notused%
'
' First I get all the sections that have the shared flag and build a list
' The maximum current list is:
' This list will be populated by a loop of calls to FGetFirst()&FGetNext()
' for today I add the entries like all sections got installed
notused% = Lot_GetAllSharedInstalled()
'Initialize globals gLotusappIniPath$ and gLotusappDir
gLotusappDir=CreateBuffer(256)
gLotusappDir=GetSymbolValue(SYM_LOTUSAPPDIR$)
gLotusappIniPath=CreateBuffer(256)
gLotusBcfDir=CreateBuffer(256)
notused% = Lot_GetLotusappiniPath(gLotusappIniPath, gLotusappDir, gLotusBcfDir)
'print "before calling ConfigSHARE32"
ConfigSHARE32
'** Execute the rest only if there is a registered product that supports
'** share Prods(i%)Share=1
IF Lot_AreShareToolsSupported()=1 THEN
'Write the INI files for standard and node install and save the config in server
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$ THEN
notused% = Lot_WriteIniFiles()
' notused% = Lot_WriteShareInProgMan(NetworkIns$)
ELSEIF NetworkIns$ = gSERVER$ THEN
'Save the server configuration in the install.ini (to be used by the node install)
notused% = Lot_SaveShareConfigInInstallIni()
END IF
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBMPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRSQLPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRPARADOXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBMDB2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRORACLEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 THEN
gDataLensInstalled = 1
ELSE
gDataLensInstalled = 0
END IF
'Write lotus.bcf file
'print STR$(gDataLensInstalled)
IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gSERVER$) AND _
gDataLensInstalled = 1 THEN
notused% = Lot_WriteLotusBcfFile()
END IF
IF NetworkIns$ = gSTANDARD$ AND gDataLensInstalled = 1 THEN
'write the datapath for BCF file
gLotusappDir$=GetSymbolValue(SYM_LOTUSAPPDIR$)
CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
END IF
IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$) AND _
gDataLensInstalled = 1 THEN
notused% = Lot_WriteODBCINST()
END IF
END IF
ConfigSHARE = SUCCESS
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION AddSHAREIcons() AS INTEGER
'** Purpose: Puts up the shared tools icons
'** Author: MZ
'** Returns: 1 if success
'***************************************************
DIM grouptitle$,Lotusappdir$,dlgeditor$,Network$,notused%,IconName$
DIM Feature$, s$
IF Lot_AreShareToolsSupported () = 1 THEN
Network$ = GetSymbolValue(SYM_NETWORK$)
grouptitle$ = Reg_GetProgManagerGroupName(1)
IconName$ = LdString(SID_LOTDIALOGEDITOR)
Feature$ = "SHRDLGPRG"
'** DIALOG EDITOR
If network$ = gSTANDARD$ Then
If (FIsKeywordinCopyList (Feature$) = 1) Then
Lotusappdir$= GetSymbolValue(SYM_LOTUSAPPDIR$)
dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
If IsNewShell() THEN
s$ = LdString(SID_LOTACCESSORIES)+IconName$+".lnk"
notused%=Lot_AddLinkToFolder(1, dlgeditor$, s$, IconName$, "", Lotusappdir$)
'JMD notused%=Lot_AddLinkToFolder(1, dlgeditor$, IconName$+".lnk", IconName$, "", Lotusappdir$)
' notused%=Lot_RegisterObject(Feature$, UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(1)+IconName$+".lnk")
Else
CreateProgmanItem grouptitle$, IconName$, dlgeditor$, "", cmoOverwrite
End If
End If
ElseIf network$ = gNODE$ Then
If Lot_IsTheFeatureInstalled("SHRDLGPRG") = 1 Then
Lotusappdir$= GetSymbolValue(SYM_NETLOTUSAPP$)
dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
If IsNewShell() THEN
s$ = LdString(SID_LOTACCESSORIES)+IconName$+".lnk"
notused%=Lot_AddLinkToFolder(1, dlgeditor$, s$, IconName$, "", Lotusappdir$)
'JMD notused%=Lot_AddLinkToFolder(1, dlgeditor$, IconName$+".lnk", IconName$, "", Lotusappdir$)
' notused%=Lot_RegisterObject(Feature$, UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(1)+IconName$+".lnk")
Else
CreateProgmanItem grouptitle$, IconName$, dlgeditor$, "", cmoOverwrite
End If
End If
End If
End If
AddSHAREIcons=SUCCESS
END FUNCTION
'*************************************************************************
FUNCTION Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,NewDestDir$) AS INTEGER
'** Purpose: Copies the shared files referenced in lotusapp.ini to a new location
'** if the copy is successful deletes the files on the old location
'** and writes the new location in the loths.ini
'** Author: MZ
'** Arguments: LotusappIniPath$ where LOTUSAPP.INI file is
'** NewDestDir$ where to move the files
'** Returns: 1 if success
'** 0 if no consolidation was done
'***************************************************
'** NOTE: This function is called after Lot_DoShareConsolidation
'******************************************************
'*************************************************************************
DIM cwd$, gSharedIniFile$, WinDir$, ExistingCommonDir$, SectionPref$
DIM SectionNumber%, SectionTag$, SectionName$, lDidProgramMove%
DIM recordedPath$, ExistingProgPath$, ExistingnetCommonDir$
DIM Entry$, lDidDataMove%, ExistingDataPath$, lDidUserMove%, ExistingUserPath$
DIM lDidFilterMove%, ExistingFilterPath$, SpellUserPath$, fileSize&, notused%
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
'Get the Common Directory and Net Common Directory
ExistingCommonDir$ = GetSymbolValue(SYM_EXISTINGCOMMDIR$)
'print "ExistingCommonDir$",ExistingCommonDir$
'print "LotusappIniPath$",LotusappIniPath$
'Initialize the loop
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
'Using the shared.ini as a data driver I find all the files to be moved
DO
'print "SectionName$",SectionName$
'Processing for Program Path
'***************************
lDidProgramMove%=0
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
'print "RecordedPath$ prog",RecordedPath$
ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
'print ExistingProgPath$,"ExistingProgPath$"
'print "NewDestDir$",NewDestDir$
'If the sectionName if Graphics File Filters or Document File Filters
'save it because now FLW installs the graphics filters in the
'\FILTERS subdirectory and does not use Filter Path to find them and
'I have to preserve this
IF SectionName$="Graphics File Filters" AND ExistingProgPath$ <> "" THEN
GraphicsFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-11)
ELSEIF SectionName$="Document File Filters" AND ExistingProgPath$ <> "" THEN
DocFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-13)
END IF
'The nested IFs are used to get around a bug in LotusScript.
'** DND: The existing path questions could be packaged in a function
'** DND: LCASE should be done once
IF ExistingNetCommonDir$ <>"" Then
IF ExistingProgPath$ <> "" AND _
ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
IF lDidProgramMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
END IF
END IF
ELSE
IF ExistingProgPath$ <> "" AND _
ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
IF lDidProgramMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
END IF
END IF
END IF
'Processing for Data Path
'************************
lDidDataMove%=0
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
'print "RecordedPath$ data",RecordedPath$
ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
'print ExistingDataPath$,"ExistingDataPath$"
'print "NewDestDir$",NewDestDir$
IF ExistingNetCommonDir$ <>"" Then
IF ExistingDataPath$ <> "" AND _
ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
IF lDidDataMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Data")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
ELSEIF Entry$="DATALENSDATA" THEN
notused% = Lot_WriteEntry(Entry$,1)
END IF
END IF
ELSE
IF ExistingDataPath$ <> "" AND _
ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
IF lDidDataMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Data")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
ELSEIF Entry$="DATALENSDATA" THEN
notused% = Lot_WriteEntry(Entry$,1)
END IF
END IF
END IF
'Processing for User Path
'*************************
lDidUserMove%=0
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "User Path")
ExistingUserPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
IF ExistingNetCommonDir$ <>"" Then
IF ExistingUserPath$ <> "" AND _
ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
IF lDidUserMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" User")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
END IF
END IF
ELSE
IF ExistingUserPath$ <> "" AND _
ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <>NewDestDir$ THEN
lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
IF lDidUserMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" User")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
END IF
END IF
END IF
'Processing for Filter Path
'**************************
lDidFilterMove%=0
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Filter Path")
ExistingFilterPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
IF ExistingNetCommonDir$ <>"" Then
IF ExistingFilterPath$ = "" AND _
SectionName$="Graphics File Filters" AND _
GraphicsFileFiltersProgPath$<>"" AND _
ExistingFilterPath$ <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
ELSEIF ExistingFilterPath$ <> "" AND _
ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
ExistingFilterPath$ <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
END IF
ELSE
IF ExistingFilterPath$ = "" AND _
SectionName$="Graphics File Filters" AND _
GraphicsFileFiltersProgPath$<>"" AND _
MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
ELSEIF ExistingFilterPath$ <> "" AND _
ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
END IF
END IF
IF lDidFilterMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingFilterPath$))
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
IF lDidAnyMove%=1 THEN
'Write common Dir
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'If the UserPath for spell is not equal with the common dir make it so
SpellUserPath$ = GetIniKeyString(gLotusIniPath$, "Spell Checker", "User Path")
IF LCASE$(SpellUserPath$) <> gLotusappDir$+"spell" THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path",gLotusappDir$+"spell",cmoOverwrite
END IF
'Special processing for lotusapp.ini
FileSize& = GetSizeOfFile(LotusappIniPath$)
'print ExistingCommonDir$,"ExistingCommonDir$"
'print NewDestDir$,"NewDestDir$"
IF ExistingCommonDir$ <> NewDestDir$ THEN
notused% = Lot_DoVerDateValidation(ExistingCommonDir$,NewDestDir$,gLOTUSAPPINI$,FileSize&)
END IF
' Delete the old common directory
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingCommonDir$))
Lot_DoConsolidateFilesInLotusappIni=1
ELSE
Lot_DoConsolidateFilesInLotusappIni=0
END IF
END FUNCTION
'*************************************************************************
FUNCTION Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,NewDestDir$) AS INTEGER
'** Purpose: Copies the shared files referenced in lotus.ini to a new location
'** if the copy is successful deletes the files on the old location
'** and writes the new location in the loths.ini
'** Author: MZ
'** Arguments: gLotusIniPath$ where LOTUS.INI file is
'** NetworkIns$ gSTANDARD$ or gNODE$
'** NewDestDir$ where to move the files
'** Returns: 1 if success
'** 0 if no consolidation was done
'*************************************************************************
DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, SectionPref$
DIM SectionNumber%, SectionTag$, SectionName$, lDidProgramMove%
DIM FileExist%, ExistingProgPath$, entry$, lDIdDataMove%, ExistingDataPath$
DIM ExistingNetCommonDir$, lDidUserMove%, ExistingUserPath$, lDIdFilterMove%
DIM ExistingFilterPath$, SpellUserPath$, notused%
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
FileExist% = DoesFileExist(gSharedIniFile$, femExists)
'Get the Common Directory and Net Common Directory from the user lotus.ini
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
'Initialize the loop
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
'Using the shared.ini as a data driver I find all the files to be moved
DO
'Processing for Program Path
'***************************
lDidProgramMove%=0
ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
'If the sectionName if Graphics File Filters or Document File Filters
'save it because now FLW installs the graphics filters in the
'\FILTERS subdirectory and does not use Filter Path to find them and
'I have to preserve this
IF SectionName$="Graphics File Filters" AND ExistingProgPath$ <> "" THEN
GraphicsFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-11)
ELSEIF SectionName$="Document File Filters" AND ExistingProgPath$ <> "" THEN
DocFileFiltersProgPath$=MID$(ExistingProgPath$,1,LEN(ExistingProgPath$)-13)
END IF
'The nested IFs are used to get around a bug in LotusScript.
'** DND: The existing path questions could be packaged in a function
'** DND: LCASE should be done once
IF ExistingNetCommonDir$ <>"" Then
IF ExistingProgPath$ <> "" AND _
ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
IF lDidProgramMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
END IF
END IF
ELSE
IF ExistingProgPath$ <> "" AND _
ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidProgramMove%=Lot_MoveFiles(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",NewDestDir$)
IF lDidProgramMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingProgPath$))
notused% = Lot_UpdateWinIni(Entry$,NewDestDir$)
END IF
END IF
END IF
'Processing for Data Path
'************************
lDidDataMove%=0
ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
IF ExistingNetCommonDir$ <>"" Then
IF ExistingDataPath$ <> "" AND _
ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
IF lDidDataMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Data")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
ELSEIF Entry$="DATALENSDATA" THEN
notused% = Lot_WriteEntry(Entry$,1)
END IF
END IF
ELSE
IF ExistingDataPath$ <> "" AND _
ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidDataMove%=Lot_MoveFiles(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",NewDestDir$)
IF lDidDataMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Data")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingDataPath$))
ELSEIF Entry$="DATALENSDATA" THEN
notused% = Lot_WriteEntry(Entry$,1)
END IF
END IF
END IF
'Processing for User Path
'*************************
lDidUserMove%=0
ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
IF ExistingNetCommonDir$ <>"" Then
IF ExistingUserPath$ <> "" AND _
ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
IF lDidUserMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" User")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
END IF
END IF
ELSE
IF ExistingUserPath$ <> "" AND _
ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidUserMove%=Lot_MoveFiles(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",NewDestDir$)
IF lDidUserMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" User")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingUserPath$))
END IF
END IF
END IF
'Processing for Filter Path
'**************************
lDidFilterMove%=0
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
IF ExistingNetCommonDir$ <>"" Then
IF ExistingFilterPath$ = "" AND _
SectionName$="Graphics File Filters" AND _
GraphicsFileFiltersProgPath$<>"" AND _
ExistingFilterPath$ <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
ELSEIF ExistingFilterPath$ <> "" AND _
ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
ExistingFilterPath$ <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
END IF
ELSE
IF ExistingFilterPath$ = "" AND _
SectionName$="Graphics File Filters" AND _
GraphicsFileFiltersProgPath$<>"" AND _
MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
ELSEIF ExistingFilterPath$ <> "" AND _
ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(NewDestDir$)) <> NewDestDir$ THEN
lDidFilterMove%=Lot_MoveFiles(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",NewDestDir$)
END IF
END IF
IF lDidFilterMove% <> 0 THEN
lDidAnyMove%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Filter")
notused% = Lot_WriteEntry(Entry$,1)
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingFilterPath$))
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
IF lDidAnyMove%=1 THEN
'Write common Dir
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'If the UserPath for spell is not equal with the common dir make it so
SpellUserPath$ = GetIniKeyString(gLotusIniPath$, "Spell Checker", "User Path")
IF LCASE$(SpellUserPath$) <> gLotusappDir$+"spell" THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path",gLotusappDir$+"spell",cmoOverwrite
END IF
' Delete the old common directory
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingCommonDir$))
Lot_DoShareConsolidation=1
ELSE
IF Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR) = "" THEN
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
END IF
Lot_DoShareConsolidation=0
END IF
END FUNCTION
'*************************************************************************
FUNCTION Lot_UpdateWinIni(Entry$,NewDestDir$) AS INTEGER
'** Purpose: Updates the embedding section in win.ini if multimedia
'** was consolidated
'** Author: MZ
'** Arguments: Entry$ entry flag
'** NewDestDir$ where the files were moved
'** Returns: 1
'*************************************************************************
DIM WinIniDir$, NewDestSubDir$, AnNoteEntry$, AnnoteStr$, SoundEntry$
DIM SoundStr$, MediaEntry$, MediaStr$, ScreenCamEntry$, ScreenCamStr$
WinIniDir$ = MakePath(GetWindowsDir(), gWININI$)
IF Entry$ = "MULTIMEDIAPROGRAM" THEN
'IF Lot_IsTheFeatureInstalled("SHRMM") = 1 THEN
NewDestSubDir$=NewDestDir$+"multimed\"
AnNoteEntry$ = GetIniKeyString(WinIniDir$,"embedding", "LotusAnNote")
IF AnNoteEntry$<>"" AND DoesFileExist(NewDestSubDir$+"ANNOTATE.EXE",femExists)=1 THEN
AnNoteStr$ = "Lotus Annotator Note,Lotus Annotator Note,"+NewDestSubDir$+"ANNOTATE.EXE,picture"
CreateIniKeyValue WinIniDir$, "embedding", "LotusAnNote", AnNoteStr$, cmoOverwrite
END IF
SoundEntry$ = GetIniKeyString(WinIniDir$,"embedding", "LotusSound")
IF SoundEntry$<>"" AND DoesFileExist(NewDestSubDir$+"LOTUSSND.EXE",femExists)=1 THEN
SoundStr$ = "Lotus Sound,Lotus Sound,"+NewDestSubDir$+"LOTUSSND.EXE,picture"
CreateIniKeyValue WinIniDir$, "embedding", "LotusSound", SoundStr$, cmoOverwrite
END IF
MediaEntry$ = GetIniKeyString(WinIniDir$,"embedding", "LotusMedia")
IF MediaEntry$<>"" AND DoesFileExist(NewDestSubDir$+"MEDMAN.EXE",femExists)=1 THEN
MediaStr$ = "Lotus Media,Lotus Media,"+NewDestSubDir$+"MEDMAN.EXE,picture"
CreateIniKeyValue WinIniDir$, "embedding", "LotusMedia", MediaStr$, cmoOverwrite
END IF
'END IF
'IF Lot_IsTheFeatureInstalled("SHRSCRNCAM") = 1 THEN
ScreenCamEntry$ = GetIniKeyString(WinIniDir$,"embedding", "ScreenCamMovie")
IF ScreenCamEntry$<>"" AND DoesFileExist(NewDestSubDir$+"SCRNCAM.EXE",femExists)=1 THEN
ScreenCamStr$ = "Lotus ScreenCam Movie,Lotus ScreenCam Movie,"+NewDestSubDir$+"SCRNCAM.EXE,picture"
CreateIniKeyValue WinIniDir$, "embedding", "ScreenCamMovie", ScreenCamStr$, cmoOverwrite
END IF
'END IF
END IF
Lot_UpdateWinIni=1
END FUNCTION
'*************************************************************************
FUNCTION Lot_IsExistingLotusappDirValid(BYVAL ExistingCommonDir$) AS INTEGER
'** Purpose: Determines if the ExistingCommonDir$ exists, is writable
'** is not empty
'** Author: MZ
'** Arguments: ExistingCommonDir$
'** Returns: 1 or 0 if the dir is valid or not
'*************************************************************************
DIM localValidCommDir%, networkCommDir$, notEmptySpell%, notEmptyDatalens%
DIM localExistingCommonDir$
if ExistingCommonDir$ <> "" then
localExistingCommonDir$ = Lot_TrimEndSlash(ExistingCommonDir$)
else
localExistingCommonDir$ = ExistingCommonDir$
end if
networkCommDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
IF localExistingCommonDir$ <> "" THEN
IF ValidatePath(localExistingCommonDir$) <> FALSE THEN
IF DoesDirExist(localExistingCommonDir$) <> 0 THEN
IF DoesDirExist(Lot_TrimEndSlash(localExistingCommonDir$)+"\spell") <> 0 THEN
notEmptySpell% = 1
' IF Lot_Dir(Lot_TrimEndSlash(localExistingCommonDir$)+"\spell\*.*") <> "" THEN
' notEmptySpell% = 1
' ELSE
' notEmptySpell% = 0
' END IF
ELSE
notEmptySpell% = 0
END IF
IF DoesDirExist(Lot_TrimEndSlash(localExistingCommonDir$)+"\datalens") <> 0 THEN
IF Lot_Dir(Lot_TrimEndSlash(localExistingCommonDir$)+"\datalens\*.*") <> "" THEN
notEmptyDatalens% = 1
ELSE
notEmptyDatalens% = 0
END IF
ELSE
notEmptyDatalens% = 0
END IF
IF ExistingCommonDir$ <> networkCommDir$ AND _
IsDirWritable(ExistingCommonDir$) <> 0 AND _
(Lot_Dir(Lot_TrimEndSlash(localExistingCommonDir$)+"\*.*") <> "" OR _
notEmptySpell% = 1 OR _
notEmptyDatalens% = 1) THEN
localValidCommDir% = 1
SetSymbolValue SYM_LOTUSAPPDIR$,LCASE$(localExistingCommonDir$)
Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
DL_SetNotesDataPath
DL_SetOraclePath
ELSE
localValidCommDir% = 0
END IF
ELSE
localValidCommDir% = 0
END IF
ELSE
localValidCommDir% = 0
END IF
ELSE
localValidCommDir% = 0
END IF
Lot_IsExistingLotusappDirValid=localValidCommDir%
END FUNCTION
FUNCTION Lot_IsConsolidationNeeded(gLotusIniPath$,NetworkIns$) AS LONG
'** Purpose: Determines if the consolidation of the Lotusapp directory
'** is needed and looks for the files referenced by lotus.ini
'** that have to be consolidated calculating the total space needed in Kb
'** if lotusapp.ini exists it calls Lot_GetSizeOfFilesInLotusappIni
'** Author: MZ
'** Arguments: gLotusIniPath$ where LOTUS.INI file is
'** NetworkIns$
'** Returns: gConsolidateSize& the total size of the files to be moved
'*************************************************************************
DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, ExistingNetCommonDir$
DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
DIM ExistingProgPath$, ExistingDataPath$, ExistingUserPath$, ExistingFilterPath$
DIM LotusAppIniPath$
'Initialize return value of the size
gConsolidateSize&=CLNG(0)
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
'print"WinDir$", WinDir$
'Get the Common Directory and Net Common Directory from the user lotus.ini
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
'print "ExistingCommonDir$ in consolidation",ExistingCommonDir$
' ExistingCommonDir$ = GetIniKeyString(gLotusIniPath$,"Lotus Applications", "Common Directory")
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
'print "ExistingNetCommonDir$ in consol..",ExistingNetCommonDir$
'validate the ExistingCommonDir$ and set the global ValidCommDir%
'A valid ExistingCommonDir$ is an existing dir with write access
ValidCommDir% = Lot_IsExistingLotusappDirValid(ExistingCommonDir$)
'print "ValidCommDir",STR(ValidCommDir%)
'Initialize the loop
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
'Using the shared.ini as a data driver I find all the files to be consolidate
DO
'** DND: Path checking can be made a function
'Processing for Program Path
'***************************
ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
'print "ExistingProgPath$",ExistingProgPath$
IF LEN(ExistingProgPath$) > 0 THEN
'print "progpath len > 0"
IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
IF (ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in if",ExistingProgPath$
END IF
ELSE
IF ExistingCommonDir$ <> "" THEN
IF (ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in else",ExistingProgPath$
END IF
ELSE
IF (ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in second else",ExistingProgPath$
END IF
END IF
END IF
END IF
'Processing for Data Path
'************************
ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
'print ExistingDataPath$, "ExistingDataPath$"
IF LEN(ExistingDataPath$) > 0 THEN
'print "datapath len > 0"
IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
IF (ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in if datapath"
END IF
ELSE
IF ExistingCommonDir$ <> "" THEN
IF (ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in else datapath"
END IF
ELSE
IF (ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in else datapath"
END IF
END IF
END IF
END IF
'Processing for User Path
'************************
ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
'print ExistingUserPath$,"ExistingUserPath$"
IF LEN(ExistingUserPath$) > 0 THEN
'print "userpath len > 0"
IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
IF (ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in if userpath"
END IF
ELSE
IF ExistingCommonDir$ <> "" THEN
IF (ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in else userpath"
END IF
ELSE
IF (ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in else userpath"
END IF
END IF
END IF
END IF
'Processing for Filter Path
'***************************
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
'print ExistingFilterPath$, "ExistingFilterPath$"
IF LEN(ExistingFilterPath$) > 0 THEN
'print "filterpath len > 0"
IF ExistingNetCommonDir$ <>"" AND ExistingCommonDir$ <> "" THEN
IF (ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in if filterpath"
END IF
ELSE
IF ExistingCommonDir$ <> "" THEN
IF (ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in else filterpath"
END IF
ELSE
IF (ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize& in else filterpath"
END IF
END IF
END IF
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
'If lotusapp.ini exists collect the files sizes referenced in it
LotusappIniPath$ = MakePath(ExistingCommonDir$,gLOTUSAPPINI$)
IF DoesFileExist(LotusappIniPath$, femExists)=1 THEN
gConsolidateSize&=Lot_GetSizeOfFilesInLotusappIni(LotusappIniPath$,ExistingCommonDir$,ExistingNetCommonDir$,gConsolidateSize&)
END IF
Lot_IsConsolidationNeeded=gConsolidateSize&
END FUNCTION
'*************************************************************************
FUNCTION Lot_ChkLotusIniSizePath(PathToCheck$,ExistingNetCommonDir$,WinDir$,newLotusappDir$) AS INTEGER
'** Purpose: Checks the path if it should be added to the size
'** Author: MZ
'** Arguments: PathToCheck$
'** ExistingNetCommonDir$
'** WinDir$
'** newLotusappDir$ the new destination for the files
'** Returns: 1 if the Lot_GetFileSize() should be called
'** 0 if should not
'*************************************************************************
DIM res%
res%=0
IF ExistingNetCommonDir$ <>"" THEN
IF PathToCheck$ <> "" AND _
PathToCheck$ <> WinDir$ AND _
MID$(PathToCheck$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(PathToCheck$,1,1) <> MID$(newLotusappDir$,1,1) THEN
res%=1
END IF
ELSE
IF PathToCheck$ <> "" AND _
PathToCheck$ <> WinDir$ AND _
MID$(PathToCheck$,1,1) <> MID$(newLotusappDir$,1,1) THEN
res%=1
END IF
END IF
Lot_ChkLotusIniSizePath=res%
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetInLotusIniSizeOfFilesToMove(gLotusIniPath$,newLotusappDir$,gMoveSize&) AS LONG
'** Purpose: Reads lotus.ini and calculates the size needed to move the
'** found files
'** Author: MZ
'** Arguments: gLotusIniPath$ where LOTUS.INI file is
'** newLotusappDir$ the new destination for the files
'** gMoveSize&
'** Returns: gMoveSize& the total size of the files to be moved
'*************************************************************************
DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, ExistingNetCommonDir$
DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
DIM ExistingProgPath$, ExistingDataPath$, ExistingUserPath$, ExistingFilterPath$
DIM LotusAppIniPath$,chk%
'** DND: Paths should all be lower case!
gSharedIniFile$ = Lot_GetSharedIniPathName()
'print "The path to shared.ini",gSharedIniFile$
WinDir$=GetWindowsDir()
'print "WinDir$", WinDir$
'print "gLotusIniPath$",gLotusIniPath$
'Get the Common Directory and Net Common Directory from the user lotus.ini
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
'print "ExistingCommonDir$",ExistingCommonDir$
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
'print "ExistingNetCommonDir$",ExistingNetCommonDir$
'Initialize the loop
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
'print "SectionTag$",SectionTag$
'print "gSharedIniFile$ where used",gSharedIniFile$
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
'print "SectionName$",SectionName$
'Using the shared.ini as a data driver I find all the files to be moved
DO
'** DND: Path checking can be made a function
'Processing for Program Path
'***************************
ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
'print ExistingProgPath$,"ExistingProgPath$"
chk%=Lot_ChkLotusIniSizePath(ExistingProgPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in prog path"
END IF
'Processing for Data Path
'************************
ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
'print ExistingDataPath$, "ExistingDataPath$"
chk%=Lot_ChkLotusIniSizePath(ExistingDataPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in data path"
END IF
'Processing for User Path
'************************
ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
'print ExistingUserPath$,"ExistingUserPath$"
chk%=Lot_ChkLotusIniSizePath(ExistingUserPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in user path"
END IF
'Processing for Filter Path
'***************************
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
'print ExistingFilterPath$, "ExistingFilterPath$"
chk%=Lot_ChkLotusIniSizePath(ExistingFilterPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in filter path"
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
Lot_GetInLotusIniSizeOfFilesToMove=gMoveSize&
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetSizeOfFilesInLotusappIni(LotusappIniPath$,ExistingCommonDir$,ExistingNetCommonDir$,gConsolidateSize&) AS LONG
'** Purpose: Determines if the consolidation of the Lotusapp directory
'** is needed and looks for the files referenced by lotusapp.ini
'** that have to be consolidated calculating the total space needed in Kb
'** Author: MZ
'** Arguments: LotusappIniPath$ where LOTUSAPP.INI file is
'** ExistingCommonDir$
'** ExistingNetCommonDir$
'** gConsolidateSize& the total size of the files to be moved
'** Returns: gConsolidateSize& the total size of the files to be moved
'*************************************************************************
DIM gSharedIniFile$, WinDir$, SectionPref$
DIM SectionNumber%, SectionTag$, SectionName$
DIM recordedpath$, existingprogpath$, existingdatapath$, existinguserpath$
DIM existingfilterpath$
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
'Initialize the loop
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
'Using the shared.ini as a data driver I find all the files to be consolidate
DO
'** DND: Path checking can be made a function
'Processing for Program Path
'***************************
'print SectionName$,"SectionName$ ",LotusappIniPath$,"LotusappIniPath$"
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
'print "RecordedPath$ prog",RecordedPath$
ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
'print ExistingProgPath$,"ExistingProgPath$"
IF ExistingNetCommonDir$ <>"" THEN
IF (ExistingProgPath$ <> "" AND _
ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize&"
END IF
ELSE
IF (ExistingProgPath$ <> "" AND _
ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
'print STR(gConsolidateSize&),"gConsolidateSize&"
END IF
END IF
'Processing for Data Path
'************************
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
'print "RecordedPath$ data",RecordedPath$
ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
'print ExistingDataPath$,"ExistingDataPath$"
IF ExistingNetCommonDir$ <>"" THEN
IF (ExistingDataPath$ <> "" AND _
ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
END IF
ELSE
IF (ExistingDataPath$ <> "" AND _
ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
END IF
END IF
'Processing for User Path
'************************
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "User Path")
ExistingUserPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
IF ExistingNetCommonDir$ <>"" THEN
IF (ExistingUserPath$ <> "" AND _
ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
END IF
ELSE
IF (ExistingUserPath$ <> "" AND _
ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
END IF
END IF
'Processing for Filter Path
'***************************
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Filter Path")
ExistingFilterPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
IF ExistingNetCommonDir$ <>"" THEN
IF (ExistingFilterPath$ <> "" AND _
ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingNetCommonDir$)) <> ExistingNetCommonDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
END IF
ELSE
IF (ExistingFilterPath$ <> "" AND _
ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) OR _
ValidCommDir% <> 1 THEN
gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
END IF
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
Lot_GetSizeOfFilesInLotusappIni=gConsolidateSize&
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION Lot_GetTheShareToolsSizeToMove (newLotusapp$) AS LONG
'** Purpose: Read the lotus.ini and lotusapp.ini
'** Identify what product edition mix (standard server or node)
'** there is in the user environment and adds the sizes of the
'** files to be moved
'** Author: MZ
'** Arguments: newLotusapp$ The new destination
'** Returns: gMoveSize& the size
'*************************************************************************
DIM NetworkIns$, ret%,ret1%, SaveCursor&, ExistingCommonDir$, LotusAppIniPath$
DIM result%, secResult%, FLWpath$, ImprovPath$, RC$, notused%,ExistingNetCommonDir$
'Initialize return value of the size
gMoveSize&=CLNG(0)
'** Execute the rest only if there is a registered product that supports
'** share Prods(i%)Share=1
IF Lot_AreShareToolsSupported()=1 THEN
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$ <> gSERVER$ THEN
'Find Lotus.ini
ret% = DoesFileExist(gLotusIniPath$, femExists)
IF ret% <> 0 THEN
'Find the size of the move as recorded in the lotus.ini
SaveCursor&=ShowWaitCursor()
gMoveSize&=Lot_GetInLotusIniSizeOfFilesToMove(gLotusIniPath$,newLotusapp$,gMoveSize&)
RestoreCursor SaveCursor&
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
LotusappIniPath$=MakePath(ExistingCommonDir$,gLOTUSAPPINI$)
'print "LotusappIniPath$ after creation",LotusappIniPath$
'Find Lotusapp.ini
ret1% = DoesFileExist(gLotusappIniPath$, femExists)
IF ret1% <> 0 THEN
'Find the size of the move as recorded in the lotus.ini
SaveCursor&=ShowWaitCursor()
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
gMoveSize&=Lot_GetInLotusappIniSizeOfFilesToMove(gLotusIniPath$,ExistingCommonDir$,ExistingNetCommonDir$,newLotusapp$,gMoveSize&)
RestoreCursor SaveCursor&
END IF 'lotusapp.ini exists
END IF 'lotus.ini exists
END IF 'not server install
End IF 'share tools are supported
Lot_GetTheShareToolsSizeToMove=gMoveSize&
END FUNCTION
'*************************************************************************
FUNCTION Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$) AS STRING
'** Purpose: Builds a path from an entry in lotusapp.ini
'** Author: MZ
'** Arguments: RecordesPath$ recorded in LOTUSAPP.INI
'** ExistingCommonDir$
'** WimDir$
'** Returns: the resulted path
'*************************************************************************
DIM ResultPath$
IF RecordedPath$ = "" THEN
ResultPath$ =""
ELSEIF RecordedPath$ = ".\" THEN
ResultPath$ = ExistingCommonDir$
ELSEIF LCASE$(RecordedPath$)+"\" = WinDir$ THEN
ResultPath$ = WinDir$
ELSE
ResultPath$ = ExistingCommonDir$+LCASE$(MID$(RecordedPath$,3))
END IF
Lot_MakeAPathFromLotusappIni=ResultPath$
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetInLotusappIniSizeOfFilesToMove(LotusappIniPath$,ExistingCommDir$,ExistingNetCommonDir$,newLotusappDir$,gMoveSize&) AS LONG
'** Purpose: Looks for the files referenced by lotusapp.ini
'** that have to be moved calculating the total space needed in Kb
'** Author: MZ
'** Arguments: LotusappIniPath$ where LOTUSAPP.INI file is
'** ExistingCommonDir$
'** ExistingNetCommonDir$
'** newLotusappDir$
'** gMoveSize& the total size of the files to be moved
'** Returns: gMoveSize& the total size of the files to be moved
'*************************************************************************
DIM gSharedIniFile$, WinDir$, SectionPref$
DIM SectionNumber%, SectionTag$, SectionName$
DIM recordedpath$, existingprogpath$, existingdatapath$, existinguserpath$
DIM existingfilterpath$,chk%
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
'Initialize the loop
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
'Using the shared.ini as a data driver I find all the files to be consolidate
DO
'** DND: Path checking can be made a function
'Processing for Program Path
'***************************
'print SectionName$,"SectionName$ ",LotusappIniPath$,"LotusappIniPath$"
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
'print "RecordedPath$ prog",RecordedPath$
ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
'print ExistingProgPath$,"ExistingProgPath$"
chk%=Lot_ChkLotusIniSizePath(ExistingProgPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in prog path"
END IF
'Processing for Data Path
'************************
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
'print "RecordedPath$ data",RecordedPath$
ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
'print ExistingDataPath$,"ExistingDataPath$"
chk%=Lot_ChkLotusIniSizePath(ExistingDataPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in data path"
END IF
'Processing for User Path
'************************
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "User Path")
ExistingUserPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
'print ExistingUserPath$,"ExistingUserPath$"
chk%=Lot_ChkLotusIniSizePath(ExistingUserPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in user path"
END IF
'Processing for Filter Path
'***************************
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Filter Path")
ExistingFilterPath$ =Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
chk%=Lot_ChkLotusIniSizePath(ExistingFilterPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
'print STR(gMoveSize&),"gMoveSize& in filter path"
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
Lot_GetInLotusappIniSizeOfFilesToMove=gMoveSize&
END FUNCTION
'************************************************************************
FUNCTION Lot_AddSectionToNodeList(DestPath$,EntryName$) AS INTEGER
'** Purpose: This function finds out if the sections were installed by the
'** network administrator (by reading Install.ini) and adds them
'** to the copy list
'** Author: MZ
'** Arguments: SourcePath$,
'** gSharedIniFile$,
'** EntryName$,
'** DestPath$
'** Symbols Out: REFRESHEDENTRIES
'** Returns: success
'*************************************************************************
DIM entryflag$, currchpt$, sharedid$, chapterspec$, source$, dest$
DIM FeatureName$,WinDir$,WinSysDir$
'Get the EntryFlag$ from the EntryName$
WinDir$=GetWindowsDir()
WinSysDir$ = GetSymbolValue(SYM_WINSYSDIR$)
EntryFlag$=Lot_GetEntryFlag(EntryName$)
'print "Source$ in Lot_addSectionToNodeList()", Source$
'Do not process the lotus.BCF file
IF EntryFlag$ <> "DATALENSDATA" THEN
CurrChpt$ = Lot_GetFirst("", F_SHARE)
WHILE (CurrChpt$ <> "")
SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE)
FeatureName$ = Lot_GetChapterValStr(CurrChpt$, F_KEYWORD)
IF SharedID$ = EntryFlag$ THEN
IF Lot_IsTheFeatureInstalled(FeatureName$) = 1 AND _
Lot_GetChapterValStr(CurrChpt$, F_DESTDIR) <> WinDir$ AND _
Lot_GetChapterValStr(CurrChpt$, F_DESTDIR) <> WinSysDir$ THEN
ChapterSpec$ = Lot_GetChapterValStr(CurrChpt$, F_NOTHING)
'strip the subdirectories from the path
Source$ = Lot_GetNetLotusappSource(CurrChpt$)
Dest$ = Lot_GetLocalLotusappDest(EntryFlag$,DestPath$)
'print "Source$ in Lot_addSectionToNodeList()", Source$
'print "Dest$ in Lot_addSectionToNodeList()", Dest$
'print "ChapterSpec$ in Lot_addSectionToNodeList()", ChapterSpec$
AddSectionFilesToCopyList ChapterSpec$,Source$,Dest$
'This list is needed to write the lotus.ini file
AddListItem "REFRESHEDENTRIES", EntryFlag$
END IF
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
Lot_AddSectionToNodeList = SUCCESS
END FUNCTION
DIM SHARESUBDIR LIST AS STRING
DIM SHARESUBDIRINIT%
'*************************************************************************
FUNCTION Lot_GetLocalLotusappDest(EntryFlag$,DestPath$) AS STRING
'** Purpose: This function strips the subdirectory depending on EntryFlag$
'** Author: MZ, JMD
'** Arguments: EntryName$ Share keyword
'** DestPath$ Path to be possibly stripped
'** Returns: Stripped path
'** NOTE: DestPath argument has NO trailing backslash
'*************************************************************************
DIM SubDestPath$,lenDest%,lenSub%,ExistingFilterPath$
DIM s1$,s2$
IF SHARESUBDIRINIT = 0 Then
SHARESUBDIRINIT = 1
SHARESUBDIR("SPELLCHECKERPROGRAM")= "spell\"
SHARESUBDIR("SPELLCHECKERDATA") = "spell\"
SHARESUBDIR("SPELLCHECKERUSER") = "spell\"
SHARESUBDIR("TOOLSPROGRAM") = "tools\"
SHARESUBDIR("TOOLSDATA") = ""
SHARESUBDIR("CONTAINERFILEPROGRAM") = ""
SHARESUBDIR("INFOBOXPROGRAM") = ""
SHARESUBDIR("ICONPALETTEPROGRAM") = ""
SHARESUBDIR("STATUSBARPROGRAM") = ""
SHARESUBDIR("DATALENSPROGRAM") = "datalens\"
SHARESUBDIR("DATALENSDATA") = "datalens\"
SHARESUBDIR("DIALOGEDITORPROGRAM") = "dialoged\"
SHARESUBDIR("USERNAMESERVICESPROGRAM") = "uns\"
SHARESUBDIR("MULTIMEDIAPROGRAM") = "multimed\"
SHARESUBDIR("MULTIMEDIADATA") = "multimed\"
SHARESUBDIR("GRAPHICSFILEFILTERSPROGRAM") = "filters\"
SHARESUBDIR("GRAPHICSFILEFILTERSFILTER") = "filters\"
SHARESUBDIR("DOCUMENTFILEFILTERSPROGRAM") = "excelflt\"
SHARESUBDIR("DOCUMENTFILEFILTERSFILTER") = "docflt\"
SHARESUBDIR("HELPPROGRAM") = "help\"
SHARESUBDIR("HELPDATA") = "help\"
SHARESUBDIR("LOTUSDIALOGSPROGRAM") = ""
SHARESUBDIR("LOTUSSCRIPTPROGRAM") = "script\"
SHARESUBDIR("MAILENABLINGPROGRAM") = ""
End If
'Set as default
Lot_GetLocalLotusappDest = DestPath$
If (ISELEMENT(SHARESUBDIR(EntryFlag$)) = 0 ) Then EXIT FUNCTION
SubDestPath$=SHARESUBDIR(EntryFlag$)
'** Handle exceptions first
If EntryFlag$ = "GRAPHICSFILEFILTERSFILTER" Then
'If no filter Path entry found, copy the filters to the FILTERS subdirectory
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$, _
"Graphics File Filters", "Filter Path",NULLSTROK,INVALIDSTROK)
IF ExistingFilterPath$ <> "" THEN SubDestPath$="gphflt\"
End If
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
'** Process the share keys that need to be stripped
If (SubDestPath$ <> "" AND lenDest% > lenSub%) Then
s1$ = Lot_TrimEndSlash(DestPath$)
s2$ = LEFT(SubDestPath$, lensub%-1)
s1$ = RIGHT(DestPath$, LEN(s2$))
if s1$ = s2$ Then
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
End If
End If
'print "Lot_GetLocalLotusappDest: " DestPath$ " -> " Lot_GetLocalLotusappDest
END FUNCTION
'*************************************************************************
FUNCTION Lot_MoveFiles(SourcePath$,gSharedIniFile$,EntryName$,DestPath$) AS INTEGER
'** Purpose: This function finds all the files and moves them to
'** the DestPath or its subdirectories
'** Author: MZ
'** Arguments: SourcePath$,
'** gSharedIniFile$,
'** EntryName$,
'** DestPath$
'** Returns: 1 if success
'** 0 if error
'*************************************************************************
DIM entryflag$,filepref$,filenumber%,filetag$,filename$,funcret%
DIM sourcepathlen%,filepath$,fileexist%,filesize&,subdestpath$,ret%
DIM existingfilterpath$, tmpPath$
'FileExist% = DoesFileExist(gSharedIniFile$, femExists)
'Get the EntryFlag$ from the EntryName$
EntryFlag$=Lot_GetEntryFlag(EntryName$)
'Initialize the loop
FilePref$ = "file"
FileNumber% = 1
FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
FuncRet%=0
DO
SourcePathLen% = LEN(SourcePath$)
IF SourcePathLen% > 14 THEN
IF UCASE$(RIGHT$(SourcePath$,13)) = "EXCELFLT.FLT\" THEN
SourcePath$ = LEFT$(SourcePath$,SourcePathLen%-13)
END IF
END IF
IF SourcePathLen% > 12 THEN
IF UCASE$(RIGHT$(SourcePath$,11)) = "ISGDI9.DLL\" THEN
SourcePath$ = LEFT$(SourcePath$,SourcePathLen%-11)
END IF
END IF
IF FileName$ <> "" THEN
FilePath$ = MakePath(SourcePath$, FileName$)
END IF
IF FileName$<>"" AND FilePath$<>"" THEN
FileExist% = DoesFileExist(FilePath$, femExists)
IF FileExist% = 1 THEN
'Find its size
FileSize& = GetSizeOfFile(FilePath$)
'** DND/MZ: The call to Lot_DoVerDate... could be moved outside
'** the SELECT, but then things are harder to debug.
'Copy it to the new location
SELECT CASE EntryFlag$
case "SPELLCHECKERPROGRAM"
SubDestPath$=DestPath$+"spell\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "SPELLCHECKERDATA"
SubDestPath$=DestPath$+"spell\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "SPELLCHECKERUSER"
SubDestPath$=DestPath$+"spell\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "TOOLSPROGRAM"
SubDestPath$=DestPath$+"tools\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "TOOLSDATA"
case "CONTAINERFILEPROGRAM"
SubDestPath$=DestPath$
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "INFOBOXPROGRAM"
SubDestPath$=DestPath$
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "ICONPALETTEPROGRAM"
SubDestPath$=DestPath$
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "STATUSBARPROGRAM"
SubDestPath$=DestPath$
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "DATALENSPROGRAM"
SubDestPath$=DestPath$+"datalens\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "DATALENSDATA"
SubDestPath$=DestPath$+"datalens\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "DIALOGEDITORPROGRAM"
SubDestPath$=DestPath$+"dialoged\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "USERNAMESERVICESPROGRAM"
SubDestPath$=DestPath$+"uns\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "MULTIMEDIAPROGRAM"
SubDestPath$=DestPath$+"multimed\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "MULTIMEDIADATA"
SubDestPath$=DestPath$+"multimed\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "GRAPHICSFILEFILTERSPROGRAM"
SubDestPath$=DestPath$+"filters\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "GRAPHICSFILEFILTERSFILTER"
'If no filter Path entry found, copy the filters
' to the FILTERS subdirectory
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Graphics File Filters", "Filter Path",NULLSTROK,INVALIDSTROK)
IF ExistingFilterPath$="" THEN
SubDestPath$=DestPath$+"filters\"
ELSE
SubDestPath$=DestPath$+"gphflt\"
END IF
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "DOCUMENTFILEFILTERSPROGRAM"
SubDestPath$=DestPath$+"excelflt\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "HELPPROGRAM"
SubDestPath$=DestPath$+"help\"
'print "HELPPROGRAM","Before Lot_DoVerDateValidation()"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
'print "Lot_DoVerDateValidation returns 1 for HELPPROGRAM"
END IF
case "HELPDATA"
SubDestPath$=DestPath$+"help\"
'print "HELPDATA","Before Lot_DoVerDateValidation()"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
'print "Lot_DoVerDateValidation returns 1 for HELPDATA"
END IF
case "LOTUSSCRIPTPROGRAM"
SubDestPath$=DestPath$+"script\"
'print "LOTUSSCRIPTPROGRAM","Before Lot_DoVerDateValidation()"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
'print "Lot_DoVerDateValidation returns 1 for LOTUSSCRIPTPROGRAM"
END IF
case "LOTUSDIALOGSPROGRAM"
SubDestPath$=DestPath$
'print ("LOTUSDIALOGSPROGRAM","Before Lot_DoVerDateValidation()"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
'print "Lot_DoVerDateValidation returns 1 for LOTUSDIALOGSPROGRAM"
END IF
case "MAILENABLINGPROGRAM"
SubDestPath$=DestPath$
'print ("MAILENABLINGPROGRAM","Before Lot_DoVerDateValidation()"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
'print "Lot_DoVerDateValidation returns 1 for MAILENABLINGPROGRAM"
END IF
case ""
END SELECT
ELSE
END IF
END IF
FileNumber% = FileNumber% + 1
FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
LOOP UNTIL FileName$ =""
Lot_MoveFiles=FuncRet%
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetEntryFlag(EntryName$) AS STRING
'** Purpose: This function finds the shared flag from the entry name
'** Author: MZ
'** Arguments: EntryName$
'** Returns: EntryFlag$
'*************************************************************************
DIM entryflag$
IF EntryName$="Spell Checker Program" THEN
EntryFlag$="SPELLCHECKERPROGRAM"
ELSEIF EntryName$="Spell Checker Data" THEN
EntryFlag$="SPELLCHECKERDATA"
ELSEIF EntryName$="Spell Checker User" THEN
EntryFlag$="SPELLCHECKERUSER"
ELSEIF EntryName$="TOOLS Program" THEN
EntryFlag$="TOOLSPROGRAM"
ELSEIF EntryName$="TOOLS Data" THEN
EntryFlag$="TOOLSDATA"
ELSEIF EntryName$="Container File Program" THEN
EntryFlag$="CONTAINERFILEPROGRAM"
ELSEIF EntryName$="InfoBox Program" THEN
EntryFlag$="INFOBOXPROGRAM"
ELSEIF EntryName$="Icon Palette Program" THEN
EntryFlag$="ICONPALETTEPROGRAM"
ELSEIF EntryName$="Status Bar Program" THEN
EntryFlag$="STATUSBARPROGRAM"
ELSEIF EntryName$="DataLens Program" THEN
EntryFlag$="DATALENSPROGRAM"
ELSEIF EntryName$="DataLens Data" THEN
EntryFlag$="DATALENSDATA"
ELSEIF EntryName$="Dialog Editor Program" THEN
EntryFlag$="DIALOGEDITORPROGRAM"
ELSEIF EntryName$="User Name Service Program" THEN
EntryFlag$="USERNAMESERVICESPROGRAM"
ELSEIF EntryName$="Multimedia Program" THEN
EntryFlag$="MULTIMEDIAPROGRAM"
ELSEIF EntryName$="Multimedia Data" THEN
EntryFlag$="MULTIMEDIADATA"
ELSEIF EntryName$="Graphics File Filters Program" THEN
EntryFlag$="GRAPHICSFILEFILTERSPROGRAM"
ELSEIF EntryName$="Graphics File Filters Filter" THEN
EntryFlag$="GRAPHICSFILEFILTERSFILTER"
ELSEIF EntryName$="Document File Filters Program" THEN
EntryFlag$="DOCUMENTFILEFILTERSPROGRAM"
ELSEIF EntryName$="Help Program" THEN
EntryFlag$="HELPPROGRAM"
'print "EntryName$",EntryName$
'print "EntryFlag$",EntryFlag$
ELSEIF EntryName$="Help Data" THEN
EntryFlag$="HELPDATA"
'print "EntryName$",EntryName$
'print "EntryFlag$",EntryFlag$
ELSEIF EntryName$="LotusScript Program" THEN
EntryFlag$="LOTUSSCRIPTPROGRAM"
'print "EntryName$",EntryName$
'print "EntryFlag$",EntryFlag$
ELSEIF EntryName$="Lotus Dialogs Program" THEN
EntryFlag$="LOTUSDIALOGSPROGRAM"
'print "EntryName$",EntryName$
'print "EntryFlag$",EntryFlag$
ELSEIF EntryName$="Mail Enabling Program" THEN
EntryFlag$="MAILENABLINGPROGRAM"
'print "EntryName$",EntryName$
'print "EntryFlag$",EntryFlag$
ELSE
EntryFlag$=""
END IF
Lot_GetEntryFlag=EntryFlag$
END FUNCTION
'*************************************************************************
FUNCTION Lot_DoVerDateValidation(Path$,SubDestPath$,FileName$,FileSize&) AS INTEGER
'** Purpose: This function validates the version or dates of the file
'** if it exist and calls the copy/delete returning its result
'** Author: MZ
'** Arguments: Path$,
'** SubDestPath$,
'** FileName$,
'** FileSize&
'** Returns: 1 if Successful
'** 0 if not success
'*************************************************************************
DIM sourcepath$,destinationpath$,sourcefileversion$,destfileversion$
DIM sourcefiledate$,destfiledate$,sourceyear%,sourcemonth%,sourceday%
DIM destyear%,destmonth%,destday%,ret%,sourcever1&,sourcever2&,sourcever3&
DIM sourcever4&,destver1&,destver2&,destver3&,destver4&, notused%
'make the source path
SourcePath$ = MakePath(Path$, FileName$)
'make the destination path
DestinationPath$ = MakePath(SubDestPath$, FileName$)
'Create directory if its neccessary
IF DoesDirExist(SubDestPath$)=0 THEN
CreateDir SubDestPath$, cmoNone
IF DoesDirExist(SubDestPath$)=0 THEN
ShowPathError SID_ERR_CREATEDIR, 0, SubDestPath$
ERROR STFQUIT
END IF
END IF
'Copy the file
IF DoesFileExist(DestinationPath$,femExists)=1 THEN
'Find the version
SourceFileVersion$=GetVersionOfFile(SourcePath$)
DestFileVersion$=GetVersionOfFile(DestinationPath$)
'If no version found
IF SourceFileVersion$="" OR DestFileVersion$="" THEN
'Find the dates
SourceFileDate$=GetDateOfFile(SourcePath$)
DestFileDate$=GetDateOfFile(DestinationPath$)
'If the dates are different
IF MID$(SourceFileDate$,1,10)<>MID$(DestFileDate$,1,10) THEN
SourceYear%=GetYearFromDate(SourceFileDate$)
SourceMonth%=GetMonthFromDate(SourceFileDate$)
SourceDay%=GetDayFromDate(SourceFileDate$)
DestYear%=GetYearFromDate(DestFileDate$)
DestMonth%=GetMonthFromDate(DestFileDate$)
DestDay%= GetDayFromDate(DestFileDate$)
'Compare the dates
IF SourceYear% > DestYear% THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSEIF SourceYear% = DestYear% AND _
SourceMonth% > DestMonth% THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSEIF SourceYear% = DestYear% AND _
SourceMonth% = DestMonth% AND _
SourceDay% > DestDay% THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSEIF SourceYear% = DestYear% AND _
SourceMonth% = DestMonth% AND _
SourceDay% = DestDay% THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSE
'the dest is newer then the source then I can delete the source
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret%=1
END IF
'If the dates are the same then delete the source
ELSE
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret%=1
END IF
'If version found
ELSE
'Find the version components
SourceVer1&=GetVersionNthField(SourceFileVersion$,1)
SourceVer2&=GetVersionNthField(SourceFileVersion$,2)
SourceVer3&=GetVersionNthField(SourceFileVersion$,3)
SourceVer4&=GetVersionNthField(SourceFileVersion$,4)
DestVer1&=GetVersionNthField(DestFileVersion$,1)
DestVer2&=GetVersionNthField(DestFileVersion$,2)
DestVer3&=GetVersionNthField(DestFileVersion$,3)
DestVer4&=GetVersionNthField(DestFileVersion$,4)
'Compare the version
IF SourceVer1& > DestVer1& THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& > DestVer2& THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& = DestVer2& AND _
SourceVer3& > DestVer3& THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& = DestVer2& AND _
SourceVer3& = DestVer3& AND _
SourceVer4& > DestVer4& THEN
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& = DestVer2& AND _
SourceVer3& = DestVer3& AND _
SourceVer4& = DestVer4& THEN
'Version is equal. Delete the source
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret%=1
ELSE
'Source is older. Delete the source
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret% = 1
END IF
END IF
'file not found in the destination
ELSE
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
END IF
Lot_DoVerDateValidation=Ret%
END FUNCTION
'*************************************************************************
FUNCTION Lot_DoDelete(SourcePath$,FileName$) AS INTEGER
'** Purpose: This function deletes the source returning success or not success
'** Author: MZ
'** Arguments: SourcePath$,
'** FileName$,
'** Returns: 1 if Successful
'** 0 if not success
'*************************************************************************
DIM fileexist%
'Remove the source file
IF GetSymbolValue("SYM_MOVE") = "1" THEN
RemoveFile SourcePath$, cmoNone
END IF
'Check if the delete was successful
FileExist%=DoesFileExist(SourcePath$,femExists)
IF FileExist%=1 THEN
'to do!!!!!!
'print "remove did not work for filr",SourcePath$
'Write a log file for the user when we cannot cleanup
Lot_DoDelete=0
ELSE
Lot_DoDelete=1
END IF
END FUNCTION
'*************************************************************************
FUNCTION Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,SourceFileSize&) AS INTEGER
'** Purpose: This function copies the files to the new destination and
'** delets the source returning success or not success
'** Author: MZ
'** Arguments: SourcePath$,
'** DestinationPath$,
'** FileName$,
'** SourceFileSize&
'** Returns: 1 if Successful
'** 0 if not success
'*************************************************************************
DIM sourcefiledate$,destfilesize&,thedateisset%,fileexist%
'Get the date of the source
SourceFileDate$=GetDateOfFile(SourcePath$)
'Copy the file from the source to the destination
CopyFile SourcePath$, DestinationPath$, cmoCopy, 0
'Check if the copy was successful
DestFileSize&=GetSizeOfFile(DestinationPath$)
IF DestFileSize&=SourceFileSize& THEN
'Set the date to the original date
theDateIsSet%=Lot_SetDateOfFile(DestinationPath$, SourceFileDate$)
'Log bad date
IF theDateIsSet% = 0 THEN
''to Do write in the log file
'print "the set date failed and the delete is not done"
END IF
'Delete the source regardless of set date success
IF GetSymbolValue("SYM_MOVE") = "1" THEN
RemoveFile SourcePath$, cmoNone
END IF
'Check if the delete was successful
FileExist%=DoesFileExist(SourcePath$,femExists)
IF FileExist%=1 THEN
'to do!!!!!!
'print "remove did not work for file",SourcePath$
'Write a log file for the user when we cannot cleanup
END IF
Lot_DoCopyDelete=1
ELSE
Lot_DoCopyDelete=0
END IF
END FUNCTION
'*************************************************************************
FUNCTION Lot_SaveShareConfigInInstallIni() AS INTEGER
'** Purpose: Saves the lotusapp dir and same drive flag into install.ini
'** in the section [Server Configuration of Shared Tools]; This
'** is needed at Node install time
'** Author: MZ
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM networkins$,proddir$,ginstallinifile$,commondir$,proddrv$,commdrv$
'Identify if I am in server install
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
'Built the path to install.ini
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
'Log the LOTUSAPP directory
commonDir$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
CreateIniKeyValue gInstallIniFile$, "Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$, commonDir$, cmoOverwrite
'Log a flag that tells if the product is in the same drive with lotusapp
prodDrv$ = LCASE$(MID$(prodDir$,1,1))
commDrv$ = LCASE$(MID$(commonDir$,1,1))
IF prodDrv$ = commDrv$ THEN
CreateIniKeyValue gInstallIniFile$, "Server Configuration of Shared Tools", "SameDriveFlag", "1", cmoOverwrite
ELSE
CreateIniKeyValue gInstallIniFile$, "Server Configuration of Shared Tools", "SameDriveFlag", "0", cmoOverwrite
END IF
END IF
Lot_SaveShareConfigInInstallIni = SUCCESS
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetFileSize(Path$,gSharedIniFile$,EntryName$,gConsolidateSize&) AS LONG
'** Purpose: This function finds all the files and their size adding
'** it to gConsolidateSize&
'** Author: MZ
'** Arguments: Path$,
'** gSharedIniFile$,
'** EntryName$,
'** gConsolidateSize&
'** Returns: gConsolidateSize&
'*************************************************************************
DIM fileexist%,filepref$,filenumber%,filetag$,filename$,filepath$,filesize&
FileExist% = DoesFileExist(gSharedIniFile$, femExists)
'Initialize the loop
FilePref$ = "file"
FileNumber% = 1
FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
'gConsolidateSize is set to 0 in Lot_IsConsolidationNeeded
DO
IF UCASE$(FileName$) = "EXCELFLT.FLT" OR _
UCASE$(FileName$) = "ISGDI9.DLL" THEN
FilePath$ = Path$
ELSEIF FileName$ <> "" THEN
FilePath$ = MakePath(Path$, FileName$)
END IF
IF FileName$<>"" AND FilePath$<>"" THEN
FileExist% = DoesFileExist(FilePath$, femExists)
IF FileExist% = 1 THEN
'Find its size
FileSize& = GetSizeOfFile(FilePath$)
'gConsolidateSize% = gConsolidateSize% + ROUND(FileSize&/1024,0)
gConsolidateSize& = gConsolidateSize& + FileSize&
ELSE
'print "File not found", FilePath$
END IF
END IF
FileNumber% = FileNumber% + 1
FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
LOOP UNTIL FileName$ =""
Lot_GetFileSize=gConsolidateSize&
END FUNCTION
'*************************************************************************
FUNCTION Lot_GetAllSharedInstalled() AS INTEGER
'** Purpose: This function searches the copy list and populates the
'** IniEntry list with the entries that have to be updated
'** for standalone install and reades the Install.ini for
'** node install
'** Author: MZ
'** Arguments: None
'** Symbols Out:IniEntry
'** Returns: SUCCESS
'*************************************************************************
DIM network$,currchpt$,sharedid$
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSTANDARD$ THEN
'The call to Lot_GetChapterValStr returns a comment when no value is found
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE)
IF SharedID$ <> "" THEN
AddListItem SYM_INIENTRY$,SharedID$
END IF
CurrChpt$ = Lot_GetNext()
WEND
Lot_GetAllSharedInstalled = SUCCESS
'End of the processing for STANDARD
ELSEIF network$ = gNODE$ THEN
IF Lot_IsTheFeatureInstalled("SHRUNS") THEN
AddListItem SYM_INIENTRY$,"USERNAMESERVICESPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRDLGPRG") THEN
AddListItem SYM_INIENTRY$,"DIALOGEDITORPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRSPELLPRG") THEN
AddListItem SYM_INIENTRY$,"SPELLCHECKERPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRSPELLDIC") OR _
Lot_IsTheFeatureInstalled("SHRSPELLSPDIC") OR _
Lot_IsTheFeatureInstalled("SHRSPELLPODIC") OR _
Lot_IsTheFeatureInstalled("SHRSPELLFRDIC") THEN
AddListItem SYM_INIENTRY$,"SPELLCHECKERDATA"
END IF
IF Lot_IsTheFeatureInstalled("SHRSTATUSBAR") THEN
AddListItem SYM_INIENTRY$,"STATUSBARPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRICONPALETTE") THEN
AddListItem SYM_INIENTRY$,"ICONPALETTEPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG") OR _
Lot_IsTheFeatureInstalled("SHRPARADOXPRG") OR _
Lot_IsTheFeatureInstalled("SHRSQLPRG") OR _
Lot_IsTheFeatureInstalled("SHRINFORMIXPRG") OR _
Lot_IsTheFeatureInstalled("SHRIBMPRG") OR _
Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG") OR _
Lot_IsTheFeatureInstalled("SHRIBMDB2PRG") OR _
Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG") OR _
Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG") OR _
Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCWKSPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG") OR _
Lot_IsTheFeatureInstalled("SHRORACLEPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCDB2PRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG") OR _
Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG") OR _
Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG") THEN
AddListItem SYM_INIENTRY$,"DATALENSPROGRAM"
AddListItem SYM_INIENTRY$,"DATALENSDATA"
END IF
IF Lot_IsTheFeatureInstalled("SHRMM") OR _
Lot_IsTheFeatureInstalled("SHRSCRNCAM") THEN
AddListItem SYM_INIENTRY$,"MULTIMEDIAPROGRAM"
AddListItem SYM_INIENTRY$,"MULTIMEDIADATA"
END IF
IF Lot_IsTheFeatureInstalled("SHRHELPPRG") THEN
AddListItem SYM_INIENTRY$,"HELPPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRHELPDATA") THEN
AddListItem SYM_INIENTRY$,"HELPDATA"
END IF
IF Lot_IsTheFeatureInstalled("SHRLOTUSSCRIPTPRG") THEN
AddListItem SYM_INIENTRY$,"LOTUSSCRIPTPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRLOTUSDIALOGSPRG") THEN
AddListItem SYM_INIENTRY$,"LOTUSDIALOGSPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRMAILENABLINGPRG") THEN
AddListItem SYM_INIENTRY$,"MAILENABLINGPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("BENTO") THEN
AddListItem SYM_INIENTRY$,"CONTAINERFILEPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("DOCFILTERS") THEN
AddListItem SYM_INIENTRY$,"DOCUMENTFILEFILTERSPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRINFOBOXPRG") THEN
AddListItem SYM_INIENTRY$,"INFOBOXPROGRAM"
END IF
IF Lot_IsTheFeatureInstalled("SHRSTATUSBAR") THEN
AddListItem SYM_INIENTRY$,"STATUSBARPROGRAM"
END IF
'End of the processing for NODE
END IF
END FUNCTION
'*************************************************************************
FUNCTION Lot_WriteLotusBcfFile()AS INTEGER
'** Purpose: This function writes the lotus.bcf file
'** Author: MZ
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM bufdn$,bufdl$,bufdd$,bufdc$,bufac$,sqlservername$,networkinfo$, notused&
'print "gLotusBcfDir",gLotusBcfDir
IF Lot_IsInformixSelected() = 1 THEN
'print "informix is selected"
bufDN$ = LdString(SID_DATALENS_INFORMIX_DN)
bufDL$ = LdString(SID_DATALENS_INFORMIX_DL)
bufDD$ = LdString(SID_DATALENS_INFORMIX_DD)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "informix is NOT selected"
END IF
IF Lot_IsSQLSelected() =1 THEN
'print "SQL is selected"
bufDN$ = LdString(SID_DATALENS_SQL_DN)
bufDL$ = LdString(SID_DATALENS_SQL_DL)
bufDC$ = LdString(SID_DATALENS_SQL_DC)
bufAC$ = LdString(SID_DATALENS_SQL_AC)
bufDD$ = LdString(SID_DATALENS_SQL_DD)
sqlServerName$= GetSymbolValue(SYM_SQLSERVERNAME$)
bufDN$=bufDN$+sqlServerName$
IF LEN(bufDN$) > 80 THEN
bufDN$=MID$(bufDN$,1,80)
END IF
bufDC$=bufDC$+sqlServerName$
IF LEN(bufDC$) > 255 THEN
bufDC$=MID$(bufDC$,1,255)
END IF
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
ELSE
'print "SQL is NOT selected"
END IF
IF Lot_IsParadoxSelected() =1 THEN
'print "Paradox is selected"
bufDN$ = LdString(SID_DATALENS_PARADOX_DN)
bufDL$ = LdString(SID_DATALENS_PARADOX_DL)
bufDD$ = LdString(SID_DATALENS_PARADOX_DD)
' bufAC$ = LdString(SID_DATALENS_PARADOX_AC)
' removed AC=UI,PW
bufDC$=GetSymbolValue(SYM_PARADOXNETWORKINFO$)
IF LEN(bufDC$) > 255 THEN
bufDC$=MID$(bufDC$,1,255)
END IF
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
'print "Paradox is NOT selected"
END IF
IF Lot_IsdBaseSelected() =1 THEN
'print "dBase is selected"
bufDN$ = LdString(SID_DATALENS_DBASE_DN)
bufDL$ = LdString(SID_DATALENS_DBASE_DL)
bufDC$ = LdString(SID_DATALENS_DBASE_DC)
bufDD$ = LdString(SID_DATALENS_DBASE_DD)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
'print "dBase is NOT selected"
END IF
IF Lot_IsIBMdBaseManagerSelected() = 1 THEN
'print "IBMdBM is selected"
bufDN$ = LdString(SID_DATALENS_EEDM_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_EEDM_DL)
bufDC$ = LdString(SID_DATALENS_EEDM_DC)
bufDD$ = LdString(SID_DATALENS_EEDM_DD)
bufAC$ = LdString(SID_DATALENS_EEDM_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
ELSE
'print "IBMdBM is selected"
END IF
IF Lot_IsNotesSQLSelected() = 1 THEN
'print "NotesSQL is selected"
bufDN$ = LdString(SID_DATALENS_NOTESSQL_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_NOTESSQL_DL)
bufDC$ = LdString(SID_DATALENS_NOTESSQL_DC)
bufDD$ = LdString(SID_DATALENS_NOTESSQL_DD)
' bufAC$ = LdString(SID_DATALENS_NOTESSQL_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
'print "NotesSQL is NOT selected"
END IF
IF Lot_IsSpreadSheetSelected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_SPREADSHEET_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_SPREADSHEET_DL)
bufDC$ = LdString(SID_DATALENS_SPREADSHEET_DC)
bufDD$ = LdString(SID_DATALENS_SPREADSHEET_DD)
'bufAC$ = LdString(SID_DATALENS_SPREADSHEET_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
'print "SPREADSHEET is NOT selected"
END IF
IF Lot_IsIBM_DB2Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_IBM_DB2_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_IBM_DB2_DL)
bufDC$ = LdString(SID_DATALENS_IBM_DB2_DC)
bufDD$ = LdString(SID_DATALENS_IBM_DB2_DD)
bufAC$ = LdString(SID_DATALENS_IBM_DB2_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
ELSE
'print "IBM_DB2 is NOT selected"
END IF
IF Lot_IsDB2_SQLDS_Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_DB2_SQLDS_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_DB2_SQLDS_DL)
bufDC$ = LdString(SID_DATALENS_DB2_SQLDS_DC)
bufDD$ = LdString(SID_DATALENS_DB2_SQLDS_DD)
bufAC$ = LdString(SID_DATALENS_DB2_SQLDS_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
ELSE
'print "DB2_SQLDS is NOT selected"
END IF
IF Lot_IsDB2_SQL400_Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_DB2_SQL400_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_DB2_SQL400_DL)
bufDC$ = LdString(SID_DATALENS_DB2_SQL400_DC)
bufDD$ = LdString(SID_DATALENS_DB2_SQL400_DD)
bufAC$ = LdString(SID_DATALENS_DB2_SQL400_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
ELSE
'print "DB2_SQL400 is NOT selected"
END IF
IF Lot_IsIBM_DDCS2_Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_IBM_DDCS_2_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_IBM_DDCS_2_DL)
bufDC$ = LdString(SID_DATALENS_IBM_DDCS_2_DC)
bufDD$ = LdString(SID_DATALENS_IBM_DDCS_2_DD)
bufAC$ = LdString(SID_DATALENS_IBM_DDCS_2_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,bufAC$,bufDD$)
ELSE
'print "IBM_DDCS_2 is NOT selected"
END IF
IF Lot_IsODBCDriverSelected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_ODBCD_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_ODBCD_DL)
' bufDC$ = LdString(SID_DATALENS_ODBCD_DC)
bufDD$ = LdString(SID_DATALENS_ODBCD_DD)
' bufAC$ = LdString(SID_DATALENS_ODBCD_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "ODBCD is NOT selected"
END IF
IF Lot_IsODBCSpreadSheetSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_SPREADSHEET_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_SPREADSHEET_DL)
bufDC$ = LdString(SID_ODBC_SPREADSHEET_DC)
bufDD$ = LdString(SID_ODBC_SPREADSHEET_DD)
' bufAC$ = LdString(SID_ODBC_SPREADSHEET_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
'print "SPREADSHEET is NOT selected"
END IF
IF Lot_IsODBCTextDriverSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_TEXTDRVR_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_TEXTDRVR_DL)
bufDC$ = LdString(SID_ODBC_TEXTDRVR_DC)
bufDD$ = LdString(SID_ODBC_TEXTDRVR_DD)
' bufAC$ = LdString(SID_ODBC_TEXTDRVR_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
'print "TEXTDRVR is NOT selected"
END IF
IF Lot_IsOracleSelected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_ORACLE_DN)
'print bufDN$
bufDL$ = LdString(SID_DATALENS_ORACLE_DL)
' bufDC$ = LdString(SID_DATALENS_ORACLE_DC)
bufDD$ = LdString(SID_DATALENS_ORACLE_DD)
' bufAC$ = LdString(SID_DATALENS_ORACLE_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "ORACLE is NOT selected"
END IF
IF Lot_IsODBCBtrieveSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_BTRIEVE_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_BTRIEVE_DL)
' bufDC$ = LdString(SID_ODBC_BTRIEVE_DC)
bufDD$ = LdString(SID_ODBC_BTRIEVE_DD)
' bufAC$ = LdString(SID_ODBC_BTRIEVE_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "BTRIEVE is NOT selected"
END IF
IF Lot_IsODBCDB2Selected () = 1 THEN
bufDN$ = LdString(SID_ODBC_DB2_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_DB2_DL)
bufDC$ = LdString(SID_ODBC_DB2_DC)
bufDD$ = LdString(SID_ODBC_DB2_DD)
' bufAC$ = LdString(SID_ODBC_DB2_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
'print "DB2 is NOT selected"
END IF
IF Lot_IsODBCFoxbaseSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_FOXBASE_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_FOXBASE_DL)
' bufDC$ = LdString(SID_ODBC_FOXBASE_DC)
bufDD$ = LdString(SID_ODBC_FOXBASE_DD)
' bufAC$ = LdString(SID_ODBC_FOXBASE_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "FOXBASE is NOT selected"
END IF
IF Lot_IsODBCAccessSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_ACCESS_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_ACCESS_DL)
' bufDC$ = LdString(SID_ODBC_ACCESS_DC)
bufDD$ = LdString(SID_ODBC_ACCESS_DD)
' bufAC$ = LdString(SID_ODBC_ACCESS_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "ACCESS is NOT selected"
END IF
IF Lot_IsODBCParadoxSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_PARADOX_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_PARADOX_DL)
' bufDC$ = LdString(SID_ODBC_PARADOX_DC)
bufDD$ = LdString(SID_ODBC_PARADOX_DD)
' bufAC$ = LdString(SID_ODBC_PARADOX_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "ODBC PARADOX is NOT selected"
END IF
IF Lot_IsODBCOracleSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_ORACLE_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_ORACLE_DL)
' bufDC$ = LdString(SID_ODBC_ORACLE_DC)
bufDD$ = LdString(SID_ODBC_ORACLE_DD)
' bufAC$ = LdString(SID_ODBC_ORACLE_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "NotesSQL is NOT selected"
END IF
IF Lot_IsODBCSQLServerSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_SQLSERVER_DN)
'print bufDN$
bufDL$ = LdString(SID_ODBC_SQLSERVER_DL)
' bufDC$ = LdString(SID_ODBC_SQLSERVER_DC)
bufDD$ = LdString(SID_ODBC_SQLSERVER_DD)
' bufAC$ = LdString(SID_ODBC_SQLSERVER_AC)
notused& = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
'print "ODBC SQLServer is NOT selected"
END IF
Lot_WriteLotusBcfFile = SUCCESS
END FUNCTION
'*************************************************************************
FUNCTION Lot_BackupLotusBcfFile()AS INTEGER
'** Purpose: This function backsup the lotus.bcf file for STANDARD
'** and NODE install
'** Author: MZ
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM dest$,network$,filepath$,backuppath$
Dest$=Lot_TrimEndSlash(GetSymbolValue(SYM_LOTUSAPPDIR$))
Dest$=Dest$+"\datalens"
network$ = GetSymbolValue(SYM_NETWORK$)
FilePath$=MakePath(Dest$,gLOTUSBCF$)
BackupPath$=Makepath(Dest$,"lotus.bak")
IF network$=gNODE$ THEN
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRPARADOXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRSQLPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRINFORMIXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBMPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRSPREADSHEETPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBMDB2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRDB2SQLDSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRDB2_SQL400PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRIBM_DDCS_2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCDRVRPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCWKSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRORACLEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCDB2PRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG")=1 OR _
Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG")=1 THEN
IF DoesFileExist(FilePath$,femExists) =1 THEN
CopyFile FilePath$, BackupPath$, cmoCopy, 1
RemoveFile FilePath$, cmoNone
END IF
END IF
ELSEIF network$=gSTANDARD$ THEN
IF Lot_IsInformixSelected() = 1 OR _
Lot_IsSQLSelected() =1 OR _
Lot_IsParadoxSelected() =1 OR _
Lot_IsdBaseSelected() =1 OR _
Lot_IsIBMdBaseManagerSelected() = 1 OR _
Lot_IsSpreadSheetSelected () = 1 OR _
Lot_IsIBM_DB2Selected () = 1 OR _
Lot_IsDB2_SQLDS_Selected () = 1 OR _
Lot_IsDB2_SQL400_Selected () = 1 OR _
Lot_IsIBM_DDCS2_Selected () = 1 OR _
Lot_IsODBCDriverSelected () = 1 OR _
Lot_IsODBCSpreadSheetSelected () = 1 OR _
Lot_IsODBCTextDriverSelected () = 1 OR _
Lot_IsOracleSelected () = 1 OR _
Lot_IsODBCBtrieveSelected () = 1 OR _
Lot_IsODBCDB2Selected () = 1 OR _
Lot_IsODBCFoxbaseSelected () = 1 OR _
Lot_IsODBCAccessSelected () = 1 OR _
Lot_IsODBCParadoxSelected () = 1 OR _
Lot_IsODBCOracleSelected () = 1 OR _
Lot_IsODBCSQLServerSelected () = 1 OR _
Lot_IsNotesSQLSelected()=1 THEN
IF DoesFileExist(FilePath$,femExists) =1 THEN
CopyFile FilePath$, BackupPath$, cmoCopy, 1
RemoveFile FilePath$, cmoNone
END IF
END IF
END IF
Lot_BackupLotusBcfFile = SUCCESS
END FUNCTION
'*************************************************************************
FUNCTION Lot_WriteIniFiles() AS INTEGER
'** Purpose: This function writes the Ini files
'** Author: MZ
'** Arguments: None
'** Symbols In: IniEntry
'** Returns: SUCCESS
'*************************************************************************
DIM inientrylistlen%,network$,entrycount%,entry$,notused%
' Find the entry list length
IniEntryListLen% = GetListLength(SYM_INIENTRY$)
IF IniEntryListLen%<>0 AND _
DoesDirExist(gLotusappDir$) <> FALSE THEN
'Write Common directory entry into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
END IF
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gNODE$ THEN
'Write Net Common directory entry into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(GetSymbolValue(SYM_NETLOTUSAPP$)), cmoOverwrite
END IF
' For every entry write it in the INI file(s)
FOR EntryCount% = 1 TO IniEntryListLen%
' Find if I have to update the lotus.ini/lotusapp.ini files
Entry$ = GetListItem(SYM_INIENTRY$,EntryCount%)
'print Entry$,STR(EntryCount%)
IF Entry$<>"" THEN
notused% = Lot_WriteEntry(Entry$,0)
END IF
Next
Lot_WriteIniFiles = SUCCESS
END FUNCTION
'*************************************************************************
FUNCTION Lot_WriteEntry(Entry$,FromPreConfigFlag%) AS INTEGER
'** Purpose: This function writes an entry in the INI files
'** and calls the OLE registration when needed
'** Author: MZ
'** Arguments: Entry$,FromPreConfigFlag%
'** Returns: SUCCESS
'*************************************************************************
DIM network$,gnetlotusappdir$,theentrywasrefreshed as integer, retstr$
DIM retdatastr$, retuserstr$,notused%,MailApplication$
network$ = GetSymbolValue(SYM_NETWORK$)
'This is a big case statement for all the entries to write
gLotusappDir$=GetSymbolValue(SYM_LOTUSAPPDIR$)
gNetLotusappDir$=GetSymbolValue(SYM_NETLOTUSAPP$)
'gLotusappIniPath$=GetSymbolValue(SYM_LOTUSAPPDIR$)+gLOTUSAPPINI$
'gNetLotusappIniPath$=GetSymbolValue("SYM_NETLOTUSAPP")+gLOTUSAPPINI$
IF network$=gNODE$ THEN
TheEntryWasRefreshed = Lot_TheEntryWasRefreshed(Entry$)
END IF
'print gLotusappDir$,"gLotusappDir in WriteEntry"
SELECT CASE Entry$
case "IVCPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
'Write into lotusapp.ini
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
'Write into lotusapp.ini
END IF
case "CONTAINERFILEPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Container File", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Container File", "Program Path", ".\", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Container File", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Container File", "Program Path", ".\", cmoOverwrite
END IF
case "DATALENSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "DataLens", "Program Path", gLotusappDir$+"datalens", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "DataLens", "Program Path", "\datalens", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "DataLens", "Program Path", gNetLotusappDir$+"datalens", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "DataLens", "Program Path", "\datalens", cmoOverwrite
END IF
case "DATALENSDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini; This is the path of *.BCF
CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
'Write into lotusapp.ini
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini; This is the path of *.BCF which has to be local
CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
'Write into lotusapp.ini
END IF
case "DIALOGEDITORPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Dialog Editor", "Program Path", gLotusappDir$+"dialoged", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Dialog Editor", "Program Path", "\DIALOGED", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Dialog Editor", "Program Path", _
gNetLotusappDir$+"dialoged", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Dialog Editor", "Program Path", "\DIALOGED", cmoOverwrite
END IF
case "DESKTOP"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
'Write into lotusapp.ini
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
'Write into lotusapp.ini
END IF
case "DOCUMENTFILEFILTERSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Document File Filters", "Program Path", _
gLotusappDir$+"excelflt\excelflt.flt", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Document File Filters", "Program Path", "\DOCFLT", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Document File Filters", "Program Path", _
gNetLotusappDir$+"excelflt\excelflt.flt", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Document File Filters", "Program Path", "\DOCFLT", cmoOverwrite
END IF
case "GRAPHICSFILEFILTERSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Program Path", _
gLotusappDir$+"filters\isgdi9.dll",cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\FILTERS", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Program Path", _
gNetLotusappDir$+"filters\isgdi9.dll",cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Graphics File Filters", "Program Path", "\FILTERS", cmoOverwrite
END IF
case "GRAPHICSFILEFILTERSFILTER"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
IF FromPreConfigFlag% = 1 THEN
retstr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Graphics File Filters", "Filter Path",NULLSTROK,INVALIDSTROK)
'Write into lotus.ini
IF retstr$<>"" THEN
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
gLotusappDir$+"gphflt", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\GPHFLT", cmoOverwrite
END IF
ELSE
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
gLotusappDir$+"gphflt", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\GPHFLT", cmoOverwrite
END IF
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
gLotusappDir$+"gphflt", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Graphics File Filters", "Program Path", "\GPHFLT", cmoOverwrite
END IF
case "ICONPALETTEPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Icon Palette", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Icon Palette", "Program Path", ".\", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Icon Palette", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Icon Palette", "Program Path", ".\", cmoOverwrite
END IF
case "INFOBOXPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "InfoBox", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Info Box", "Program Path", ".\", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "InfoBox", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Info Box", "Program Path", ".\", cmoOverwrite
END IF
case "SCRIPTPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gLotusappDir$+"script", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "LotusScript", "Program Path", "\SCRIPT", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gNetLotusappDir$+"script", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "LotusScript", "Program Path", "\SCRIPT", cmoOverwrite
END IF
case "MULTIMEDIAPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Program Path", gLotusappDir$+"multimed", cmoOverwrite
'CreateIniKeyValue gLotusIniPath$, "Lotus Applications", _
' "SCREENCAM", gLotusappDir$+"mutlimed\scrncam.exe Lotus ScreenCam",cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Multimedia", "Program Path", "\MULTIMED", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Program Path", gNetLotusappDir$+"multimed", cmoOverwrite
'CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "SCREENCAM", _
' gNetLotusappDir$+"mutlimed\scrncam.exe Lotus ScreenCam",cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Multimedia", "Program Path", "\MULTIMED", cmoOverwrite
END IF
IF network$=gSTANDARD$ OR network$=gNODE$ THEN
'Write the OLE Registration
notused%=Lot_WriteOLERegForShare(Entry$,FromPreConfigFlag%)
END IF
case "MULTIMEDIADATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Data Path", gLotusappDir$+"multimed", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Multimedia", "Data Path", "\MULTIMED", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Data Path", gNetLotusappDir$+"multimed", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Multimedia", "Data Path", "\MULTIMED", cmoOverwrite
END IF
case "SPELLCHECKERPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Program Path", gLotusappDir$+"spell", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Spell Checker", "Program Path", "\SPELL", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Program Path", gNetLotusappDir$+"spell", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Spell Checker", "Program Path", "\SPELL", cmoOverwrite
END IF
case "SPELLCHECKERDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Data Path", gLotusappDir$+"spell", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Spell Checker", "Data Path", "\SPELL", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Data Path", gNetLotusappDir$+"spell", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Spell Checker", "Data Path", "\SPELL", cmoOverwrite
END IF
case "SPELLCHECKERUSER"
IF FromPreConfigFlag% = 0 THEN
'Write into lotus.ini
retstr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Spell Checker", "User Path",NULLSTROK,INVALIDSTROK)
IF retstr$="" THEN
CreateDir gLotusappDir$+"spell", cmoNone
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path", gLotusappDir$+"spell", cmoOverwrite
END IF
ELSE
'Write into lotus.ini
CreateDir gLotusappDir$+"spell", cmoNone
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path", gLotusappDir$+"spell", cmoOverwrite
END IF
case "STATUSBARPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Status Bar", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Status Bar", "Program Path", ".\", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Status Bar", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue getLotusappIniPath$, "Status Bar", "Program Path", ".\", cmoOverwrite
END IF
case "TOOLSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Program Path", gLotusappDir$+"tools", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "TOOLS", "Program Path", "\TOOLS", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Program Path", gNetLotusappDir$+"tools", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "TOOLS", "Program Path", "\TOOLS", cmoOverwrite
END IF
case "TOOLSDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Data Path", Lot_TrimEndSlash(GetSymbolValue(SYM_WINDIR$)), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "TOOLS", "Data Path", ".\", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Data Path", Lot_TrimEndSlash(GetSymbolValue(SYM_WINDIR$)), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "TOOLS", "Data Path", ".\", cmoOverwrite
END IF
case "USERNAMESERVICESPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "User Name Service", "Program Path", gLotusappDir$+"uns", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "User Name Service", "Program Path", "\UNS", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "User Name Service", "Program Path", gNetLotusappDir$+"uns", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "User Name Service", "Program Path", "\UNS", cmoOverwrite
END IF
'Write Alias User if does not exist
retstr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "User Name Service", "AliasUser",NULLSTROK,INVALIDSTROK)
IF retstr$="" THEN
CreateIniKeyValue gLotusIniPath$, "User Name Service", "AliasUser", GetSymbolValue(SYM_NAME$), cmoOverwrite
END IF
case "FILTERS"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
'Write into lotusapp.ini
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
'Write into lotusapp.ini
END IF
case "EXCELFLT"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
'Write into lotusapp.ini
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
'Write into lotusapp.ini
END IF
case "HELPPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Help", "Program Path", gLotusappDir$+"help", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Help", "Program Path", gNetLotusappDir$+"help", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite
END IF
case "HELPDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Help", "Data Path", gLotusappDir$+"help", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Help", "Data Path", gNetLotusappDir$+"help", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Help", "Program Path", "\help", cmoOverwrite
END IF
case "LOTUSSCRIPTPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gLotusappDir$+"script", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "LotusScript", "Program Path", "\script", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", _
gNetLotusappDir$+"script", cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "LotusScript", "Program Path", "\script", cmoOverwrite
END IF
case "LOTUSDIALOGSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Lotus Dialogs", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Lotus Dialogs", "Program Path", ".\", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Lotus Dialogs", "Program Path", _
Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Lotus Dialogs", "Program Path", ".\", cmoOverwrite
END IF
case "MAILENABLINGPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Mail Enabling", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gLotusappIniPath$, "Mail Enabling", "Program Path", ".\", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
'Write into lotus.ini
CreateIniKeyValue gLotusIniPath$, "Mail Enabling", "Program Path", _
Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
'Write into lotusapp.ini
'CreateIniKeyValue gNetLotusappIniPath$, "Mail Enabling", "Program Path", ".\", cmoOverwrite
END IF
END SELECT
' If the spell checker was installed and does not existe user path
' add the user path to point to the local lotusapp\spell dir
retDataStr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Spell Checker", "Data Path",NULLSTROK,INVALIDSTROK)
retUserStr$ = Lot_LocalGetPathFromIni(gLotusIniPath$, "Spell Checker", "User Path",NULLSTROK,INVALIDSTROK)
IF retDataStr$ <> "" AND retUserStr$ = "" THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path", gLotusappDir$+"spell", cmoOverwrite
CreateDir gLotusappDir$+"spell", cmoNone
END IF
Lot_WriteEntry = SUCCESS
END FUNCTION
'*************************************************************************
FUNCTION Lot_TheEntryWasRefreshed(Entry$) AS INTEGER
'** Purpose: This function checks "REFRESHEDENTRIES" list and returns
'** 1 if finds Entry$ and 0 if does not
'** Author: MZ
'** Arguments: Entry$
'** Symbols In: REFRESHEDENTRIES
'** Returns: 0 = NO
'** 1 = YES
'*************************************************************************
DIM RefreshListLen%,EntryCount%,RefreshEntry$
' Find the entry list length
RefreshListLen% = GetListLength("REFRESHEDENTRIES")
IF RefreshListLen%=0 THEN
'No entries were refreshed
Lot_TheEntryWasRefreshed = 0
ELSE
FOR EntryCount%=1 TO RefreshListLen%
RefreshEntry$ = GetListItem("REFRESHEDENTRIES",EntryCount%)
IF RefreshEntry$=Entry$ THEN
Lot_TheEntryWasRefreshed = 1
Exit Function
END IF
Next
Lot_TheEntryWasRefreshed = 0
END IF
END FUNCTION
'*************************************************************************
FUNCTION Lot_WriteOLERegForShare(Entry$,FromPreConfigFlag%) AS INTEGER
'** Purpose: This function writes OLE registration needed
'** Author: MZ
'** Arguments: Entry$,FromPreConfigFlag%
'** Returns: SUCCESS
'*************************************************************************
DIM LotusAppDir$,NetLotusAppDir$,NetworkIns$
'This is a big case statement for all the OLE Registration to write
LotusAppDir$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
NetLotusAppDir$ = GetSymbolValue(SYM_NETLOTUSAPP$)
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
SELECT CASE Entry$
case "IVCPROGRAM"
case "CONTAINERFILEPROGRAM"
case "DATALENSPROGRAM"
case "DATALENSDATA"
case "DIALOGEDITORPROGRAM"
case "DESKTOP"
case "DOCUMENTFILEFILTERSPROGRAM"
case "GRAMMARCHECKERPROGRAM"
case "GRAMMARCHECKERDATA"
case "GRAPHICSFILEFILTERSPROGRAM"
case "GRAPHICSFILEFILTERSFILTER"
case "HYPHENATIONPROGRAM"
case "HYPHENATIONDATA"
case "ICONPALETTEPROGRAM"
case "INFOBOXPROGRAM"
case "SCRIPTPROGRAM"
case "MULTIMEDIAPROGRAM"
'Write the OLE Registration
'Lotus Sound
'***********
'If standard install
IF NetworkIns$ = gSTANDARD THEN
IF DoesFileExist(LotusAppDir$+"MULTIMED\LOTUSSND.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTUSSOUND_STR), LdString(SID_LOTUSSOUND_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_SHELL_STR), LdString(SID_LOTUSSOUND_SHELL_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V2_STR), LdString(SID_LOTUSSOUND_PROT_V2_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V1_STR), LdString(SID_LOTUSSOUND_PROT_V1_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V0_STR), LdString(SID_LOTUSSOUND_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSSOUND_PROT_SRV_VAL)
END IF
'If node install
ELSEIF NetworkIns$ = gNODE THEN
IF DoesFileExist(NetLotusAppDir$+"MULTIMED\LOTUSSND.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTUSSOUND_STR), LdString(SID_LOTUSSOUND_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_SHELL_STR), LdString(SID_LOTUSSOUND_SHELL_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V2_STR), LdString(SID_LOTUSSOUND_PROT_V2_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V1_STR), LdString(SID_LOTUSSOUND_PROT_V1_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V0_STR), LdString(SID_LOTUSSOUND_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_SRV_STR), NetLotusAppDir$+LdString(SID_LOTUSSOUND_PROT_SRV_VAL)
ELSEIF DoesFileExist(LotusAppDir$+"MULTIMED\LOTUSSND.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTUSSOUND_STR), LdString(SID_LOTUSSOUND_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_SHELL_STR), LdString(SID_LOTUSSOUND_SHELL_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V2_STR), LdString(SID_LOTUSSOUND_PROT_V2_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V1_STR), LdString(SID_LOTUSSOUND_PROT_V1_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_V0_STR), LdString(SID_LOTUSSOUND_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTUSSOUND_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSSOUND_PROT_SRV_VAL)
END IF
END IF
'Lotus Multimedia
'****************
'If standard install
IF NetworkIns$ = gSTANDARD THEN
IF DoesFileExist(LotusAppDir$+"MULTIMED\MEDMAN.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTUSMEDIA_STR), LdString(SID_LOTUSMEDIA_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_SHELL_STR), LotusAppDir$+"MULTIMED\"+LdString(SID_LOTUSMEDIA_SHELL_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_HDLR_STR),LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_HDLR_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V1_STR), LdString(SID_LOTUSMEDIA_PROT_V1_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V0_STR), LdString(SID_LOTUSMEDIA_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_SRV_VAL)
END IF
'If node install
ELSEIF NetworkIns$ = gNODE THEN
IF DoesFileExist(NetLotusAppDir$+"MULTIMED\MEDMAN.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTUSMEDIA_STR), LdString(SID_LOTUSMEDIA_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_SHELL_STR), NetLotusAppDir$+"MULTIMED\"+LdString(SID_LOTUSMEDIA_SHELL_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_HDLR_STR),NetLotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_HDLR_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V1_STR), LdString(SID_LOTUSMEDIA_PROT_V1_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V0_STR), LdString(SID_LOTUSMEDIA_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_SRV_STR), NetLotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_SRV_VAL)
ELSEIF DoesFileExist(LotusAppDir$+"MULTIMED\MEDMAN.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTUSMEDIA_STR), LdString(SID_LOTUSMEDIA_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_SHELL_STR), LotusAppDir$+"MULTIMED\"+LdString(SID_LOTUSMEDIA_SHELL_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_HDLR_STR),LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_HDLR_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V1_STR), LdString(SID_LOTUSMEDIA_PROT_V1_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_V0_STR), LdString(SID_LOTUSMEDIA_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTUSMEDIA_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTUSMEDIA_PROT_SRV_VAL)
END IF
END IF
'Lotus annotator
'***************
'If standard install
IF NetworkIns$ = gSTANDARD THEN
IF DoesFileExist(LotusAppDir$+"MULTIMED\ANNOTATE.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTANNOTE_STR), LdString(SID_LOTANNOTE_VAL)
SetRegKeyValue LdString(SID_LOTANNOTE_PROT_V0_STR), LdString(SID_LOTANNOTE_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTANNOTE_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTANNOTE_PROT_SRV_VAL)
END IF
'If node install
ELSEIF NetworkIns$ = gNODE THEN
IF DoesFileExist(NetLotusAppDir$+"MULTIMED\ANNOTATE.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTANNOTE_STR), LdString(SID_LOTANNOTE_VAL)
SetRegKeyValue LdString(SID_LOTANNOTE_PROT_V0_STR), LdString(SID_LOTANNOTE_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTANNOTE_PROT_SRV_STR), NetLotusAppDir$+LdString(SID_LOTANNOTE_PROT_SRV_VAL)
ELSEIF DoesFileExist(LotusAppDir$+"MULTIMED\ANNOTATE.EXE",femExists)=1 THEN
SetRegKeyValue LdString(SID_LOTANNOTE_STR), LdString(SID_LOTANNOTE_VAL)
SetRegKeyValue LdString(SID_LOTANNOTE_PROT_V0_STR), LdString(SID_LOTANNOTE_PROT_V0_VAL)
SetRegKeyValue LdString(SID_LOTANNOTE_PROT_SRV_STR), LotusAppDir$+LdString(SID_LOTANNOTE_PROT_SRV_VAL)
END IF
END IF
case "MULTIMEDIADATA"
case "SPELLCHECKERPROGRAM"
case "SPELLCHECKERDATA"
case "SPELLCHECKERUSER"
case "STATUSBARPROGRAM"
case "THESAURUSPROGRAM"
case "THESAURUSDATA"
case "TOOLSPROGRAM"
case "TOOLSDATA"
case "USERNAMESERVICESPROGRAM"
case "FILTERS"
case "EXCELFLT"
case "HELPPROGRAM"
case "HELPDATA"
case "LOTUSSCRIPTPROGRAM"
case "LOTUSDIALOGSPROGRAM"
case "MAILENABLINGPROGRAM"
END SELECT
Lot_WriteOLERegForShare = SUCCESS
END FUNCTION
'*************************************************************************
SUB CONSOLIDATELOTUSAPPDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
'** Purpose: Processing for DBM_CONSOLIDATE_LOTUSAPPDIR
'** Author: MZ
'** Arguments: hDlg&, CtrlId&, Classes$, Inst&
'** Returns:
'*************************************************************************
STATIC gDriveIndex%, dirChanged%
DIM display$,dirToChange$,drive$,yesno&
' unc start
DIM uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo& '** MZ
DIM drvSel%, DriveChangedFlag%, i%, Inst% '** MZ
DIM curCombo$, uncOff&, unusedPath$, NumDirs%
Inst% = CINT(LInst&)
IF INSTR(Classes$, "IDC_COMBO") THEN
i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
gDriveIndex% = Inst%
dirChanged% = TRUE
curCombo$ = GetListItem("IDC_COMBO1", Inst%)
fullPath$ = GetListItem("IDC_EDIT",1)
Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
uncOff& = INSTR(1, curCombo$, "\\")
IF uncOff > 0 THEN
Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
ELSE
uncPath$ = ""
END IF
SetListItem "IDC_EDIT", 1, uncPath$ + dirPath$
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
EXIT SUB
END IF
'unc end
SELECT CASE Classes$
case "__DLGINIT"
dirChanged%=FALSE
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
display$ ="("+LdString(SID_SPACENEEDED)+STR$(gConsolidateSize&\1024)+gStrK$+")"
SetListItem "IDC_TEXT", 6, display$
AddListItem SYM_UPDATELIST$, "IDC_TEXT6"
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
AddListItem "UPDATELIST","IDC_COMBO1"
dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
SetListItem "IDC_EDIT", 1, dirToChange$
gDriveIndex% = ValidateEditBox(hDlg& , 1)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
case "IDC_COMBO1"
dirChanged%=TRUE
gDriveIndex% = CInt(Inst%)
case "IDC_EDIT"
dirChanged% = TRUE
case "IDC_BRWSDIR"
drvSel% = ValidateBrowse(hDlg& , Inst%)
dirChanged% = TRUE
case "IDC_OK"
' IF dirChanged% = TRUE THEN
IF Lot_IsUnvalidatedUNCPath(GetListItem("IDC_EDIT",1)) = TRUE THEN
ErrorMsgNoDlgExit SID_ERR_SHARED_NO_UNC, ""
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
ELSE
drvSel% = ValidateEditBox(hDlg& , 1)
IF drvSel% = 0 THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
gDriveIndex% = drvSel%
END IF
END IF
dirToChange$ = LCASE$(MID$(GetListItem("IDC_COMBO1",gDriveIndex%), 1, 2)+ _
GetListItem("IDC_EDIT", 1))
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
IF IsLongDirPath(dirToChange$) = TRUE THEN
'** output "FAT path only" dialog
ErrorMsgNoDlgExit SID_ERR_SHARED_NO_LONG, ""
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
' END IF
'Validate the space
IF GetFreeSpaceForDrive(dirToChange$) < (gConsolidateSize& \ 1024) THEN
ShowPathError SID_DRV_NOTENOUGHSPACE, 0, dirToChange$
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
'Validate the path against net lotus app
IF dirToChange$ = GetSymbolValue(SYM_EXISTINGNETCOMMDIR$) THEN
ShowPathError SID_ERR_SHARE_NETEQLOCAL1, SID_ERR_SHARE_NETEQLOCAL2, dirToChange$
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
'Confirmation box
yesno& = DoMsgBox(LdString(SID_SHAREDCONFIRMATION1) + " " + dirToChange$ + _
LdString(SID_SHAREDCONFIRMATION2),LdString(SID_SHAREDCONFIRMATION0), _
MB_YESNO)
If yesno& = CLNG(7) Then ''NO
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
End if
'Set the symbol to move
SetSymbolValue "SYM_MOVE", "1"
SetSymbolValue "SYM_COPY", "0"
'print "move"
'Set the symbol to the new path
SetSymbolValue SYM_LOTUSAPPDIR$, dirToChange$
SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
CreateDir dirToChange$, cmoNone
Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
DL_SetNotesDataPath
DL_SetOraclePath
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
case "IDC_CONTINUE"
'Is a Copy
' IF dirChanged% = TRUE THEN
IF Lot_IsUnvalidatedUNCPath(GetListItem("IDC_EDIT",1)) = TRUE THEN
ErrorMsgNoDlgExit SID_ERR_SHARED_NO_UNC, ""
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
ELSE
drvSel% = ValidateEditBox(hDlg& , 1)
IF drvSel% = 0 THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
gDriveIndex% = drvSel%
END IF
END IF
dirToChange$ = LCASE$(MID$(GetListItem("IDC_COMBO1",gDriveIndex%), 1, 2)+ _
GetListItem("IDC_EDIT", 1))
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
IF IsLongDirPath(dirToChange$) = TRUE THEN
'** output "FAT path only" dialog
ErrorMsgNoDlgExit SID_ERR_SHARED_NO_LONG, ""
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
' END IF
'IF dirChanged% = TRUE THEN
'Validate the space
IF GetFreeSpaceForDrive(dirToChange$) < (gConsolidateSize& \ 1024) THEN
ShowPathError SID_DRV_NOTENOUGHSPACE, 0, dirToChange$
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
'Validate the path against net lotus app
IF dirToChange$ = GetSymbolValue(SYM_EXISTINGNETCOMMDIR$) THEN
ShowPathError SID_ERR_SHARE_NETEQLOCAL1, SID_ERR_SHARE_NETEQLOCAL2, dirToChange$
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
'END IF
'Confirmation box
yesno& = DoMsgBox(LdString(SID_SHAREDCONFIRMATION1) + " " + dirToChange$ + _
LdString(SID_SHAREDCONFIRMATION2),LdString(SID_SHAREDCONFIRMATION0), _
MB_YESNO)
If yesno& = CLNG(7) Then ''NO
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
End if
'Set the symbol to the new path
SetSymbolValue "SYM_MOVE", "0"
SetSymbolValue "SYM_COPY", "1"
SetSymbolValue SYM_LOTUSAPPDIR$, dirToChange$
SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
CreateDir dirToChange$, cmoNone
Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
DL_SetNotesDataPath
DL_SetOraclePath
END SELECT
EXIT_CONSOLIDATELOTUSAPPDIR:
END SUB
'*************************************************************************
SUB CONSOLIDATEMOVECOPYCB (hDlg&, CtrlId%, Classes$, Inst&)
'** Purpose: Processing for DBM_CONSOLIDATE_MOVECOPY
'** Author: MZ
'** Arguments: hDlg&, CtrlId&, Classes$, Inst&
'** Returns:
'*************************************************************************
STATIC gDriveIndex%, dirChanged%
DIM display$,dirToChange$,drive$
SELECT CASE Classes$
case "__DLGINIT"
dirChanged%=FALSE
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
display$ ="("+LdString(SID_SPACENEEDED)+STR$(gConsolidateSize&\1024)+gStrK$+")"
SetListItem "IDC_TEXT", 6, display$
AddListItem SYM_UPDATELIST$, "IDC_TEXT6"
case "IDC_OK"
' is a MOVE
'print "move"
SetSymbolValue "SYM_MOVE", "1"
SetSymbolValue "SYM_COPY", "0"
GOTO EXIT_CONSOLIDATEMOVECOPY
case "IDC_CONTINUE"
' Is a copy
'print "copy"
SetSymbolValue "SYM_MOVE", "0"
SetSymbolValue "SYM_COPY", "1"
GOTO EXIT_CONSOLIDATEMOVECOPY
END SELECT
EXIT_CONSOLIDATEMOVECOPY:
END SUB
'*************************************************************************
'*************************************************************************
SUB ISTHISNETLOTUSAPPCB (hDlg&, CtrlId%, Classes$, Inst&)
'** Purpose: Processing for DBM_ISTHISNETLOTUSAPP
'** Author: MZ
'** Arguments: hDlg&, CtrlId&, Classes$, Inst&
'** Returns:
'*************************************************************************
STATIC gDriveIndex%, dirChanged%, ExistingCommonDir$
DIM display$,dirToChange$,drive$
SELECT CASE Classes$
case "__DLGINIT"
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
SetListItem "IDC_TEXT", 3, ExistingCommonDir$
AddListItem SYM_UPDATELIST$, "IDC_TEXT3"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT7)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT8)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT9)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT10)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
case "IDC_CONTINUE"
' is not a network lotusapp
'print "is not network lotusapp"
GOTO EXIT_ISTHISNETLOTUSAPP
case "IDC_OK"
' Is a network lotusapp
' print "is a network lotusapp"
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(ExistingCommonDir$), cmoOverwrite
RemoveIniKey gLotusIniPath$, "Lotus Applications", "Common Directory", cmoVital
GOTO EXIT_ISTHISNETLOTUSAPP
END SELECT
EXIT_ISTHISNETLOTUSAPP:
END SUB
'*************************************************************************
SUB SQLSERVERNAMECB (hDlg&, CtrlId%, Classes$, Inst&)
'** Purpose:
'** Author: MZ
'** Arguments: hDlg&, CtrlId&, Classes$, Inst&
'** Returns:
'*************************************************************************
DIM tempbuf$
SELECT CASE Classes$
case "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
tempbuf$ = GetSymbolValue (SYM_SQLSERVERNAME$)
SetListItem "IDC_EDIT",1,tempbuf$
AddListItem "UPDATELIST","IDC_EDIT1"
case "IDC_OK"
IF LEN( GetListItem ("IDC_EDIT", 1)) > 0 THEN
SetSymbolValue SYM_SQLSERVERNAME$, GetListItem ("IDC_EDIT", 1)
END IF
END SELECT
END SUB
'*************************************************************************
SUB PARADOXNETWORKINFOCB (hDlg&, CtrlId%, Classes$, Inst&)
'** Purpose:
'** Author: MZ
'** Arguments: hDlg&, CtrlId&, Classes$, Inst&
'** Returns:
'*************************************************************************
DIM tempbuf$,buttonsetting$, notused%
SELECT CASE Classes$
case "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
tempbuf$ = GetSymbolValue (SYM_PARADOXNETWORKINFO$)
If tempbuf$ = "" Then
SetListItem "IDC_B", 1, "F"
SetListItem "IDC_B", 2, "F"
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),0)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),0)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),0)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),0)
else
SetListItem "IDC_B", 1, "T"
SetListItem "IDC_B", 2, "T"
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),1)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),1)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),1)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),1)
SetListItem "IDC_EDIT",1,tempbuf$
end if
AddListItem "UPDATELIST", "IDC_B1"
AddListItem "UPDATELIST", "IDC_B2"
AddListItem "UPDATELIST", "IDC_EDIT1"
case "IDC_B"
ButtonSetting$ = GetListItem ("IDC_B", 1)
IF Inst&=1 THEN
IF ButtonSetting$ = "T" THEN
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),1)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),1)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),1)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),1)
ELSEIF ButtonSetting$ = "F" THEN
SetListItem "IDC_B", 2, "F"
SetListItem "IDC_EDIT",1, " "
AddListItem "UPDATELIST", "IDC_B2"
AddListItem "UPDATELIST", "IDC_EDIT1"
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_GROUP1),0)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_B2),0)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_TEXT1),0)
notused% = EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1),0)
END IF
ELSEIF Inst&=2 THEN
END IF
case "IDC_OK"
IF LEN( GetListItem ("IDC_EDIT", 1)) > 0 AND _
GetListItem ("IDC_B", 1) ="T" AND _
GetListItem ("IDC_B", 2) ="T" THEN
SetSymbolValue SYM_PARADOXNETWORKINFO$, GetListItem ("IDC_EDIT", 1)
ELSEIF LEN( GetListItem ("IDC_EDIT", 1)) = 0 OR _
GetListItem ("IDC_B", 1) ="F" OR _
GetListItem ("IDC_B", 2) ="F" THEN
SetSymbolValue SYM_PARADOXNETWORKINFO$, ""
END IF
END SELECT
END SUB
'*************************************************************************
FUNCTION Lot_WriteODBCINST() AS INTEGER
'** Purpose: This function writes the ODBCINST.INI file
'** Author: PJT
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
DIM ODBC20_SQLLvl$, ODBC20_APILvl$, ODBC20_FUsage$, ODBC20_FExtns$
DIM ODBC20_DrvVer$, ODBC20_Connct$
DIM DL_AdminPath$, DL_AdminSect$, DL_AdminKey$, DL_AdminVal$
DIM TmpWinSysPath$, TmpWinPath$, TmpIniPath$
DIM ODBCInstalled%
DIM XLAT_Sect$, XLAT_Inst$, XLAT_KEY$, XLAT_Name$, XLAT_DLL$
DIM XLAT_Setup$, XLAT_SetupKey$
DIM notused%
TmpWinPath$ = GetWindowsDir()
TmpWinSysPath$ = GetSymbolValue(SYM_WINSYSDIR$)
ODBCInstalled% = 0
IF Lot_IsTheFeatureInstalled("SHRDBASEPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_DATALENS_DBDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_DATALENS_DBPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_DATALENS_DBSETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
notused% = Lot_ModifyODBC()
notused% = Lot_ModifyDataLensIni()
ODBCInstalled% = 1
END IF
IF Lot_IsTheFeatureInstalled("SHRNOTESSQLPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_DATALENS_NSQLDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_DATALENS_NSQLPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_DATALENS_NSQLSETU )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBCInstalled% = 1
END IF
'** ODBC SPECIFIC STRINGS
'** SPREADSHEET SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCWKSPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_SSDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_SSPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_SSSETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBCInstalled% = 1
END IF
'** ODBC TEXT SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCTEXTPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_TEXTDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_TEXTPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_TEXTSETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBC20_SQLLvl$ = LdString( SID_ODBC_TEXT_SQLLVL )
ODBC20_APILvl$ = LdString( SID_ODBC_TEXT_APILVL )
ODBC20_FUsage$ = LdString( SID_ODBC_TEXT_USAGE )
ODBC20_FExtns$ = LdString( SID_ODBC_TEXT_EXT )
ODBC20_DrvVer$ = LdString( SID_ODBC_TEXT_VER )
ODBC20_Connct$ = LdString( SID_ODBC_TEXT_CONNECT )
WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
ODBC20_FUsage$, ODBC20_FExtns$, _
ODBC20_DrvVer$, ODBC20_Connct$
ODBCInstalled% = 1
END IF
'** ODBC BTRIEVE SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCBTRIEVEPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_BTRIEVEDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_BTRIEVEPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_BTRIEVESETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBC20_SQLLvl$ = LdString( SID_ODBC_BTRIEVE_SQLLVL )
ODBC20_APILvl$ = LdString( SID_ODBC_BTRIEVE_APILVL )
ODBC20_FUsage$ = LdString( SID_ODBC_BTRIEVE_USAGE )
ODBC20_FExtns$ = LdString( SID_ODBC_BTRIEVE_EXT )
ODBC20_DrvVer$ = LdString( SID_ODBC_BTRIEVE_VER )
ODBC20_Connct$ = LdString( SID_ODBC_BTRIEVE_CONNECT )
WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
ODBC20_FUsage$, ODBC20_FExtns$, _
ODBC20_DrvVer$, ODBC20_Connct$
ODBCInstalled% = 1
END IF
'** ODBC FOXBASE SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCFOXBASEPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_FOXBASEDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_FOXBASEPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_FOXBASESETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBC20_SQLLvl$ = LdString( SID_ODBC_FOXBASE_SQLLVL )
ODBC20_APILvl$ = LdString( SID_ODBC_FOXBASE_APILVL )
ODBC20_FUsage$ = LdString( SID_ODBC_FOXBASE_USAGE )
ODBC20_FExtns$ = LdString( SID_ODBC_FOXBASE_EXT )
ODBC20_DrvVer$ = LdString( SID_ODBC_FOXBASE_VER )
ODBC20_Connct$ = LdString( SID_ODBC_FOXBASE_CONNECT )
WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
ODBC20_FUsage$, ODBC20_FExtns$, _
ODBC20_DrvVer$, ODBC20_Connct$
ODBCInstalled% = 1
END IF
'** ODBC ACCESS SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCACCESSPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_ACCESSDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_ACCESSPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_ACCESSSETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBC20_SQLLvl$ = LdString( SID_ODBC_ACCESS_SQLLVL )
ODBC20_APILvl$ = LdString( SID_ODBC_ACCESS_APILVL )
ODBC20_FUsage$ = LdString( SID_ODBC_ACCESS_USAGE )
ODBC20_FExtns$ = LdString( SID_ODBC_ACCESS_EXT )
ODBC20_DrvVer$ = LdString( SID_ODBC_ACCESS_VER )
ODBC20_Connct$ = LdString( SID_ODBC_ACCESS_CONNECT )
WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
ODBC20_FUsage$, ODBC20_FExtns$, _
ODBC20_DrvVer$, ODBC20_Connct$
ODBCInstalled% = 1
END IF
'** ODBC PARADOX SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCPARADOXPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_PARADOXDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_PARADOXPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_PARADOXSETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBC20_SQLLvl$ = LdString( SID_ODBC_PARADOX_SQLLVL )
ODBC20_APILvl$ = LdString( SID_ODBC_PARADOX_APILVL )
ODBC20_FUsage$ = LdString( SID_ODBC_PARADOX_USAGE )
ODBC20_FExtns$ = LdString( SID_ODBC_PARADOX_EXT )
ODBC20_DrvVer$ = LdString( SID_ODBC_PARADOX_VER )
ODBC20_Connct$ = LdString( SID_ODBC_PARADOX_CONNECT )
WriteODBC20INST DL_DriverDesc$, ODBC20_SQLLvl$, ODBC20_APILvl$, _
ODBC20_FUsage$, ODBC20_FExtns$, _
ODBC20_DrvVer$, ODBC20_Connct$
ODBCInstalled% = 1
END IF
'** ODBC DB2 SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCDB2PRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_DB2DESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_DB2PATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_DB2SETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBCInstalled% = 1
END IF
'** ODBC ORACLE SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCORACLEPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_ORADESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_ORAPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_ORASETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBCInstalled% = 1
END IF
'** ODBC SQLServer SPECIFIC STRINGS
IF Lot_IsTheFeatureInstalled("SHRODBCSQLSVRPRG") = 1 THEN
DL_DriverDesc$ = LdString( SID_ODBC_SQLDESC )
DL_DriverPath$ = TmpWinSysPath$ + LdString( SID_ODBC_SQLPATH )
DL_SetupPath$ = TmpWinSysPath$ + LdString( SID_ODBC_SQLSETUP )
WriteODBCINST DL_DriverDesc$, DL_DriverPath$, DL_SetupPath$
ODBCInstalled% = 1
XLAT_Sect$ = LdString( SID_ODBC_XLAT_SECTION )
XLAT_Inst$ = LdString( SID_ODBC_XLAT_INSTALLED )
XLAT_Name$ = LdString( SID_ODBC_XLAT_NAME )
XLAT_KEY$ = LdString( SID_ODBC_XLAT_KEYWORD )
XLAT_DLL$ = TmpWinSysPath$ + LdString( SID_ODBC_XLAT_DLL )
XLAT_Setup$ = TmpWinSysPath$ + LdString( SID_ODBC_XLAT_SETUP )
XLAT_SetupKey$ = LdString( SID_DATALENS_ODBCINST_SET )
TmpIniPath$ = GetWindowsDir() + LdString(SID_DATALENS_ODBCINST_PATH)
CreateIniKeyValue TmpIniPath$, XLAT_Sect$, XLAT_Name$, _
XLAT_Inst$, cmoOverwrite
CreateIniKeyValue TmpIniPath$, XLAT_Name$, XLAT_KEY$, XLAT_DLL$, _
cmoOverwrite
CreateIniKeyValue TmpIniPath$, XLAT_Name$, XLAT_SetupKey$, _
XLAT_Setup$, cmoOverwrite
END IF
IF ODBCInstalled% = 1 THEN
DL_AdminPath$ = TmpWinPath$ + LdString( SID_ODBC_ADMIN_INIFILE )
'print "Admin Path: " & DL_AdminPath$
DL_AdminSect$ = LdString( SID_ODBC_ADMIN_SECTION )
'print "Admin Section: " & DL_AdminSect$
DL_AdminKey$ = LdString( SID_ODBC_ADMIN_KEYWORD )
'print "Admin Keyword: " & DL_AdminKey$
DL_AdminVal$ = TmpWinSysPath$ + LdString( SID_ODBC_ADMIN_PRG )
'print "Admin Value: " & DL_AdminVal$
CreateIniKeyValue DL_AdMinPath$, DL_AdminSect$, DL_AdminKey$, _
DL_AdminVal$, cmoOverwrite
END IF
Lot_WriteODBCINST = SUCCESS
END FUNCTION
SUB WriteODBCINST ( DriverDesc$, DriverPath$, SetupPath$ )
'** Purpose: Write the Driver Entries to the ODBCINST.INI
'** Author: PJT
'** Arguments: DriverDesc$, DriverPath$, SetupPath$
'** Returns:
'*************************************************************************
DIM TmpIniPath$
DIM ODBCINSTPath$, ODBCDriverSection$, ODBCInstallKeyword$
DIM ODBCDriverKeyword$, ODBCSetupKeyword$
ODBCINSTPath$ = LdString(SID_DATALENS_ODBCINST_PATH)
ODBCDriverSection$ = LdString(SID_DATALENS_ODBCINST_ODBC)
ODBCInstallKeyword$ = LdString(SID_DATALENS_ODBCINST_INST)
ODBCDriverKeyword$ = LdString(SID_DATALENS_ODBCINST_DRVR)
ODBCSetupKeyword$ = LdString(SID_DATALENS_ODBCINST_SET)
TmpIniPath$ = GetWindowsDir() + ODBCINSTPath$
CreateIniKeyValue TmpIniPath$, ODBCDriverSection$, DriverDesc$, _
ODBCInstallKeyword$, cmoOverwrite
CreateIniKeyValue TmpIniPath$, DriverDesc$, ODBCDriverKeyword$, _
DriverPath$, cmoOverwrite
CreateIniKeyValue TmpIniPath$, DriverDesc$, ODBCSetupKeyword$, _
SetupPath$, cmoOverwrite
END SUB
'*************************************************************************
'NEW!!
SUB WriteODBC20INST ( DriverDesc$, SQLLvl$, APILvl$, Usage$, Ext$, DrvVer$, Cnnct$ )
'** Purpose: Write the ODBC 2.0 Driver Entries to the ODBCINST.INI
'** Author: PJT
'** Arguments: DriverDesc$, DriverPath$, SetupPath$
'** Returns:
'*************************************************************************
DIM TmpIniPath$
DIM ODBCINSTPath$, ODBCDriverSection$
DIM ODBCSQLLevelKeyword$, ODBCAPILevelKeyword$
DIM ODBCFileUsageKeyword$, ODBCFileExtnsKeyword$
DIM ODBCDriverVerKeyword$, ODBCConnectKeyword$
ODBCINSTPath$ = LdString(SID_DATALENS_ODBCINST_PATH)
ODBCDriverSection$ = LdString(SID_DATALENS_ODBCINST_ODBC)
ODBCSQLLevelKeyword$ = LdString(SID_DATALENS_ODBCINST_SQLLVL)
ODBCAPILevelKeyword$ = LdString(SID_DATALENS_ODBCINST_APILVL)
ODBCFileUsageKeyword$ = LdString(SID_DATALENS_ODBCINST_USAGE)
ODBCFileExtnsKeyword$ = LdString(SID_DATALENS_ODBCINST_EXT)
ODBCDriverVerKeyword$ = LdString(SID_DATALENS_ODBCINST_VER)
ODBCConnectKeyword$ = LdString(SID_DATALENS_ODBCINST_CONNECT)
TmpIniPath$ = GetWindowsDir() + ODBCINSTPath$
CreateIniKeyValue TmpIniPath$, DriverDesc$, _
ODBCSQLLevelKeyword$, _
SQLLvl$, _
cmoOverwrite
CreateIniKeyValue TmpIniPath$, DriverDesc$, _
ODBCAPILevelKeyword$, _
APILvl$, _
cmoOverwrite
CreateIniKeyValue TmpIniPath$, DriverDesc$, _
ODBCFileUsageKeyword$, _
Usage$, _
cmoOverwrite
CreateIniKeyValue TmpIniPath$, DriverDesc$, _
ODBCFileExtnsKeyword$, _
Ext$, _
cmoOverwrite
CreateIniKeyValue TmpIniPath$, DriverDesc$, _
ODBCDriverVerKeyword$, _
DrvVer$, _
cmoOverwrite
CreateIniKeyValue TmpIniPath$, DriverDesc$, _
ODBCConnectKeyword$, _
Cnnct$, _
cmoOverwrite
END SUB
'*************************************************************************
'End NEW!!
FUNCTION Lot_ModifyODBC() AS INTEGER
'** Purpose: This modifies the ODBC.INI file. Changing the QODBF entries
'** to LODBF04 entries, and changing "DataLens" entries to
'** "Lotus Q+E dBASE" entries.
'** Author: PJT
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM TmpIniPath$
DIM ODBCPath$, ODBCSection1$, ODBCKeyword1$, ODBCReplacement1$
DIM ODBCSection2$, ODBCKeyword2$, ODBCReplacement2$
DIM notused&
ODBCPath$ = LdString(SID_DATALENS_ODBCINI_PATH)
ODBCSection1$ = LdString(SID_DATALENS_ODBCINI_SECT1)
ODBCKeyword1$ = LdString(SID_DATALENS_ODBCINI_KEY1)
ODBCReplacement1$ = LdString(SID_DATALENS_ODBCINI_REPL1)
ODBCSection2$ = LdString(SID_DATALENS_ODBCINI_SECT2)
ODBCKeyword2$ = LdString(SID_DATALENS_ODBCINI_KEY2)
ODBCReplacement2$ = LdString(SID_DATALENS_ODBCINI_REPL2)
TmpIniPath$ = GetWindowsDir() + ODBCPath$
' This is commented out because the BCFMOD.DLL was not ported to 32 bit
notused& = FixODBCiniSources( TmpIniPath$, _
ODBCSection1$, ODBCKeyword1$, ODBCReplacement1$, _
ODBCSection2$, ODBCKeyword2$, ODBCReplacement2$ )
Lot_ModifyODBC = SUCCESS
END FUNCTION
'*************************************************************************
'*************************************************************************
FUNCTION Lot_ModifyDataLensIni() AS INTEGER
'** Purpose: This modifies the DATALENS.INI file. Changing the QODBF entries
'** to LODBF04 entries
'** Author: PJT
'** Arguments: None
'** Returns: SUCCESS
'*************************************************************************
DIM InFileNum, OutFileNum, n as Integer
DIM nextline as string
DIM tmp$, OldDll$, NewDll$, IniFile$, BakFile$, IniPath$
ON ERROR GOTO MOD_DL_ErrHandler
OldDLL$ = LdString(SID_DATALENS_ODBCINI_KEY2) '"QODBF.DLL"
NewDLL$ = LdString(SID_DATALENS_ODBCINI_REPL2) '"LODBF04.DLL"
IniFile$ = "DATALENS.INI"
BakFile$ = "DATALENS.BAK"
IniPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"DataLens", "Data Path",NULLSTROK,INVALIDSTRERR)
If IniPath$ = "" Then goto MOD_DL_EndFunction
'print "IniPath$ = " & IniPath$
filecopy IniPath$ & IniFile$, IniPath$ & BakFile$
' copy "DATALENS.INI" to "DATALENS.BAK"
InFileNum = FREEFILE
OPEN IniPath$ & BakFile$ For INPUT AS InFileNum
OutFileNum = FREEFILE
OPEN IniPath$ & IniFile$ For Output AS OutFileNum
DO UNTIL EOF(InFileNum)
LINE INPUT #InFileNum, nextline
n = instr( 1, nextline, OldDLL$, 1 )
If n > 0 Then
'print "Found - ""QODBF"" "; str( n )
tmp$ = left$( nextline, n - 1 )
tmp$ = tmp$ & NewDLL$
tmp$ = tmp$ & mid$( nextline, n + len(OldDLL$) , len( nextline ) - n )
print #OutFileNum, tmp$
else
print #OutFileNum, nextline
End If
LOOP
'Print "End Of File found"
CLOSE
goto MOD_DL_EndFunction
MOD_DL_ErrHandler:
'print "Error: " & str( ERR ) & " on Line: " & str( ERL ) & " Msg: " & Error$
exit function
MOD_DL_EndFunction:
Lot_ModifyDataLensIni = SUCCESS
END FUNCTION