home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-23 | 44.0 KB | 1,406 lines |
- ''/*********************************************************************
- ''
- '' Module Name: automate.lss
- ''
- '' Module Code: TOOLKIT
- ''
- '' Author: Thangaraj Veerappan
- ''
- '' Creation Date: Aug 31, 1994
- ''
- '' Copyright Lotus Development Corporation, (c) 1991
- ''
- ''
- '' Description:
- ''
- '' Additional authors:
- ''
- ''
- '' Change History:
- '' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/automate.l@s $
- ''
- '' Rev 1.27 23 May 1996 12:21:00 jdonohue
- '' Replaced LEFTBP calls with LEFT
- ''
- '' Rev 1.26 07 May 1996 12:55:04 glutz
- '' In Lot_AutoGetProgramGroupOrFolder changed WhatPlatform calls to
- '' IsNewShell. SPR#CDWT34LJLA
- ''
- '' Rev 1.25 07 May 1996 10:16:24 glutz
- '' fixed up logic for node options handling SPR#CDWT353MX9.
- ''
- '' Rev 1.24 04 Mar 1996 08:31:08 jdonohue
- '' Remove 16 bit shared component support -- pass 1 : eliminate LOTUSAPP
- ''
- '' Rev 1.23 01 Mar 1996 10:57:18 glutz
- '' The Lot_AutoProcessNodeOptions uses the CustomizeNodeOptions ACRONYM keyword
- '' for setting node options
- ''
- '' Rev 1.22 28 Feb 1996 15:07:32 glutz
- '' Lot_AutoProcessNodeOptions now processes available options individually.
- ''
- '' Rev 1.21 28 Feb 1996 14:50:34 cmoy
- '' added header
- ''
- ''*********************************************************************/
-
-
- USE "TOOLKIT"
- OPTION DECLARE
-
-
-
- '*****
- 'AUTOMATION
- PUBLIC gAutoFile$
- PUBLIC gLogFile$
- 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_AutoGetProgramGroupOrFolder () 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 PUBLIC FUNCTION Lot_AutoInstallCustomize () AS INTEGER
- DECLARE PUBLIC FUNCTION Lot_AutoCustomizeShare () AS INTEGER
- DECLARE PUBLIC FUNCTION Lot_AutoInstallSuiteCustomize () AS INTEGER
- DECLARE PUBLIC FUNCTION Lot_AutoSetSrvNodeOptions () AS INTEGER
- DECLARE PUBLIC FUNCTION Lot_AutoAddiconOptions () AS INTEGER
- DECLARE PUBLIC SUB AutoSetParentDir
-
- DECLARE FUNCTION Lot_AutoCheckRSPPath (rsppath$) AS STRING
-
-
- '*************************************************************************
- '** AUTOMATION
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_GetKeyValFromResponseFile (Section$, Key$) AS STRING
- '**
- '** Purpose: reads in values from the response file.
- '** Author: Thangv
- '** Arguments: section and key
- '** Returns: the key value
- '*************************************************************************
- PUBLIC FUNCTION Lot_GetKeyValFromResponseFile (Section$, Key$) AS STRING
-
- DIM Platform%
- '** Automation Intialization: needs to be moved else where.
- IF gAutoFile$ = "" THEN
- gAutoFile$ = GetSymbolValue(SYM_RSPPATH$)
-
- '** For win95 the FFileExists(init.c)function seems to return true if
- '** the file is in the CWD or at the root.
- '** if in the cwd build the path to rsp file for Getinikey to work.
- Platform% = WhatPlatForm()
- IF (PlatForm% = PLATFORM_WIN95 OR PlatForm% = PLATFORM_WINNT) _
- AND INSTR(gAutoFile$,"\") = 0 THEN
- gAutoFile$ = GetSymbolValue(SYM_STF_SRCDIR$)+ gAutoFile$
- END IF
-
- 'DEBUGGING INFO -- PLEASE RETAIN
- 'gAutoFile$ = GetSymbolValue(SYM_STF_CWDDIR$)+"auto.rsp"
- 'gAutoFile$ = GetSymbolValue(SYM_STF_CWDDIR$)+"autosuit.rsp"
-
- 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
- '** Purpose: Get the destination directory symbols
- '** from the RSP file -- used in AUTOMATION
- '**
- '** Author: Jill Salter Plump
- '** Arguments:
- '** Returns: TRUE if successful
- '**
- '*************************************************************************
- DIM notused%, prodno%, lname$, n%, i%, d%, DirSymbol1$, DirListSymbol$
- DIM proddirectory$, errText$, rc$
- DIM saveproddirectory$
-
- Lot_AutoGetProductDestDirSymbol = FALSE
- n% = Reg_GetNumberOfProducts()
-
- ' IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ THEN
- 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%)
- 'd% = GetListLength(DirListSymbol$)
- For i% = 1 to d%
- DirSymbol1$ = GetListItem(DirListSymbol$, i%)
- ' Save the original value in case if fails
- saveproddirectory$ = GetSymbolValue (DirSymbol1$)
- proddirectory$ = Lot_GetKeyValFromResponseFile (lname$,DirSymbol1$)
-
- proddirectory$ = Lot_AutoCheckRSPPath(proddirectory$)
-
- IF LEN(proddirectory$) > 0 THEN
- SetSymbolValue DirSymbol1$, proddirectory$
-
- rc$ = Lot_CallOneProductFunction(prodno%, "PathChange",gNEXT$, _
- FALSE, |"| + DirSymbol1$ + |",TRUE|)
- IF rc$ = gBACK THEN
- SetSymbolValue DirSymbol1$, saveproddirectory$
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_PRODDIR) + " " + lname$
- ERROR STFQUIT
- END IF
-
- ELSE
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_PRODDIR) + " " + lname$
- ERROR STFQUIT
- END IF
- Next
- END IF
- Next
- ' END IF
- Lot_AutoGetProductDestDirSymbol = TRUE
- END FUNCTION
- '*************************************************************************
- FUNCTION Lot_AutoCheckRSPPath (rsppath$) AS STRING
- '** Purpose: To validate paths from RSP file
- '**
- '**
- '** Author: Jill Salter Plump
- '** Arguments: The path from the RSP file
- '** Returns: Valid path input -- path with "\" on the end
- '** Invalid path input (includes bad path, non-existent path
- '** and empty path) -- empty string
- '**
- '** IMPORTANT!!! -- calling functions should check path length
- '** upon return for LEN > 0 before proceeding.
- '** If LEN (path$) < 1, caller should singal
- '** error in RSP file path and quit if default
- '** path not available.
- '*************************************************************************
-
- 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
- '** Purpose: Get the BASEDIR symbol (for Suite)
- '** from the RSP file -- used in AUTOMATION
- '**
- '** Author: Jill Salter Plump
- '** Arguments:
- '** Returns: TRUE if successful
- '**
- '*************************************************************************
- 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
- '**
- '** Purpose: reads in values from the response file.
- '** Author: Thangv
- '** Arguments: section and key
- '** Returns: the key value
- '*************************************************************************
- 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
- 'Log Error: Invalid entry
- Lot_AutoGetInstallType = ""
- END SELECT
-
- END FUNCTION
-
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoGetProgramGroupOrFolder () AS INTEGER
- '**
- '** Purpose: Reads in values from the response file for Program Group
- '** or start menu folder, to be created under programs in Win95.
- '** Checks value for validity, uses the Default Group for the
- '** first registered product or "Lotus Applications" if the
- '** user's value is invalid.
- '** Author: Jill Salter Plump, Thangaraj Veerappan
- '** Arguments:
- '** Returns:
- '** Replaces: PROGMANGROUPCB
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoGetProgramGroupOrFolder () AS INTEGER
- DIM proggroup$, DefaultGroup$, CheckName$, failed%, count%, errText$
- DIM lname$, newShell%
- 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" '* MMETH; I believe that this is a valid character
-
- 'TV: These are also invalid characters.
- 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"
- newShell% = IsNewShell()
- IF newShell% <> FALSE THEN
- '** Win95 and NT 4.x
- proggroup$ = Lot_GetKeyValFromResponseFile(lname$,"StartmenuFolder")
-
- ELSE
- '** WinNT 3.x and Win3.x
- proggroup$ = Lot_GetKeyValFromResponseFile(lname$,"ProgramGroup")
- END IF
-
- IF proggroup$ = "" THEN
- proggroup$=DefaultGroup$
- END IF
-
- ' Validate the name if it is a new one
- ' The ilegal characters in the name are:
- ' * + | : " < > ? + { } \ ; , / MMETH removed the period
- ' if the path consists only of " then the group name will be )]
- ' if the path consists only of ) or ] or , the group is not created
- failed% = 1
-
- '** TV: Reject only if the group name consists entirely of Invalid
- '**characters
- 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
-
- '*** TV: The " character cannot be permitted.
- '** This breaks the script execution later!!
- 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$
- ERROR STFQUIT
- END IF
-
- IF newShell% <> FALSE THEN
- '** Win95: SelectedFolder has complete path
- proggroup$ = Reg_GetRootFolder() + "\" + proggroup$
- Reg_SetSelectedFolder 1,proggroup$
- ELSE
- Reg_SetProgManagerGroup 1,proggroup$
- END IF
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoGetSizeOfInstall () AS STRING
- '**
- '** Purpose: reads in values from the response file.
- '** Author: Jill Salter Plump
- '** Arguments:
- '** Returns:
- '** Replaces:
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoGetSizeOfInstall () AS INTEGER
- DIM size$, lname$, i%, nProds%
-
- Lot_AutoGetSizeOfInstall = FALSE
-
- '**** TV: we don't need this check for now
- '** If GetSymbolValue(SYM_SINGLESMARTSUITE$)= gSINGLE$ Then
- lname$ = Reg_GetProductAcronym(1)
- size$ = Lot_GetKeyValFromResponseFile(lname$,"SizeOfInstall")
- '** Else
- 'SMARTSUITE: Full & Min for all products. Custom : Set Size of install
- 'for each product
- '** End IF
-
- 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
- 'Log Error: Invalid entry
- END SELECT
-
- SetSymbolValue SYM_SIZEOFINSTALL$, size$
-
- '** Reset all the sizes
- 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
- '** Purpose: Checks to see if there is enough space on dest directories
- '** First does a cheap check, followed, if need be by a high
- '** granularity check.
- '** Author: Thangaraj Veerappan
- '** Arguments:
- '**
- '**
- '** Returns: SUCCESS/FAILURE
- '**
- '*************************************************************************
- DIM lTicks&, lcb&, lNew&, i%, lcbNeed&, dr$, s$, helpId&, rc$
- DIM notused1$, curcursor&, j%, UNCSym$
-
- '** Try a quick check
- AutoCheckForSpace = SUCCESS
- lcb& = LcbGetChapterCost("", "", SYM_COST$, SYM_NEEDED$)
- IF lcb& = CLNG(0) THEN
- DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$
- GOTO ENDCHECK
- END IF
- '** Try A High Granularity Check
- curcursor& = ShowWaitCursor()
- SetListItem "IDC_BMP", 1, STR$(IDD_MAXSCAN_BMP) '** put up the bitmap
- notused1$ = PopupModelessDlg(DB_CHECKSPACE, DB_CHECKSPACE)
- lcb& = GetCopyListCost (gEXTRA, SYM_COST$, SYM_NEEDED$)
- UIPOP 1 '** Bring down DB_CHECKSPACE
- RestoreCursor curcursor&
- IF lcb& = CLNG(0) THEN
- DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$
- GOTO ENDCHECK
- END IF
-
- '** If you get here then there was not enough space (Tab is CHR$(9))
- FOR i% = 1 TO 26
- lcbNeed& = CLNG(GetListItem(SYM_NEEDED$, i%))
- IF lcbNeed& > 0 THEN
- dr$ = CHR$(ASC("A")+i%-1) + ": "
- s$ = dr$ & (lcbNeed& + 4)
- END IF
- NEXT
-
- '** unc stuff
- j%=GetListLength("UNCVOLLIST")
- FOR i% = 1 to j%
- UNCSym$ = GetListItem("UNCVOLLIST",i%)
- lcbNeed& = CLNG(GetListItem(UNCSym$, 3))
- IF lcbNeed& > 0 THEN
- IF IsDBCSFirstAtOffset(UNCSym$, 18) = 0 THEN
- s$ = Left(UNCSym$, 18)
- ELSE
- s$ = Left(UNCSym$, 17)
- END IF
- s$ = s$ & CHR$(9) & (lcbNeed& + 4)
- AddlistItem "IDC_LIST1", s$ + gStrK$
- END IF
- NEXT
-
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_DRV_INSUFSPACE)+ s$ + LdString(SID_KBYTE_CHAR)
- ERROR STFQUIT
- 'Log space needed and drive information: s$
- AutoCheckForSpace = FAILURE
-
- ENDCHECK:
-
- RemoveSymbol(SYM_COST$)
- RemoveSymbol(SYM_NEEDED$)
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoGetUserInfo () AS INTEGER
- '**
- '** Purpose: Reads in values from the response file for User Name and
- '** Company Name
- '**
- '**
- '** Author: Jill Salter Plump
- '** Arguments:
- '** Returns:
- '** Replaces: WELCOMECB
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoGetUserInfo () AS INTEGER
- DIM uname$, company$, defname$, defcompany$
- DIM lname$
-
- Lot_AutoGetUserInfo = FALSE
-
- 'Get Defaults
- defname$ = GetSymbolValue(SYM_NAME$)
- defcompany$ = GetSymbolValue(SYM_COMPANY$)
-
- 'Get User Name from Command Line
- 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"
- 'ADD ERROR
- 'print "Warning: 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"
- 'ADD ERROR
- END IF
- ELSE
- company$ = defcompany$
- END IF
- END IF
-
- SetSymbolValue SYM_COMPANY$, company$
-
- Lot_AutoGetUserInfo = TRUE
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoConfigureAutoexec () AS INTEGER
- '**
- '** Purpose: Determines if the autoexec needs to be configured and the
- '** system rebooted.
- '** Author: Thangv
- '** Arguments:
- '** Returns: TRUE or FALSE
- '*************************************************************************
- 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" ''** Yes button:IDC_OK
- modflag% = 0
- IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
- modflag% = 1 '** autoexec needs notes
- END IF
- IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
- modflag% = modflag% + 2 '** autoexec needs share
- END IF
- IF modflag% <> FALSE THEN
- notused1$=ModifyAutoexec(modflag%, 1, "AUTOEXEC.LTS")
- END IF
- SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTO$
-
- CASE "2" '** Make Copy button **
- modflag% = 0 '** test flag situation
- IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
- modflag% = 1 '** autoexec needs notes
- END IF
- IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
- modflag% = modflag% + 2 '** autoexec needs share
- END IF
- IF modflag% <> FALSE THEN
- notused1$=ModifyAutoexec(modflag%, 0, "AUTOEXEC.LTS")
- END IF
- SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTOCOPY$
-
- CASE "3" '** No button
- SetSymbolValue SYM_AUTOEXEC_CHOICE$, gMAN$
-
- CASE ELSE
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_REBOOT) + " " + lname$
- ERROR STFQUIT
- 'Log Error: Invalid entry
- END SELECT
-
- SELECT CASE GetSymbolValue(SYM_AUTOEXEC_CHOICE$)
-
- CASE "AUTO"
- 'Log appropriate message
- CASE "AUTOCOPY"
- 'Log appropriate message
-
- CASE "MAN"
- 'Log appropriate message
-
- END SELECT
-
- Lot_AutoConfigureAutoexec = TRUE
-
-
-
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC SUB AutoInstallReboot ()
- '**
- '** Purpose: reboots the system.
- '** Author: Thangv
- '** Arguments:
- '** Returns: TRUE or FALSE
- '*************************************************************************
- PUBLIC SUB AutoInstallReboot ()
- DIM notused1$, hwnd&, lr&
- 'notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNext, FALSE, gALLPRODUCTS,"")
- hwnd&=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
- ' Japanese build
- ' hwnd&=FindWindow("LInstallWClass","âìü[â^âX âCâôâXâgü[âïâvâìâOâëâÇé╓éµéñé▒é╗")
- lr&=SendMessage(hwnd&, WM_COMMAND, UM_REBOOTFLAG, 0)
-
- END SUB
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoWriteOutDebugFile () AS INTEGER
- '**
- '** Purpose:
- '**
- '**
- '**
- '** Author: Jill Salter Plump
- '** Arguments:
- '** Returns:
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoWriteOutDebugFile () AS INTEGER
- DIM notused%, mybuffer$, symbolbuff$, uname$
- DIM FileExist&, TBD$, spacer$
- DIM rc%, lrc&, 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
-
-
-
- 'Initialize the loop
- SectionPref$="section"
- SectionNumber%=1
- SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
- SectionName$ = GetIniKeyString(DebugIni$,"Sections", SectionTag$)
-
- 'Using auto.ini as a data driver I find all the section entries and
- 'log them to the debugging file
-
- DO
-
- mybuffer$ = spacer$
- 'WriteToFile DebugLog$, mybuffer$
-
- lrc& = DoesIniSectionExist (gAutoFile$, SectionName$)
-
- mybuffer$ = "[" + SectionName$ + "]"
-
- IF lrc& = 1 THEN
- ' WriteToFile DebugLog$, mybuffer$
- KeywordPref$="option"
- KeywordNumber%=1
- KeywordTag$=KeywordPref$+LTRIM$(STR(KeywordNumber%))
- 'DoMsgBox("KeywordTag$",KeywordTag$ ,MB_OK)
- 'DoMsgBox("gSharedIniFile$ where used",gSharedIniFile$ ,MB_OK)
- 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 "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%))
- 'DoMsgBox("SectionTag$",SectionTag$ ,MB_OK)
- 'DoMsgBox("gSharedIniFile$ where used",gSharedIniFile$ ,MB_OK)
- SectionName$ = GetIniKeyString(DebugIni$,"Sections", SectionTag$)
- 'DoMsgBox("SectionName$",SectionName$ ,MB_OK)
- LOOP UNTIL SectionName$ = ""
-
- Lot_AutoWriteOutDebugFile = 1
-
- 'print sname$,,scompany$,, stype$,, sproggroup$,, slotusappdir$,, ssize$
-
- NODEBUGLOG:
-
- ELSE
-
- END IF
-
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoConsolidateMoveCopy () AS INTEGER
- '**
- '** Purpose: Assums that at the prompt DBM_CONSOLIDATE_MOVECOPY the user
- '** selected copy
- '**
- '** Author: MZ
- '** Arguments: NONE
- '** Returns: TRUE
- '** Replaces: CONSOLIDATEMOVECOPY
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoConsolidateMoveCopy () AS INTEGER
- ' Is a copy
- 'print "copy"
- SetSymbolValue "SYM_MOVE", "0"
- SetSymbolValue "SYM_COPY", "1"
- Lot_AutoConsolidateMoveCopy = TRUE
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoSuiteAppSelect () AS INTEGER
- '**
- '** Purpose: reads in values from the response file for suite app.selection.
- '** Author: Thangaraj Veerappan
- '** Arguments:
- '** Returns: TRUE or FALSE
- '** Replaces:
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoSuiteAppSelect () AS INTEGER
- DIM Selection%, lname$, prodno%, nProds%
- DIM sname$, rspval$
-
- Lot_AutoSuiteAppSelect = FALSE
-
-
- If GetSymbolValue(SYM_SINGLESMARTSUITE$)= gSMARTSUITE$ Then
-
- sname$ = "Select Applications"
- nProds% = Reg_GetNumberOfProducts()
- 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
- '** Error in response file
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_SELECTAPPS)
- ERROR STFQUIT
- ELSE
- Reg_SetUIInOrOut prodno%, Selection%
- END IF
-
- ' Find out if product actually exists on the server
- ' Set if off if not
- IF GetSymbolValue(SYM_NETWORK$) = gNODE$ THEN
- lname$ = Reg_GetProductAcronym(prodno%)
- IF Lot_IsTheFeatureInstalled(lname$ + "TOP") = 0 THEN
- Reg_SetUIInOrOut prodno%, 0
- END IF
- END IF
- END IF
- Next
-
- End IF
-
- Lot_AutoSuiteAppSelect = TRUE
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoProcessNodeOptions () AS INTEGER
- '**
- '** Purpose: reads in values from the response file for node options and does
- '** the processing.
- '** Author: Thangaraj Veerappan
- '** Arguments:
- '** Returns: TRUE or FALSE
- '** Replaces:
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoProcessNodeOptions () AS INTEGER
-
- DIM AllProdNum%,prodNum%,AllOptNum%,OptName$,OptNum%,notused%
- DIM nodeoption%, Chapter$, lname$, rspval$
-
- Lot_AutoProcessNodeOptions = TRUE
- 'Loop through the products and turn the options on
- AllProdNum% = 0
- AllProdNum% = Reg_GetNumberOfProducts()
- IF AllProdNum% <> 0 THEN
- FOR prodNum%=1 TO AllProdNum%
- AllOptNum% = 0
- AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
- IF AllOptNum% <> 0 THEN
- lname$ = "CustomizeNodeOptions" + Reg_GetProductAcronym(prodNum%)
- 'Loop though registered options and toggle them according
- 'to response file. If they are not avail turn them off
- FOR OptNum%=1 TO AllOptNum%
- OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
- nodeoption% = 0
- Chapter$ = Lot_GetChapterFromKeyword(OptName$)
- IF Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) = 1 THEN
- rspval$ = Lot_GetKeyValFromResponseFile(lname$, OptName$)
- IF rspval$ = "1" THEN
- nodeoption% = 1
- END IF
- END IF
- notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$, _
- nodeoption%)
- NEXT
- END IF
- NEXT
- END IF
- END FUNCTION
-
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoGetSetLicenserInfo () AS INTEGER
- '** Purpose: Get the destination directory symbols
- '** from the RSP file -- used in AUTOMATION
- '**
- '** Author: Jill Salter Plump
- '** Arguments:
- '** Returns: TRUE if successful
- '**
- '*************************************************************************
- 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()
-
- '** FIND THE FIRST LICENSED PRODUCT. ONLY WORKS FOR SINGLE PRODUCT!
- 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 suite propagate the lic. selection to all products
- '** that are selected and support lic.
- 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
- '** CONFIGURE COPYLIST TO ACCOUNT FOR LICENSER FILES
- 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
- '** ACCOUNT FOR LOTUS LICENSER DIRECTORY CHANGE
- 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
-
- '** ACCOUNT FOR LOTUS COUNT DIRECTORY CHANGE
- 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 'licselected = TRUE
-
-
-
- Lot_AutoGetSetLicenserInfo = TRUE
-
- END FUNCTION
-
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoInstallCustomize () AS INTEGER
- '**
- '** Purpose: reads in values from the response file.
- '** Author: Thangv
- '** Arguments:
- '** Returns: TRUE if successful
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoInstallCustomize () AS INTEGER
- DIM tabchpt$, prodfeaturechpt$, RspInOrOut%, Rspval$
- DIM lname$, rc%, prodno%, n%, chpt$, tab_name$, prodfeature$
-
- Lot_AutoInstallCustomize = 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
- IF Reg_GetUIInOrOut (prodno%) = 1 AND _
- Reg_GetProdSelectedInstallType (prodno%) = gCUSTOM$ THEN
- chpt$ = Lot_GetChapterFromKeyword(lname$ + gTOP$)
- '** DND: If no first chapter then we need to do somthing
- prodfeaturechpt$ = Lot_GetFirst(chpt$, F_DISPLAY + F_CUSTOM)
- WHILE (prodfeaturechpt$ <> "")
- prodfeature$ = Lot_GetChapterValStr (prodfeaturechpt$, F_KEYWORD)
- Rspval$ = Lot_GetKeyValFromResponseFile("Customize"+lname$,prodfeature$)
- '** script bug work around: generates Type mismatch and crashes
- IF Rspval$ <> "" THEN
- RspInOrOut% = CINT(Rspval$)
-
- IF RspInOrOut% <> 0 AND RspInOrOut% <> 1 THEN
- ErrorMsg SID_ERR_AUTO_INSTALL, "Feature selection entry in response file invalid: " + prodfeature$
- ERROR STFQUIT
- END IF
- rc% = Lot_SetChapterFilesInCopyListInOrOut(prodfeaturechpt$,RspInOrOut%)
- END IF
- '*** Goto next sibbling feature chpt$
- prodfeaturechpt$ = Lot_GetNext()
- WEND
-
- END IF
- END IF
- Next
-
- Lot_AutoInstallCustomize = TRUE
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoCustomizeShare () AS INTEGER
- '**
- '** Purpose: reads in values from the response file.
- '** Author: Thangv
- '** Arguments:
- '** Returns: TRUE if successful
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoCustomizeShare () AS INTEGER
- DIM sharechpt$, RspInOrOut%, Rspval$, prodchpt$
- DIM lname$, rc%, n%, chpt$, sharefeature$,prodkeyword$
-
- Lot_AutoCustomizeShare = FALSE
-
- lname$ = Reg_GetProductAcronym(1)
- sharechpt$ = Lot_GetFirst("", F_DISPLAY + F_CUSTOM + F_SHARE)
-
- '** DND: If no first chapter then we need to do somthing
-
- WHILE (sharechpt$ <> "")
-
- '** for the shared chpt check if the product it belongs to
- '** is in the copylist.
- '** Only the shared chpt$ of a product being installed
- '** is processed. This works as long as the same shared keywords are
- '** listed in all the products for a specific shared feature.
-
- prodchpt$ = LEFT$(sharechpt$,1)
- prodkeyword$ = Lot_GetChapterValStr (prodchpt$, F_KEYWORD)
- IF FIsKeywordinCopyList (prodkeyword$) <> FALSE THEN
- sharefeature$ = Lot_GetChapterValStr (sharechpt$, F_KEYWORD)
- IF LEFT$(sharefeature$,5) = "WIN32" THEN
- '** 32 bit shared component
- Rspval$ = Lot_GetKeyValFromResponseFile("Shared Components", sharefeature$)
- ELSE
- '** 16 bit lotusapp component
- Rspval$ = Lot_GetKeyValFromResponseFile("Lotusapp",sharefeature$)
- END IF
- '** script bug work around: generates Type mismatch and crashes
- IF Rspval$ <> "" THEN
- RspInOrOut% = CINT(Rspval$)
- IF RspInOrOut% <> 0 AND RspInOrOut% <> 1 THEN
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString (SID_ERR_AUTO_SHRCOMPNENT) + sharefeature$
- ERROR STFQUIT
- END IF
- rc% = Lot_SetChapterFilesInCopyListInOrOut(sharechpt$,RspInOrOut%)
- ELSE
- '*** Log error: feature missing from the response file
- END IF
- END IF
- '*** Goto next shared feature chpt$
- sharechpt$ = Lot_GetNext()
- WEND
-
- Lot_AutoCustomizeShare = TRUE
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoInstallSuiteCustomize () AS INTEGER
- '**
- '** Purpose: reads in values from the response file.
- '** Author: Thangv
- '** Arguments:
- '** Returns: TRUE if successful
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoInstallSuiteCustomize () AS INTEGER
-
- Lot_AutoInstallSuiteCustomize = FALSE
-
- DIM sizetype$, direction$
- DIM lname$, rc%, prodno%, n%
- n% = Reg_GetNumberOfProducts()
- For prodno% = 1 to n%
- lname$ = Reg_GetProductAcronym(prodno%)
- IF lname$ <> "" AND lname$ <> "INST" AND lname$ <> "LIC" AND _
- lname$ <> "SUIT" Then
- IF Reg_GetUIInOrOut(prodno%) = 1 THEN
- sizetype$ = Lot_GetKeyValFromResponseFile(lname$,"SizeOfInstall")
- IF sizetype$ = "" THEN
- ErrorMsg SID_ERR_AUTO_INSTALL, "SizeOfInstall entry missing from section: " + lname$
- ERROR STFQUIT
- END IF
- If sizetype$ = "1" Then '*** gCOMPLETE$
- Reg_SetSelectedInstallType prodno%, gCOMPLETE$
- direction$ = Lot_CallOneProductFunction(prodno%, "InitCopyList", gNEXT, TRUE, "")
- ElseIf sizetype$ = "2" Then '*** gLAPTOP$
- Reg_SetSelectedInstallType prodno%, gLAPTOP$
- direction$ = Lot_CallOneProductFunction(prodno%, "InitCopyList", gNEXT, TRUE, "")
- End If
- END IF
- END IF
- Next
- Lot_AutoInstallSuiteCustomize = TRUE
-
- END FUNCTION
-
- '*************************************************************************
- PUBLIC SUB AutoSetParentDir
- '** Purpose: Get the BASEDIR symbol (for Single product),
- '** from the RSP file -- used in AUTOMATION
- '**
- '** Author: TV
- '** Arguments:
- '** Returns:
- '**
- '*************************************************************************
- DIM notused%, lname$
- DIM parentdirectory$
-
- '*** single product no is always 1 *****
- lname$ = Reg_GetProductAcronym(1)
- parentdirectory$ = Lot_GetKeyValFromResponseFile (lname$,SYM_BASEDIR$)
-
- parentdirectory$ = Lot_AutoCheckRSPPath(parentdirectory$)
-
- IF LEN(parentdirectory$) < 1 THEN
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString(SID_ERR_AUTO_BASEDIR) + " " + lname$
- ERROR STFQUIT
- END IF
-
- SetSymbolValue SYM_BASEDIR$, parentdirectory$
-
- END SUB
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoSetSrvNodeOptions () AS INTEGER
- '**
- '** Purpose: reads in values from the response file.
- '** Author: Thangv
- '** Arguments:
- '** Returns: TRUE if successful
- '*************************************************************************
- PUBLIC FUNCTION Lot_AutoSetSrvNodeOptions () AS INTEGER
-
- DIM chpt$, nodesel%, nodeoptsel$
- DIM NumOfProds%, OptNum%, OptName$, ProdNum%, prodno$
- DIM i%, j%,k%, notused%, OptKeyWord$
- DIM lname$
-
- ' If no products are registered exit
- NumOfProds% = Reg_GetNumberOfProducts()
- IF NumOfProds%=0 THEN
- Lot_AutoSetSrvNodeOptions = TRUE
- EXIT FUNCTION
- END IF
-
- Lot_AutoSetSrvNodeOptions = FALSE
-
- ' Loop through products
- FOR i% = 1 TO NumOfProds%
- lname$ = "CustomizeNodeOptions" + Reg_GetProductAcronym(i%)
- Reg_ReSetAllNodeOptsSelToDefaults i%
- OptNum%=Reg_GetNumofNodeOptions(i%)
- IF OptNum% <> 0 THEN
- chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(i%) + gTOP$)
-
- ' Loop through the options
- FOR j% = 1 TO OptNum%
- ' Indent the option name under the product
- OptKeyWord$ = Reg_GetNodeOptionStr(i%,j%)
- chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$)
- IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN
- nodeoptsel$ = Lot_GetKeyValFromResponseFile(lname$, OptKeyWord$)
- 'IF nodeoptsel$ <> "0" AND nodeoptsel$ <> "1" THEN
- ' ErrorMsg SID_ERR_AUTO_INSTALL, "Auto install error"
- ' ERROR STFQUIT
- 'END IF
- IF nodeoptsel$ = "0" OR nodeoptsel$ = "1" THEN
- nodesel% = CINT (nodeoptsel$)
- Reg_ReSetNodeOptionSelected i%,j%,nodesel%
- END IF
-
- END IF
- NEXT
-
- END IF
- NEXT
-
- Lot_AutoSetSrvNodeOptions = TRUE
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC FUNCTION Lot_AutoAddiconOptions () AS INTEGER
- '**
- '** Purpose: reads AddiconOption values from the response file.
- '** Author: Shu Chen
- '** Arguments:
- '** Returns: TRUE if successful
- '*************************************************************************
-
- PUBLIC FUNCTION Lot_AutoAddiconOptions () AS INTEGER
-
- DIM AddOption$
- DIM lname$
-
- Lot_AutoAddiconOptions = TRUE
-
- lname$ = "General Information"
-
- AddOption$ = Lot_GetKeyValFromResponseFile(lname$,"AddiconOption")
-
- SELECT CASE AddOption$
- case "1"
- Lot_AutoAddiconOptions = TRUE
- case "0"
- Lot_AutoAddiconOptions = FALSE
- case else
- Lot_AutoAddiconOptions = TRUE
-
- END SELECT
-
- END FUNCTION
-
-
-
-