home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 February
/
PCWK0297.iso
/
lotus
/
english
/
winagent
/
install.dsk
/
TOOLKIT.LSS
< prev
next >
Wrap
Text File
|
1995-01-25
|
160KB
|
7,197 lines
USE "SETUPAPI"
OPTION DECLARE
PUBLIC CONST WM_COMMAND = 273
PUBLIC CONST WM_USER = 1024
PUBLIC CONST UM_PAINTMODELESS = (WM_USER+1000)
PUBLIC CONST UM_REBOOTFLAG = (WM_USER+503)
PUBLIC CONST UM_RESTARTWINDOWS = (WM_USER+504)
PUBLIC CONST DRIVE_REMOVABLE = 2
PUBLIC CONST DRIVE_FIXED = 3
PUBLIC CONST DRIVE_REMOTE = 4
PUBLIC CONST SUCCESS = 1
PUBLIC CONST FAILURE = 0
PUBLIC CONST MANotes = 1
PUBLIC CONST MAShare = 2
PUBLIC CONST F_NOTHING = 0
PUBLIC CONST F_CHAPTER = 1
PUBLIC CONST F_NAME = 2
PUBLIC CONST F_INOROUT = 4
PUBLIC CONST F_DISPLAY = 8
PUBLIC CONST F_COMPLETE = 16
PUBLIC CONST F_LAPTOP = 32
PUBLIC CONST F_CUSTOM = 64
PUBLIC CONST F_TIPS = 128
PUBLIC CONST F_HELP = 256
PUBLIC CONST F_DESTDIR = 512
PUBLIC CONST F_BITMAP = 1024
PUBLIC CONST F_EXCEPTION = 2048
PUBLIC CONST F_SHARE = 4096
PUBLIC CONST F_KEYWORD = 8192
PUBLIC CONST F_DESTDIRSYM = 16384
DECLARE SUB PopulateCINSTALLLIST
DIM CINSTALL LIST AS STRING
DIM gNCINSTALL%
PUBLIC gAutoFile$
DECLARE PUBLIC FUNCTION Lot_AutoGetProductDestDirSymbol () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoGetBaseDirSymbol () AS STRING
DECLARE PUBLIC FUNCTION Lot_GetKeyValFromResponseFile (Section$, Key$) AS STRING
DECLARE PUBLIC FUNCTION Lot_AutoGetInstallType () AS STRING
DECLARE PUBLIC FUNCTION Lot_AutoGetProgramGroup () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoGetSizeOfInstall () AS INTEGER
DECLARE PUBLIC FUNCTION AutoCheckForSpace () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoGetUserInfo () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoConfigureAutoexec () AS INTEGER
DECLARE PUBLIC SUB AutoInstallReboot ()
DECLARE PUBLIC FUNCTION Lot_AutoWriteOutDebugFile () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoIsThisNetLotusApp (LotusIniPath$, ExistingCommDir$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoConsolidateMoveCopy () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoConsolidateLotusAppDir (gConsolidateSize&) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoChangeLotusAppDir () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoSuiteAppSelect () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoProcessNodeOptions () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AutoGetSetLicenserInfo () AS INTEGER
DECLARE FUNCTION Lot_AutoCheckRSPPath (rsppath$) AS STRING
TYPE PRODINFO
Acronym AS STRING
Name AS STRING
Complete AS INTEGER
Custom AS INTEGER
Laptop AS INTEGER
SelectedType AS STRING
UIInOrOut AS INTEGER
AllowUserToPickInSuite AS INTEGER
FullSize AS LONG
MinSize AS LONG
Share AS INTEGER
DataLens AS INTEGER
SQL AS INTEGER
Paradox AS INTEGER
CDOpt AS STRING
CDOptSelected AS STRING
CDOptDefaultSelected AS STRING
NodeOpt AS STRING
NodeOptSelected AS STRING
NodeOptDefaultSelected AS STRING
Srv AS INTEGER
Dist AS INTEGER
License AS INTEGER
LicenseSelected AS INTEGER
CountDirectory AS STRING
ATM AS INTEGER
DirSymList AS STRING
ProgManagerGroup AS STRING
SystemFileSize AS LONG
BillboardNumber AS INTEGER
SHAREEXE AS INTEGER
Notes AS INTEGER
PreviousVersion AS STRING
END TYPE
DIM Prods(gMaxNumOfProds) AS PRODINFO
DIM gCurrNumOfProds%
DIM gCurrentProduct%
DECLARE PUBLIC FUNCTION FIsKeywordInCopyList LIB "lcomstf.dll" (ByVal szKeyword$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetChapterFromKeyword LIB "lcomstf.dll" (ByVal szKeyword$, ByVal szChptname$, ByVal cbChptsize%) AS INTEGER
DECLARE PUBLIC FUNCTION FRemoveDir LIB "lcomstf.dll" (ByVal szDir$) AS INTEGER
DECLARE PUBLIC FUNCTION FOpenInf LIB "lcomstf.dll" (ByVal szFile$,ByVal fCheck%,ByVal fCheckSyms%) AS INTEGER
DECLARE PUBLIC FUNCTION LcbGetChapterCost LIB "lcomstf.dll" (ByVal szchapter$,ByVal szextra$,ByVal szcost$, ByVal szneed$) AS LONG
DECLARE PUBLIC FUNCTION CbGetInfSectionKeyField LIB "lcomstf.dll" (ByVal szSect$, ByVal szKey$, ByVal iField%, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION FMakeListInfSectionField LIB "lcomstf.dll" (ByVal szSym$, ByVal szSect$, ByVal iField%) AS INTEGER
DECLARE PUBLIC FUNCTION FSetSymbolToListOfInfKeys LIB "lcomstf.dll" (ByVal szSym$, ByVal szSect$, ByVal fNulls%) AS INTEGER
DECLARE PUBLIC FUNCTION FAddSectionFilesToCopyList LIB "lcomstf.dll" (ByVal szSect$, ByVal szSrc$, ByVal szDest$) AS INTEGER
DECLARE PUBLIC FUNCTION FAddSectionKeyFileToCopyList LIB "lcomstf.dll" (ByVal szSect$, ByVal szKey$, ByVal szSrc$, ByVal szDest$) AS INTEGER
DECLARE PUBLIC FUNCTION FDumpCopyListToFile LIB "lcomstf.dll" (ByVal szFile$) AS INTEGER
DECLARE PUBLIC SUB ResetCopyList LIB "lcomstf.dll" ()
DECLARE PUBLIC SUB ResetFileCosts LIB "lcomstf.dll" ()
DECLARE PUBLIC FUNCTION FRemoveSectionFilesFromCopyList LIB "lcomstf.dll" (ByVal szSect$) AS INTEGER
DECLARE PUBLIC FUNCTION FRemoveSectionKeyFileFromCopyList LIB "lcomstf.dll" (ByVal szSect$, ByVal szKey$) AS INTEGER
DECLARE PUBLIC FUNCTION FSetBeepingMode LIB "lcomstf.dll" (ByVal mode%) AS INTEGER
DECLARE PUBLIC SUB ProSetPos LIB "lcomstf.dll" (ByVal x%, ByVal y%)
DECLARE PUBLIC FUNCTION GrcCopyFilesInCopyList LIB "lcomstf.dll" (ByVal hInstance%) AS INTEGER
DECLARE PUBLIC FUNCTION LcbGetCopyListCost LIB "lcomstf.dll" (ByVal szExtraList$, ByVal szCostList$, ByVal szNeedList$) AS LONG
DECLARE PUBLIC FUNCTION FAddToBillboardList LIB "lcomstf.dll" (ByVal szDll$, ByVal idDlg%, ByVal szProc$, ByVal lTicks&) AS INTEGER
DECLARE PUBLIC FUNCTION FClearBillboardList LIB "lcomstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION SetCopyMode LIB "lcomstf.dll" (ByVal fMode%) AS INTEGER
DECLARE PUBLIC FUNCTION GetCopyMode LIB "lcomstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION SetSizeCheckMode LIB "lcomstf.dll" (ByVal scmMode%) AS INTEGER
DECLARE PUBLIC FUNCTION LcbGetInfSectionSize LIB "lcomstf.dll" (ByVal szSect$) AS LONG
DECLARE PUBLIC FUNCTION FSetSilent LIB "lcomstf.dll" (ByVal mode%) AS INTEGER
DECLARE PUBLIC FUNCTION ReadSerialNumber LIB "lcomstf.dll" (ByVal szSrc$,ByVal szSerial$) AS INTEGER
DECLARE PUBLIC FUNCTION WriteUserRegistration LIB "lcomstf.dll" (ByVal szRi$,ByVal szUser$,ByVal szCompany$,ByVal szSerial$) AS INTEGER
DECLARE PUBLIC FUNCTION ReadUserRegistration LIB "lcomstf.dll" (ByVal szRi$,ByVal szUser$,ByVal szCompany$,ByVal szSerial$) AS INTEGER
DECLARE PUBLIC FUNCTION FPopulateLCB LIB "lcomstf.dll" (ByVal hDlg%,ByVal Chapter$) AS INTEGER
DECLARE PUBLIC FUNCTION FSetDateOfFile LIB "lcomstf.dll" (ByVal szFile$,ByVal szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetFirstChild LIB "lcomstf.dll" (ByVal szChapter$,ByVal szFirsthapter$, ByVal nField%) AS INTEGER
DECLARE PUBLIC FUNCTION FGetFirst LIB "lcomstf.dll" (ByVal szChapter$,ByVal szFirsthapter$, ByVal nField%) AS INTEGER
DECLARE PUBLIC FUNCTION FGetChapterValStr LIB "lcomstf.dll" (ByVal szChapter$,ByVal nField%, ByVal szBuf$,ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION FGetChapterValInt LIB "lcomstf.dll" (ByVal szChapter$,ByVal nField%, lpVal%) AS INTEGER
DECLARE PUBLIC FUNCTION FGetNextSibling LIB "lcomstf.dll" (ByVal szChapter$,ByVal szNextChapter$,ByVal nField%) AS INTEGER
DECLARE PUBLIC FUNCTION FGetNextChild LIB "lcomstf.dll" (ByVal szNextChildChapter$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetNext LIB "lcomstf.dll" (ByVal szNextChapter$) AS INTEGER
DECLARE PUBLIC FUNCTION FToggleChapterFilesInCopyList LIB "lcomstf.dll" (ByVal szChapter$) AS INTEGER
DECLARE PUBLIC FUNCTION LcbGetInfChapterSize LIB "lcomstf.dll" (ByVal szChapter$) AS LONG
DECLARE PUBLIC FUNCTION FInitializeCopyList LIB "lcomstf.dll" (ByVal szChpt$, ByVal szSourcedir$, ByVal nField%) AS INTEGER
DECLARE PUBLIC FUNCTION FRefreshDestination LIB "lcomstf.dll" (ByVal lpszSym$) AS INTEGER
DECLARE PUBLIC FUNCTION FSetRestartDir LIB "lcomstf.dll" (ByVal szDir$) AS INTEGER
DECLARE PUBLIC FUNCTION FRestartListEmpty LIB "lcomstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FExitExecRestart LIB "lcomstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION DriveType LIB "mscuistf.dll" (ByVal drivetype%) As INTEGER
DECLARE PUBLIC FUNCTION RegisterFunction LIB "mscuistf.dll" (ByVal sess& ,ByVal modname$, ByVal fname$) AS INTEGER
DECLARE PUBLIC FUNCTION NotebookAddDlgPage LIB "mscuistf.dll" (ByVal hDlg%,_
ByVal idNotebook%, ByVal idDlg%, ByVal lpszDllName$, ByVal lpszDlgProc$,_
ByVal lpszTab$) AS INTEGER
DECLARE PUBLIC FUNCTION FNotebookPageView LIB "mscuistf.dll" (ByVal hDlg%,_
ByVal idNotebook%, ByVal idDlg%, ByVal fShowPage%) AS INTEGER
DECLARE PUBLIC FUNCTION FNotebookTurnToPage LIB "mscuistf.dll" (ByVal hDlg%,ByVal idNotebook%,ByVal id%) AS INTEGER
DECLARE PUBLIC FUNCTION NotebookGetPageHwnd LIB "mscuistf.dll" (ByVal hDlg%,ByVal idNotebook%,ByVal idPage%) AS INTEGER
DECLARE PUBLIC SUB LCBResetContent LIB "mscuistf.dll" (ByVal hDlg%)
DECLARE PUBLIC SUB LCBSetRedraw LIB "mscuistf.dll" (ByVal hDlg%, ByVal fRedraw%)
DECLARE PUBLIC FUNCTION LCBGetCount LIB "mscuistf.dll" (ByVal hDlg%) AS INTEGER
DECLARE PUBLIC FUNCTION LCBAddItem LIB "mscuistf.dll" (ByVal hDlg%, ByVal item$) AS INTEGER
DECLARE PUBLIC FUNCTION LCBReplaceItem LIB "mscuistf.dll" (ByVal hDlg%, ByVal index%, ByVal itemnum%, ByVal item$) AS INTEGER
DECLARE PUBLIC FUNCTION LCBGetItem LIB "mscuistf.dll" (ByVal hDlg%, ByVal index%, ByVal itemnum%, ByVal item$, ByVal itemmax%) AS INTEGER
DECLARE PUBLIC FUNCTION LCBToggleItem LIB "mscuistf.dll" (ByVal hDlg%, ByVal index%) AS INTEGER
DECLARE PUBLIC SUB LCBSetSel LIB "mscuistf.dll" (ByVal hDlg%, ByVal index%)
DECLARE PUBLIC SUB LCBSetTabs LIB "mscuistf.dll" (ByVal hDlg%, ByVal t1%,ByVal t2%,ByVal t3%,ByVal t4%)
DECLARE PUBLIC FUNCTION FGetDriveFreeSpaceList LIB "mscuistf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetGroupName LIB "mscuistf.dll" (ByVal szGroupFileName$, ByVal szBuf$,ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC SUB ReadInfFile (szFile$)
DECLARE PUBLIC SUB MakeListFromSectionKeys (szSymbol$, szSect$)
DECLARE PUBLIC SUB MakeListFromSectionDate (szSym$, szSect$)
DECLARE PUBLIC SUB MakeListFromSectionFilename (szSym$, szSect$)
DECLARE PUBLIC SUB MakeListFromSectionSize (szSym$, szSect$)
DECLARE PUBLIC SUB MakeListFromSectionVersion (szSym$, szSect$)
DECLARE PUBLIC FUNCTION SetSilentMode (mode%) AS INTEGER
DECLARE PUBLIC FUNCTION SetBeepingMode (mode%) AS INTEGER
DECLARE PUBLIC FUNCTION GetSectionKeyDate (szSect$, szKey$) AS STRING
DECLARE PUBLIC FUNCTION GetSectionKeyFilename (szSect$, szKey$) AS STRING
DECLARE PUBLIC FUNCTION GetSectionKeySize (szSect$, szKey$) AS LONG
DECLARE PUBLIC FUNCTION GetSectionKeyVersion (szSect$, szKey$) AS STRING
DECLARE PUBLIC SUB RemoveDir (szDir$, cmo%)
DECLARE PUBLIC SUB DumpCopyList (szFile$)
DECLARE PUBLIC SUB ClearCopyList
DECLARE PUBLIC FUNCTION GetCopyListCost (szExtraList$, szCostList$, szNeedList$) AS LONG
DECLARE PUBLIC SUB CopyFilesInCopyList
DECLARE PUBLIC SUB AddSectionFilesToCopyList (szSect$, szSrc$, szDest$)
DECLARE PUBLIC SUB AddSectionKeyFileToCopyList (szSect$, szKey$, szSrc$, szDest$)
DECLARE PUBLIC SUB AddToBillboardList (szDll$, idDlg%, szProc$, lTicks&)
DECLARE PUBLIC SUB AddBlankToBillboardList (lTicks&)
DECLARE PUBLIC SUB ClearBillboardList
DECLARE PUBLIC SUB SetCopyGaugePosition (x%, y%)
DECLARE PUBLIC SUB SetRestartDir(szDir$)
DECLARE PUBLIC FUNCTION RestartListEmpty AS INTEGER
DECLARE PUBLIC FUNCTION ExitExecRestart AS INTEGER
DECLARE PUBLIC FUNCTION GetAbsPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
DECLARE PUBLIC FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE PUBLIC SUB ShowPathError (nMsg%, nDescription%, szPath$)
DECLARE PUBLIC SUB ShowPathErrorNoDlgExit (nMsg%, nDescription%, szPath$)
DECLARE PUBLIC FUNCTION IsPathWritable (szPath$) AS INTEGER
DECLARE PUBLIC FUNCTION ValidatePath (szPath$) AS INTEGER
DECLARE PUBLIC FUNCTION RegisterCallback (ReturnStr$, FuncName$) AS INTEGER
DECLARE PUBLIC FUNCTION PopupModalDlg (Dlg%, HelpID&) AS STRING
DECLARE PUBLIC FUNCTION PopupModelessDlg (Dlg%, HelpID&) AS STRING
DECLARE PUBLIC FUNCTION SelectDriveCombo (ComboID$, path$) AS INTEGER
DECLARE PUBLIC FUNCTION CheckForSpace (dlgId%) AS INTEGER
DECLARE PUBLIC SUB QUIT
DECLARE PUBLIC FUNCTION Lot_WriteToRiFile (ripath$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_ReadDefaultsfromRi (default_ripath$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_TrimEndSlash (path$) AS STRING
DECLARE PUBLIC FUNCTION Lot_AreShareToolsSupported () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_CallSharedTool (func$) AS INTEGER
DECLARE PUBLIC FUNCTION GetNotesPathfromLotusIni() AS STRING
DECLARE PUBLIC FUNCTION IsNotesInPath() AS INTEGER
DECLARE PUBLIC FUNCTION IsShareInAUTOEXEC() AS INTEGER
DECLARE PUBLIC FUNCTION ModifyAutoexec(modflag%,directmod%,backup$) AS STRING
DECLARE PUBLIC FUNCTION GetBootDrive() AS STRING
DECLARE PUBLIC FUNCTION Lot_GetLotusNotesDataPath() AS STRING
DECLARE PUBLIC FUNCTION Lot_GetORACLEHomePath() AS STRING
DECLARE PUBLIC FUNCTION Lot_GetLotusNotesPrgPath() AS STRING
DECLARE PUBLIC SUB DL_SetOraclePath
DECLARE PUBLIC SUB DL_SetNotesDataPath
DECLARE PUBLIC FUNCTION TrimNetlotusapp (ByVal path$) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetLocalHardDrive (ProdSize&,DefaultDir$) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetNetHardDrive (ProdSize&,DefaultDir$) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetAllHardDrive(ProdSize&,DefaultDir$) AS STRING
DECLARE PUBLIC FUNCTION Lot_Dir (szDir$) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetChapterFromKeyword (szKeyword$) AS STRING
DECLARE PUBLIC FUNCTION Lot_CallProductFunctions (func_name$, BYVAL direction$, always%, back$, parms$) AS STRING
DECLARE PUBLIC FUNCTION Lot_CallOneProductFunction (prodno%, func_name$, BYVAL direction$, always%, parms$) AS STRING
DECLARE PUBLIC FUNCTION Lot_CheckPath (path$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_GetInfSectionSize (szSect$) AS LONG
DECLARE PUBLIC SUB Lot_RemoveSectionFilesFromCopyList (szSect$)
DECLARE PUBLIC SUB Lot_RemoveSectionKeyFileFromCopyList (szSect$, szKey$)
DECLARE PUBLIC FUNCTION Lot_SetDateOfFile (szFile$, szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_GetFirst (szChapt$, nFlag%) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetNext () AS STRING
DECLARE PUBLIC FUNCTION Lot_GetNthFieldFromIniString (szLine$, iField%, sp$) AS STRING
DECLARE PUBLIC FUNCTION Lot_AddPagetoNotebook (hDlg%, Notebookid%, Dlgid%,Tabstring$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_NotebookPageView (hDlg%, Notebookid%, Dlgid%, fShowPage%) AS INTEGER
DECLARE PUBLIC SUB Lot_TurnToPage (hDlg%,Notebookid%, pageid%)
DECLARE PUBLIC FUNCTION Lot_GetPagehandle (hDlg%,Notebookid%,Pageid%) AS INTEGER
DECLARE PUBLIC SUB Lot_LCBResetContent (hDlg%)
DECLARE PUBLIC SUB Lot_LCBSetRedraw (hDlg%, fRedraw%)
DECLARE PUBLIC FUNCTION Lot_LCBGetCount (hDlg%) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_LCBAddItem (hDlg%, item$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_LCBReplaceItem (hDlg%, index%, itemnum%, item$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_LCBGetItem (hDlg%, index%, itemnum%) AS STRING
DECLARE PUBLIC FUNCTION Lot_LCBToggleItem (hDlg%, index%) AS INTEGER
DECLARE PUBLIC SUB Lot_LCBSetSel (hDlg%, index%)
DECLARE PUBLIC SUB Lot_LCBSetTabs (hDlg%, t1%,t2%,t3%,t4%)
DECLARE PUBLIC FUNCTION Lot_GetFirstChild (szChapt$, nFlag%) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetChapterValStr (szChapter$, nField%) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetChapterValInt (szChapter$,nField%) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_GetNextSibling (szChapter$,nField%) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetNextChild () AS STRING
DECLARE PUBLIC FUNCTION Lot_GetInfChapterSize (szChapter$) AS LONG
DECLARE PUBLIC SUB Lot_ToggleChapterFilesInCopyList (szChapter$)
DECLARE PUBLIC FUNCTION Lot_SetChapterFilesInCopyListInOrOut (szChapter$, InOrOut%) AS INTEGER
DECLARE PUBLIC SUB Lot_InitializeCopyList (chpt$, nField%)
DECLARE PUBLIC SUB Lot_RefreshDestination (symbol$)
DECLARE PUBLIC SUB Lot_GetDriveFreeSpaceList (szSymbol$)
DECLARE PUBLIC FUNCTION Lot_GetSharedToolsSize() AS INTEGER
DECLARE PUBLIC FUNCTION Lot_MakeSizeString (size AS LONG) AS STRING
DECLARE PUBLIC FUNCTION Lot_ExtractDriveLetter (destdir$) AS STRING
DECLARE PUBLIC FUNCTION Lot_ExtractDirectory (destdir$) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetGroupName ( szGroupFileName$) AS STRING
DECLARE PUBLIC FUNCTION Lot_IsTheFeatureInstalled(s$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING
DECLARE PUBLIC SUB Lot_InitializeWinWinsysSym ()
DECLARE PUBLIC SUB Lot_InitializeEXTRA ()
DECLARE PUBLIC FUNCTION Lot_IsDestVerNewerOrEqual(DestinationPath$,SourceVer1&,SourceVer2&,SourceVer3&,SourceVer4&) AS INTEGER
DECLARE PUBLIC SUB Reg_RegisterProductNames(Acronym$,Full_Name$)
DECLARE PUBLIC SUB Reg_SetSupportedInstallTypes(ProdNo%,Complete%,Custom%,Laptop%)
DECLARE PUBLIC SUB Reg_SetSelectedInstallType(ProdNo%,TypeSelected$)
DECLARE PUBLIC SUB Reg_SetProdSizes(ProdNo%,FullSize&,MinSize&)
DECLARE PUBLIC SUB Reg_SetUIInOrOut(ProdNo%,Flag%)
DECLARE PUBLIC SUB Reg_SetAllowUserToPickInSuite(ProdNo%,Flag%)
DECLARE PUBLIC SUB Reg_SetShareFlags(ProdNo%,Share%,DLens%,SQL%,Paradox%)
DECLARE PUBLIC SUB Reg_SetCDOption(ProdNo%,Inst%,CDOptStr$)
DECLARE PUBLIC SUB Reg_SetCDOptionSelected(ProdNo%,Inst%,Selection%)
DECLARE PUBLIC SUB Reg_ReSetCDOptionSelected(ProdNo%,Inst%,Selection%)
DECLARE PUBLIC SUB Reg_ReSetCDOptionSelectedToDefault(ProdNo%,Inst%)
DECLARE PUBLIC SUB Reg_ReSetAllCDOptsSelToDefaults(ProdNo%)
DECLARE PUBLIC SUB Reg_SetNodeOption(ProdNo%,Inst%,NodeOptStr$)
DECLARE PUBLIC SUB Reg_SetNodeOptionSelected(ProdNo%,Inst%,Selection%)
DECLARE PUBLIC SUB Reg_ReSetNodeOptionSelected(ProdNo%,Inst%,Selection%)
DECLARE PUBLIC SUB Reg_ReSetNodeOptionSelectedToDefault(ProdNo%,Inst%)
DECLARE PUBLIC SUB Reg_ReSetAllNodeOptsSelToDefaults(ProdNo%)
DECLARE PUBLIC SUB Reg_SetSrvSupport(ProdNo%,SrvFlag%)
DECLARE PUBLIC SUB Reg_SetDistSupport(ProdNo%,DistFlag%)
DECLARE PUBLIC SUB Reg_SetLicenseSupport(ProdNo%,LicFlag%)
DECLARE PUBLIC SUB Reg_SetLicenseSelected(ProdNo%,LicFlag%)
DECLARE PUBLIC SUB Reg_SetCountDirectory(ProdNo%,CountDir$)
DECLARE PUBLIC SUB Reg_SetATMSupport(ProdNo%,ATMFlag%)
DECLARE PUBLIC SUB Reg_SetProgManagerGroup(ProdNo%,GroupName$)
DECLARE PUBLIC SUB Reg_SetSystemFileSize(ProdNo%,Size&)
DECLARE PUBLIC SUB Reg_SetBillboardNumber(ProdNo%,BBNum%)
DECLARE PUBLIC SUB Reg_SetSHAREEXESupport(ProdNo%,Flag%)
DECLARE PUBLIC SUB Reg_SetNotesSupport(ProdNo%,Flag%)
DECLARE PUBLIC SUB Reg_SetPreviousVersion(ProdNo%,prev$)
DECLARE PUBLIC FUNCTION Reg_GetNumberOfProducts() AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProductNo(ProdAcronym$) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProductAcronym(ProdNo%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForFullInstall(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForCustInstall(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForMinInstall(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSelectedInstallType(ProdNo%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetProdFullSize(ProdNo%) AS LONG
DECLARE PUBLIC FUNCTION Reg_GetProdMinSize(ProdNo%) AS LONG
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForShare(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForDataLens(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForSQL(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForParadox(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetCDOptionStr(ProdNo%,Inst%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetNodeOptionStr(ProdNo%,Inst%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetNumOfCDOptions(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetNumOfNodeOptions(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForSrv(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForDist(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForLicense(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_IsLicenseSelected(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetCountDirectory(ProdNo%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetProdSupportForATM(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetDirSymbolList(ProdNo%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetProgManagerGroupName(ProdNo%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetNumOfDirectories(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetSystemFileSize(ProdNo%) AS LONG
DECLARE PUBLIC FUNCTION Reg_IsCDOptionSelected(ProdNo%,Inst%) AS STRING
DECLARE PUBLIC FUNCTION Reg_IsCDOptionDefaultSelected(ProdNo%,Inst%) AS STRING
DECLARE PUBLIC FUNCTION Reg_IsNodeOptionSelected(ProdNo%,Inst%) AS STRING
DECLARE PUBLIC FUNCTION Reg_IsNodeOptionDefaultSelected(ProdNo%,Inst%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetBillboardNumber(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetProductName(ProdNo%) AS STRING
DECLARE PUBLIC FUNCTION Reg_GetUIInOrOut(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetAllowUserToPickInSuite(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetSHAREEXESupport(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetNotesSupport(ProdNo%) AS INTEGER
DECLARE PUBLIC FUNCTION Reg_GetPreviousVersion(ProdNo%) AS STRING
DECLARE PUBLIC FUNCTION Lot_GetCurrentProduct() AS INTEGER
DECLARE PUBLIC SUB Lot_SetCurrentProduct(ProdNo%)
DECLARE PUBLIC FUNCTION Lot_GetInstallDir() AS STRING
DECLARE PUBLIC FUNCTION Lot_GetTheRealProdDir(prodno%) AS STRING
DECLARE PUBLIC FUNCTION Lot_Readserialnumber () AS INTEGER
DECLARE PUBLIC FUNCTION Lot_SaveFeaturesInstaledInInstallIni() AS INTEGER
DECLARE PUBLIC FUNCTION Lot_SaveTheNodeOptionsInInstallIni() AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsAnyNodeOptAvailToNode()AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AreNodeOptAvailToNodeForProd(prodNum%) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_GetNumOfNodeOptAvailToNodeForProd(prodNum%) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AreAnyNodeOptAvailToSrv() AS INTEGER
DECLARE PUBLIC FUNCTION Lot_SaveTheCDOptionsInInstallIni() AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsTheCDOptionsAvailToNode(prodNum%,OptName$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_IsAnyCDOptAvailToNode()AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AreCDOptAvailToNodeForProd(prodNum%) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_GetNumOfCDOptAvailToNodeForProd(prodNum%) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_AreAnyCDOptAvailToSrv() AS INTEGER
DECLARE SUB DisplayWhenSpaceIsTight(szCost$,szNeed$)
DECLARE FUNCTION Lot_GetLastFeatureNumber() AS INTEGER
DECLARE FUNCTION Lot_GetLastNodeOptNumber(s$) AS INTEGER
DECLARE FUNCTION Lot_GetLastCDOptNumber(s$) AS INTEGER
PUBLIC gEndStatementEncountered%
SUB INITIALIZE
gCurrNumOfProds% = 0
gCurrentProduct% = 1
END SUB
PUBLIC FUNCTION Lot_GetSharedToolsSize() AS INTEGER
DIM CurrChpt$, SharedID$, ShareSize&
CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
WHILE (CurrChpt$ <> "")
SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE)
IF SharedID$="IVCPROGRAM" OR _
SharedID$="CONTAINERFILEPROGRAM" OR _
SharedID$="DATALENSPROGRAM" OR _
SharedID$="DATALENSDATA" OR _
SharedID$="DIALOGEDITORPROGRAM" OR _
SharedID$="DESKTOP" OR _
SharedID$="DOCUMENTFILEFILTERSPROGRAM" OR _
SharedID$="DOCUMENTFILEFILTERSFILTER" OR _
SharedID$="GRAMMARCHECKERPROGRAM" OR _
SharedID$="GRAMMARCHECKERDATA" OR _
SharedID$="GRAPHICFILEFILTERSPROGRAM" OR _
SharedID$="HYPHENATIONPROGRAM" OR _
SharedID$="HYPHENATIONDATA" OR _
SharedID$="ICONPALETTEPROGRAM" OR _
SharedID$="INFOBOXPROGRAM" OR _
SharedID$="SCRIPTPROGRAM" OR _
SharedID$="MULTIMEDIAPROGRAM" OR _
SharedID$="MULTIMEDIADATA" OR _
SharedID$="SPELLCHECKERPROGRAM" OR _
SharedID$="SPELLCHECKERDATA" OR _
SharedID$="SPELLCHECKERUSER" OR _
SharedID$="STATUSBARPROGRAM" OR _
SharedID$="THESAURUSPROGRAM" OR _
SharedID$="THESAURUSDATA" OR _
SharedID$="TOOLSPROGRAM" OR _
SharedID$="TOOLSDATA" OR _
SharedID$="USERNAMESERVICESPROGRAM" OR _
SharedID$="FILTERS" OR _
SharedID$="EXCELFLT" THEN
ShareSize& = ShareSize&+Lot_GetInfChapterSize(CurrChpt$)
END IF
CurrChpt$ = Lot_GetNext()
WEND
Lot_GetSharedToolsSize = INT(ShareSize&/1024)
END FUNCTION
PUBLIC FUNCTION GetAbsPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
DIM rstring$, rv%, errText$
GetAbsPathFromIni = ""
rstring$ = GetIniKeyString(szFile$, szSect$, szKey$)
If rstring$ <> "" Then
rv% = Lot_CleanPath(rstring$)
errText$ = LEFT$(szFile$, INSTR(szFile$, CHR$(0)))
if rv% <> 0 Then
GetAbsPathFromIni = rstring$
elseif invalidpathflag% <> FALSE then
ErrorMsg SID_ERR_GETINIKEYSTRING, errText$
ERROR STFQUIT
end if
elseif nullflag% <> FALSE then
ErrorMsg SID_ERR_GETINIKEYSTRING, errText$
ERROR STFQUIT
else
GetAbsPathFromIni = ""
end if
END FUNCTION
PUBLIC FUNCTION MakePath (szDir$, szFile$) AS STRING
DIM sz$
IF szDir$ = "" THEN
sz$ = szFile$
ELSEIF szFile$ = "" THEN
sz$ = szDir$
ELSEIF LEN(szFile$) > 12 THEN
IF LEN(szFile$) = 13 AND RIGHT$(szFile$,1) = "\" THEN
sz$ = szDir$ + szFile$
ELSE
sz$ = ""
END IF
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
sz$ = szDir$ + szFile$
ELSE
sz$ = szDir$ + "\" + szFile$
END IF
IF sz$ <> "" THEN
MakePath = LCASE$(sz$)
ELSE
MakePath = sz$
END IF
END FUNCTION
PUBLIC FUNCTION Lot_MakeSizeString(size&) AS STRING
Lot_MakeSizeString = STR$(size&) + gStrK$
END FUNCTION
PUBLIC FUNCTION Lot_ExtractDriveLetter(destdir$) AS STRING
Lot_ExtractDriveLetter = LCASE$(MID$(destdir$, 1, 1))
END FUNCTION
PUBLIC FUNCTION Lot_ExtractDirectory(destdir$) AS STRING
Lot_ExtractDirectory = LCASE$(MID$(destdir$, 3))
END FUNCTION
PUBLIC SUB ShowPathError (nMsg%, nDescription%, szPath$)
DIM sz$
sz$ = CHR$(10) + CHR$(10) + " " + szPath$
IF nDescription% <> 0 THEN
sz$ = sz$ + CHR$(10) + CHR$(10) + LdString(nDescription%)
END IF
ErrorMsg nMsg%, sz$
END SUB
PUBLIC SUB ShowPathErrorNoDlgExit (nMsg%, nDescription%, szPath$)
ShowPathError nMsg%, nDescription%, szPath$
SetListItem "__LASTSTATUS", 1, "Q"
END SUB
PUBLIC FUNCTION IsPathWritable (szPath$) AS INTEGER
DIM sz$, cb%, i%, j%
IsPathWritable = 0
sz$ = szPath$
IF Lot_CheckPath(sz$) <> FALSE THEN
IF cb% > 3 AND RIGHT$(sz$,1) = "\" THEN
cb% = LEN(sz$)
sz$ = MID$(sz$,1,(cb%-1))
END IF
DO
IF LEN(sz$) <= 3 OR DoesDirExist(sz$) = 1 THEN
IsPathWritable = IsDirWritable(sz$)
EXIT DO
END IF
i% = INSTR(sz$,"\")
IF i% = 0 THEN EXIT DO
DO
j% = INSTR((i%+1),sz$,"\")
IF j% = 0 THEN
IF i% = 3 THEN
sz$ = MID$(sz$,1,3)
ELSE
sz$ = MID$(sz$,1,(i%-1))
END IF
EXIT DO
END IF
i% = j%
LOOP
LOOP
END IF
END FUNCTION
PUBLIC FUNCTION ValidatePath (szPath$) AS INTEGER
DIM cch%, difflen%
ValidatePath = FALSE
cch% = LEN(szPath$)
difflen% = cch% + CINT(GetSymbolValue(SYM_DOSMAXPATHDIFF$))
IF (MID$(szPath$,2,1) = ":" AND IsDriveValid(szPath$) = FALSE) THEN
ShowPathError SID_DRV_NOTEXIST, 0, MID$(szPath$,1,2)
ELSEIF (cch% = 2) OR (cch% = 3 AND MID$(szPath$,3,1) = "\") THEN
ShowPathError SID_ERR_DIRSYNTAX, SID_ERR_DIRROOTDESCR, szPath$
ELSEIF Lot_CheckPath(szPath$) = FALSE THEN
ShowPathError SID_ERR_DIRSYNTAX, SID_ERR_DIRSYNTAXDESCR, szPath$
ELSEIF IsPathWritable(szPath$) = FALSE THEN
ShowPathError SID_DIR_READONLY, 0, szPath$
ELSEIF difflen% > 65 THEN
ShowPathError SID_ERR_PATHLEN, SID_ERR_PATHLEN_DESCR, _
STR$(65 - CINT(GetSymbolValue(SYM_DOSMAXPATHDIFF$)))+LdString(SID_ERR_PATHLEN_CHARS)
ELSE
ValidatePath = TRUE
END IF
END FUNCTION
PUBLIC FUNCTION Lot_Dir (szDir$) AS STRING
DIM DirRet$
DirRet$ = Dir$(szDir$)
Lot_Dir = DirRet$
END FUNCTION
PUBLIC FUNCTION Lot_GetLocalHardDrive(ProdSize&,DefaultDir$) AS STRING
DIM Length%, count%, lDrive$, SpaceAvail&
Lot_GetLocalHardDrive = ""
GetLocalHardDrivesList SYM_LOCALHARDDRIVES$
Length% = GetListLength(SYM_LOCALHARDDRIVES$)
FOR count% = 1 TO Length%
lDrive$ = GetListItem(SYM_LOCALHARDDRIVES$, count%)
SpaceAvail& = GetFreeSpaceForDrive(lDrive$)
lDrive$ = lDrive$ + ":\" + DefaultDir$
IF SpaceAvail& > ProdSize& AND IsDirWritable(lDrive$) THEN
Lot_GetLocalHardDrive = LCASE$(lDrive$)
EXIT FUNCTION
END IF
NEXT
END FUNCTION
PUBLIC FUNCTION Lot_GetNetHardDrive(ProdSize&,DefaultDir$) AS STRING
DIM Length%, count%, lDrive$, SpaceAvail&
Lot_GetNetHardDrive = ""
GetNetworkDrivesList SYM_NETHARDDRIVES$
Length% = GetListLength(SYM_NETHARDDRIVES$)
FOR count% = 1 TO Length%
lDrive$ = GetListItem(SYM_NETHARDDRIVES$, count%)
SpaceAvail& = GetFreeSpaceForDrive(lDrive$)
lDrive$ = lDrive$ + ":\" + DefaultDir$
IF SpaceAvail& > ProdSize& AND IsDirWritable(lDrive$) THEN
Lot_GetNetHardDrive = LCASE$(lDrive$)
EXIT FUNCTION
END IF
NEXT
END FUNCTION
PUBLIC FUNCTION Lot_GetAllHardDrive(ProdSize&,DefaultDir$) AS STRING
DIM drv$
drv$ = Lot_GetLocalHardDrive(ProdSize&, DefaultDir$)
IF drv$ <> "" THEN
Lot_GetAllHardDrive = drv$
ELSE
Lot_GetAllHardDrive = Lot_GetNetHardDrive(ProdSize&, DefaultDir$)
END IF
END FUNCTION
PUBLIC FUNCTION Lot_GetChapterFromKeyword (szKeyword$) AS STRING
DIM g_strbuf$
g_strbuf$ = string(256,0)
If FGetChapterFromKeyword(szKeyword$, g_strbuf$, 256) = 0 Then
Lot_GetChapterFromKeyword = ""
Else
Lot_GetChapterFromKeyword = LEFT$(g_strbuf$, INSTR(g_strbuf$,CHR$(0))-1)
End If
END FUNCTION
PUBLIC Lot_CallExec_RC as String
PUBLIC FUNCTION Lot_CallProductFunctions (func_name$, BYVAL direction$, always%, back$, parms$) AS STRING
DIM n%, i%, lname$, prodcall$, notused%, incr%
Lot_CallProductFunctions = ""
n% = Reg_GetNumberOfProducts()
If direction$ = gBACK Then
i% = n%
incr% = 1
Else
i% = 1
incr% = -1
End If
WHILE (i% >= 1 AND i% <= n%)
lname$ = Reg_GetProductAcronym(i%)
If lname$ <> "" AND (always% <> FALSE OR Prods(i%).UIInOrOut <> FALSE) Then
If parms$ <> "" Then
prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & i% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & "," & parms$ & ")"
Else
prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & i% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & ")"
End If
gEndStatementEncountered% = FALSE
EXECUTE(|USE "| & lname$ & |" : | & prodcall$)
IF gEndStatementEncountered% = TRUE THEN
END
END IF
direction$ = Lot_CallExec_RC$
If direction$ = gBACK Then
incr% = -1
Else
incr% = 1
End If
End If
If direction$ = gBACK AND back$ = gALLPRODUCTS then
Lot_CallProductFunctions = direction$
Exit Function
End If
i% = i% + incr%
WEND
Lot_CallProductFunctions = direction$
END FUNCTION
PUBLIC FUNCTION Lot_CallOneProductFunction (prodno%, func_name$, BYVAL direction$, always%, parms$) AS STRING
DIM lname$, prodcall$, notused%
Lot_CallOneProductFunction = ""
lname$ = Reg_GetProductAcronym(prodno%)
If lname$ <> "" Then
If parms$ <> "" Then
prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & prodno% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & "," & parms$ & ")"
Else
prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & prodno% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & ")"
End If
gEndStatementEncountered% = FALSE
EXECUTE(|USE "| & lname$ & |" : | & prodcall$)
IF gEndStatementEncountered% = TRUE THEN
END
END IF
Lot_CallOneProductFunction = Lot_CallExec_RC$
End If
END FUNCTION
PUBLIC FUNCTION Lot_CheckPath (path$) AS INTEGER
DIM ldrive$
Lot_CheckPath = FALSE
IF path$ <> "" THEN
ldrive$ = Lot_ExtractDriveLetter(path$)
IF IsDriveValid(ldrive$) <> FALSE AND Lot_CleanPath(path$) <> FALSE THEN
Lot_CheckPath = TRUE
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_GetFirst (szChapt$, nFlag%) AS STRING
DIM g_strbuf$, Length%
g_strbuf$ = string(256,0)
if FGetFirst(szChapt$,g_strbuf$,nFlag%) = 0 then
Lot_GetFirst = ""
else
Length% = len(g_strbuf$)
Lot_GetFirst = LEFT$ (g_strbuf$, INSTR (g_strbuf$, CHR$(0)) -1)
end if
END FUNCTION
PUBLIC FUNCTION Lot_GetNext () AS STRING
DIM g_strbuf$, Length%
g_strbuf$ = string(256,0)
if FGetNext(g_strbuf$) = 0 then
Lot_GetNext = ""
else
Length% = len(g_strbuf$)
Lot_GetNext = LEFT$ (g_strbuf$, INSTR (g_strbuf$, CHR$(0)) - 1)
end if
END FUNCTION
PUBLIC FUNCTION Lot_SetDateOfFile (szFile$, szDate$) AS INTEGER
if FSetDateOfFile(szFile$,szDate$) = 0 then
Lot_SetDateOfFile = 0
else
Lot_SetDateOfFile = 1
end if
END FUNCTION
PUBLIC SUB Lot_RemoveSectionFilesFromCopyList (szSect$)
IF FRemoveSectionFilesFromCopyList (szSect$) = 0 THEN
ErrorMsg SID_ERR_LOT_RSFFCL, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB Lot_RemoveSectionKeyFileFromCopyList (szSect$, szKey$)
IF FRemoveSectionKeyFileFromCopyList (szSect$, szKey$) = 0 THEN
ErrorMsg SID_ERR_LOT_RSKFFCL, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC FUNCTION Lot_GetInfSectionSize (szSect$) AS LONG
Lot_GetInfSectionSize = LcbGetInfSectionSize(szSect$)
END FUNCTION
PUBLIC FUNCTION Lot_GetNthFieldFromIniString (szLine$, iField%, sp$) AS STRING
DIM szStart$, i%, iNew%
IF sp$ = "" THEN
sp$ = ","
END IF
IF iField% < 1 THEN
ErrorMsg SID_ERR_LOT_GNFFIS, ""
ERROR STFQUIT
END IF
szStart$ = szLine$
IF iField% <> 1 THEN
FOR i% = 2 TO iField% STEP 1
iNew% = INSTR(szStart$, sp$)
IF iNew% = 0 THEN
Lot_GetNthFieldFromIniString = ""
GOTO GNFFIS_END
END IF
szStart$ = MID$(szStart$, (iNew% + 1),100)
NEXT
END IF
iNew% = INSTR(szStart$, sp$)
IF iNew% <> 0 THEN
szStart$ = MID$(szStart$, 1, (iNew% - 1))
END IF
Lot_GetNthFieldFromIniString = LTRIM$(RTRIM$(szStart$))
GNFFIS_END:
END FUNCTION
PUBLIC FUNCTION Lot_AddPagetoNotebook (hDlg%, Notebookid%,Dlgid%, Tabstring$) AS INTEGER
Lot_AddPagetoNotebook = NotebookAddDlgPage(hDlg%, Notebookid%,Dlgid%, "mscuistf.dll","FNameOrgDlgProc",Tabstring$)
IF Lot_AddPagetoNotebook = 0 THEN
ErrorMsg 0, "Error creating notebook page"
ERROR STFQUIT
END IF
END FUNCTION
PUBLIC FUNCTION Lot_NotebookPageView (hDlg%, Notebookid%, Dlgid%, fShowPage%) AS INTEGER
Lot_NotebookPageView = FNotebookPageView (hDlg%, Notebookid%, Dlgid%, fShowPage%)
IF Lot_NotebookPageView = 0 THEN
ErrorMsg 0, "Error viewing notebook page"
ERROR STFQUIT
END IF
END FUNCTION
PUBLIC SUB Lot_TurnToPage (hDlg%,Notebookid%, pageid%)
IF FNotebookTurnToPage(hDlg%,Notebookid%, pageid%) <> 1 THEN
ErrorMsg 0, "Error turning notebook page"
ERROR STFQUIT
END IF
END SUB
PUBLIC FUNCTION Lot_GetPagehandle (hDlg%,Notebookid%,Pageid%) AS INTEGER
Lot_GetPagehandle = NotebookGetPageHwnd(hDlg%,Notebookid%,Pageid%)
IF Lot_GetPagehandle = 0 THEN
ErrorMsg 0, "Error getting the notebook page handle"
ERROR STFQUIT
END IF
END FUNCTION
PUBLIC SUB Lot_LCBResetContent(hDlg%)
LCBResetContent hDlg%
END SUB
PUBLIC SUB Lot_LCBSetRedraw (hDlg%, fRedraw%)
LCBSetRedraw hDlg%, fRedraw%
END SUB
PUBLIC FUNCTION Lot_LCBGetCount (hDlg%) AS INTEGER
Lot_LCBGetCount = LCBGetCount(hDlg%)
END FUNCTION
PUBLIC FUNCTION Lot_LCBAddItem (hDlg%, item$) AS INTEGER
DIM rc%
rc% = LCBAddItem (hDlg%, item$)
If (rc% = 0) Then
ErrorMsg 0, "Could not Add Item: "+item$+" to LCB on DLG: "+STR$(hDlg%)
ERROR STFQUIT
End If
Lot_LCBAddItem= rc%
END FUNCTION
PUBLIC FUNCTION Lot_LCBReplaceItem (hDlg%, index%, itemnum%, item$) AS INTEGER
DIM rc%
rc% = LCBReplaceItem (hDlg%, index%, itemnum%, item$)
Lot_LCBReplaceItem = rc%
END FUNCTION
PUBLIC FUNCTION Lot_LCBGetItem (hDlg%, index%, itemnum%) AS STRING
DIM rc%
DIM szValue As String : szValue = String$(cbSymValMax, 0)
rc% = LCBGetItem (hDlg%, index%, itemnum%, szValue$, cbSymValMax)
Lot_LCBGetItem = LEFT$( szValue$, INSTR( szValue$, CHR$(0)) -1)
END FUNCTION
PUBLIC FUNCTION Lot_LCBToggleItem (hDlg%, index%) AS INTEGER
DIM rc%
rc% = LCBToggleItem (hDlg%, index%)
Lot_LCBToggleItem = rc%
END FUNCTION
PUBLIC SUB Lot_LCBSetSel (hDlg%, index%)
LCBSetSel hDlg%, index%
END SUB
PUBLIC SUB Lot_LCBSetTabs (hDlg%, t1%, t2%, t3%, t4%)
LCBSetTabs hDlg%, t1%, t2%, t3%, t4%
END SUB
PUBLIC FUNCTION Lot_GetFirstChild (szChapt$, nFlag%) AS STRING
DIM szValue As String : szValue = String$(cbSymValMax, 0)
if FGetFirstChild(szChapt$, szValue$, nFlag%) = 0 then
Lot_GetFirstChild = ""
else
Lot_GetFirstChild = LEFT$( szValue$, INSTR (szValue$, CHR$(0)) -1)
end if
END FUNCTION
PUBLIC FUNCTION Lot_GetGroupName ( szGroupFileName$) AS STRING
DIM szValue As String : szValue = String$(cbSymValMax, 0)
IF FGetGroupName(szGroupFileName$, szValue$, cbSymValMax) = 0 THEN
Lot_GetGroupName = ""
ELSE
Lot_GetGroupName = LEFT$(szValue$, INSTR(szValue$, CHR$(0)) - 1)
END IF
END FUNCTION
PUBLIC FUNCTION Lot_GetChapterValStr (szChapter$, nField%) AS STRING
DIM szValue As String : szValue = String$(cbSymValMax, 0)
IF FGetChapterValStr(szChapter$, nField%, szValue$, cbSymValMax) = 0 THEN
Lot_GetChapterValStr = ""
ELSE
Lot_GetChapterValStr = LEFT$(szValue$, INSTR(szValue$, CHR$(0)) - 1)
END IF
END FUNCTION
PUBLIC FUNCTION Lot_GetChapterValInt (szChapter$,nField%) AS INTEGER
DIM lpVal%
if FGetChapterValInt(szChapter$, nField%,lpVal%) = 0 then
Lot_GetChapterValInt = -1
else
Lot_GetChapterValInt = lpVal%
end if
END FUNCTION
PUBLIC FUNCTION Lot_GetNextSibling (szChapter$,nField%) AS STRING
DIM szValue As String : szValue = String$(cbSymValMax, 0)
if FGetNextSibling(szChapter$, szValue$,nField%) = 0 then
Lot_GetNextSibling = ""
else
Lot_GetNextSibling = LEFT$( szValue$, INSTR (szValue$, CHR$(0)) -1)
end if
END FUNCTION
PUBLIC FUNCTION Lot_GetNextChild () AS STRING
DIM g_strbuf$, Length%
g_strbuf$ = string(256,0)
if FGetNextChild(g_strbuf$) = 0 then
Lot_GetNextChild = ""
else
Length% = len(g_strbuf$)
Lot_GetNextChild = LEFT$(g_strbuf$, INSTR (g_strbuf$, CHR$(0)) -1)
end if
END FUNCTION
PUBLIC FUNCTION Lot_GetInfChapterSize (szChapter$) AS LONG
DIM size&
size&= LcbGetInfChapterSize(szChapter$)
if size& = -1 then
Lot_GetInfChapterSize = -1
else
Lot_GetInfChapterSize = size&
end if
END FUNCTION
PUBLIC SUB Lot_ToggleChapterFilesInCopyList (szChapter$)
If FToggleChapterFilesInCopylist(szChapter$) = 0 Then
ERROR STFTOGGLE
End If
END SUB
PUBLIC FUNCTION Lot_SetChapterFilesInCopyListInOrOut (szChapter$, InOrOut%) AS INTEGER
DIM curinorout%, FeatureToFind$
If szChapter$ = "" Then
Lot_SetChapterFilesInCopyListInOrOut = 0
Exit FUNCTION
End If
curinorout% = Lot_GetChapterValInt(szChapter$, F_INOROUT)
If InOrOut% = curinorout% Then
Lot_SetChapterFilesInCopyListInOrOut = InOrOut%
Exit FUNCTION
End If
If InOrOut% = 1 THEN
Lot_SetChapterFilesInCopyListInOrOut = 1
If GetSymbolValue("NETWORK") = gNODE Then
FeatureToFind$ = Lot_GetChapterValStr(szChapter$, F_KEYWORD)
If Lot_IsTheFeatureInstalled(FeatureToFind$) = FALSE Then
Lot_SetChapterFilesInCopyListInOrOut = 0
Exit Function
End If
End If
If FToggleChapterFilesInCopylist(szChapter$) = 0 Then
Lot_SetChapterFilesInCopyListInOrOut = 0
End If
Else
Lot_SetChapterFilesInCopyListInOrOut = 0
If FToggleChapterFilesInCopylist(szChapter$) = 0 Then
Lot_SetChapterFilesInCopyListInOrOut = 1
End If
End If
END FUNCTION
PUBLIC SUB Lot_InitializeCopyList (szChpt$, nField%)
if FInitializeCopyList(szChpt$, GetSymbolValue(SYM_STF_SRCDIR$), nField%) = 0 then
ErrorMsg 0, "Error initializing the copylist: " + szChpt$
ERROR STFQUIT
end if
END SUB
PUBLIC SUB Lot_InitializeWinWinsysSym ()
DIM systemDir$
SetSymbolValue SYM_WINDIR$, GetWindowsDir()
systemDir$ = GetWindowsSysDir()
IF(IsDirWritable(systemDir$)) = 1 THEN
SetSymbolValue SYM_WINSYSDIR$, systemDir$
ELSE
SetSymbolValue SYM_WINSYSDIR$, GetWindowsDir()
END IF
END SUB
PUBLIC SUB Lot_InitializeEXTRA
DIM drv$, drvno%, i%
If GetListLength(gEXTRA) = 0 Then
drv$ = Lot_ExtractDriveLetter(GetWindowsDir())
drvno% = ASC(drv$) - ASC("a") + 1
FOR i% = 1 to 26
If i% = drvno% Then
AddlistItem gEXTRA, "200000"
Else
AddlistItem gEXTRA, ""
End If
NEXT
End If
END SUB
PUBLIC SUB Lot_RefreshDestination (symbol$)
if FRefreshDestination(symbol$) = FALSE THEN
ErrorMsg 0, "Lot_RefreshDestination error: " + symbol$
ERROR STFQUIT
end if
END SUB
PUBLIC SUB Lot_GetDriveFreeSpaceList (szSymbol$)
if FGetDriveFreeSpaceList(szSymbol$) = FALSE THEN
ErrorMsg SID_ERR_LOT_GDFSL, ""
ERROR STFQUIT
end if
END SUB
PUBLIC FUNCTION PopupModelessDlg (Dlg%, HelpID&) AS STRING
DIM cuidll$, szWnd$, notused$, notused1%
cuidll$ = GetSymbolValue(SYM_CUIDLL$)
notused$ = UIStartDlg(cuidll$, Dlg%, "FNameOrgDlgProc", 0, "")
szWnd$ = GetSymbolValue(SYM_WNDHANDLE$)
notused1% = SendMessage(VAL(szWnd$),UM_PAINTMODELESS,0,0)
END FUNCTION
PUBLIC FUNCTION PopupModalDlg (Dlg%, HelpID&) AS STRING
DIM cuidll$, sz$, cdir$, notused%
cuidll$ = GetSymbolValue(SYM_CUIDLL$)
If GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ Then
while (TRUE)
sz$ = UIStartDlg(cuidll$, Dlg%, "FNameOrgDlgProc", 0, "")
SELECT CASE sz$
case "IDC_EXIT"
notused% = FRemoveSymbol("IDC_TEXT")
QUIT
SetListItem "__DLG_ID", 1, STR(Dlg%)
case "IDC_CANCEL"
GOTO END_POPUP_WHILE
case "IDC_CONTINUE"
GOTO END_POPUP_WHILE
case "IDC_OK"
GOTO END_POPUP_WHILE
case "IDC_MENU"
GOTO END_POPUP_WHILE
case "IDC_BACK"
GOTO END_POPUP_WHILE
case "IDC_HELP"
cdir$ = CURDIR$ + "\" + gINSTALLHLP$
notused% = WinHelp(HwndFrame(), cdir$, HELP_CONTEXT, HelpID&)
SetListItem "RETFROMHELP", 1, "T"
case "HELPKEY"
cdir$ = CURDIR$ + "\" + gINSTALLHLP$
notused% = WinHelp(HwndFrame(), cdir$, HELP_CONTEXT, HelpID&)
SetListItem "RETFROMHELP", 1, "T"
END SELECT
wend
END_POPUP_WHILE:
PopupModalDlg = MID$(sz$,5,LEN(sz$)-4)
UIPop 1
End If
END FUNCTION
PUBLIC FUNCTION RegisterCallback (ModName$, FuncName$) AS INTEGER
DIM rc%, automation$
automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
If automation$ <> gTRUE$ Then
RemoveSymbol(SYM_CALLBACK$)
AddListItem SYM_CALLBACK$, FuncName$
rc% = RegisterFunction(LSI_INFO(4),ModName$,FuncName$)
If rc% = -4 Then
ErrorMsg 0, "Maximum Number of Callbacks exceeded"
End If
End If
END FUNCTION
PUBLIC FUNCTION SelectDriveCombo (ComboID$, path$) AS INTEGER
DIM n%, i%, drv$
n% = GetListLength(ComboID$)
SelectDriveCombo = 1
drv$ = Lot_ExtractDriveLetter(path$)
For i% = 1 to n%
If drv$ = LCASE$(MID(GetListItem(ComboID$, i%), 1, 1)) Then
AddListItem SYM_UPDATELIST$, ComboID$
AddListItem SYM_UPDATELIST$, ComboID$ & "," & i%
SelectDriveCombo = i%
EXIT FUNCTION
End If
Next
END FUNCTION
PUBLIC FUNCTION CheckForSpace(dlgId%) AS INTEGER
DIM lTicks&, lcb&, lNew&, i%, lcbNeed&, dr$, s$, helpId&, rc$
DIM notused1$, curcursor%
CheckForSpace = SUCCESS
lTicks& = GetTickCount()
lcb& = LcbGetChapterCost("", "", SYM_COST$, SYM_NEEDED$)
IF lcb& = CLNG(0) THEN
DO
lNew& = GetTickCount()
LOOP UNTIL (lNew& - lTicks&) > 2000
DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$
GOTO ENDCHECK
END IF
curcursor% = ShowWaitCursor()
SetListItem "IDC_BMP", 1, STR$(IDD_MAXSCAN_BMP)
notused1$ = PopupModelessDlg(DB_CHECKSPACE, DB_CHECKSPACE)
lcb& = GetCopyListCost (gEXTRA, SYM_COST$, SYM_NEEDED$)
UIPOP 1
RestoreCursor curcursor%
IF lcb& = CLNG(0) THEN
DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$
GOTO ENDCHECK
END IF
CheckForSpace = FAILURE
RemoveSymbol "IDC_LIST1"
FOR i% = 1 TO 26
lcbNeed& = CLNG(GetListItem(SYM_NEEDED$, i%))
IF lcbNeed& > 0 THEN
dr$ = CHR$(ASC("A")+i%-1) + ":" + CHR$(9)
s$ = dr$ & ((lcbNeed& \ 1024) + 4)
AddlistItem "IDC_LIST1", s$ + gStrK$
END IF
NEXT
SetListItem "SETTABS1",1,"50"
SetListItem "NORMALFONT", 1, STR$(IDC_TEXT1)
SetListItem "NORMALFONT", 2, STR$(IDC_TEXT2)
SetListItem "NORMALFONT", 3, STR$(IDC_TEXT3)
helpId& = dlgId%
rc$ = PopupModalDlg (dlgId%, helpId&)
ENDCHECK:
RemoveSymbol(SYM_COST$)
RemoveSymbol(SYM_NEEDED$)
END FUNCTION
SUB DisplayWhenSpaceIsTight(szCost$,szNeed$)
DIM i%, lcbCost&, lcbNeed&, sz$, notused%
FOR i% = 1 TO 26
lcbCost& = CLNG(GetListItem(szCost$, i%)) \ 10
lcbNeed& = -CLNG(GetListItem(szNeed$, i%))
IF lcbCost& > lcbNeed& THEN
sz$ = LdString(SID_WARN_DISKSPACE1) + _
LdString(SID_WARN_DISKSPACE2) + _
LdString(SID_WARN_DISKSPACE3)
notused% = DoMsgBox(sz$,LdString(SID_TKT_STD_TITLE),MB_OK+MB_ICONINFORMATION)
EXIT FOR
END IF
NEXT
END SUB
PUBLIC SUB ReadInfFile (szFile$)
IF FOpenInf(szFile$, 1, 0) = 0 THEN
ErrorMsg SID_ERR_READINFFILE, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB MakeListFromSectionKeys(szSymbol$, szSect$)
IF FSetSymbolToListOfInfKeys(szSymbol$, szSect$, 1) = 0 THEN
ErrorMsg SID_ERR_MAKELISTFROMSECTIONKEYS, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB MakeListFromSectionDate (szSym$, szSect$)
IF FMakeListInfSectionField(szSym$, szSect$, 5) = 0 THEN
ErrorMsg SID_ERR_MAKELISTFROMSECTIONDATE, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB MakeListFromSectionFilename (szSym$, szSect$)
IF FMakeListInfSectionField(szSym$, szSect$, 1) = 0 THEN
ErrorMsg SID_ERR_MAKELISTFROMSECTIONFILENAME, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB MakeListFromSectionSize (szSym$, szSect$)
IF FMakeListInfSectionField(szSym$, szSect$, 15) = 0 THEN
ErrorMsg SID_ERR_MAKELISTFROMSECTIONSIZE, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB MakeListFromSectionVersion (szSym$, szSect$)
IF FMakeListInfSectionField(szSym$, szSect$, 19) = 0 THEN
ErrorMsg SID_ERR_MAKELISTFROMSECTIONVERSION, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC FUNCTION SetSilentMode (mode%) AS INTEGER
SetSilentMode = FSetSilent(mode%)
END FUNCTION
PUBLIC FUNCTION SetBeepingMode (mode%) AS INTEGER
SetBeepingMode = FSetBeepingMode(mode%)
END FUNCTION
PUBLIC FUNCTION GetSectionKeyDate (szSect$, szKey$) AS STRING
DIM szBuf$, Length%
szBuf$ = string$(128, 32)
Length% = CbGetInfSectionKeyField(szSect$, szKey$, 5, szBuf$, 128)
IF Length% >= 128 THEN
ErrorMsg SID_ERR_GETSECTIONKEYDATE, ""
ERROR STFQUIT
END IF
IF Length% = -1 THEN
ErrorMsg SID_ERR_GETSECTIONKEYDATE2, ""
ERROR STFQUIT
END IF
GetSectionKeyDate = LEFT$ (szBuf$, Length%)
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION GetSectionKeyFilename (szSect$, szKey$) AS STRING
DIM szBuf$, Length%
szBuf$ = string$(128, 32)
Length% = CbGetInfSectionKeyField(szSect$, szKey$, 1, szBuf$, 128)
IF Length% >= 128 THEN
ErrorMsg SID_ERR_GETSECTIONKEYFILENAME, ""
ERROR STFQUIT
END IF
IF Length% = -1 THEN
ErrorMsg SID_ERR_GETSECTIONKEYFILENAME2, ""
ERROR STFQUIT
END IF
GetSectionKeyFilename = LEFT$ (szBuf$, Length%)
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION GetSectionKeySize (szSect$, szKey$) AS LONG
DIM szBuf$, Length%
szBuf$ = string$(128, 32)
Length% = CbGetInfSectionKeyField(szSect$, szKey$, 15, szBuf$, 128)
IF Length% >= 128 THEN
ErrorMsg SID_ERR_GETSECTIONKEYSIZE, ""
ERROR STFQUIT
END IF
IF Length% = -1 THEN
ErrorMsg SID_ERR_GETSECTIONKEYSIZE2, ""
ERROR STFQUIT
END IF
GetSectionKeySize = VAL (LEFT$ (szBuf$, Length%))
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION GetSectionKeyVersion (szSect$, szKey$) AS STRING
DIM szBuf$, Length%
szBuf$ = string$(128, 32)
Length% = CbGetInfSectionKeyField(szSect$, szKey$, 19, szBuf$, 128)
IF Length% >= 128 THEN
ErrorMsg SID_ERR_GETSECTIONKEYVERSION, ""
ERROR STFQUIT
END IF
IF Length% = -1 THEN
ErrorMsg SID_ERR_GETSECTIONKEYVERSION2, ""
ERROR STFQUIT
END IF
GetSectionKeyVersion = LEFT$ (szBuf$, Length%)
szBuf$ = ""
END FUNCTION
PUBLIC SUB RemoveDir (szDir$, cmo%)
IF FRemoveDir(szDir$) = 0 THEN
ErrorMsg SID_ERR_REMOVEDIR, ""
ERROR STFERR
END IF
END SUB
PUBLIC SUB DumpCopyList (szFile$)
IF FDumpCopyListToFile (szFile$) = 0 THEN
ErrorMsg SID_ERR_DUMPCOPYLIST, ""
ERROR STFERR
END IF
END SUB
PUBLIC SUB ClearCopyList
ResetCopyList
END SUB
PUBLIC FUNCTION GetCopyListCost (szExtraList$, szCostList$, szNeedList$) AS LONG
DIM lNeed&
lNeed& = LcbGetCopyListCost (szExtraList$, szCostList$, szNeedList$)
IF lNeed& < 0 THEN
ErrorMsg SID_ERR_GETCOPYLISTCOST, ""
ERROR STFQUIT
END IF
GetCopyListCost = lNeed&
END FUNCTION
PUBLIC SUB CopyFilesInCopyList
DIM grc%
grc% = GrcCopyFilesInCopyList (HinstFrame())
IF grc% = grcUserQuit THEN
ErrorMsg SID_ERR_NOT_COMPLETE, ""
ERROR STFQUIT
ELSEIF grc% > 0 THEN
ErrorMsg SID_ERR_NOT_COMPLETE, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB AddSectionFilesToCopyList (szSect$, szSrc$, szDest$)
IF FAddSectionFilesToCopyList (szSect$, szSrc$, szDest$) = 0 THEN
ErrorMsg SID_ERR_ADDSECTIONFILESTOCOPYLIST, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB AddSectionKeyFileToCopyList (szSect$, szKey$, szSrc$, szDest$)
IF FAddSectionKeyFileToCopyList (szSect$, szKey$, szSrc$, szDest$) = 0 THEN
ErrorMsg SID_ERR_ADDSECTIONKEYFILETOCOPYLIST, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB AddToBillboardList (szDll$, idDlg%, szProc$, lTicks&)
IF FAddToBillboardList(szDll$, idDlg%, szProc$, lTicks&) = 0 THEN
ErrorMsg SID_ERR_ADDTOBILLBOARDLIST, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB AddBlankToBillboardList (lTicks&)
IF FAddToBillboardList("", 0, "", lTicks&) = 0 THEN
ErrorMsg SID_ERR_ADDBLANKTOBILLBOARDLIST, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB ClearBillboardList
IF FClearBillboardList() = 0 THEN
ErrorMsg SID_ERR_CLEARBILLBOARDLIST, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB SetCopyGaugePosition (x%, y%)
ProSetPos x%, y%
END SUB
PUBLIC SUB QUIT
DIM sz$
sz$ = PopupModalDlg (DB_EXITHISTORY, DB_EXITHISTORY)
If sz$ = "OK" Then
UIPopAll
gEndStatementEncountered% = TRUE
END
End If
END SUB
PUBLIC FUNCTION Lot_WriteToRiFile (ripath$) AS INTEGER
DIM uname$, cname$, snum$
Lot_WriteToRiFile = TRUE
uname$ = GetSymbolValue("NAME")
IF LEN(uname$) > 30 THEN
uname$ = MID$(uname$,1,30)
END IF
cname$ = GetSymbolValue(SYM_COMPANY$)
IF LEN(cname$) > 30 THEN
cname$ = MID$(cname$,1,30)
END IF
snum$ = GetSymbolValue(SYM_SERIALNUM$)
IF WriteUserRegistration(ripath$,uname$,cname$,snum$) <> 0 Then
Lot_WriteToRiFile = FALSE
End If
END FUNCTION
PUBLIC FUNCTION Lot_ReadDefaultsfromRi (default_ripath$) AS INTEGER
DIM rc%, n%
DIM buf1 AS STRING : buf1 = String$(80,0)
DIM buf2 AS STRING : buf2 = String$(80,0)
DIM buf3 AS STRING : buf3 = String$(18,0)
Lot_ReadDefaultsfromRi = FALSE
rc% = DoesFileExist(default_ripath$,femExists)
if rc% = 0 goto rinotfound
rc% = ReadUserRegistration(default_ripath$,buf1,buf2,buf3)
If rc% <> 0 goto rinotfound
n% = LEN(buf1)
SetSymbolValue SYM_NAME$, LEFT$(buf1, n%)
n% = LEN(buf2)
SetSymbolValue SYM_COMPANY$, LEFT$(buf2, n%)
n% = LEN(buf3)
SetSymbolValue SYM_SERIALNUM$, LEFT$(buf3, n%)
Lot_ReadDefaultsfromRi = TRUE
EXIT FUNCTION
rinotfound:
END FUNCTION
PUBLIC FUNCTION Reg_GetNumberOfProducts() AS INTEGER
Reg_GetNumberOfProducts=gCurrNumOfProds%
END FUNCTION
PUBLIC SUB Reg_RegisterProductNames(Acronym$,Full_Name$)
gCurrNumOfProds%=gCurrNumOfProds%+1
IF gCurrNumOfProds% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(gCurrNumOfProds%).Acronym=Acronym$
Prods(gCurrNumOfProds%).Name=Full_Name$
Prods(gCurrNumOfProds%).DirSymList=Acronym$+"DIRS"
Prods(gCurrNumOfProds%).CDOpt=Acronym$+"CDOPT"
Prods(gCurrNumOfProds%).CDOptSelected=Acronym$+"CDOPTSELECTED"
Prods(gCurrNumOfProds%).NodeOpt=Acronym$+"NODEOPT"
Prods(gCurrNumOfProds%).NodeOptSelected=Acronym$+"NODEOPTSELECTED"
Prods(gCurrNumOfProds%).NodeOptDefaultSelected=Acronym$+"NODEOPTDEFAULTSELECTED"
Prods(gCurrNumOfProds%).CDOptDefaultSelected=Acronym$+"CDOPTDEFAULTSELECTED"
Prods(gCurrNumOfProds%).BillboardNumber=0
Prods(gCurrNumOfProds%).ProgManagerGroup="Lotus Applications"
Prods(gCurrNumOfProds%).UIInOrOut = 1
Prods(gCurrNumOfProds%).AllowUserToPickInSuite = 1
Prods(gCurrNumOfProds%).Share = 0
Prods(gCurrNumOfProds%).DataLens = 0
Prods(gCurrNumOfProds%).SQL = 0
Prods(gCurrNumOfProds%).Paradox = 0
Prods(gCurrNumOfProds%).Srv = 0
Prods(gCurrNumOfProds%).License = 0
Prods(gCurrNumOfProds%).ATM = 0
Prods(gCurrNumOfProds%).PreviousVersion = ""
END SUB
PUBLIC SUB Reg_SetSupportedInstallTypes(ProdNo%,Complete%,Custom%,Laptop%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).Complete=Complete%
Prods(ProdNo%).Custom=Custom%
Prods(ProdNo%).Laptop=Laptop%
END SUB
PUBLIC SUB Reg_SetSelectedInstallType(ProdNo%,TypeSelected$)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF (TypeSelected$<>gCOMPLETE$ AND TypeSelected$<>gCUSTOM$ AND _
TypeSelected$<>gLAPTOP$) THEN
ERROR STFQUIT
END IF
SELECT CASE TypeSelected$
CASE gCOMPLETE$
Prods(ProdNo%).SelectedType=TypeSelected$
CASE gCUSTOM$
IF(Prods(ProdNo%).Custom=1) THEN
Prods(ProdNo%).SelectedType=TypeSelected$
ELSE
Prods(ProdNo%).SelectedType=gCOMPLETE$
END IF
CASE gLAPTOP$
IF(Prods(ProdNo%).Laptop=1) THEN
Prods(ProdNo%).SelectedType=TypeSelected$
ELSE
Prods(ProdNo%).SelectedType=gCOMPLETE$
END IF
END SELECT
END SUB
PUBLIC SUB Reg_SetProdSizes(ProdNo%,FullSize&,MinSize&)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).FullSize=FullSize&
Prods(ProdNo%).MinSize=MinSize&
END SUB
PUBLIC SUB Reg_SetUIInOrOut(ProdNo%,Flag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).UIInOrOut = Flag%
END SUB
PUBLIC SUB Reg_SetAllowUserToPickInSuite(ProdNo%,Flag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).AllowUserToPickInSuite = Flag%
END SUB
PUBLIC SUB Reg_SetShareFlags(ProdNo%,Share%,DLens%,SQL%,Paradox%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).Share=Share%
Prods(ProdNo%).DataLens=DLens%
Prods(ProdNo%).SQL=SQL%
Prods(ProdNo%).Paradox=Paradox%
END SUB
PUBLIC SUB Reg_SetCDOption(ProdNo%,Inst%,CDOptStr$)
DIM CDOptSym$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSym$=Prods(ProdNo%).CDOpt
IF CDOptSym$ = "" OR CDOptStr$ = ""THEN
ERROR STFQUIT
END IF
SetListItem CDOptSym$, Inst%,CDOptStr$
END SUB
PUBLIC SUB Reg_SetCDOptionSelected(ProdNo%,Inst%,Selection%)
DIM CDOptSymSelected$,CDOptSymDefaultSelected$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSymSelected$=Prods(ProdNo%).CDOptSelected
IF CDOptSymSelected$ = "" OR _
(Selection% <> 1 AND Selection% <> 0) THEN
ERROR STFQUIT
END IF
SetListItem CDOptSymSelected$,Inst%,STR$(Selection%)
CDOptSymDefaultSelected$=Prods(ProdNo%).CDOptDefaultSelected
IF CDOptSymDefaultSelected$ = "" OR _
(Selection% <> 1 AND Selection% <> 0) THEN
ERROR STFQUIT
END IF
SetListItem CDOptSymDefaultSelected$,Inst%,STR$(Selection%)
END SUB
PUBLIC SUB Reg_ReSetCDOptionSelected(ProdNo%,Inst%,Selection%)
DIM CDOptSymSelected$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSymSelected$=Prods(ProdNo%).CDOptSelected
IF CDOptSymSelected$ = "" OR _
(Selection% <> 1 AND Selection% <> 0) THEN
ERROR STFQUIT
END IF
SetListItem CDOptSymSelected$,Inst%,STR$(Selection%)
END SUB
PUBLIC SUB Reg_ReSetCDOptionSelectedToDefault(ProdNo%,Inst%)
DIM CDOptSymSelected$,CDOptSymDefaultSelected$,Sel$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSymDefaultSelected$=Prods(ProdNo%).CDOptDefaultSelected
IF CDOptSymDefaultSelected$ = "" THEN
ERROR STFQUIT
END IF
Sel$ = GetListItem( CDOptSymDefaultSelected$,Inst% )
CDOptSymSelected$=Prods(ProdNo%).CDOptSelected
IF CDOptSymSelected$ = "" THEN
ERROR STFQUIT
END IF
SetListItem CDOptSymSelected$,Inst%,Sel$
END SUB
PUBLIC SUB Reg_ReSetAllCDOptsSelToDefaults(ProdNo%)
DIM CDOptSelSym$,CDOptSelListLen%,Inst%
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSelListLen% = 0
CDOptSelSym$=Prods(ProdNo%).CDOptSelected
IF CDOptSelSym$ = "" THEN
ERROR STFQUIT
END IF
CDOptSelListLen%=GetListLength(CDOptSelSym$)
FOR Inst%=1 TO CDOptSelListLen%
Reg_ReSetCDOptionSelectedToDefault ProdNo%,Inst%
NEXT
END SUB
PUBLIC SUB Reg_SetNodeOption(ProdNo%,Inst%,NodeOptStr$)
DIM NodeOptSym$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSym$=Prods(ProdNo%).NodeOpt
IF NodeOptSym$ = "" OR NodeOptStr$ = ""THEN
ERROR STFQUIT
END IF
SetListItem NodeOptSym$, Inst%,NodeOptStr$
END SUB
PUBLIC SUB Reg_SetNodeOptionSelected(ProdNo%,Inst%,Selection%)
DIM NodeOptSymSelected$,NodeOptSymDefaultSelected$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSymSelected$=Prods(ProdNo%).NodeOptSelected
IF NodeOptSymSelected$ = "" OR _
(Selection% <> 1 AND Selection% <> 0) THEN
ERROR STFQUIT
END IF
SetListItem NodeOptSymSelected$,Inst%,STR$(Selection%)
NodeOptSymDefaultSelected$=Prods(ProdNo%).NodeOptDefaultSelected
IF NodeOptSymDefaultSelected$ = "" OR _
(Selection% <> 1 AND Selection% <> 0) THEN
ERROR STFQUIT
END IF
SetListItem NodeOptSymDefaultSelected$,Inst%,STR$(Selection%)
END SUB
PUBLIC SUB Reg_ReSetNodeOptionSelected(ProdNo%,Inst%,Selection%)
DIM NodeOptSymSelected$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSymSelected$=Prods(ProdNo%).NodeOptSelected
IF NodeOptSymSelected$ = "" OR _
(Selection% <> 1 AND Selection% <> 0) THEN
ERROR STFQUIT
END IF
SetListItem NodeOptSymSelected$,Inst%,STR$(Selection%)
END SUB
PUBLIC SUB Reg_ReSetNodeOptionSelectedToDefault(ProdNo%,Inst%)
DIM NodeOptSymSelected$,NodeOptSymDefaultSelected$,Sel$
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSymDefaultSelected$=Prods(ProdNo%).NodeOptDefaultSelected
IF NodeOptSymDefaultSelected$ = "" THEN
ERROR STFQUIT
END IF
Sel$ = GetListItem( NodeOptSymDefaultSelected$,Inst% )
NodeOptSymSelected$=Prods(ProdNo%).NodeOptSelected
IF NodeOptSymSelected$ = "" THEN
ERROR STFQUIT
END IF
SetListItem NodeOptSymSelected$,Inst%,Sel$
END SUB
PUBLIC SUB Reg_ReSetAllNodeOptsSelToDefaults(ProdNo%)
DIM NodeOptSelSym$,NodeOptSelListLen%,Inst%
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSelListLen% = 0
NodeOptSelSym$=Prods(ProdNo%).NodeOptSelected
IF NodeOptSelSym$ = "" THEN
ERROR STFQUIT
END IF
NodeOptSelListLen%=GetListLength(NodeOptSelSym$)
FOR Inst%=1 TO NodeOptSelListLen%
Reg_ReSetNodeOptionSelectedToDefault ProdNo%,Inst%
NEXT
END SUB
PUBLIC SUB Reg_SetSrvSupport(ProdNo%,SrvFlag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF SrvFlag% <> 0 AND SrvFlag% <> 1 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).Srv=SrvFlag%
END SUB
PUBLIC SUB Reg_SetDistSupport(ProdNo%,DistFlag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF DistFlag% <> 0 AND DistFlag% <> 1 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).Dist=DistFlag%
END SUB
PUBLIC SUB Reg_SetLicenseSupport(ProdNo%,LicFlag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF LicFlag% <> 0 AND LicFlag% <> 1 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).License=LicFlag%
Prods(ProdNo%).LicenseSelected=LicFlag%
END SUB
PUBLIC SUB Reg_SetLicenseSelected(ProdNo%,LicFlag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF LicFlag% <> 0 AND LicFlag% <> 1 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).LicenseSelected=LicFlag%
END SUB
PUBLIC SUB Reg_SetCountDirectory(ProdNo%,CountDir$)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF CountDir$ ="" THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).CountDirectory=CountDir$
END SUB
PUBLIC SUB Reg_SetATMSupport(ProdNo%,ATMFlag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF ATMFlag% <> 0 AND ATMFlag% <> 1 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).ATM=ATMFlag%
END SUB
PUBLIC SUB Reg_SetProgManagerGroup(ProdNo%,GroupName$)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF LEN(GroupName$) > 30 THEN
Prods(ProdNo%).ProgManagerGroup=LEFT$(GroupName$,30)
ELSE
Prods(ProdNo%).ProgManagerGroup=GroupName$
END IF
END SUB
PUBLIC SUB Reg_SetBillboardNumber(ProdNo%,BBNum%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF BBNum% < 0 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).BillboardNumber=BBNum%
END SUB
PUBLIC FUNCTION Reg_GetProductNo(ProdAcronym$) AS INTEGER
DIM ProdNo%, count%
IF ProdAcronym$ = "" THEN
ERROR STFQUIT
END IF
ProdNo% = 0
FOR count%=1 TO gMaxNumOfProds%
IF Prods(count%).Acronym = ProdAcronym$ THEN
ProdNo% = count%
EXIT FOR
END IF
NEXT
Reg_GetProductNo=ProdNo%
END FUNCTION
PUBLIC FUNCTION Reg_GetProductAcronym(ProdNo%) AS STRING
DIM ProdAcronym$
ProdAcronym$=""
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
ProdAcronym$=Prods(ProdNo%).Acronym
Reg_GetProductAcronym=ProdAcronym$
END FUNCTION
PUBLIC FUNCTION Reg_GetProductname(ProdNo%) AS STRING
DIM Prodname$
Prodname$=""
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prodname$ = Prods(ProdNo%).Name
Reg_GetProductname = Prodname$
END FUNCTION
PUBLIC FUNCTION Reg_GetUIInOrOut(ProdNo%) AS INTEGER
DIM flag%
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
flag% = Prods(ProdNo%).UIInOrOut
Reg_GetUIInOrOut = flag%
END FUNCTION
PUBLIC FUNCTION Reg_GetAllowUserToPickInSuite(ProdNo%) AS INTEGER
DIM flag%
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
flag% = Prods(ProdNo%).AllowUserToPickInSuite
Reg_GetAllowUserToPickInSuite = flag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForFullInstall(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Complete
Reg_GetProdSupportForFullInstall=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForCustInstall(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Custom
Reg_GetProdSupportForCustInstall=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForMinInstall(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Laptop
Reg_GetProdSupportForMinInstall=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSelectedInstallType(ProdNo%) AS STRING
DIM SelType$
SelType$ = ""
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SelType$=Prods(ProdNo%).SelectedType
Reg_GetProdSelectedInstallType=SelType$
END FUNCTION
PUBLIC FUNCTION Reg_GetProdFullSize(ProdNo%) AS LONG
DIM FSize&
FSize& = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
FSize&=Prods(ProdNo%).FullSize
Reg_GetProdFullSize=FSize&
END FUNCTION
PUBLIC FUNCTION Reg_GetProdMinSize(ProdNo%) AS LONG
DIM MSize&
MSize& = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
MSize&=Prods(ProdNo%).MinSize
Reg_GetProdMinSize=MSize&
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForShare(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Share
Reg_GetProdSupportForShare=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForDataLens(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).DataLens
Reg_GetProdSupportForDataLens=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForSQL(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).SQL
Reg_GetProdSupportForSQL=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForParadox(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Paradox
Reg_GetProdSupportForParadox=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetCDOptionStr(ProdNo%,Inst%) AS STRING
DIM CDOptSym$,CDOptStr$,CDOptListLen%
CDOptSym$ = ""
CDOptStr$ = ""
CDOptListLen% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSym$=Prods(ProdNo%).CDOpt
IF CDOptSym$ = "" THEN
ERROR STFQUIT
END IF
CDOptListLen%=GetListLength(CDOptSym$)
IF Inst% > CDOptListLen% THEN
ERROR STFQUIT
END IF
CDOptStr$=GetListItem( CDOptSym$, Inst%)
Reg_GetCDOptionStr=CDOptStr$
END FUNCTION
PUBLIC FUNCTION Reg_GetNodeOptionStr(ProdNo%,Inst%) AS STRING
DIM NodeOptSym$,NodeOptStr$,NodeOptListLen%
NodeOptSym$ = ""
NodeOptStr$ = ""
NodeOptListLen% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSym$=Prods(ProdNo%).NodeOpt
IF NodeOptSym$ = "" THEN
ERROR STFQUIT
END IF
NodeOptListLen%=GetListLength(NodeOptSym$)
IF Inst% > NodeOptListLen% THEN
ERROR STFQUIT
END IF
NodeOptStr$=GetListItem( NodeOptSym$, Inst%)
Reg_GetNodeOptionStr=NodeOptStr$
END FUNCTION
PUBLIC FUNCTION Reg_GetNumOfCDOptions(ProdNo%) AS INTEGER
DIM CDOptSym$,CDOptNum%
CDOptSym$ = ""
CDOptNum% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSym$=Prods(ProdNo%).CDOpt
IF CDOptSym$ = "" THEN
ERROR STFQUIT
END IF
CDOptNum%=GetListLength( CDOptSym$)
Reg_GetNumOfCDOptions=CDOptNum%
END FUNCTION
PUBLIC FUNCTION Reg_GetNumOfNodeOptions(ProdNo%) AS INTEGER
DIM NodeOptSym$,NodeOptNum%
NodeOptSym$ = ""
NodeOptNum% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSym$=Prods(ProdNo%).NodeOpt
IF NodeOptSym$ = "" THEN
ERROR STFQUIT
END IF
NodeOptNum%=GetListLength( NodeOptSym$)
Reg_GetNumOfNodeOptions=NodeOptNum%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForSrv(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Srv
Reg_GetProdSupportForSrv=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForDist(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Dist
Reg_GetProdSupportForDist=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForLicense(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).License
Reg_GetProdSupportForLicense=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_IsLicenseSelected(ProdNo%) AS INTEGER
DIM SelFlag%
SelFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SelFlag%=Prods(ProdNo%).LicenseSelected
Reg_IsLicenseSelected=SelFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetCountDirectory(ProdNo%) AS STRING
DIM CountDir$
CountDir$=""
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CountDir$=Prods(ProdNo%).CountDirectory
Reg_GetCountDirectory=CountDir$
END FUNCTION
PUBLIC FUNCTION Reg_GetProdSupportForATM(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).ATM
Reg_GetProdSupportForATM=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetDirSymbolList(ProdNo%) AS STRING
DIM DirList$
DirList$=""
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
DirList$=Prods(ProdNo%).DirSymList
Reg_GetDirSymbolList=DirList$
END FUNCTION
PUBLIC FUNCTION Reg_GetProgManagerGroupName(ProdNo%) AS STRING
DIM ProdManagerGroupName$
ProdManagerGroupName$=""
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
ProdManagerGroupName$=Prods(ProdNo%).ProgManagerGroup
Reg_GetProgManagerGroupName=ProdManagerGroupName$
END FUNCTION
PUBLIC FUNCTION Reg_GetNumOfDirectories(ProdNo%) AS INTEGER
DIM DirSym$,DirNum%
DirSym$ = ""
DirNum% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
DirSym$=Prods(ProdNo%).DirSymList
IF DirSym$ = "" THEN
ERROR STFQUIT
END IF
DirNum%=GetListLength( DirSym$)
Reg_GetNumOfDirectories=DirNum%
END FUNCTION
PUBLIC FUNCTION Reg_IsCDOptionSelected(ProdNo%,Inst%) AS STRING
DIM CDOptSelectedSym$,CDOptSel$,CDOptSelListLen%
CDOptSelectedSym$ = ""
CDOptSel$ = ""
CDOptSelListLen% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSelectedSym$=Prods(ProdNo%).CDOptSelected
IF CDOptSelectedSym$ = "" THEN
ERROR STFQUIT
END IF
CDOptSelListLen%=GetListLength(CDOptSelectedSym$)
IF Inst% > CDOptSelListLen% THEN
ERROR STFQUIT
END IF
CDOptSel$=GetListItem( CDOptSelectedSym$, Inst%)
Reg_IsCDOptionSelected=CDOptSel$
END FUNCTION
PUBLIC FUNCTION Reg_IsNodeOptionSelected(ProdNo%,Inst%) AS STRING
DIM NodeOptSelectedSym$,NodeOptSel$,NodeOptSelListLen%
NodeOptSelectedSym$ = ""
NodeOptSel$ = ""
NodeOptSelListLen% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSelectedSym$=Prods(ProdNo%).NodeOptSelected
IF NodeOptSelectedSym$ = "" THEN
ERROR STFQUIT
END IF
NodeOptSelListLen%=GetListLength(NodeOptSelectedSym$)
IF Inst% > NodeOptSelListLen% THEN
ERROR STFQUIT
END IF
NodeOptSel$=GetListItem( NodeOptSelectedSym$, Inst%)
Reg_IsNodeOptionSelected=NodeOptSel$
END FUNCTION
PUBLIC FUNCTION Reg_IsNodeOptionDefaultSelected(ProdNo%,Inst%) AS STRING
DIM NodeOptSelectedDefaultSym$,NodeOptSelDefault$,NodeOptSelDefaultListLen%
NodeOptSelectedDefaultSym$ = ""
NodeOptSelDefault$ = ""
NodeOptSelDefaultListLen% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
NodeOptSelectedDefaultSym$=Prods(ProdNo%).NodeOptDefaultSelected
IF NodeOptSelectedDefaultSym$ = "" THEN
ERROR STFQUIT
END IF
NodeOptSelDefaultListLen%=GetListLength(NodeOptSelectedDefaultSym$)
IF Inst% > NodeOptSelDefaultListLen% THEN
ERROR STFQUIT
END IF
NodeOptSelDefault$=GetListItem( NodeOptSelectedDefaultSym$, Inst%)
Reg_IsNodeOptionDefaultSelected=NodeOptSelDefault$
END FUNCTION
PUBLIC FUNCTION Reg_IsCDOptionDefaultSelected(ProdNo%,Inst%) AS STRING
DIM CDOptSelectedDefaultSym$,CDOptSelDefault$,CDOptSelDefaultListLen%
CDOptSelectedDefaultSym$ = ""
CDOptSelDefault$ = ""
CDOptSelDefaultListLen% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
CDOptSelectedDefaultSym$=Prods(ProdNo%).CDOptDefaultSelected
IF CDOptSelectedDefaultSym$ = "" THEN
ERROR STFQUIT
END IF
CDOptSelDefaultListLen%=GetListLength(CDOptSelectedDefaultSym$)
IF Inst% > CDOptSelDefaultListLen% THEN
ERROR STFQUIT
END IF
CDOptSelDefault$=GetListItem( CDOptSelectedDefaultSym$, Inst%)
Reg_IsCDOptionDefaultSelected=CDOptSelDefault$
END FUNCTION
PUBLIC SUB Reg_SetSystemFileSize(ProdNo%,Size&)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).SystemFileSize = Size&
END SUB
PUBLIC FUNCTION Reg_GetSystemFileSize(ProdNo%) AS LONG
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Reg_GetSystemFileSize = Prods(ProdNo%).SystemFileSize
END FUNCTION
PUBLIC FUNCTION Reg_GetBillboardNumber(ProdNo%) AS INTEGER
DIM BBNum%
BBNum%=0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
BBNum%=Prods(ProdNo%).BillboardNumber
Reg_GetBillboardNumber=BBNum%
END FUNCTION
PUBLIC FUNCTION Lot_GetCurrentProduct() AS INTEGER
Lot_GetCurrentProduct = gCurrentProduct%
END FUNCTION
PUBLIC SUB Lot_SetCurrentProduct(ProdNo%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
gCurrentProduct% = ProdNo%
END SUB
PUBLIC FUNCTION Lot_GetInstallDir() AS STRING
DIM s$, network$
s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$)
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ <> gNODE THEN
IF s$ = gSMARTSUITE$ THEN
Lot_GetInstallDir = GetSymbolValue(SYM_BASEDIR$)
ELSE
s$ = Reg_GetDirSymbolList(1)
s$ = GetListItem(s$,1)
Lot_GetInstallDir = GetSymbolValue(s$)
END IF
ELSE
Lot_GetInstallDir = GetSymbolValue(SYM_STF_SRCDIR$)
END IF
END FUNCTION
PUBLIC FUNCTION Lot_GetTheRealProdDir(prodno%) AS STRING
DIM sym$, prodsym$, progdir$, basedir$, l%, m%, disks$, dlen%
If GetSymbolValue(SYM_NETWORK$) <> gNODE$ Then
sym$ = Reg_GetDirSymbolList(prodno%)
prodsym$ = GetListItem(sym$, 1)
progdir$ = GetListItem(prodsym$,1)
Else
If GetSymbolValue (SYM_SINGLESMARTSUITE) = gSINGLE$ Then
disks$ = GetSymbolValue(SYM_INSTALL_SOURCE$)
dlen% = LEN(disks$)
If dlen% <=0 Then
disks$ = GetSymbolValue(SYM_STF_SRCDIR$)
dlen% = LEN(disks$)
End If
If MID$(disks$,dlen%,1) <> "\" Then
disks$ = disks$ + "\"
End If
progdir$ = disks$
Else
sym$ = Reg_GetDirSymbolList(prodno%)
prodsym$ = GetListItem(sym$, 1)
progdir$ = GetListItem(prodsym$,1)
basedir$ = GetSymbolValue (SYM_BASEDIR$)
l% = INSTR(progdir$, basedir$)
l% = INSTR(l%, progdir$, "\")
m% = INSTR(l%, progdir$, "\")
progdir$ = GetSymbolValue (SYM_INSTALL_SOURCE) +_
RIGHT$( LEFT$ (progdir$, m%), l%)
End If
End If
Lot_GetTheRealProdDir = progdir$
END FUNCTION
PUBLIC FUNCTION Lot_ReadSerialNumber () AS INTEGER
DIM buf1 AS STRING : buf1 = String$(18,0)
DIM snpath$, rc%
snpath$ = GetSymbolValue(SYM_STF_SRCDIR$)
rc% = ReadSerialNumber(snpath$,buf1$)
If rc% = 0 Then
SetSymbolValue SYM_SERIALNUM$, LEFT$(buf1$, INSTR(buf1$, CHR$(0)))
Lot_ReadSerialNumber = SUCCESS
Else
ErrorMsg SID_ERR_READSERIAL, ""
Lot_ReadSerialNumber = FAILURE
end if
END FUNCTION
PUBLIC FUNCTION Lot_TrimEndSlash (path$) AS STRING
DIM l%
l% = LEN(path$)
If MID$(path$, l%, 1) = "\" Then
Lot_TrimEndSlash = LEFT$ (path$, l%-1)
Else
Lot_TrimEndSlash = path$
End If
END FUNCTION
PUBLIC FUNCTION Lot_AreShareToolsSupported () AS INTEGER
DIM NumberOfProducts%,count%,ShareSupport%
ShareSupport%=0
NumberOfProducts%=Reg_GetNumberOfProducts()
IF(NumberOfProducts%<>0) THEN
FOR count%=1 TO NumberOfProducts%
IF Reg_GetProdSupportForShare(count%)=1 THEN
ShareSupport%=1
EXIT FOR
END IF
NEXT
END IF
Lot_AreShareToolsSupported=ShareSupport%
END FUNCTION
PUBLIC Lot_CallShareExec_RC%
PUBLIC FUNCTION Lot_CallSharedTool (func$) AS INTEGER
DIM notused%
Lot_CallSharedTool = 0
IF Lot_AreShareToolsSupported () = 1 THEN
gEndStatementEncountered% = FALSE
EXECUTE(|USE "SHARE" : Lot_CallShareExec_RC% = | & func$)
IF gEndStatementEncountered% = TRUE THEN
END
END IF
Lot_CallSharedTool = Lot_CallShareExec_RC%
END IF
END FUNCTION
PUBLIC SUB SetRestartDir (szDir$)
IF FSetRestartDir(szDir$) = FALSE THEN
ErrorMsg SID_ERR_SETRESTARTDIR, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC FUNCTION RestartListEmpty AS INTEGER
IF FRestartListEmpty() = FALSE THEN
RestartListEmpty = FALSE
ELSE
RestartListEmpty = TRUE
END IF
END FUNCTION
PUBLIC FUNCTION ExitExecRestart AS INTEGER
ExitExecRestart = FExitExecRestart()
END FUNCTION
PUBLIC FUNCTION Lot_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING
DIM network$, dirsym$, chpt$, destdir$,s$,InorOut%,subdir$,installIniFile$
network$ = GetSymbolValue(SYM_NETWORK$)
s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$)
IF s$ = gSMARTSUITE$ THEN
IF network$ = gSTANDARD$ THEN
IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESUITCD
chpt$ = Lot_GetChapterFromKeyWord(featureId$)
IF chpt$ = "" GOTO NOFEATURE
InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT)
IF InorOut%=0 GOTO MAYBESUITCD
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
IF dirsym$ = "" GOTO NOFEATURE
destdir$ = GetSymbolValue(dirsym$)
IF destdir$ = "" GOTO NOFEATURE
IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESUITCD
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
ELSEIF network$ = gNODE$ THEN
IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESUITCD
chpt$ = Lot_GetChapterFromKeyWord(featureId$)
IF chpt$ <> "" THEN
InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT)
IF InorOut%=0 GOTO LOOKONSUITSRV
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
destdir$ = GetSymbolValue(dirsym$)
IF DoesFileExist(destdir$+filetolookfor$,femExists) <> 0 THEN
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
ELSE
GOTO LOOKONSUITSRV
END IF
ELSE
GOTO LOOKONSUITSRV
END IF
ELSEIF network$ = gSERVER$ THEN
IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESUITCD
chpt$ = Lot_GetChapterFromKeyWord(featureId$)
IF chpt$ = "" GOTO MAYBESUITCD
InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT)
IF InorOut%=0 GOTO MAYBESUITCD
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
IF dirsym$ = "" GOTO MAYBESUITCD
destdir$ = GetSymbolValue(dirsym$)
IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESUITCD
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
ELSE
GOTO NOFEATURE
END IF
ELSEIF s$ = gSINGLE$ THEN
IF network$ = gSTANDARD$ THEN
IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESINGLECD
chpt$ = Lot_GetChapterFromKeyWord(featureId$)
IF chpt$ = "" GOTO NOFEATURE
InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT)
IF InorOut%=0 GOTO MAYBESINGLECD
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
IF dirsym$ = "" GOTO NOFEATURE
destdir$ = GetSymbolValue(dirsym$)
IF destdir$ = "" GOTO NOFEATURE
IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESINGLECD
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
ELSEIF network$ = gNODE$ THEN
IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESINGLECD
chpt$ = Lot_GetChapterFromKeyWord(featureId$)
IF chpt$ <> "" THEN
InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT)
IF InorOut%=0 GOTO LOOKONSINGLESRV
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
destdir$ = GetSymbolValue(dirsym$)
IF DoesFileExist(destdir$+filetolookfor$,femExists) <> 0 THEN
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
ELSE
GOTO LOOKONSINGLESRV
END IF
ELSE
GOTO LOOKONSINGLESRV
END IF
ELSEIF network$ = gSERVER$ THEN
IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESINGLECD
chpt$ = Lot_GetChapterFromKeyWord(featureId$)
IF chpt$ = "" GOTO MAYBESINGLECD
InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT)
IF InorOut%=0 GOTO MAYBESINGLECD
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
IF dirsym$ = "" GOTO MAYBESINGLECD
destdir$ = GetSymbolValue(dirsym$)
IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESINGLECD
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
ELSE
GOTO NOFEATURE
END IF
END IF
Exit Function
LOOKONSINGLESRV:
destdir$ = GetSymbolValue(SYM_INSTALL_SOURCE$)
IF destdir$ = "" THEN destdir$ = GetSymbolValue(SYM_STF_SRCDIR$)
IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO LOOKONNETLOTUSAPP
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
LOOKONSUITSRV:
destdir$ = GetSymbolValue(SYM_INSTALL_SOURCE$)
IF destdir$ = "" THEN destdir$ = GetSymbolValue(SYM_STF_SRCDIR$)
installIniFile$ = MakePath(destdir$,gINSTALLINI$)
subdir$ = GetIniKeyString(installIniFile$,"Destination Directories", Reg_GetProductAcronym(prodno%))
IF DoesFileExist(destdir$+subdir$+filetolookfor$,femExists) = 0 GOTO LOOKONNETLOTUSAPP
Lot_WhereIsFeature = destdir$+subdir$
EXIT FUNCTION
LOOKONNETLOTUSAPP:
destdir$ = GetSymbolValue(SYM_NETLOTUSAPP$)
IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO NOFEATURE
Lot_WhereIsFeature = destdir$
EXIT FUNCTION
MAYBESINGLECD:
MAYBESUITCD:
NOFEATURE:
Lot_WhereIsFeature = ""
END FUNCTION
PUBLIC FUNCTION Lot_IsTheFeatureInstalled(FeatureToFind$) AS INTEGER
DIM NetworkIns$
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
PopulateCINSTALLLIST
IF NetworkIns$ <> gDISTRIBUTION THEN
If ISELEMENT(CINSTALL(FeatureToFind$)) <> FALSE Then
Lot_IsTheFeatureInstalled = 1
Else
Lot_IsTheFeatureInstalled = 0
End If
Else
Lot_IsTheFeatureInstalled = 0
End If
END FUNCTION
PUBLIC FUNCTION Lot_SaveFeaturesInstaledInInstallIni() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, CurrChpt$, FeatureName$
DIM FeatureNum%,s$,AllProdNum%,prodNum%,ProdAcronym$,BaseDir$,symList$
DIM prodsym$,progdir$
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ OR NetworkIns$=gSTANDARD THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
PopulateCINSTALLLIST
CurrChpt$ = Lot_GetFirst("", F_INOROUT)
WHILE (CurrChpt$ <> "")
FeatureName$ = Lot_GetChapterValStr(CurrChpt$, F_KEYWORD)
If ISELEMENT(CINSTALL(FeatureName$)) = FALSE Then
FeatureNum% = gNCINSTALL%
CreateIniKeyValue gInstallIniFile$, "Server Feature Installed", "Feature"+LTRIM$(STR$(FeatureNum%+1)),FeatureName$, cmoOverwrite
CINSTALL (FeatureName$) = "1"
gNCINSTALL% = gNCINSTALL%+1
END IF
CurrChpt$ = Lot_GetNext()
WEND
END IF
s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$)
IF NetworkIns$=gSERVER$ AND s$ = gSMARTSUITE$ THEN
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
BaseDir$= GetSymbolValue(SYM_BASEDIR$)
FOR prodNum%=1 TO AllProdNum%
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
symList$ = Reg_GetDirSymbolList(prodNum%)
prodsym$ = GetListItem(symList$, 1)
progdir$ = GetListItem(prodsym$,1)
IF LEN(BaseDir$) < LEN(progdir$) THEN
CreateIniKeyValue gInstallIniFile$, "Destination Directories", ProdAcronym$,MID(progdir$,LEN(BaseDir$)+1), cmoOverwrite
END IF
NEXT
END IF
END IF
Lot_SaveFeaturesInstaledInInstallIni = SUCCESS
END FUNCTION
FUNCTION Lot_GetLastFeatureNumber() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, FeaturePref$
DIM FeatureTag$, FeatureID$, rc%
STATIC FeatureNumber%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ OR NetworkIns$=gSTANDARD$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
FeaturePref$ = "Feature"
FeatureNumber%=1
FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%))
FeatureID$ = GetIniKeyString(gInstallIniFile$,"Server Feature Installed", FeatureTag$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
IF FeatureID$ = "" THEN
Lot_GetLastFeatureNumber = 0
EXIT FUNCTION
ELSE
WHILE (FeatureID$ <> "")
FeatureNumber% = FeatureNumber% + 1
FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%))
FeatureID$ = GetIniKeyString(gInstallIniFile$,"Server Feature Installed", FeatureTag$)
WEND
Lot_GetLastFeatureNumber = FeatureNumber%-1
EXIT FUNCTION
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_SaveTheNodeOptionsInInstallIni() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$
DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
IF AllOptNum% <> 0 THEN
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
FOR OptNum%=1 TO AllOptNum%
IF Reg_IsNodeOptionSelected(prodNum%,OptNum%)=STR(1) THEN
OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
IF OptName$ <> "" AND FIsKeywordinCopyList (OptName$) <> FALSE THEN
OptCount% = Lot_GetLastNodeOptNumber(ProdAcronym$)
CreateIniKeyValue gInstallIniFile$, ProdAcronym$+" Node Options", "Option"+LTRIM$(STR$(OptCount%+1)),OptName$, cmoOverwrite
END IF
END IF
NEXT
END IF
NEXT
END IF
END IF
Lot_SaveTheNodeOptionsInInstallIni = SUCCESS
END FUNCTION
FUNCTION Lot_GetLastNodeOptNumber(ProdAcronym$) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$
DIM OptTag$, OptID$, OptPref$, rc%
STATIC OptNumber%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
IF OptID$ = "" THEN
Lot_GetLastNodeOptNumber = 0
EXIT FUNCTION
ELSE
WHILE (OptID$ <> "")
OptNumber% = OptNumber% + 1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
WEND
Lot_GetLastNodeOptNumber = OptNumber%-1
EXIT FUNCTION
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
Lot_IsTheNodeOptionsAvailToNode = 0
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
IF OptID$ = OptName$ THEN
Lot_IsTheNodeOptionsAvailToNode = 1
EXIT FUNCTION
ELSE
WHILE (OptID$ <> "")
IF OptID$ = OptName$ THEN
Lot_IsTheNodeOptionsAvailToNode = 1
EXIT FUNCTION
END IF
OptNumber% = OptNumber% + 1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
WEND
Lot_IsTheNodeOptionsAvailToNode = 0
EXIT FUNCTION
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_IsAnyNodeOptAvailToNode() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds%
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%,prodNum%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
NumOfProds% = Reg_GetNumberOfProducts()
IF NumOfProds% = 0 THEN
Lot_IsAnyNodeOptAvailToNode = 0
EXIT FUNCTION
END IF
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
FOR prodNum% = 1 TO NumOfProds%
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
IF OptID$ <> "" THEN
Lot_IsAnyNodeOptAvailToNode = 1
EXIT FUNCTION
END IF
NEXT
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_AreNodeOptAvailToNodeForProd(prodNum%) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds%
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
IF OptID$ <> "" THEN
Lot_AreNodeOptAvailToNodeForProd = 1
EXIT FUNCTION
ELSE
Lot_AreNodeOptAvailToNodeForProd = 0
EXIT FUNCTION
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_GetNumOfNodeOptAvailToNodeForProd(prodNum%) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfOptions%
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
IF OptID$ <> "" THEN
WHILE (OptID$ <> "")
NumOfOptions% = OptNumber%
OptNumber% = OptNumber% + 1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$)
WEND
ELSE
Lot_GetNumOfNodeOptAvailToNodeForProd = 0
EXIT FUNCTION
END IF
Lot_GetNumOfNodeOptAvailToNodeForProd = NumOfOptions
EXIT FUNCTION
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_AreAnyNodeOptAvailToSrv() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$, j%, nodeopt_flag%
DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum%
DIM OptKeyword$, chpt$
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
AllProdNum% = 0
nodeopt_flag% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
OptNum%=Reg_GetNumofNodeOptions(prodNum%)
IF OptNum% <> 0 THEN
chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(prodNum%) + gTOP$)
FOR j% = 1 TO OptNum%
OptKeyWord$ = Reg_GetNodeOptionStr(prodNum%,j%)
chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$)
IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN
nodeopt_flag% = 1
END IF
NEXT
END IF
IF AllOptNum% <> 0 AND nodeopt_flag% <> 0 THEN
Lot_AreAnyNodeOptAvailToSrv=1
EXIT FUNCTION
END IF
NEXT
ELSE
Lot_AreAnyNodeOptAvailToSrv=0
EXIT FUNCTION
END IF
ELSE
Lot_AreAnyNodeOptAvailToSrv=0
EXIT FUNCTION
END IF
Lot_AreAnyNodeOptAvailToSrv=0
END FUNCTION
PUBLIC FUNCTION Lot_SaveTheCDOptionsInInstallIni() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$
DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofCDOptions(prodNum%)
IF AllOptNum% <> 0 THEN
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
FOR OptNum%=1 TO AllOptNum%
IF Reg_IsCDOptionSelected(prodNum%,OptNum%)=STR(1) THEN
OptName$ = Reg_GetCDOptionStr(prodNum%,OptNum%)
IF OptName$ <> "" AND FIsKeywordinCopyList (OptName$) <> FALSE THEN
OptCount% = Lot_GetLastCDOptNumber(ProdAcronym$)
CreateIniKeyValue gInstallIniFile$, ProdAcronym$+" CD Options", "Option"+LTRIM$(STR$(OptCount%+1)),OptName$, cmoOverwrite
END IF
END IF
NEXT
END IF
NEXT
END IF
END IF
Lot_SaveTheCDOptionsInInstallIni = SUCCESS
END FUNCTION
FUNCTION Lot_GetLastCDOptNumber(ProdAcronym$) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$
DIM OptTag$, OptID$, OptPref$, rc%
STATIC OptNumber%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
IF OptID$ = "" THEN
Lot_GetLastCDOptNumber = 0
EXIT FUNCTION
ELSE
WHILE (OptID$ <> "")
OptNumber% = OptNumber% + 1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
WEND
Lot_GetLastCDOptNumber = OptNumber%-1
EXIT FUNCTION
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_IsTheCDOptionsAvailToNode(prodNum%,OptName$) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
Lot_IsTheCDOptionsAvailToNode = 0
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
IF OptID$ = OptName$ THEN
Lot_IsTheCDOptionsAvailToNode = 1
EXIT FUNCTION
ELSE
WHILE (OptID$ <> "")
IF OptID$ = OptName$ THEN
Lot_IsTheCDOptionsAvailToNode = 1
EXIT FUNCTION
END IF
OptNumber% = OptNumber% + 1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
WEND
Lot_IsTheCDOptionsAvailToNode = 0
EXIT FUNCTION
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_IsAnyCDOptAvailToNode() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds%
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%,prodNum%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
NumOfProds% = Reg_GetNumberOfProducts()
IF NumOfProds% = 0 THEN
Lot_IsAnyCDOptAvailToNode = 0
EXIT FUNCTION
END IF
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
FOR prodNum% = 1 TO NumOfProds%
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
IF OptID$ <> "" THEN
Lot_IsAnyCDOptAvailToNode = 1
EXIT FUNCTION
END IF
NEXT
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_AreCDOptAvailToNodeForProd(prodNum%) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds%
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
IF OptID$ <> "" THEN
Lot_AreCDOptAvailToNodeForProd = 1
EXIT FUNCTION
ELSE
Lot_AreCDOptAvailToNodeForProd = 0
EXIT FUNCTION
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_GetNumOfCDOptAvailToNodeForProd(prodNum%) AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfOptions%
DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gNODE$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
rc% = DoesFileExist(gInstallIniFile$,femExists)
IF rc% = 1 THEN
ProdAcronym$ = Reg_GetProductAcronym(prodNum%)
OptPref$ = "Option"
OptNumber%=1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
IF OptID$ <> "" THEN
WHILE (OptID$ <> "")
NumOfOptions% = OptNumber%
OptNumber% = OptNumber% + 1
OptTag$=OptPref$+LTRIM$(STR$(OptNumber%))
OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$)
WEND
ELSE
Lot_GetNumOfCDOptAvailToNodeForProd = 0
EXIT FUNCTION
END IF
Lot_GetNumOfCDOptAvailToNodeForProd = NumOfOptions
EXIT FUNCTION
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_AreAnyCDOptAvailToSrv() AS INTEGER
DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$, j%, CDopt_flag%
DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum%
DIM OptKeyword$, chpt$
NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
IF NetworkIns$=gSERVER$ THEN
prodDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
AllProdNum% = 0
CDopt_flag% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofCDOptions(prodNum%)
OptNum%=Reg_GetNumofCDOptions(prodNum%)
IF OptNum% <> 0 THEN
chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(prodNum%) + gTOP$)
FOR j% = 1 TO OptNum%
OptKeyWord$ = Reg_GetCDOptionStr(prodNum%,j%)
chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$)
IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN
CDopt_flag% = 1
END IF
NEXT
END IF
IF AllOptNum% <> 0 AND CDopt_flag% <> 0 THEN
Lot_AreAnyCDOptAvailToSrv=1
EXIT FUNCTION
END IF
NEXT
ELSE
Lot_AreAnyCDOptAvailToSrv=0
EXIT FUNCTION
END IF
ELSE
Lot_AreAnyCDOptAvailToSrv=0
EXIT FUNCTION
END IF
Lot_AreAnyCDOptAvailToSrv=0
END FUNCTION
PUBLIC SUB Reg_SetSHAREEXESupport(ProdNo%,Flag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF Flag% <> 0 AND Flag% <> 1 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).SHAREEXE=Flag%
END SUB
PUBLIC FUNCTION Reg_GetSHAREEXESupport(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).SHAREEXE
Reg_GetSHAREEXESupport=SuppFlag%
END FUNCTION
PUBLIC SUB Reg_SetNotesSupport(ProdNo%,Flag%)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
IF Flag% <> 0 AND Flag% <> 1 THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).Notes=Flag%
END SUB
PUBLIC SUB Reg_SetPreviousVersion(ProdNo%,prev$)
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Prods(ProdNo%).PreviousVersion=prev$
END SUB
PUBLIC FUNCTION Reg_GetNotesSupport(ProdNo%) AS INTEGER
DIM SuppFlag%
SuppFlag% = 0
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
SuppFlag%=Prods(ProdNo%).Notes
Reg_GetNotesSupport=SuppFlag%
END FUNCTION
PUBLIC FUNCTION Reg_GetPreviousVersion(ProdNo%) AS STRING
IF ProdNo% > gMaxNumOfProds% THEN
ERROR STFQUIT
END IF
Reg_GetPreviousVersion=Prods(ProdNo%).PreviousVersion
END FUNCTION
PUBLIC FUNCTION GetNotesPathfromLotusIni() AS STRING
DIM DestDir$, lotusinipath$, defdir$, temp%, ProdDir$, fullpath$, rv%
DestDir$ = GetWindowsDir()
lotusinipath$ = DestDir$ +"lotus.ini"
if DoesFileExist(lotusinipath$,femExists) then
defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "Notes")
if defdir$ <> "" then
temp% = INSTR(1,LCASE$(defdir$),"notes.exe")
if temp% <> 0 then
ProdDir$ = MID$(defdir$,1,(temp%-1))
if ProdDir$ <> "" then
fullpath$ = ProdDir$ + "notes.exe"
if DoesFileExist(fullpath$, femExists) then
GetNotesPathfromLotusIni = MID$(defdir$,1,(temp%-2))
EXIT FUNCTION
end if
end if
end if
end if
end if
GetNotesPathfromLotusIni = ""
END FUNCTION
PUBLIC FUNCTION IsNotesInPath() AS INTEGER
DIM notesdir$,autoexec$,Buffer$
DIM autofile%, FoundPath%
notesdir$ = GetNotesPathfromLotusIni()
IsNotesInPath = 0
if notesdir$ = "" then
IsNotesInPath = 1
EXIT FUNCTION
end if
autoexec$ = GetBootDrive()
IF autoexec$ <> "" THEN
autoexec$ = autoexec$ + "autoexec.bat"
ELSE
autoexec$ = "c:\" + "autoexec.bat"
END IF
autofile% = 111
OPEN autoexec$ FOR INPUT AS autofile%
Do Until EOF(autofile%)
LINE INPUT #autofile%, Buffer$
FoundPath% = INSTR(1,LCASE$(Buffer$), "path")
if FoundPath% <> 0 Then
FoundPath% = INSTR(FoundPath%, LCASE$(Buffer$), LCASE$(notesdir$))
if FoundPath% <> 0 Then
IsNotesInPath = 1
CLOSE #autofile%
EXIT FUNCTION
end if
end if
Loop
CLOSE #autofile%
END FUNCTION
PUBLIC FUNCTION IsShareInAUTOEXEC() AS INTEGER
DIM autoexec$,Buffer$
DIM autofile%, FoundShare%
IsShareInAUTOEXEC = 0
autoexec$ = GetBootDrive()
IF autoexec$ <> "" THEN
autoexec$ = autoexec$ + "autoexec.bat"
ELSE
autoexec$ = "c:\" + "autoexec.bat"
END IF
autofile% = 111
OPEN autoexec$ FOR INPUT AS autofile%
Do Until EOF(autofile%)
LINE INPUT #autofile%, Buffer$
FoundShare% = INSTR(1,LCASE$(Buffer$), "share")
if FoundShare% <> 0 Then
IsShareInAUTOEXEC = 1
CLOSE #autofile%
EXIT FUNCTION
end if
Loop
CLOSE #autofile%
END FUNCTION
PUBLIC FUNCTION ModifyAutoexec(modflag%,directmod%,backup$) AS STRING
DIM notesdir$,src$,dest$,Buffer$
DIM srcfile%,destfile%, FoundPath%, PathNext%
srcfile% = 112
destfile% = 113
ModifyAutoexec=""
if (modflag% AND MANotes) then
notesdir$ = GetNotesPathfromLotusIni()
end if
src$ = GetBootDrive()
IF src$ <> "" THEN
dest$ = src$ + backup$
src$ = src$ + "autoexec.bat"
ELSE
dest$ = "c:\" + backup$
src$ = "c:\" + "autoexec.bat"
END IF
IF FCopyOneFile(src$, dest$, CmoOverwrite, 0) = FALSE THEN
ModifyAutoexec = LdString( SID_ERR_AUTOEXEC_NOT_COPIED )
EXIT FUNCTION
End If
CopyFile src$, dest$, CmoOverwrite, 0
if directmod% <> 0 then
src$ = dest$
dest$ = GetBootDrive()
IF dest$ <> "" THEN
dest$ = dest$ + "autoexec.bat"
ELSE
dest$ = "c:\" + "autoexec.bat"
END IF
End If
OPEN src$ FOR INPUT AS srcfile%
OPEN dest$ FOR OUTPUT AS destfile%
PathNext% = 0
Do Until EOF(srcfile%)
LINE INPUT #srcfile%, Buffer$
FoundPath% = INSTR(1,LCASE$(Buffer$), "path")
if ((FoundPath% <> 0) AND (PathNext <> 2)) Then
PathNext% = 1
end if
PRINT #destfile%, Buffer$
if PathNext% = 1 Then
if (modflag% AND MANotes) then
PRINT #destfile%, "PATH=%PATH%;"+notesdir$
End If
If (modflag% AND MAShare) then
PRINT #destfile%, "SHARE"
End If
PathNext% = 2
End If
Loop
if PathNext% <> 2 Then
if (modflag% AND MANotes) then
PRINT #destfile%, "PATH=%PATH%;"+notesdir$
End If
If (modflag% AND MAShare) then
PRINT #destfile%, "SHARE"
End If
End If
CLOSE #srcfile%, #destfile%
END FUNCTION
PUBLIC FUNCTION GetBootDrive() AS STRING
DIM lDrive$, Length%, count%
GetLocalHardDrivesList SYM_LOCALHARDDRIVES$
Length% = GetListLength(SYM_LOCALHARDDRIVES$)
FOR count% = 1 TO Length%
lDrive$ = GetListItem(SYM_LOCALHARDDRIVES$, count%) + ":\"
IF IsDirWritable(lDrive$) AND (DoesFileExist(lDrive$+"autoexec.bat",femExists)=1) THEN
GetBootDrive$ = lDrive$
EXIT FUNCTION
END IF
NEXT
GetBootDrive$=""
END FUNCTION
PUBLIC SUB DL_SetOraclePath
DIM TmpDDir$, rc%
TmpDDir$ = Lot_GetORACLEHomePath()
IF TmpDDir$ <> "" THEN
rc% = FDirExists ( TmpDDir$ & "\DBS" )
If (rc% = 1) Then
SetSymbolValue SYM_ORACLEHOMEDIR$, TmpDDir$
ELSE
SetSymbolValue SYM_ORACLEHOMEDIR$, _
GetSymbolValue ( SYM_LOTUSAPPDIR$ ) & "DATALENS"
End If
ELSE
SetSymbolValue SYM_ORACLEHOMEDIR$, _
GetSymbolValue ( SYM_LOTUSAPPDIR$ ) & "DATALENS"
END IF
SetSymbolValue "ORACLEHOMEDIR", GetSymbolValue ( SYM_ORACLEHOMEDIR$ )
Lot_RefreshDestination(SYM_ORACLEHOMEDIR$)
END SUB
PUBLIC SUB DL_SetNotesDataPath
DIM TmpDDir$
TmpDDir$ = Lot_GetLotusNotesDataPath()
IF TmpDDir$ <> "" THEN
SetSymbolValue SYM_LOTUSNOTESDATADIR$, TmpDDir$
ELSE
SetSymbolValue SYM_LOTUSNOTESDATADIR$, GetSymbolValue( SYM_LOTUSAPPDIR$ )
End If
SetSymbolValue "NOTESDATADIR", GetSymbolValue ( SYM_LOTUSNOTESDATADIR$ )
Lot_RefreshDestination(SYM_LOTUSNOTESDATADIR$)
END SUB
PUBLIC FUNCTION Lot_GetLotusNotesDataPath() AS STRING
DIM szDir$, szSearch$, szTmp$, rc%
Lot_GetLotusNotesDataPath = ""
szTmp$ = GetIniKeyString( "Notes.ini", "Notes", "Directory")
If szTmp$ <> "" Then
rc% = FDirExists ( szTmp$ )
If (rc% = 1) Then
Lot_GetLotusNotesDataPath = szTmp$
End If
Else
szTmp$ = GetIniKeyString( "Lotus.ini", "Lotus Applications", "Notes")
szSearch$ = ucase$( szTmp$ )
rc% = instr( szSearch$, "NOTES.EXE")
If rc% > 2 Then
szDir$ = left$(szTmp$, rc% - 2 )
rc% = FDirExists ( szDir$ )
If (rc% = 1) Then
szTmp$ = GetIniKeyString( szDir$ & "\" & "Notes.ini", "Notes", "Directory")
If szTmp$ <> "" Then
rc% = FDirExists ( szTmp$ )
If (rc% = 1) Then
Lot_GetLotusNotesDataPath = szTmp$
End If
Else
Lot_GetLotusNotesDataPath = szDir$
End If
End If
End If
End If
END FUNCTION
PUBLIC FUNCTION Lot_GetLotusNotesPrgPath() AS STRING
DIM szDir$, szSearch$, szTmp$, rc%
DIM szPath$, szFile$, szSect$, szKey$, szExe$
szPath$ = GetSymbolValue( SYM_WINDIR$ ) & LdString( SID_DATALENS_NOTES_INI )
szSect$ = LdString( SID_DATALENS_NOTES_SECT )
szKey$ = LdString( SID_DATALENS_NOTES_KEY )
szExe$ = LdString( SID_DATALENS_NOTES_EXE )
Lot_GetLotusNotesPrgPath = ""
szTmp$ = GetIniKeyString( szPath$, szSect$, szKey$ )
szSearch$ = ucase$( szTmp$ )
rc% = instr( szSearch$, szExe$)
If rc% > 2 Then
szDir$ = left$(szTmp$, rc% - 2 )
rc% = FDirExists ( szDir$ )
If (rc% = 1) Then
Lot_GetLotusNotesPrgPath = szDir$
End If
End If
END FUNCTION
PUBLIC FUNCTION Lot_GetORACLEHomePath() AS STRING
DIM szPath$, szTmp$, rc%, szFile$, szSect$, szKey$
szPath$ = GetSymbolValue( SYM_WINDIR$ ) & LdString( SID_DATALENS_ORACLE_INI )
szSect$ = LdString( SID_DATALENS_ORACLE_SECT )
szKey$ = LdString( SID_DATALENS_ORACLE_KEY )
Lot_GetORACLEHomePath = ""
szTmp$ = GetIniKeyString ( szPath$, szSect$, szKey$ )
If szTmp$ <> "" Then
rc% = FDirExists ( szTmp$ )
If (rc% = 1) Then
Lot_GetORACLEHomePath = szTmp$
End If
End If
END FUNCTION
PUBLIC FUNCTION Lot_IsDestVerNewerOrEqual(DestinationPath$,sourcever1&,sourcever2&,sourcever3&,sourcever4&) AS INTEGER
DIM DestFileVersion$
DIM DestVer1&,DestVer2&,DestVer3&,DestVer4&, notused%
IF DoesFileExist(DestinationPath$,femExists)=1 THEN
DestFileVersion$=GetVersionOfFile(DestinationPath$)
IF DestFileVersion$="" THEN
Lot_IsDestVerNewerOrEqual = 0
EXIT FUNCTION
ELSE
DestVer1&=GetVersionNthField(DestFileVersion$,1)
DestVer2&=GetVersionNthField(DestFileVersion$,2)
DestVer3&=GetVersionNthField(DestFileVersion$,3)
DestVer4&=GetVersionNthField(DestFileVersion$,4)
IF SourceVer1& > DestVer1& THEN
Lot_IsDestVerNewerOrEqual = 0
EXIT FUNCTION
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& > DestVer2& THEN
Lot_IsDestVerNewerOrEqual = 0
EXIT FUNCTION
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& = DestVer2& AND _
SourceVer3& > DestVer3& THEN
Lot_IsDestVerNewerOrEqual = 0
EXIT FUNCTION
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& = DestVer2& AND _
SourceVer3& = DestVer3& AND _
SourceVer4& > DestVer4& THEN
Lot_IsDestVerNewerOrEqual = 0
EXIT FUNCTION
ELSEIF SourceVer1& = DestVer1& AND _
SourceVer2& = DestVer2& AND _
SourceVer3& = DestVer3& AND _
SourceVer4& = DestVer4& THEN
Lot_IsDestVerNewerOrEqual = 1
EXIT FUNCTION
ELSE
Lot_IsDestVerNewerOrEqual = 1
EXIT FUNCTION
END IF
END IF
ELSE
Lot_IsDestVerNewerOrEqual = 0
EXIT FUNCTION
END IF
END FUNCTION
SUB PopulateCINSTALLLIST
DIM prodDir$, installIniFile$, FeaturePref$, Featurenumber%
DIM FeatureTag$, FeatureID$, rc%
STATIC gCINSTALLinited%
If gCINSTALLinited% <> 1 Then
gNCINSTALL% = 0
gCINSTALLinited% = 1
prodDir$ = Lot_GetInstallDir()
installIniFile$ = MakePath(prodDir$,gINSTALLINI$)
FeaturePref$ = "Feature"
FeatureNumber%=1
FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%))
FeatureID$ = GetIniKeyString(installIniFile$,"Server Feature Installed", FeatureTag$)
rc% = DoesFileExist(installIniFile$,femExists)
IF rc% = 1 THEN
IF FeatureID$ <> "" THEN
DO
CINSTALL (FeatureID$) = "1"
gNCINSTALL% = gNCINSTALL%+1
FeatureNumber% = FeatureNumber% + 1
FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%))
FeatureID$ = GetIniKeyString(installIniFile$,"Server Feature Installed", FeatureTag$)
LOOP UNTIL FeatureID$ = ""
END IF
ELSE
FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT
END IF
END IF
END SUB
PUBLIC FUNCTION TrimNetlotusapp (ByVal path$) AS STRING
DIM firstslash%, newpath$, drive$
TrimNetlotusapp = ""
path$ = Lot_TrimEndSlash (path$)
drive$ = LEFT(path$, 2)
firstslash% = INSTR(1,path$,"\")
WHILE firstslash% <> 0
path$ = MID$(path$,firstslash%+1)
newpath$ = drive$ + "\" + path$
IF DoesDirExist(newpath$) = 1 THEN
TrimNetlotusapp = newpath$ + "\"
EXIT FUNCTION
ELSE
firstslash% = INSTR(1,path$,"\")
END IF
WEND
END FUNCTION
PUBLIC FUNCTION Lot_GetKeyValFromResponseFile (Section$, Key$) AS STRING
IF gAutoFile$ = "" THEN
gAutoFile$ = GetSymbolValue(SYM_RSPPATH$)
IF DoesFileExist (gAutoFile$,femExists) = 0 THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_NORSP)
ERROR STFQUIT
END IF
END IF
Lot_GetKeyValFromResponseFile = GetIniKeyString(gAutoFile$,Section$,Key$)
END FUNCTION
PUBLIC FUNCTION Lot_AutoGetProductDestDirSymbol () AS INTEGER
DIM notused%, prodno%, lname$, n%, i%, d%, DirSymbol1$, DirListSymbol$
DIM proddirectory$, errText$, rc$
Lot_AutoGetProductDestDirSymbol = FALSE
n% = Reg_GetNumberOfProducts()
For prodno% = 1 to n%
lname$ = Reg_GetProductAcronym(prodno%)
IF lname$ <> "" AND lname$ <> "INST" AND lname$ <> "LIC" AND lname$ <> "SUIT" Then
DirListSymbol$ = Reg_GetDirSymbolList(prodno%)
d% = Reg_GetNumOfDirectories(prodno%)
For i% = 1 to d%
DirSymbol1$ = GetListItem(DirListSymbol$, i%)
proddirectory$ = Lot_GetKeyValFromResponseFile (lname$,DirSymbol1$)
proddirectory$ = Lot_AutoCheckRSPPath(proddirectory$)
IF LEN(proddirectory$) > 0 THEN
rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
FALSE, |"| + proddirectory$ + |",TRUE|)
IF rc$ = gBACK THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_PRODDIR) + " " + lname$
ERROR STFQUIT
END IF
SetSymbolValue DirSymbol1$, proddirectory$
ELSE
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_PRODDIR) + " " + lname$
ERROR STFQUIT
END IF
Next
END IF
Next
Lot_AutoGetProductDestDirSymbol = TRUE
END FUNCTION
FUNCTION Lot_AutoCheckRSPPath (rsppath$) AS STRING
Lot_AutoCheckRSPPATH = ""
IF LEN(rsppath$) > 0 THEN
IF RIGHT$(rsppath$, 1) <> "\" THEN
rsppath$ = rsppath$+ "\"
END IF
IF ValidatePath(rsppath$) <> FALSE THEN
Lot_AutoCheckRSPPATH = rsppath$
END IF
END IF
END FUNCTION
PUBLIC FUNCTION Lot_AutoGetBaseDirSymbol () AS STRING
DIM notused%, lname$
DIM proddirectory$
Lot_AutoGetBaseDirSymbol = ""
lname$ = "SUIT"
proddirectory$ = Lot_GetKeyValFromResponseFile (lname$,SYM_BASEDIR$)
proddirectory$ = Lot_AutoCheckRSPPath(proddirectory$)
IF LEN(proddirectory$) < 1 THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_BASEDIR) + " " + lname$
ERROR STFQUIT
END IF
Lot_AutoGetBaseDirSymbol = proddirectory$
END FUNCTION
PUBLIC FUNCTION Lot_AutoGetInstallType () AS STRING
DIM installtype$
DIM lname$
lname$ = "General Information"
installtype$ = Lot_GetKeyValFromResponseFile(lname$,"InstallType")
SELECT CASE installtype$
case "1"
Lot_AutoGetInstallType = gSTANDARD$
case "2"
Lot_AutoGetInstallType = gSERVER$
case "3"
Lot_AutoGetInstallType = gDISTRIBUTION$
case "4"
IF GetSymbolValue (SYM_NETWORK$) <> gNODE$ THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_NODE)
ERROR STFQUIT
END IF
case else
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_INSTALLTYPE)+ " " + lname$
ERROR STFQUIT
Lot_AutoGetInstallType = ""
END SELECT
END FUNCTION
PUBLIC FUNCTION Lot_AutoGetProgramGroup () AS INTEGER
DIM proggroup$, DefaultGroup$, CheckName$, failed%, count%, errText$
DIM lname$
DIM InvChar LIST AS STRING
InvChar("*") = "1"
InvChar("+") = "1"
InvChar("|") = "1"
InvChar(":") = "1"
InvChar(|"|) = "1"
InvChar("<") = "1"
InvChar(">") = "1"
InvChar("?") = "1"
InvChar("=") = "1"
InvChar("[") = "1"
InvChar("]") = "1"
InvChar("\") = "1"
InvChar(";") = "1"
InvChar(",") = "1"
InvChar("/") = "1"
InvChar(")") = "1"
InvChar("(") = "1"
InvChar(".") = "1"
InvChar("'") = "1"
InvChar("@") = "1"
InvChar("{") = "1"
InvChar("}") = "1"
InvChar("#") = "1"
InvChar("%") = "1"
InvChar("!") = "1"
InvChar("`") = "1"
InvChar("$") = "1"
InvChar("^") = "1"
InvChar("~") = "1"
InvChar("-") = "1"
InvChar("_") = "1"
InvChar("&") = "1"
DefaultGroup$=Reg_GetProgManagerGroupName(1)
IF DefaultGroup$="" THEN
DefaultGroup$="Lotus Application"
END IF
lname$ = "General Information"
proggroup$ = Lot_GetKeyValFromResponseFile(lname$,"ProgramGroup")
IF proggroup$ = "" THEN
proggroup$=DefaultGroup$
END IF
failed% = 1
CheckName$ = proggroup$
FOR count% = 1 TO LEN(proggroup$)
IF ISELEMENT(InvChar(LEFT$(CheckName$,1))) = FALSE THEN
failed% = 0
EXIT FOR
END IF
CheckName$ = RIGHT$(Checkname$,LEN(CheckName$)-1)
NEXT
IF INSTR(1,proggroup$,|"|) <> 0 THEN
failed% = 1
END IF
IF failed% <> 0 THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_PROGGROUP) + " " + lname$
proggroup$=DefaultGroup$
END IF
Reg_SetProgManagerGroup 1,proggroup$
END FUNCTION
PUBLIC FUNCTION Lot_AutoGetSizeOfInstall () AS INTEGER
DIM size$, lname$, i%, nProds%
Lot_AutoGetSizeOfInstall = FALSE
lname$ = Reg_GetProductAcronym(1)
size$ = Lot_GetKeyValFromResponseFile(lname$,"SizeOfInstall")
SELECT CASE size$
case "1"
size$ = gCOMPLETE$
case "2"
size$ = gLAPTOP$
case "3"
size$ = gCUSTOM$
case else
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_SIZEOFINSTALL)+ " " + lname$
ERROR STFQUIT
END SELECT
SetSymbolValue SYM_SIZEOFINSTALL$, size$
size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
nProds% = Reg_GetNumberOfProducts()
FOR i% = 1 to nProds%
Reg_SetSelectedInstallType i%, size$
NEXT
Lot_AutoGetSizeOfInstall = TRUE
END FUNCTION
PUBLIC FUNCTION AutoCheckForSpace() AS INTEGER
DIM lTicks&, lcb&, lNew&, i%, lcbNeed&, dr$, s$, helpId&, rc$
DIM notused1$, curcursor%
AutoCheckForSpace = SUCCESS
lcb& = LcbGetChapterCost("", "", SYM_COST$, SYM_NEEDED$)
IF lcb& = CLNG(0) THEN
DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$
GOTO ENDCHECK
END IF
curcursor% = ShowWaitCursor()
SetListItem "IDC_BMP", 1, STR$(IDD_MAXSCAN_BMP)
notused1$ = PopupModelessDlg(DB_CHECKSPACE, DB_CHECKSPACE)
lcb& = GetCopyListCost (gEXTRA, SYM_COST$, SYM_NEEDED$)
UIPOP 1
RestoreCursor curcursor%
IF lcb& = CLNG(0) THEN
DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$
GOTO ENDCHECK
END IF
FOR i% = 1 TO 26
lcbNeed& = CLNG(GetListItem(SYM_NEEDED$, i%))
IF lcbNeed& > 0 THEN
dr$ = CHR$(ASC("A")+i%-1) + ": "
s$ = dr$ & ((lcbNeed& \ 1024) + 4)
END IF
NEXT
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_DRV_INSUFSPACE)+ s$ + LdString(SID_KBYTE_CHAR)
ERROR STFQUIT
AutoCheckForSpace = FAILURE
ENDCHECK:
RemoveSymbol(SYM_COST$)
RemoveSymbol(SYM_NEEDED$)
END FUNCTION
PUBLIC FUNCTION Lot_AutoGetUserInfo () AS INTEGER
DIM uname$, company$, defname$, defcompany$
DIM lname$
Lot_AutoGetUserInfo = FALSE
defname$ = GetSymbolValue(SYM_NAME$)
defcompany$ = GetSymbolValue(SYM_COMPANY$)
uname$ = GetSymbolValue(SYM_USERNAME$)
lname$ = "User Registration"
IF LEN (uname$) < 1 THEN
uname$ = Lot_GetKeyValFromResponseFile(lname$,"UserName")
IF LEN (uname$) < 1 THEN
IF LEN (defname$) < 1 THEN
uname$ = GetSymbolValue(SYM_NAME$)
IF LEN (uname$) < 1 THEN
uname$ = "Unknown User"
END IF
ELSE
uname$ = defname$
END IF
END IF
END IF
SetSymbolValue SYM_NAME$, uname$
company$ = Lot_GetKeyValFromResponseFile(lname$,"CompanyName")
IF LEN (company$) < 1 THEN
IF LEN (defcompany$) < 1 THEN
company$ = GetSymbolValue(SYM_COMPANY$)
IF LEN (company$) < 1 THEN
company$ = "Unknown Company"
END IF
ELSE
company$ = defcompany$
END IF
END IF
SetSymbolValue SYM_COMPANY$, company$
Lot_AutoGetUserInfo = TRUE
END FUNCTION
PUBLIC FUNCTION Lot_AutoConfigureAutoexec () AS INTEGER
DIM modflag%, notused1$, reboot$, lname$
Lot_AutoConfigureAutoexec = FALSE
lname$ = "General Information"
reboot$ = Lot_GetKeyValFromResponseFile(lname$, "Autoexec")
SELECT CASE reboot$
CASE "1"
modflag% = 0
IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
modflag% = 1
END IF
IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
modflag% = modflag% + 2
END IF
IF modflag% <> FALSE THEN
notused1$=ModifyAutoexec(modflag%, 1, "AUTOEXEC.LTS")
END IF
SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTO$
CASE "2"
modflag% = 0
IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
modflag% = 1
END IF
IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
modflag% = modflag% + 2
END IF
IF modflag% <> FALSE THEN
notused1$=ModifyAutoexec(modflag%, 0, "AUTOEXEC.LTS")
END IF
SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTOCOPY$
CASE "3"
SetSymbolValue SYM_AUTOEXEC_CHOICE$, gMAN$
CASE ELSE
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_REBOOT) + " " + lname$
ERROR STFQUIT
END SELECT
SELECT CASE GetSymbolValue(SYM_AUTOEXEC_CHOICE$)
CASE "AUTO"
CASE "AUTOCOPY"
CASE "MAN"
END SELECT
Lot_AutoConfigureAutoexec = TRUE
END FUNCTION
PUBLIC SUB AutoInstallReboot ()
DIM notused1$, hwnd%, lr%
hwnd%=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
lr%=SendMessage(hwnd%, WM_COMMAND, UM_REBOOTFLAG, 0)
END SUB
PUBLIC FUNCTION Lot_AutoWriteOutDebugFile () AS INTEGER
DIM notused%, mybuffer$, symbolbuff$, uname$
DIM FileExist%, TBD$, spacer$
DIM rc%, SectionName$, SectionPref$, SectionNumber%, SectionTag$
DIM KeywordName$, KeywordPref$, KeywordNumber%, KeywordTag$, KeywordValue$
DIM DebugLog$, DebugIni$, AutoRsp$
DIM sname$, scompany$, stype$, sproggroup$, slotusappdir$, ssize$
DIM i%, n%, licensedprod%
Lot_AutoWriteOutDebugFile = 0
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
DebugLog$ = GetWindowsDir() + "autosuit.out"
DebugIni$ = GetWindowsDir() + "autosuit.ini"
ELSE
DebugLog$ = GetWindowsDir() + "auto.out"
DebugIni$ = GetWindowsDir() + "auto.ini"
END IF
FileExist%=DoesFileExist(DebugIni$, femExists)
IF FileExist% <> 1 THEN
GOTO NODEBUGLOG
END IF
TBD$ = "NOT YET IMPLEMENTED!!!"
spacer$ = ""
FileExist%=DoesFileExist(DebugLog$, femExists)
IF FileExist%=1 THEN
RemoveFile DebugLog$, cmoNone
END IF
SectionPref$="section"
SectionNumber%=1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(DebugIni$,"Sections", SectionTag$)
DO
mybuffer$ = spacer$
notused% = WriteToFile(DebugLog$, mybuffer$)
rc% = DoesIniSectionExist (gAutoFile$, SectionName$)
mybuffer$ = "[" + SectionName$ + "]"
IF rc% =1 THEN
notused% = WriteToFile(DebugLog$, mybuffer$)
KeywordPref$="option"
KeywordNumber%=1
KeywordTag$=KeywordPref$+LTRIM$(STR(KeywordNumber%))
KeywordName$ = GetIniKeyString(DebugIni$,SectionName$, KeywordTag$)
DO
SELECT CASE KeywordName$
case "UserName"
KeywordValue$ = GetSymbolValue(SYM_NAME$)
sname$ = "UserName: " + KeywordValue$
uname$ = GetSymbolValue(SYM_USERNAME$)
IF LEN (uname$) >= 1 THEN
IF KeywordValue$ <> uname$ THEN
KeywordValue$ = "Mismatch:" + uname$ + "from command" + KeywordValue$ + "used"
ELSE
KeywordValue$ = KeyWordValue$ + " <---- From Command Line"
END IF
END IF
case "CompanyName"
KeywordValue$ = GetSymbolValue(SYM_COMPANY$)
scompany$ = "CompanyName:" + KeywordValue$
case "InstallType"
KeywordValue$ = GetSymbolValue(SYM_NETWORK$)
SELECT CASE KeywordValue$
case gSTANDARD$
KeywordValue$ = "1 (Standard)"
case gSERVER$
KeywordValue$ = "2 (Server)"
case gDISTRIBUTION$
KeywordValue$ = "3 (Distribution)"
END SELECT
stype$ = "InstallType:" + KeywordValue$
case "Autoexec"
KeywordValue$ = GetSymbolValue(SYM_AUTOEXEC_CHOICE$)
SELECT CASE KeywordValue$
case gAUTO$
KeywordValue$ = "1 (Auto)"
case gAUTOCOPY$
KeywordValue$ = "2 (AutoCopy)"
case gMAN$
KeywordValue$ = "0 (Manual)"
END SELECT
case "ProgramGroup"
KeywordValue$ = Reg_GetProgManagerGroupName(1)
sproggroup$ = "ProgramGroup:" + KeywordValue$
case "Licenser"
KeywordValue$ = "NOT IMPLEMENTED YET!!!"
case "LICDIR"
KeywordValue$ = GetSymbolValue(SYM_LICDIR$)
case "LICCOUNTDIR"
n% = Reg_GetNumberOfProducts()
FOR i% = 1 to n%
IF Reg_GetProdSupportForLicense (i%) <> FALSE THEN
licensedprod% = i%
KeywordValue$ = Reg_GetCountDirectory(licensedprod%)
EXIT FOR
ELSE
KeywordValue$ = "Licenser not supported"
END IF
NEXT
case "NodeOptions"
KeywordValue$ = TBD$
case "Consolidation"
KeywordValue$ = TBD$
case "LOTUSAPPDIR"
slotusappdir$ = "Lotusapp Dir:" + KeywordValue$
case "SQLServerName"
KeywordValue$ = TBD$
case "PARADOXNetInfo"
KeywordValue$ = TBD$
case "BASEDIR"
KeywordValue$ =GetSymbolValue(SYM_BASEDIR$)
case "SizeofInstall"
KeywordValue$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
SELECT CASE KeywordValue$
case gCOMPLETE$
KeywordValue$ = "1 (Complete)"
case gLAPTOP$
KeywordValue$ = "2 (Laptop)"
case gCUSTOM$
KeywordValue$ = "3 (Custom)"
END SELECT
ssize$ = "SizeofInstall" + KeywordValue$
case "123"
KeywordValue$ = TBD$
case "AMI"
KeywordValue$ = TBD$
case "ORG"
KeywordValue$ = TBD$
case "APR"
KeywordValue$ = TBD$
case "123DIR"
KeywordValue$ = GetSymbolValue(KeywordName$)
case "123WORKDIR"
IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ OR _
GetSymbolValue(SYM_NETWORK$) = gNODE$ THEN
KeywordValue$ = GetSymbolValue(KeywordName$)
ELSE
KeywordValue$ = "Only supported in Standalone or Node"
END IF
case "Customize123"
KeywordValue$ = TBD$
case "AMIDIR"
KeywordValue$ = GetListItem("AMIDIRS", 1)
case "ORGDIR"
KeywordValue$ = GetListItem("ORGDIRS", 1)
END SELECT
mybuffer$ = KeywordName$ + "="+ KeywordValue$
notused% = WriteToFile(DebugLog$, mybuffer$)
KeywordNumber% = KeywordNumber% + 1
KeywordTag$=KeywordPref$+LTRIM$(STR(KeywordNumber%))
KeywordName$ = GetIniKeyString(DebugIni$,SectionName$, KeywordTag$)
LOOP UNTIL KeywordName$ = ""
ELSE
mybuffer$ = mybuffer$ + " missing from RSP"
notused% = WriteToFile(DebugLog$, mybuffer$)
END IF
SectionNumber% = SectionNumber% + 1
SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
SectionName$ = GetIniKeyString(DebugIni$,"Sections", SectionTag$)
LOOP UNTIL SectionName$ = ""
Lot_AutoWriteOutDebugFile = 1
NODEBUGLOG:
ELSE
END IF
END FUNCTION
PUBLIC FUNCTION Lot_AutoIsThisNetLotusApp (LotusIniPath$,ExistingCommDir$) AS INTEGER
DIM path$, directory$
path$ = LotusIniPath$
directory$ = ExistingCommDir$
CreateIniKeyValue path$, "Lotus Applications", "Net Common Directory", Lot_TrimEndSlash(directory$), cmoOverwrite
RemoveIniKey path$, "Lotus Applications", "Common Directory", cmoVital
Lot_AutoIsThisNetLotusApp = TRUE
END FUNCTION
PUBLIC FUNCTION Lot_AutoConsolidateMoveCopy () AS INTEGER
SetSymbolValue "SYM_MOVE", "0"
SetSymbolValue "SYM_COPY", "1"
Lot_AutoConsolidateMoveCopy = TRUE
END FUNCTION
PUBLIC FUNCTION Lot_AutoConsolidateLotusAppDir (gConsolidateSize&) AS INTEGER
DIM dirToChange$, notused%, Size&
Size& = gConsolidateSize&
dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
IF ValidatePath(dirToChange$) = FALSE THEN
notused%=WriteToFile(GetSymbolValue(SYM_LOGGINGPATH$),"ERROR:"+dirToChange$)
dirToChange$ = GetSymbolValue(SYM_DEFAULT_LOTUSAPP$)
IF ValidatePath(dirToChange$) = FALSE THEN
notused%=WriteToFile(GetSymbolValue(SYM_LOGGINGPATH$),"ERROR:"+dirToChange$)
ERROR STFQUIT
GOTO EXIT_CONSLOTUSAPPDIR
ELSE
GOTO NEXT_CONSOLIDATELOTUSAPPDIR
END IF
ELSE
NEXT_CONSOLIDATELOTUSAPPDIR:
IF GetFreeSpaceForDrive(MID$(dirToChange$,1,1)) < Size& THEN
ShowPathError SID_DRV_NOTENOUGHSPACE, 0, dirToChange$
ERROR STFQUIT
GOTO EXIT_CONSLOTUSAPPDIR
END IF
IF dirToChange$ = GetSymbolValue(SYM_EXISTINGNETCOMMDIR$) THEN
ShowPathError SID_ERR_SHARE_NETEQLOCAL1, SID_ERR_SHARE_NETEQLOCAL2, dirToChange$
ERROR STFQUIT
GOTO EXIT_CONSLOTUSAPPDIR
END IF
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
Lot_AutoConsolidateLotusAppDir = TRUE
EXIT_CONSLOTUSAPPDIR:
END FUNCTION
PUBLIC FUNCTION Lot_AutoChangeLotusAppDir () AS INTEGER
DIM dirToChange$,dirSym$,notused%
Lot_AutoChangeLotusAppDir = FALSE
dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
IF ValidatePath(dirToChange$) = FALSE THEN
notused%=WriteToFile(GetSymbolValue(SYM_LOGGINGPATH$),"ERROR:"+dirToChange$)
dirToChange$ = GetSymbolValue(SYM_DEFAULT_LOTUSAPP$)
IF ValidatePath(dirToChange$) = FALSE THEN
notused%=WriteToFile(GetSymbolValue(SYM_LOGGINGPATH$),"ERROR:"+dirToChange$)
ERROR STFQUIT
GOTO EXIT_CHANGELOTUSAPPDIR
END IF
ELSE
dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
SetSymbolValue dirSym$, dirToChange$
Lot_RefreshDestination(dirSym$)
END IF
Lot_AutoChangeLotusAppDir = TRUE
EXIT_CHANGELOTUSAPPDIR:
END FUNCTION
PUBLIC FUNCTION Lot_AutoSuiteAppSelect () AS INTEGER
DIM Selection%, lname$, prodno%, nProds%
DIM sname$, rspval$
Lot_AutoSuiteAppSelect = FALSE
sname$ = "Select Applications"
nProds% = Reg_GetNumberOfProducts()
If GetSymbolValue(SYM_SINGLESMARTSUITE$)= gSMARTSUITE$ Then
For prodno% = 2 to nProds%
lname$ = Reg_GetProductAcronym(prodno%)
IF lname$ <> "" AND lname$ <> "INST" AND lname$ <> "LIC" Then
rspval$ = Lot_GetKeyValFromResponseFile(sname$, lname$)
IF rspval$ <> "" THEN
Selection% = CINT(rspval$)
ELSE
Selection% = -1
END IF
IF Selection% <> 0 AND Selection% <> 1 THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_SELECTAPPS)
ERROR STFQUIT
ELSE
Reg_SetUIInOrOut prodno%, Selection%
END IF
END IF
Next
End IF
Lot_AutoSuiteAppSelect = TRUE
END FUNCTION
PUBLIC FUNCTION Lot_AutoProcessNodeOptions () AS INTEGER
DIM AllProdNum%,prodNum%,AllOptNum%,OptName$,OptNum%,notused%
DIM nodeoption%, Chapter$, lname$, rspval$
Lot_AutoProcessNodeOptions = FALSE
lname$ = "Node Install"
IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
rspval$ = Lot_GetKeyValFromResponseFile(lname$, "NodeOptions")
IF rspval$ <> "" THEN
nodeoption% = CINT(rspval$)
ELSE
nodeoption% = -1
END IF
IF nodeoption% <> 0 AND nodeoption% <> 1 THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_NODEOPTIONS) + " " + lname$
ERROR STFQUIT
ELSE
IF nodeoption% = 0 THEN
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
IF AllOptNum% <> 0 THEN
FOR OptNum%=1 TO AllOptNum%
OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
Chapter$ = Lot_GetChapterFromKeyword(OptName$)
notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,0)
NEXT
END IF
NEXT
END IF
ELSE
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
IF AllOptNum% <> 0 THEN
FOR OptNum%=1 TO AllOptNum%
OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
Chapter$ = Lot_GetChapterFromKeyword(OptName$)
IF Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) = 1 THEN
notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,1)
END IF
NEXT
END IF
NEXT
END IF
END IF
END IF
END IF
Lot_AutoProcessNodeOptions = TRUE
END FUNCTION
PUBLIC FUNCTION Lot_AutoGetSetLicenserInfo () AS INTEGER
STATIC licselected%, licensedprod%
DIM i%, n%, dirtochange$, lname$
DIM chpt$, notused%, countdir$
DIM firstslash%, lastslash%, fullpath$
DIM countbasedir$, counttaildir$, rspval$
Lot_AutoGetSetLicenserInfo = FALSE
lname$ = "Server Install"
licensedprod% = 0
licselected% = 0
n% = Reg_GetNumberOfProducts()
FOR i% = 1 to n%
IF Reg_GetProdSupportForLicense (i%) <> FALSE THEN
licensedprod% = i%
EXIT FOR
END IF
NEXT
IF licensedprod% <> 0 THEN
rspval$ = Lot_GetKeyValFromResponseFile (lname$, "Licenser")
IF rspval$ <> "" THEN
licselected% = CINT(rspval$)
ELSE
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_LICENSER) + " " + lname$
ERROR STFQUIT
END IF
END IF
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
FOR i% = 1 to n%
IF Reg_GetProdSupportForLicense (i%) <> FALSE AND _
Reg_GetUIInOrOut(i%) <> FALSE THEN
Reg_SetLicenseSelected i%, licselected%
END IF
NEXT
ELSE
Reg_SetLicenseSelected licensedprod%, licselected%
END IF
IF licselected% = 1 THEN
IF Reg_IsLicenseSelected(licensedprod%) <> FALSE Then
chpt$ = Lot_GetChapterFromKeyword("LIC" + gTOP$)
notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 1)
ELSE
chpt$ = Lot_GetChapterFromKeyword("LIC" + gTOP$)
notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 0)
END IF
IF Reg_IsLicenseSelected(licensedprod%) <> FALSE Then
dirtochange$ = Lot_GetKeyValFromResponseFile ("Server Install", "LICDIR")
IF Lot_AutoCheckRSPPath(dirtochange$) <> "" THEN
SetSymbolValue SYM_LICDIR$, dirtochange$
Lot_RefreshDestination(SYM_LICDIR$)
ELSE
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_LICDIR) + " " + lname$
ERROR STFQUIT
END IF
dirtochange$ = Lot_GetKeyValFromResponseFile (lname$, "LICCOUNTDIR")
IF Lot_AutoCheckRSPPath(dirtochange$) = "" THEN
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_LICDIR) + " " + lname$
ERROR STFQUIT
END IF
licensedprod% = 0
FOR i% = 1 to Reg_GetNumberofProducts()
IF Reg_GetProdSupportForLicense(i%) <> FALSE THEN
licensedprod% = i%
countdir$ = Lot_TrimEndSlash(Reg_GetCountDirectory(licensedprod%))
firstslash% = INSTR(countdir$, "\") : lastslash% = firstslash%
WHILE firstslash% <> 0
lastslash% = firstslash% : firstslash% = INSTR(firstslash%+1, countdir$, "\")
WEND
countdir$ = countdir$ + "\"
counttaildir$ = RIGHT$(countdir$, LEN(countdir$) - lastslash%)
fullpath$ = MakePath(dirtochange$, counttaildir$)
IF ValidatePath(fullpath$) <> FALSE THEN
Reg_SetCountDirectory licensedprod%, fullpath$
ELSE
ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_LICCOUNTDIR) + " " + lname$
ERROR STFQUIT
END IF
END IF
NEXT
END IF
END IF
Lot_AutoGetSetLicenserInfo = TRUE
END FUNCTION