home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 February
/
PCWK0297.iso
/
lotus
/
english
/
winagent
/
install.dsk
/
SHARE.LSS
< prev
next >
Wrap
Text File
|
1995-01-25
|
213KB
|
6,469 lines
USE "TOOLKIT"
OPTION DECLARE
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
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_GetLotusiniPath (s$) AS INTEGER
DECLARE FUNCTION Lot_GetLotusappiniPath (s1$, s2$,s3$) 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 FUNCTION Lot_SaveShareConfigInInstallIni() AS INTEGER
DECLARE SUB CONSOLIDATELOTUSAPPDIRCB (hDlg%, CtrlId%, Classes$, Inst%)
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_GetSharedIniPathName() AS STRING
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 FUNCTION Lot_LocalGetPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
DECLARE SUB WriteODBC20INST ( Driver$, SQLLvl$, APILvl$, Usage$, Ext$, DrvVer$, Cnnct$ )
PUBLIC gNetCommDirPath AS STRING
PUBLIC gLotusIniPath AS STRING
PUBLIC gLotusappIniPath AS STRING
PUBLIC gLotusappDir AS STRING
PUBLIC gLotusBcfDir AS STRING
PUBLIC gConsolidateSize AS LONG
PUBLIC gMoveSize AS LONG
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
DIM lbLotusAppsize&, shareDir$, shareDrv$, possibleDrv$
DIM availSpace&, network$, cwd$, gInstallIniFile$, rc%, netLotusapp$
DIM rv%, ExistingCommonDir$, ExistingNetCommonDir$, notused%, SameFlag$
DIM source$, FLWPath$, drive$, RCDialog$, AutoLotusapp$
IF Lot_AreShareToolsSupported()=1 THEN
lbLotusAppSize& = CLNG(10485760)
shareDir$ = GetWindowsDir()+gLOTUSAPP$+"\"
shareDrv$ = MID$(shareDir$,1,1)
possibleDrv$ = Lot_GetLocalHardDrive(lbLotusAppSize&,"")
IF possibleDrv$ <> "" THEN
availSpace& = GetFreeSpaceForDrive(shareDrv$)
IF availSpace& < lbLotusAppSize& THEN
shareDir$ =possibleDrv$+gLOTUSAPP$+"\"
END IF
END IF
network$ = GetSymbolValue(SYM_NETWORK$)
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
IF network$ = gSERVER$ AND _
GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
SetSymbolValue SYM_LOTUSAPPDIR$,MID$(shareDir$,1,3)+"lotus\"+gLOTUSAPP$+"\"
ELSEIF network$ = gSERVER$ AND _
GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
SetSymbolValue SYM_LOTUSAPPDIR$,GetSymbolValue(SYM_BASEDIR$)+gLOTUSAPP$+"\"
ELSE
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
END IF
ELSE
AutoLotusapp$ = Lot_GetKeyValFromResponseFile("Lotusapp","LOTUSAPPDIR")
IF AutoLotusapp$ <> "" THEN
IF RIGHT$(AutoLotusapp$, 1) <> "\" THEN
AutoLotusapp$ = AutoLotusapp$+ "\"
END IF
SetSymbolValue SYM_LOTUSAPPDIR$,AutoLotusapp$
SetSymbolValue SYM_DEFAULT_LOTUSAPP$, shareDir$
ELSE
SetSymbolValue SYM_LOTUSAPPDIR$,shareDir$
END IF
END IF
SetSymbolValue SYM_LOTUSAPPDIR$+gNAME$, LdString(SID_SHARED_LOTUS_TOOLS)
IF network$ = gNODE$ THEN
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
ErrorMsg SID_ERR_INSTALLINI_CORRUPT, CHR$(10) + CHR$(10)+netLotusapp$
gEndStatementEncountered% = TRUE
EXIT FUNCTION
ELSE
IF SameFlag$ = "1" THEN
SetSymbolValue SYM_NETLOTUSAPP$, MID$(source$,1,1)+MID$(netLotusapp$,2)
ELSE
SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
END IF
END IF
ELSE
ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
gEndStatementEncountered% = TRUE
EXIT FUNCTION
END IF
END IF
gLotusIniPath$ = String$(256,0)
notused% = Lot_GetLotusiniPath(gLotusIniPath$)
gLotusappIniPath$=string$(256,0)
gLotusBcfDir$=string$(256,0)
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
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
notused% = Lot_GetLotusappiniPath(gLotusappIniPath$, GetSymbolValue(SYM_LOTUSAPPDIR$),gLotusBcfDir$)
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTRERR)
SetSymbolValue SYM_EXISTINGCOMMDIR$, ExistingCommonDir$
SetSymbolValue SYM_EXISTINGNETCOMMDIR$, ExistingNetCommonDir$
IF ExistingCommonDir$ <> "" THEN
SetSymbolValue SYM_LOTUSAPPEXISTS$, "1"
ELSE
SetSymbolValue SYM_LOTUSAPPEXISTS$, "0"
END IF
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
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
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
SetSymbolValue SYM_SQLSERVERNAME$, ""
SetSymbolValue SYM_PARADOXNETWORKINFO$, ""
DL_SetNotesDataPath
DL_SetOraclePath
END IF
InitSHARE = SUCCESS
END FUNCTION
PUBLIC FUNCTION Lot_RefreshLocalLotusapp () AS INTEGER
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()
IF Lot_AreShareToolsSupported()=1 THEN
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$
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
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
IF ExistingNetCommonDir$ <> "" THEN
lenNet% = LEN(ExistingNetCommonDir$) - 1
ELSE
lenNet% = 0
END IF
SectionPref$="Section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
DO
lDidProgramRefresh%=0
ExistingProgPath$ = GetIniKeyString(gLotusIniPath$,SectionName$,"Program Path")
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
IF ExistingNetCommonDir$ <> "" THEN
IF ExistingProgPath$ <> "" THEN
IF DoesDirExist(ExistingProgPath$) = 1 THEN
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")
IF lDidProgramRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
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")
IF lDidProgramRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Program")
END IF
END IF
END IF
END IF
END IF
lDidDataRefresh%=0
ExistingDataPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "Data Path")
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")
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")
IF lDidDataRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" Data")
END IF
END IF
END IF
END IF
END IF
lDidUserRefresh%=0
ExistingUserPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "User Path")
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")
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")
IF lDidUserRefresh% <> 0 THEN
lDidAnyRefresh%=1
Entry$=Lot_GetEntryFlag(SectionName$+" User")
END IF
END IF
END IF
END IF
END IF
lDidFilterRefresh%=0
ExistingFilterPath$ = GetIniKeyString(gLotusIniPath$,SectionName$, "Filter Path")
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")
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")
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
DIM NetworkIns$, ret%, SaveCursor%, ExistingCommonDir$, LotusAppIniPath$
DIM result%, secResult%, FLWpath$, ImprovPath$, RC$, notused%
IF Lot_AreShareToolsSupported()=1 THEN
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$ <> gSERVER$ THEN
gLotusIniPath$ = GetWindowsDir()+gLOTUSINI$
ret% = DoesFileExist(gLotusIniPath$, femExists)
IF ret% <> 0 THEN
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$)
IF ValidCommDir% = 1 THEN
IF GetFreeSpaceForDrive(MID$(ExistingCommonDir$,1,1)) > gConsolidateSize& THEN
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
notused% = RegisterCallback("SHARE","CONSOLIDATEMOVECOPYCB")
RC$=PopupModalDlg (DBM_CONSOLIDATE_MOVECOPY, DBM_CONSOLIDATE_MOVECOPY)
ELSE
notused% = Lot_AutoConsolidateMoveCopy()
END IF
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
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)+LdString(SID_ERR_SHARE_CONSOLID1)
END IF
END IF
END IF
ELSE
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
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
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
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)+LdString(SID_ERR_SHARE_CONSOLID1)
END IF
END IF
END IF
END IF
ELSE
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
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
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
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)+LdString(SID_ERR_SHARE_CONSOLID1)
END IF
END IF
END IF
END IF
END IF
ELSE
gConsolidateSize&=CLNG(0)
END IF
END IF
END IF
PreConfigSHARE = SUCCESS
END FUNCTION
FUNCTION Lot_GetNetLotusappSource(Chapter$) AS STRING
DIM NetworkIns$, prodDir$, DestSpec$
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = GetSymbolValue(SYM_STF_SRCDIR$)
DestSpec$ = Lot_GetChapterValStr(Chapter$, F_DESTDIR)
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
DIM NetworkIns$, cwd$, gInstallIniFile$, ChapterPref$, ChapterNumber%
DIM ChapterTag$, ChapterID$, rc%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
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
ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
gEndStatementEncountered% = TRUE
EXIT FUNCTION
END IF
END IF
Lot_IsTheChapterInstalled = 0
END FUNCTION
FUNCTION Lot_GetNetCommDirPath (gLotusIniPath$,gNetCommDirPath$) AS STRING
DIM gLotusIniExist%
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
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_SQL)
Lot_IsSQLSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsParadoxSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_PARADOX)
Lot_IsParadoxSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsdBaseSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_DBASE)
Lot_IsdBaseSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsInformixSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_INFORMIX)
Lot_IsInformixSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsIBMdBaseManagerSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DBM)
Lot_IsIBMdBaseManagerSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsNotesSQLSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_NOTESSQL)
Lot_IsNotesSQLSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsSpreadSheetSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_SPREADSHEET)
Lot_IsSpreadSheetSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsIBM_DB2Selected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DB2)
Lot_IsIBM_DB2Selected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsDB2_SQLDS_Selected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_DB2_SQLDS)
Lot_IsDB2_SQLDS_Selected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsDB2_SQL400_Selected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_DB2_SQL400)
Lot_IsDB2_SQL400_Selected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsIBM_DDCS2_Selected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_IBM_DDCS_2)
Lot_IsIBM_DDCS2_Selected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCDriverSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_ODBCD)
Lot_IsODBCDriverSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCSpreadSheetSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_SPREADSHEET)
Lot_IsODBCSpreadSheetSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCTextDriverSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_TEXTDRVR)
Lot_IsODBCTextDriverSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsOracleSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_DATA_LENS_ORACLE)
Lot_IsOracleSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCBtrieveSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_Btrieve)
Lot_IsODBCBtrieveSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCDB2Selected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_DB2)
Lot_IsODBCDB2Selected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCFoxbaseSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_FOXBASE)
Lot_IsODBCFoxbaseSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCAccessSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_ACCESS)
Lot_IsODBCAccessSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCParadoxSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_PARADOX)
Lot_IsODBCParadoxSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCOracleSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_Oracle)
Lot_IsODBCOracleSelected=0
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 FUNCTION
PUBLIC FUNCTION Lot_IsODBCSQLServerSelected () AS INTEGER
DIM buf1$, CurrChpt$, ChapterName$
buf1$ = LdString(SID_SHARED_ODBC_SQLSERVER)
Lot_IsODBCSQLServerSelected=0
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 FUNCTION
PUBLIC FUNCTION ConfigSHARE () AS INTEGER
DIM NetworkIns$, notused%
notused% = Lot_GetAllSharedInstalled()
gLotusappDir=string$(256,0)
gLotusappDir=GetSymbolValue(SYM_LOTUSAPPDIR$)
gLotusappIniPath=string$(256,0)
gLotusBcfDir=string$(256,0)
notused% = Lot_GetLotusappiniPath(gLotusappIniPath, gLotusappDir, gLotusBcfDir)
IF Lot_AreShareToolsSupported()=1 THEN
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$ THEN
notused% = Lot_WriteIniFiles()
ELSEIF NetworkIns$ = gSERVER$ THEN
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
IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gSERVER$) AND _
gDataLensInstalled = 1 THEN
notused% = Lot_WriteLotusBcfFile()
END IF
IF NetworkIns$ = gSTANDARD$ AND gDataLensInstalled = 1 THEN
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
DIM grouptitle$,Lotusappdir$,dlgeditor$,Network$
Network$ = GetSymbolValue(SYM_NETWORK$)
grouptitle$ = Reg_GetProgManagerGroupName(1)
If network$ = gSTANDARD$ Then
If (FIsKeywordinCopyList ("SHRDLGPRG") = 1) Then
Lotusappdir$= GetSymbolValue(SYM_LOTUSAPPDIR$)
dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
CreateProgmanItem grouptitle$, LdString(SID_LOTDIALOGEDITOR), dlgeditor$, "", cmoOverwrite
End If
ElseIf network$ = gNODE$ Then
If Lot_IsTheFeatureInstalled("SHRDLGPRG") = 1 Then
Lotusappdir$= GetSymbolValue(SYM_NETLOTUSAPP$)
dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
CreateProgmanItem grouptitle$, LdString(SID_LOTDIALOGEDITOR), dlgeditor$, "", cmoOverwrite
End If
End If
AddSHAREIcons=SUCCESS
END FUNCTION
FUNCTION Lot_DoConsolidateFilesInLotusappIni(LotusappIniPath$,NewDestDir$) AS INTEGER
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()
ExistingCommonDir$ = GetSymbolValue(SYM_EXISTINGCOMMDIR$)
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
DO
lDidProgramMove%=0
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
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
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
lDidDataMove%=0
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
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
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
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
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
SpellUserPath$ = GetIniKeyString(gLotusIniPath$, "Spell Checker", "User Path")
IF LCASE$(SpellUserPath$) <> gLotusappDir$+"spell" THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path",gLotusappDir$+"spell",cmoOverwrite
END IF
FileSize& = GetSizeOfFile(LotusappIniPath$)
IF ExistingCommonDir$ <> NewDestDir$ THEN
notused% = Lot_DoVerDateValidation(ExistingCommonDir$,NewDestDir$,gLOTUSAPPINI$,FileSize&)
END IF
notused% = FRemoveDir(Lot_TrimEndSlash(ExistingCommonDir$))
Lot_DoConsolidateFilesInLotusappIni=1
ELSE
Lot_DoConsolidateFilesInLotusappIni=0
END IF
END FUNCTION
FUNCTION Lot_DoShareConsolidation(gLotusIniPath$,NetworkIns$,NewDestDir$) AS INTEGER
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)
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
DO
lDidProgramMove%=0
ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
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
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
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
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
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
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
SpellUserPath$ = GetIniKeyString(gLotusIniPath$, "Spell Checker", "User Path")
IF LCASE$(SpellUserPath$) <> gLotusappDir$+"spell" THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "User Path",gLotusappDir$+"spell",cmoOverwrite
END IF
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
DIM WinIniDir$, NewDestSubDir$, AnNoteEntry$, AnnoteStr$, SoundEntry$
DIM SoundStr$, MediaEntry$, MediaStr$, ScreenCamEntry$, ScreenCamStr$
WinIniDir$ = MakePath(GetWindowsDir(), gWININI$)
IF Entry$ = "MULTIMEDIAPROGRAM" 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
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
Lot_UpdateWinIni=1
END FUNCTION
FUNCTION Lot_IsExistingLotusappDirValid(BYVAL ExistingCommonDir$) AS INTEGER
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
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
DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, ExistingNetCommonDir$
DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
DIM ExistingProgPath$, ExistingDataPath$, ExistingUserPath$, ExistingFilterPath$
DIM LotusAppIniPath$
gConsolidateSize&=CLNG(0)
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
ValidCommDir% = Lot_IsExistingLotusappDirValid(ExistingCommonDir$)
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
DO
ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
IF LEN(ExistingProgPath$) > 0 THEN
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&)
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&)
END IF
ELSE
IF (ExistingProgPath$ <> WinDir$ AND _
MID$(ExistingProgPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gConsolidateSize&)
END IF
END IF
END IF
END IF
ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
IF LEN(ExistingDataPath$) > 0 THEN
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&)
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&)
END IF
ELSE
IF (ExistingDataPath$ <> WinDir$ AND _
MID$(ExistingDataPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Data",gConsolidateSize&)
END IF
END IF
END IF
END IF
ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
IF LEN(ExistingUserPath$) > 0 THEN
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&)
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&)
END IF
ELSE
IF (ExistingUserPath$ <> WinDir$ AND _
MID$(ExistingUserPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" User",gConsolidateSize&)
END IF
END IF
END IF
END IF
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
IF LEN(ExistingFilterPath$) > 0 THEN
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&)
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&)
END IF
ELSE
IF (ExistingFilterPath$ <> WinDir$ AND _
MID$(ExistingFilterPath$,1,LEN(ExistingCommonDir$)) <> ExistingCommonDir$) THEN
gConsolidateSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Filter",gConsolidateSize&)
END IF
END IF
END IF
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
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_GetSharedIniPathName() AS STRING
DIM cwd$,gSharedIniFile$
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
gSharedIniFile$ = MakePath(cwd$,gSHAREDINI$)
Lot_GetSharedIniPathName=gSharedIniFile$
END FUNCTION
FUNCTION Lot_ChkLotusIniSizePath(PathToCheck$,ExistingNetCommonDir$,WinDir$,newLotusappDir$) AS INTEGER
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
DIM gSharedIniFile$, WinDir$, ExistingCommonDir$, ExistingNetCommonDir$
DIM SectionPref$, SectionNumber%, SectionTag$, SectionName$
DIM ExistingProgPath$, ExistingDataPath$, ExistingUserPath$, ExistingFilterPath$
DIM LotusAppIniPath$,chk%
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
ExistingNetCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Net Common Directory",NULLSTROK,INVALIDSTROK)
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
DO
ExistingProgPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Program Path",NULLSTROK,INVALIDSTROK)
chk%=Lot_ChkLotusIniSizePath(ExistingProgPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
END IF
ExistingDataPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Data Path",NULLSTROK,INVALIDSTROK)
chk%=Lot_ChkLotusIniSizePath(ExistingDataPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
END IF
ExistingUserPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "User Path",NULLSTROK,INVALIDSTROK)
chk%=Lot_ChkLotusIniSizePath(ExistingUserPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
END IF
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,SectionName$, "Filter Path",NULLSTROK,INVALIDSTROK)
chk%=Lot_ChkLotusIniSizePath(ExistingFilterPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingFilterPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
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
DIM gSharedIniFile$, WinDir$, SectionPref$
DIM SectionNumber%, SectionTag$, SectionName$
DIM recordedpath$, existingprogpath$, existingdatapath$, existinguserpath$
DIM existingfilterpath$
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
DO
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
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&)
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&)
END IF
END IF
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$)
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
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
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
DIM NetworkIns$, ret%,ret1%, SaveCursor%, ExistingCommonDir$, LotusAppIniPath$
DIM result%, secResult%, FLWpath$, ImprovPath$, RC$, notused%,ExistingNetCommonDir$
gMoveSize&=CLNG(0)
IF Lot_AreShareToolsSupported()=1 THEN
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$ <> gSERVER$ THEN
ret% = DoesFileExist(gLotusIniPath$, femExists)
IF ret% <> 0 THEN
SaveCursor%=ShowWaitCursor()
gMoveSize&=Lot_GetInLotusIniSizeOfFilesToMove(gLotusIniPath$,newLotusapp$,gMoveSize&)
RestoreCursor SaveCursor%
ExistingCommonDir$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Lotus Applications", "Common Directory",NULLSTROK,INVALIDSTRERR)
LotusappIniPath$=MakePath(ExistingCommonDir$,gLOTUSAPPINI$)
ret1% = DoesFileExist(gLotusappIniPath$, femExists)
IF ret1% <> 0 THEN
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
END IF
END IF
End IF
Lot_GetTheShareToolsSizeToMove=gMoveSize&
END FUNCTION
FUNCTION Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommonDir$,WinDir$) AS STRING
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
DIM gSharedIniFile$, WinDir$, SectionPref$
DIM SectionNumber%, SectionTag$, SectionName$
DIM recordedpath$, existingprogpath$, existingdatapath$, existinguserpath$
DIM existingfilterpath$,chk%
gSharedIniFile$ = Lot_GetSharedIniPathName()
WinDir$=GetWindowsDir()
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(gSharedIniFile$,"Sections", SectionTag$)
DO
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Program Path")
ExistingProgPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
chk%=Lot_ChkLotusIniSizePath(ExistingProgPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingProgPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
END IF
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "Data Path")
ExistingDataPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
chk%=Lot_ChkLotusIniSizePath(ExistingDataPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingDataPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
END IF
RecordedPath$ = GetIniKeyString(LotusappIniPath$,SectionName$, "User Path")
ExistingUserPath$ = Lot_MakeAPathFromLotusappIni(RecordedPath$,ExistingCommDir$,WinDir$)
chk%=Lot_ChkLotusIniSizePath(ExistingUserPath$,ExistingNetCommonDir$,WinDir$,newLotusappDir$)
IF chk% = 1 THEN
gMoveSize&=Lot_GetFileSize(ExistingUserPath$,gSharedIniFile$,SectionName$+" Program",gMoveSize&)
END IF
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&)
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
DIM entryflag$, currchpt$, sharedid$, chapterspec$, source$, dest$
DIM FeatureName$,WinDir$,WinSysDir$
WinDir$=GetWindowsDir()
WinSysDir$ = GetSymbolValue(SYM_WINSYSDIR$)
EntryFlag$=Lot_GetEntryFlag(EntryName$)
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)
Source$ = Lot_GetNetLotusappSource(CurrChpt$)
Dest$ = Lot_GetLocalLotusappDest(EntryFlag$,DestPath$)
AddSectionFilesToCopyList ChapterSpec$,Source$,Dest$
AddListItem "REFRESHEDENTRIES", EntryFlag$
END IF
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
Lot_AddSectionToNodeList = SUCCESS
END FUNCTION
FUNCTION Lot_GetLocalLotusappDest(EntryFlag$,DestPath$) AS STRING
DIM subdestpath$,lendest%,lensub%,existingfilterpath$
SELECT CASE EntryFlag$
case "SPELLCHECKERDATA"
SubDestPath$="spell\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "SPELLCHECKERPROGRAM"
SubDestPath$="spell\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
LCASE$(MID$(DestPath$,lenDest%-lenSub%+1,lenDest%)) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "SPELLCHECKERUSER"
Lot_GetLocalLotusappDest = DestPath$
case "CONTAINERFILEPROGRAM"
Lot_GetLocalLotusappDest = DestPath$
case "INFOBOXPROGRAM"
Lot_GetLocalLotusappDest = DestPath$
case "TOOLSDATA"
Lot_GetLocalLotusappDest = DestPath$
case "ICONPALETTEPROGRAM"
Lot_GetLocalLotusappDest = DestPath$
case "STATUSBARPROGRAM"
Lot_GetLocalLotusappDest = DestPath$
case "TOOLSPROGRAM"
SubDestPath$="tools\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "DATALENSPROGRAM"
SubDestPath$="datalens\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "DATALENSDATA"
SubDestPath$="datalens\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "DIALOGEDITORPROGRAM"
SubDestPath$="dialoged\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "USERNAMESERVICESPROGRAM"
SubDestPath$="uns\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "MULTIMEDIAPROGRAM"
SubDestPath$="multimed\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "MULTIMEDIADATA"
SubDestPath$="multimed\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "GRAPHICSFILEFILTERSPROGRAM"
SubDestPath$="filters\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "GRAPHICSFILEFILTERSFILTER"
ExistingFilterPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"Graphics File Filters", "Filter Path",NULLSTROK,INVALIDSTROK)
IF ExistingFilterPath$="" THEN
SubDestPath$="filters\"
ELSE
SubDestPath$="gphflt\"
END IF
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "DOCUMENTFILEFILTERSPROGRAM"
SubDestPath$="excelflt\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "DOCUMENTFILEFILTERSFILTER"
SubDestPath$="docflt\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "HELPPROGRAM"
SubDestPath$="help\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "HELPDATA"
SubDestPath$="help\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "LOTUSSCRIPTPROGRAM"
SubDestPath$="script\"
lenDest% = LEN(DestPath$)
lenSub%=LEN(SubDestPath$)
IF lenDest% > lenSub% AND _
MID$(DestPath$,lenDest%-lenSub%+1,lenDest%) = SubDestPath$ THEN
Lot_GetLocalLotusappDest = MID$(DestPath$, 1, lenDest%-lenSub%)
ELSE
Lot_GetLocalLotusappDest = DestPath$
END IF
case "LOTUSDIALOGSPROGRAM"
Lot_GetLocalLotusappDest = DestPath$
case "MAILENABLINGPROGRAM"
Lot_GetLocalLotusappDest = DestPath$
case ""
END SELECT
END FUNCTION
FUNCTION Lot_MoveFiles(SourcePath$,gSharedIniFile$,EntryName$,DestPath$) AS INTEGER
DIM entryflag$,filepref$,filenumber%,filetag$,filename$,funcret%
DIM sourcepathlen%,filepath$,fileexist%,filesize&,subdestpath$,ret%
DIM existingfilterpath$, tmpPath$
EntryFlag$=Lot_GetEntryFlag(EntryName$)
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
FileSize& = GetSizeOfFile(FilePath$)
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"
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\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "HELPDATA"
SubDestPath$=DestPath$+"help\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "LOTUSSCRIPTPROGRAM"
SubDestPath$=DestPath$+"script\"
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "LOTUSDIALOGSPROGRAM"
SubDestPath$=DestPath$
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
END IF
case "MAILENABLINGPROGRAM"
SubDestPath$=DestPath$
ret% = Lot_DoVerDateValidation(SourcePath$,SubDestPath$,FileName$,FileSize&)
IF ret% = 1 THEN
FuncRet% = 1
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
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"
ELSEIF EntryName$="Help Data" THEN
EntryFlag$="HELPDATA"
ELSEIF EntryName$="LotusScript Program" THEN
EntryFlag$="LOTUSSCRIPTPROGRAM"
ELSEIF EntryName$="Lotus Dialogs Program" THEN
EntryFlag$="LOTUSDIALOGSPROGRAM"
ELSEIF EntryName$="Mail Enabling Program" THEN
EntryFlag$="MAILENABLINGPROGRAM"
ELSE
EntryFlag$=""
END IF
Lot_GetEntryFlag=EntryFlag$
END FUNCTION
FUNCTION Lot_DoVerDateValidation(Path$,SubDestPath$,FileName$,FileSize&) AS INTEGER
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%
SourcePath$ = MakePath(Path$, FileName$)
DestinationPath$ = MakePath(SubDestPath$, FileName$)
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
IF DoesFileExist(DestinationPath$,femExists)=1 THEN
SourceFileVersion$=GetVersionOfFile(SourcePath$)
DestFileVersion$=GetVersionOfFile(DestinationPath$)
IF SourceFileVersion$="" OR DestFileVersion$="" THEN
SourceFileDate$=GetDateOfFile(SourcePath$)
DestFileDate$=GetDateOfFile(DestinationPath$)
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$)
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
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret%=1
END IF
ELSE
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret%=1
END IF
ELSE
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)
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
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret%=1
ELSE
notused% = Lot_DoDelete(SourcePath$,FileName$)
Ret% = 1
END IF
END IF
ELSE
Ret%= Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,FileSize&)
END IF
Lot_DoVerDateValidation=Ret%
END FUNCTION
FUNCTION Lot_DoDelete(SourcePath$,FileName$) AS INTEGER
DIM fileexist%
IF GetSymbolValue("SYM_MOVE") = "1" THEN
RemoveFile SourcePath$, cmoNone
END IF
FileExist%=DoesFileExist(SourcePath$,femExists)
IF FileExist%=1 THEN
Lot_DoDelete=0
ELSE
Lot_DoDelete=1
END IF
END FUNCTION
FUNCTION Lot_DoCopyDelete(SourcePath$,DestinationPath$,FileName$,SourceFileSize&) AS INTEGER
DIM sourcefiledate$,destfilesize&,thedateisset%,fileexist%
SourceFileDate$=GetDateOfFile(SourcePath$)
CopyFile SourcePath$, DestinationPath$, cmoCopy, 0
DestFileSize&=GetSizeOfFile(DestinationPath$)
IF DestFileSize&=SourceFileSize& THEN
theDateIsSet%=Lot_SetDateOfFile(DestinationPath$, SourceFileDate$)
IF theDateIsSet% = 0 THEN
END IF
IF GetSymbolValue("SYM_MOVE") = "1" THEN
RemoveFile SourcePath$, cmoNone
END IF
FileExist%=DoesFileExist(SourcePath$,femExists)
IF FileExist%=1 THEN
END IF
Lot_DoCopyDelete=1
ELSE
Lot_DoCopyDelete=0
END IF
END FUNCTION
FUNCTION Lot_SaveShareConfigInInstallIni() AS INTEGER
DIM networkins$,proddir$,ginstallinifile$,commondir$,proddrv$,commdrv$
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
commonDir$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
CreateIniKeyValue gInstallIniFile$, "Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$, Lot_TrimEndSlash(commonDir$), cmoOverwrite
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
DIM fileexist%,filepref$,filenumber%,filetag$,filename$,filepath$,filesize&
FileExist% = DoesFileExist(gSharedIniFile$, femExists)
FilePref$ = "file"
FileNumber% = 1
FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
FileName$ = GetIniKeyString(gSharedIniFile$, EntryName$, FileTag$)
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
FileSize& = GetSizeOfFile(FilePath$)
gConsolidateSize& = gConsolidateSize& + FileSize&
ELSE
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
DIM network$,currchpt$,sharedid$
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSTANDARD$ THEN
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
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 IF
END FUNCTION
FUNCTION Lot_WriteLotusBcfFile()AS INTEGER
DIM bufdn$,bufdl$,bufdd$,bufdc$,bufac$,sqlservername$,networkinfo$, notused%
IF Lot_IsInformixSelected() = 1 THEN
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
END IF
IF Lot_IsSQLSelected() =1 THEN
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
END IF
IF Lot_IsParadoxSelected() =1 THEN
bufDN$ = LdString(SID_DATALENS_PARADOX_DN)
bufDL$ = LdString(SID_DATALENS_PARADOX_DL)
bufDD$ = LdString(SID_DATALENS_PARADOX_DD)
bufDC$=GetSymbolValue(SYM_PARADOXNETWORKINFO$)
IF LEN(bufDC$) > 255 THEN
bufDC$=MID$(bufDC$,1,255)
END IF
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
END IF
IF Lot_IsdBaseSelected() =1 THEN
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
END IF
IF Lot_IsIBMdBaseManagerSelected() = 1 THEN
bufDN$ = LdString(SID_DATALENS_EEDM_DN)
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
END IF
IF Lot_IsNotesSQLSelected() = 1 THEN
bufDN$ = LdString(SID_DATALENS_NOTESSQL_DN)
bufDL$ = LdString(SID_DATALENS_NOTESSQL_DL)
bufDC$ = LdString(SID_DATALENS_NOTESSQL_DC)
bufDD$ = LdString(SID_DATALENS_NOTESSQL_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
END IF
IF Lot_IsSpreadSheetSelected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_SPREADSHEET_DN)
bufDL$ = LdString(SID_DATALENS_SPREADSHEET_DL)
bufDC$ = LdString(SID_DATALENS_SPREADSHEET_DC)
bufDD$ = LdString(SID_DATALENS_SPREADSHEET_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
END IF
IF Lot_IsIBM_DB2Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_IBM_DB2_DN)
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
END IF
IF Lot_IsDB2_SQLDS_Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_DB2_SQLDS_DN)
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
END IF
IF Lot_IsDB2_SQL400_Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_DB2_SQL400_DN)
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
END IF
IF Lot_IsIBM_DDCS2_Selected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_IBM_DDCS_2_DN)
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
END IF
IF Lot_IsODBCDriverSelected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_ODBCD_DN)
bufDL$ = LdString(SID_DATALENS_ODBCD_DL)
bufDD$ = LdString(SID_DATALENS_ODBCD_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
IF Lot_IsODBCSpreadSheetSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_SPREADSHEET_DN)
bufDL$ = LdString(SID_ODBC_SPREADSHEET_DL)
bufDC$ = LdString(SID_ODBC_SPREADSHEET_DC)
bufDD$ = LdString(SID_ODBC_SPREADSHEET_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
END IF
IF Lot_IsODBCTextDriverSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_TEXTDRVR_DN)
bufDL$ = LdString(SID_ODBC_TEXTDRVR_DL)
bufDC$ = LdString(SID_ODBC_TEXTDRVR_DC)
bufDD$ = LdString(SID_ODBC_TEXTDRVR_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
END IF
IF Lot_IsOracleSelected () = 1 THEN
bufDN$ = LdString(SID_DATALENS_ORACLE_DN)
bufDL$ = LdString(SID_DATALENS_ORACLE_DL)
bufDD$ = LdString(SID_DATALENS_ORACLE_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
IF Lot_IsODBCBtrieveSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_BTRIEVE_DN)
bufDL$ = LdString(SID_ODBC_BTRIEVE_DL)
bufDD$ = LdString(SID_ODBC_BTRIEVE_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
IF Lot_IsODBCDB2Selected () = 1 THEN
bufDN$ = LdString(SID_ODBC_DB2_DN)
bufDL$ = LdString(SID_ODBC_DB2_DL)
bufDC$ = LdString(SID_ODBC_DB2_DC)
bufDD$ = LdString(SID_ODBC_DB2_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,bufDC$,"",bufDD$)
ELSE
END IF
IF Lot_IsODBCFoxbaseSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_FOXBASE_DN)
bufDL$ = LdString(SID_ODBC_FOXBASE_DL)
bufDD$ = LdString(SID_ODBC_FOXBASE_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
IF Lot_IsODBCAccessSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_ACCESS_DN)
bufDL$ = LdString(SID_ODBC_ACCESS_DL)
bufDD$ = LdString(SID_ODBC_ACCESS_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
IF Lot_IsODBCParadoxSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_PARADOX_DN)
bufDL$ = LdString(SID_ODBC_PARADOX_DL)
bufDD$ = LdString(SID_ODBC_PARADOX_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
IF Lot_IsODBCOracleSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_ORACLE_DN)
bufDL$ = LdString(SID_ODBC_ORACLE_DL)
bufDD$ = LdString(SID_ODBC_ORACLE_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
IF Lot_IsODBCSQLServerSelected () = 1 THEN
bufDN$ = LdString(SID_ODBC_SQLSERVER_DN)
bufDL$ = LdString(SID_ODBC_SQLSERVER_DL)
bufDD$ = LdString(SID_ODBC_SQLSERVER_DD)
notused% = BcfMod(gLotusBcfDir,bufDN$,bufDL$,"","",bufDD$)
ELSE
END IF
Lot_WriteLotusBcfFile = SUCCESS
END FUNCTION
FUNCTION Lot_BackupLotusBcfFile()AS INTEGER
DIM dest$,network$,filepath$,backuppath$
Dest$=GetSymbolValue(SYM_LOTUSAPPDIR$)+"\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
DIM inientrylistlen%,network$,entrycount%,entry$,notused%
IniEntryListLen% = GetListLength(SYM_INIENTRY$)
IF IniEntryListLen%<>0 THEN
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Common Directory", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
END IF
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gNODE$ THEN
CreateIniKeyValue gLotusIniPath$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(GetSymbolValue(SYM_NETLOTUSAPP$)), cmoOverwrite
END IF
FOR EntryCount% = 1 TO IniEntryListLen%
Entry$ = GetListItem(SYM_INIENTRY$,EntryCount%)
IF Entry$<>"" THEN
notused% = Lot_WriteEntry(Entry$,0)
END IF
Next
Lot_WriteIniFiles = SUCCESS
END FUNCTION
FUNCTION Lot_WriteEntry(Entry$,FromPreConfigFlag%) AS INTEGER
DIM network$,gnetlotusappdir$,theentrywasrefreshed as integer, retstr$
DIM retdatastr$, retuserstr$,notused%,MailApplication$
network$ = GetSymbolValue(SYM_NETWORK$)
gLotusappDir$=GetSymbolValue(SYM_LOTUSAPPDIR$)
gNetLotusappDir$=GetSymbolValue(SYM_NETLOTUSAPP$)
IF network$=gNODE$ THEN
TheEntryWasRefreshed = Lot_TheEntryWasRefreshed(Entry$)
END IF
SELECT CASE Entry$
case "IVCPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
END IF
case "CONTAINERFILEPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Container File", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Container File", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
END IF
case "DATALENSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "DataLens", "Program Path", gLotusappDir$+"datalens", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "DataLens", "Program Path", gNetLotusappDir$+"datalens", cmoOverwrite
END IF
case "DATALENSDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "DataLens", "Data Path", gLotusappDir$+"datalens", cmoOverwrite
END IF
case "DIALOGEDITORPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Dialog Editor", "Program Path", gLotusappDir$+"dialoged", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Dialog Editor", "Program Path", _
gNetLotusappDir$+"dialoged", cmoOverwrite
END IF
case "DESKTOP"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
END IF
case "DOCUMENTFILEFILTERSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Document File Filters", "Program Path", _
gLotusappDir$+"excelflt\excelflt.flt", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Document File Filters", "Program Path", _
gNetLotusappDir$+"excelflt\excelflt.flt", cmoOverwrite
END IF
case "GRAPHICSFILEFILTERSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Program Path", _
gLotusappDir$+"filters\isgdi9.dll",cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Program Path", _
gNetLotusappDir$+"filters\isgdi9.dll",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)
IF retstr$<>"" THEN
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
gLotusappDir$+"gphflt", cmoOverwrite
END IF
ELSE
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
gLotusappDir$+"gphflt", cmoOverwrite
END IF
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Graphics File Filters", "Filter Path", _
gLotusappDir$+"gphflt", cmoOverwrite
END IF
case "ICONPALETTEPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Icon Palette", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Icon Palette", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
END IF
case "INFOBOXPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "InfoBox", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "InfoBox", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
END IF
case "SCRIPTPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gLotusappDir$+"script", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gNetLotusappDir$+"script", cmoOverwrite
END IF
case "MULTIMEDIAPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Program Path", gLotusappDir$+"multimed", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Program Path", gNetLotusappDir$+"multimed", cmoOverwrite
END IF
IF network$=gSTANDARD$ OR network$=gNODE$ THEN
notused%=Lot_WriteOLERegForShare(Entry$,FromPreConfigFlag%)
END IF
case "MULTIMEDIADATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Data Path", gLotusappDir$+"multimed", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Multimedia", "Data Path", gNetLotusappDir$+"multimed", cmoOverwrite
END IF
case "SPELLCHECKERPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Program Path", gLotusappDir$+"spell", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Program Path", gNetLotusappDir$+"spell", cmoOverwrite
END IF
case "SPELLCHECKERDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Data Path", gLotusappDir$+"spell", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Spell Checker", "Data Path", gNetLotusappDir$+"spell", cmoOverwrite
END IF
case "SPELLCHECKERUSER"
IF FromPreConfigFlag% = 0 THEN
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
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
CreateIniKeyValue gLotusIniPath$, "Status Bar", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Status Bar", "Program Path", Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
END IF
case "TOOLSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Program Path", gLotusappDir$+"tools", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Program Path", gNetLotusappDir$+"tools", cmoOverwrite
END IF
case "TOOLSDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Data Path", Lot_TrimEndSlash(GetSymbolValue(SYM_WINDIR$)), cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "TOOLS", "Data Path", Lot_TrimEndSlash(GetSymbolValue(SYM_WINDIR$)), cmoOverwrite
END IF
case "USERNAMESERVICESPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "User Name Service", "Program Path", gLotusappDir$+"uns", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "User Name Service", "Program Path", gNetLotusappDir$+"uns", cmoOverwrite
END IF
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
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
END IF
case "EXCELFLT"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
END IF
case "HELPPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Help", "Program Path", gLotusappDir$+"help", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Help", "Program Path", gNetLotusappDir$+"help", cmoOverwrite
END IF
case "HELPDATA"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Help", "Data Path", gLotusappDir$+"help", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Help", "Data Path", gNetLotusappDir$+"help", cmoOverwrite
END IF
case "LOTUSSCRIPTPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", gLotusappDir$+"script", cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "LotusScript", "Program Path", _
gNetLotusappDir$+"script", cmoOverwrite
END IF
case "LOTUSDIALOGSPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Lotus Dialogs", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Lotus Dialogs", "Program Path", _
Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
END IF
case "MAILENABLINGPROGRAM"
IF network$=gSTANDARD$ OR _
(network$=gNODE$ AND TheEntryWasRefreshed=1) THEN
CreateIniKeyValue gLotusIniPath$, "Mail Enabling", "Program Path", Lot_TrimEndSlash(gLotusappDir$), cmoOverwrite
ELSEIF network$=gNODE$ AND TheEntryWasRefreshed=0 THEN
CreateIniKeyValue gLotusIniPath$, "Mail Enabling", "Program Path", _
Lot_TrimEndSlash(gNetLotusappDir$), cmoOverwrite
END IF
END SELECT
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
DIM RefreshListLen%,EntryCount%,RefreshEntry$
RefreshListLen% = GetListLength("REFRESHEDENTRIES")
IF RefreshListLen%=0 THEN
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
DIM LotusAppDir$,NetLotusAppDir$,NetworkIns$
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"
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
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
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
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
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
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
FUNCTION Lot_GetLotusiniPath(gLotusIniPath$) AS INTEGER
gLotusIniPath$ = MakePath( GetWindowsDir(), gLOTUSINI$)
Lot_GetLotusiniPath = SUCCESS
END FUNCTION
FUNCTION Lot_GetLotusappiniPath(gLotusappIniPath$, gLotusappDir$, gLotusBcfDir$) AS INTEGER
gLotusappIniPath$=gLotusappDir$+"lotusapp.ini"
gLotusBcfDir$ = gLotusappDir$+"datalens\"+ gLOTUSBCF$
Lot_GetLotusappiniPath = SUCCESS
END FUNCTION
SUB CONSOLIDATELOTUSAPPDIRCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC gDriveIndex%, dirChanged%
DIM display$,dirToChange$,drive$,yesno%
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$ = LCASE$(GetSymbolValue(SYM_LOTUSAPPDIR$))
gDriveIndex%=SelectDriveCombo ("IDC_COMBO1",dirToChange$)
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(dirToChange$)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
case "IDC_COMBO1"
dirChanged%=TRUE
gDriveIndex% = Inst%
case "IDC_EDIT"
dirChanged% = TRUE
case "IDC_OK"
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
ELSE
IF GetFreeSpaceForDrive(MID$(dirToChange$,1,1)) < gConsolidateSize& THEN
ShowPathError SID_DRV_NOTENOUGHSPACE, 0, dirToChange$
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
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
yesno% = DoMsgBox(LdString(SID_SHAREDCONFIRMATION1) + " " + dirToChange$ + _
LdString(SID_SHAREDCONFIRMATION2),LdString(SID_SHAREDCONFIRMATION0), _
MB_YESNO)
If yesno% = 7 Then
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
End if
SetSymbolValue "SYM_MOVE", "1"
SetSymbolValue "SYM_COPY", "0"
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"
dirToChange$ = LCASE$(MID$(GetListItem("IDC_COMBO1",gDriveIndex%), 1, 2)+ _
GetListItem("IDC_EDIT", 1))
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
ELSE
IF GetFreeSpaceForDrive(MID$(dirToChange$,1,1)) < gConsolidateSize& THEN
ShowPathError SID_DRV_NOTENOUGHSPACE, 0, dirToChange$
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
END IF
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
yesno% = DoMsgBox(LdString(SID_SHAREDCONFIRMATION1) + " " + dirToChange$ + _
LdString(SID_SHAREDCONFIRMATION2),LdString(SID_SHAREDCONFIRMATION0), _
MB_YESNO)
If yesno% = 7 Then
SetListItem "__LASTSTATUS", 1, "Q"
GOTO EXIT_CONSOLIDATELOTUSAPPDIR
End if
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%)
STATIC gDriveIndex%, dirChanged%
DIM display$,dirToChange$,drive$,yesno%
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"
SetSymbolValue "SYM_MOVE", "1"
SetSymbolValue "SYM_COPY", "0"
GOTO EXIT_CONSOLIDATEMOVECOPY
case "IDC_CONTINUE"
SetSymbolValue "SYM_MOVE", "0"
SetSymbolValue "SYM_COPY", "1"
GOTO EXIT_CONSOLIDATEMOVECOPY
END SELECT
EXIT_CONSOLIDATEMOVECOPY:
END SUB
SUB ISTHISNETLOTUSAPPCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC gDriveIndex%, dirChanged%, ExistingCommonDir$
DIM display$,dirToChange$,drive$,yesno%
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"
GOTO EXIT_ISTHISNETLOTUSAPP
case "IDC_OK"
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%)
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%)
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
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
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
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
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
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
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
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
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
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
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 )
DL_AdminSect$ = LdString( SID_ODBC_ADMIN_SECTION )
DL_AdminKey$ = LdString( SID_ODBC_ADMIN_KEYWORD )
DL_AdminVal$ = TmpWinSysPath$ + LdString( SID_ODBC_ADMIN_PRG )
CreateIniKeyValue DL_AdMinPath$, DL_AdminSect$, DL_AdminKey$, _
DL_AdminVal$, cmoOverwrite
END IF
Lot_WriteODBCINST = SUCCESS
END FUNCTION
SUB WriteODBCINST ( DriverDesc$, DriverPath$, SetupPath$ )
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
SUB WriteODBC20INST ( DriverDesc$, SQLLvl$, APILvl$, Usage$, Ext$, DrvVer$, Cnnct$ )
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
FUNCTION Lot_ModifyODBC() AS INTEGER
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$
notused% = FixODBCiniSources( TmpIniPath$, _
ODBCSection1$, ODBCKeyword1$, ODBCReplacement1$, _
ODBCSection2$, ODBCKeyword2$, ODBCReplacement2$ )
Lot_ModifyODBC = SUCCESS
END FUNCTION
FUNCTION Lot_ModifyDataLensIni() AS INTEGER
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)
NewDLL$ = LdString(SID_DATALENS_ODBCINI_REPL2)
IniFile$ = "DATALENS.INI"
BakFile$ = "DATALENS.BAK"
IniPath$ = Lot_LocalGetPathFromIni(gLotusIniPath$,"DataLens", "Data Path",NULLSTROK,INVALIDSTRERR)
If IniPath$ = "" Then goto MOD_DL_EndFunction
filecopy IniPath$ & IniFile$, IniPath$ & BakFile$
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
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
CLOSE
goto MOD_DL_EndFunction
MOD_DL_ErrHandler:
exit function
MOD_DL_EndFunction:
Lot_ModifyDataLensIni = SUCCESS
END FUNCTION
FUNCTION Lot_LocalGetPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
DIM rstring$, rv%, errText$
Lot_LocalGetPathFromIni = ""
rstring$ = GetIniKeyString(szFile$, szSect$, szKey$)
If rstring$ <> "" Then
rv% = Lot_CleanPath(rstring$)
if rv% <> 0 Then
Lot_LocalGetPathFromIni = rstring$
elseif invalidpathflag% <> FALSE then
Lot_LocalGetPathFromIni = ""
EXIT FUNCTION
end if
elseif nullflag% <> FALSE then
Lot_LocalGetPathFromIni = ""
EXIT FUNCTION
else
Lot_LocalGetPathFromIni = ""
end if
END FUNCTION