home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 January
/
pcwk_01_1999_B.iso
/
Lotus123
/
FRENCH
/
INSTALL.DSK
/
INST.LSS
< prev
next >
Wrap
Text File
|
1996-07-03
|
54KB
|
1,296 lines
''/*********************************************************************
''
'' Module Name: INST.lss
''
'' Module Code: COMINST
''
'' Author:
''
'' Creation Date: Jan 26, 1994
''
'' Copyright Lotus Development Corporation, (c) 1994
''
''
''
'' Description:
''
''
'' Additional authors:
''
'' Change History:
'' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/inst___@.lss $
''
'' Rev 1.65 03 Jul 1996 12:21:02 jdonohue
'' Only record the language of install for server install in PostSuccessRegINST
''
'' Rev 1.64 14 Jun 1996 16:42:32 jdonohue
'' Ref SPR: RBAN364Q7G
'' Added pipeline RunOnce registry entry if reboot needed and requested
''
'' Rev 1.63 17 May 1996 10:09:58 jdonohue
'' Added SYM_LOTUSUSERDIR to symbol list for install for cinstall.ini
''
'' Rev 1.62 30 Apr 1996 09:58:48 jdonohue
'' Ref SPR: AGAO357QH7
'' Changed logic in SetUserHomeDirectory so that LOTUSUSERDIR set to
'' COMPONENTSDIR for standard and server, to local user directory for node, and
'' to nothing for distribution
''
'' Rev 1.61 29 Apr 1996 16:23:30 jdonohue
'' Only refresh SYM_LOTUSUSERDIR Destination if symbol not empty string
''
'' Rev 1.60 22 Apr 1996 14:17:08 jdonohue
'' Ref SPR: RMOO345M3L
'' Fixed error in setting value of LOTUSUSERDIR
''
'' Rev 1.59 04 Apr 1996 16:27:48 jdonohue
'' Moved IncrementSharedDLLCount and Lot_DoSharedDLLs from inst.lss to main.lss
'' since inst PostConfig processing not done for node since install not copied
''
'' Rev 1.58 02 Apr 1996 11:48:06 jdonohue
'' Call MarkLanguageSubdir for INSTDIR only in node install
''
'' Rev 1.57 01 Apr 1996 08:54:44 jdonohue
'' Register "INSTDIR" with MarkLanguageSubdir since the destination of secondary
'' language files to the server is subdirectory of main product directory
''
'' Rev 1.56 27 Mar 1996 13:15:22 jdonohue
'' Changed LOTUSFONTSDIR handling to mimic WIN/WINSYS fonts go to win directory
'' on server
''
'' Rev 1.55 18 Mar 1996 13:14:18 jdonohue
'' Ref SPR:LSCR32TQHP
'' Use IsNewShell instead of WhatPlatform for determination of LOTUSFONTS directory
''
'' Rev 1.54 12 Mar 1996 15:37:36 jdonohue
'' Moved call to FixupSourceDirSymbol for SYM_LOTUSFONTSDIR$ to InitINST
''
'' Rev 1.53 04 Mar 1996 15:47:06 jdonohue
'' Only call Lot_RegisterFonts for standard and node install
''
'' Rev 1.52 04 Mar 1996 14:23:14 jdonohue
'' Only call Lot_DoSharedDLLs for standard and node
''
'' Rev 1.51 04 Mar 1996 08:31:46 jdonohue
'' Remove 16 bit shared component support -- pass 1 : eliminate LOTUSAPP
''
'' Rev 1.50 28 Feb 1996 15:01:02 jdonohue
'' Added subs IncrementSharedDLLCount and Lot_DoSharedDLLs to increment shared DLL
'' reference count in PostCopyConfigINST
''
'' Rev 1.49 02 Feb 1996 14:42:10 jdonohue
'' Fixed bug with symbol list name not getting set for node in InitInst
''
'' Rev 1.48 29 Jan 1996 16:43:14 jdonohue
'' Fixed error in adding SYM_LOTUSFONTSDIR to list
''
'' Rev 1.47 25 Jan 1996 16:18:40 jdonohue
'' Add SYM_LOTUSFONTSDIR$ to the Directory symbol table list for INST to make
'' sure it gets into the cinstall.ini file
''
'' Rev 1.46 24 Jan 1996 16:08:48 jdonohue
'' Ref SPR: JHOH327JVA
'' Fixed logic error in setting LOTUSUSERDIR
''
'' Rev 1.45 18 Jan 1996 13:38:16 jdonohue
'' Register all the Windows system fonts installed with call to Lot_RegisterFonts
''
'' Rev 1.44 17 Jan 1996 11:43:54 jdonohue
'' Fixed bug setting SYM_LOTUSUSERDIR$ - append \ where not needed
''
'' Rev 1.43 10 Jan 1996 16:51:18 jdonohue
'' Changed SetUserHomeDirectory to locate the user component files in a
'' subdirectory of the node root, or the original install location for that user
'' if there is one in the registry
''
'' Rev 1.42 09 Jan 1996 14:25:34 jdonohue
'' Reset the source for node install for LOTUSFONTSDIR sections in PreCopyConfig
''
'' Rev 1.41 02 Jan 1996 16:19:58 jdonohue
'' Reset destination of all files that have destination directory symbol
'' LOTUSFONTSDIR
''
'' Rev 1.40 02 Jan 1996 15:58:04 jdonohue
'' Determine the location of the Windows fonts directory and set symbol
'' SYM_LOTUSFONTSDIR$ in InitInst.
''
'' Rev 1.39 28 Dec 1995 10:54:36 jdonohue
'' Added sub SetUserHomeDirectory for multi-user configuration
''
'' Rev 1.38 22 Dec 1995 14:27:08 jdonohue
'' Use the language acronym instead of the language for the install node icons
''
'' Rev 1.37 22 Dec 1995 10:13:18 jdonohue
'' Removed all references to SYM_PARENTDIR$ -- is now SYM_BASEDIR$ for all
''
'' Rev 1.36 26 Oct 1995 15:25:16 tveerapp
'' FIxed IF END IF for SYM_LOTUSUSERDIR processing in PrecopyConfigINST.
''
'' Rev 1.35 Oct 24 1995 16:55:46 cmoy
'' removed eof char
''
'' Rev 1.34 24 Oct 1995 15:42:38 jdonohue
'' Fixed syntax error
''
'' Rev 1.33 24 Oct 1995 15:25:04 jdonohue
'' Make sure SYM_LOTUSUSERDIR$ not blank before refresh
''
'' Rev 1.32 24 Oct 1995 11:49:42 jdonohue
'' Added dummy call to InitLanguages
''
'' Rev 1.31 19 Oct 1995 14:57:16 jdonohue
'' Refresh "LOTUSUSERDIR" destination in PreCopyConfig
''
'' Rev 1.30 11 Oct 1995 15:57:22 glutz
'' AddIconINST sets working directory.
''
'' Rev 1.29 26 Sep 1995 09:01:30 jdonohue
'' Fixed preventing overwrite of cinstall.ini, .inf for language install
''
'' Rev 1.28 25 Sep 1995 12:51:28 jdonohue
'' Added placeholder function InitLanguageINST
''
'' Rev 1.27 Sep 25 1995 09:52:24 cmoy
'' Prevent overwrite of cinstall.ini, xxx.lss by supressing INSTTOP section inst
'' ead of INSTFILES section
''
'' Rev 1.26 07 Sep 1995 14:55:18 tveerapp
'' Moved the setting of INSTDIR during a language server install from
'' main.lss to fix spr# WED2SVNRDZ
''
'' Rev 1.25 01 Sep 1995 09:35:18 jdonohue
'' Turn off INSTLANG?? section for language install
''
'' Rev 1.24 18 Aug 1995 16:43:12 glutz
'' INITInst sets InitDir to SYM_PARENTDIR$.
''
'' Rev 1.23 14 Aug 1995 13:41:46 jdonohue
'' Added code to add language qualifier to node icon in AddIconsINST
''
'' Rev 1.22 14 Aug 1995 09:09:26 jdonohue
'' Added code to handle language install to server
''
'' Rev 1.21 02 Aug 1995 14:56:28 amontalv
'' Added name of product to node install shortcut.
''
'' Rev 1.20 17 Jul 1995 15:53:58 amontalv
'' Added code to put install in program folder for server install.
''
'' Rev 1.19 03 May 1995 18:14:14 mzgripce
'' replace #else with 'else
''
'' Rev 1.18 02 May 1995 12:52:42 cmoy
'' Merged c2 into cf build
''
'' Rev 1.18 10 Apr 1995 18:09:14 amontalv
'' Changed comments to reflect change of function reference.
''
'' Rev 1.17 02 Feb 1995 14:27:06 cmoy
''
'' Thangaraj added fixes for Pipeline Problem
''
'' Rev 1.16 13 Jan 1995 17:17:58 tveerapp
''
'' Removed redundant code
''
'' Rev 1.15 12 Jan 1995 15:30:42 tveerapp
''
'' 1. changed cmoVital to cmoOverwrite for making the LAUNCHEXE entry in cinstall.ini
'' 2. Removed MakePath.It cannot handle file names with paths in it. e.g. reg\foo.exe
''
'' Rev 1.14 11 Jan 1995 15:32:08 tveerapp
''
'' Fixed spr# TVEN28TJK:
'' The cinstall.ini in the temporary directory is used to determine if the product
'' being installed supports pipeline(based on the existence of the LAUNCHEXE entry)
'' If it does, a global flag is set to indicate this and an enrty is made in the
'' cinstall.ini that is installed on the machine.
'' If the flag is set and the execuatble exists, it is launched.
''
'' Rev 1.13 29 Dec 1994 12:23:14 tveerapp
''
'' Fixed AND _.
''
'' Rev 1.12 29 Dec 1994 12:15:28 tveerapp
''
'' Added a check for pipeline processing to be launched only for a non-automated
'' install.
''
'' Rev 1.11 28 Dec 1994 16:13:50 tveerapp
''
'' Added pipeline processing (electronic registration). Functions PostCopyConfig
'' and PostSuccessReg have these changes. Removed the callback for the elrctronic
'' registration dialog.
''
'' Rev 1.10 12 May 1994 11:20:52 mmeth
'' Adding Icons for Lic and Install and using DoMsgBox instead of MessageBox
''
'' Rev 1.9 02 May 1994 18:34:02 mzgripce
''
'' add AddIconsINST()
''
'' Rev 1.8 04 Apr 1994 18:10:44 mmeth
'' Now can ignore share.lss & shared.ini
''
'' Rev 1.7 22 Mar 1994 12:34:16 mmeth
'' added licdir & instdir to toolkit registration
''
'' Rev 1.6 28 Feb 1994 14:27:42 mmeth
'' Incorrectly reseting INSTDIR in PrecopyCOnfigINST
''
'' Rev 1.5 18 Feb 1994 13:29:42 mmeth
''
'' Now check for Listlength of Reg_GetDirSymbolList
''
'' Rev 1.4 17 Feb 1994 10:23:06 mmeth
'' Added Reg_SetAllowUserToChoseInSMartSUite
''
'' Rev 1.3 16 Feb 1994 11:00:22 mmeth
'' Added error message if INSTTOP sec is
''
'' Rev 1.2 15 Feb 1994 15:33:58 mmeth
'' took out a print
''
'' Rev 1.1 15 Feb 1994 14:48:30 mmeth
'' fixed BASEDIR & Reg_GetDirSymbolLIst(1)
''
'' Rev 1.0 11 Feb 1994 10:56:44 jbrodeur
'' Initial Revision
''----------------------------------------------------------------------
'' Date Vers. Pgmr SPR# Change
''----------------------------------------------------------------------
'' 2-08-94 0004 MMETH moved checking first prod for change to Initcopylist
'' 2-04-94 0003 MMETH changed PreCopyConfig to work for SmartSuite
'' 2-03-94 0002 MMETH corrected 1 prod vs smartsuite
'' 2-02-94 0001 MMETH cinstall.ini install for standard and server
'' 1-25-94 0000 Initial Check-In
'' !
''
''----------------------------------------------------------------------
''
''*********************************************************************/
USE "TOOLKIT"
USE "LANGUAGE"
OPTION DECLARE
'** These Are the Required Functions that Products must provide
'***************************************************************
DECLARE PUBLIC FUNCTION ProductRegINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION DefaultUserRegINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION InitINST (prodno%, network$, direction$, basedir$) AS STRING
DECLARE PUBLIC FUNCTION PathChangeINST (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DECLARE PUBLIC FUNCTION InitCopyListINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PreCopyConfigINST (prodno%, network$, direction$, lic%) AS STRING
DECLARE PUBLIC FUNCTION AddTheBillBoardsINST (prodno%, network$, direction$, nbytes&) AS STRING
DECLARE PUBLIC FUNCTION PostCopyConfigINST (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION AddIconsINST (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION UIINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PostSuccessRegINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION InitLanguageINST (prodno%, network$, direction$) AS STRING
'** Product specific functions
'*****************************
DECLARE FUNCTION GetINSTPathfromLotusIni() AS STRING
DECLARE SUB SetUserHomeDirectory()
' ** Global flag for launching pipeline exe
PUBLIC gProdsupport%
'*************************************************************************
'**************************** Required Functions *************************
'*************************************************************************
'*************************************************************************
'** SUB Initialize
'**
'** Purpose: Initialize the INST product scripts. There is only one purpose
'** of this routine, it is to register **your product**. Without
'** this function, your product will not install. All you
'** you need to do in this subroutine is:
'** modify INST -> your acronmy.
'** NOTE: so as not to clutter up the INSTCUI.RC file,
'** we always use SID_INST. You of course can be more
'** creative!
'**
'** ASSUMPTIONS: Many things in the toolkit key off of your
'** Acronym. These are the constraints:
'** 1. your top level chapther in the INF must
'** have a KEYWORD of your Acronym +"TOP"
'** e.g. INSTTOP
'** Author: Marcel Meth
'** Arguments: None
'** Returns: NONE
'*************************************************************************
SUB Initialize
Reg_RegisterProductNames "INST", LdString(SID_BLANKTEXT)
END SUB
'*************************************************************************
'** FUNCTION ProductRegINST (prodno%, network$, direction$) AS INTEGER
'**
'** Purpose: This function allows your product to register itself
'** in the Install Product Registry. The toolkit squirrles
'** the information provided and will provide you with
'** various features accordingly. For example, if you support
'** shared files, the toolkit will do most of the work
'** for the COMPENT directory.
'**
'** For the most part you should use only Reg_Set... Functions.
'**
'**
'** If you turn on ATM, LICENSING, or and SHARED tools, then
'** you must be sure to add the appropriate lines and files
'** in you INST.SCR and INST.LYT, respectively. See Cook book.
'**
'** If you support server, you will have to make sure that
'** you have the correct entire for the install files in your
'** INST.SCR and INST.LYT
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: UNINITIALIZED
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'*************************************************************************
PUBLIC FUNCTION ProductRegINST (prodno%, network$, direction$) AS STRING
ProductRegINST = gNEXT
Reg_SetSupportedInstallTypes prodno%, 1, 1, 1
'Reg_SetSelectedInstallType ProdNo%,TypeSelected$
Reg_SetProdSizes prodno%, 524288, 524288 ' .5 meg.
Reg_SetUIInOrOut prodno%, 1
Reg_SetShareFlags prodno%, 0, 0, 0, 0
Reg_SetAllowUserToPickInSuite prodno%, 0
'NO NEED TO SET SINCE THER IS NO CD SUPPORT.
'Reg_SetCDOption prodno%,Inst%,CDOptStr$
'Reg_SetCDOptionSelected ProdNo%,Inst%,Selection%
'DEAL WITH LATER
'Reg_SetNodeOption ProdNo%,Inst%,NodeOptStr$
'Reg_SetNodeOptionSelected ProdNo%,Inst%,Selection%
Reg_SetSrvSupport prodno%, 1
Reg_SetLicenseSupport prodno%, 0
Reg_SetATMSupport prodno%, 0
'Reg_SetProgManagerGroup prodno%, LdString(SID_INST)
END FUNCTION
'*************************************************************************
'** FUNCTION DefaultUserRegINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: **Only** the first registered product gets called.
'** For SMartSUite, this will be Smart Suite.
'** This functions allows you to set the default user reg.
'** information that the user will be shown. The toolkit
'** will provide default values from MS-Windows. If you disagree
'** with them you should modify them in this function using:
'** SetSymbolValue on SYM_NAME, SYM_COMPANY & SYM_SERIALNUM$
'**
'** It is upto you how you store registration information.
'** it will not be stored until later in PostCopyConfigINST.
'** The CIT provides functions that allow you to access .ri
'** files: Lot_ReadDefaultsfromRi(ripath$).
'**
'** If you need to write back to the floppy, do it here.
'** Most Lotus products will no longer write back to the floppy.
'** Remeber, you can't write back to a CD or network!
'**
'** In Symbols : SYM_NAME$, SYM_COMPANY$
'** Out Symbols: SYM_NAME$, SYM_COMPANY$, SYM_SERIALNUM$
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: UNINITIALIZED
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'*************************************************************************
PUBLIC FUNCTION DefaultUserRegINST (prodno%, network$, direction$) AS STRING
DefaultUserRegINST = gNEXT
END FUNCTION
'*************************************************************************
'** FUNCTION InitINST (prodno%, network$, direction$, basedir$) AS STRING
'**
'** Purpose: This is the first time you will be called when
'** the server parmater us valid. You need to use this
'** function to intialize certain things. (See the MUST DO
'** below).
'**
'** This is a good place to put up a dialog warning the user
'** of a prrevious version of your product. If there is a previous
'** version you might want to steer them twords or away from it.
'**
'**
'** Must Do: You **MUST** set inital values for all of the destination
'** ======= directories that you refer to in your INF file. If you do not,
'** then InitCopylist will fail! e.g. SetSymbolValue "INSTDIR", basedir$
'** Of course you may be more intelligent. You should preface your
'** directory with basedir$. The toolkit is finding a good drive
'** letter and basedirectory. Also, remeber all paths end in a
'** \ and are lower case.
'**
'** You should **NOT** define LOTUSFONTSDIR, LOTUSUSERDIR, WINDIR, &
'** WINSYSDIR. The toolkit does this for you.
'**
'** Once you have defined destdir symbols, you need to register
'** them with the toolkit. (See the code below)
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** basedir$: The toolkit has found a good base. for your directory.
'** This is it. You should use it. This will make Smart
'** Suite work, and will pick a good drive letter for you.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION InitINST (prodno%, network$, direction$, basedir$) AS STRING
DIM dirSym$, sym$, symname$, i%
InitINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
i% = 1
sym$ = Reg_GetDirSymbolList(prodno%)
symname$ = sym$ + gNAME
If network$ <> gSERVER AND network$ <> gSTANDARD AND network$ <> gDISTRIBUTION$ Then
Reg_SetUIInOrOut prodno%, FALSE
Else
'** Figure out where the first product is., put install there!
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
SetSymbolValue "INSTDIR", GetSymbolValue(SYM_BASEDIR$)
Else
SetSymbolValue "INSTDIR", basedir$
End If
SetSymbolValue "INSTDIRNAME", " "
SetListItem sym$, 1, "INSTDIR"
SetListItem symname$, 1, "INSTDIR" + gNAME$
i% = i% + 1
End If
'**
'** Determine the location of the Windows fonts directory and set symbol
'** SYM_LOTUSFONTSDIR$
If network$ = gNODE OR network$ = gSTANDARD THEN
IF IsNewShell() THEN
SetSymbolValue SYM_LOTUSFONTSDIR$, GetSymbolValue(SYM_WINDIR$) _
+ LdString(SID_FONTS95_DIR) + "\"
ELSE
SetSymbolValue SYM_LOTUSFONTSDIR$, GetSymbolValue(SYM_WINSYSDIR$)
END IF
END IF
' Initialize SYM_LOTUSUSERDIR$ symbol
SetUserHomeDirectory
' The destination of secondary language files to the server is subdirectory
' of main product directory
If network$ = gNODE THEN _
MarkLanguageSubdir("INSTDIR")
' Make sure special CIT symbols get into Cinstall.ini
dirSym$ = SYM_LOTUSFONTSDIR$
SetListItem sym$, i%, dirSym$
SetListItem symname$, i%, dirSym$ + gNAME$
i% = i% + 1
dirSym$ = SYM_LOTUSUSERDIR$
SetListItem sym$, i%, dirSym$
SetListItem symname$, i%, dirSym$ + gNAME$
i% = i% + 1
END FUNCTION
'*************************************************************************
'** FUNCTION PathChangeINST (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
'**
'** Purpose: This function is called whenever the user proposes changes
'** to a path for your product. by the time this function calls
'** you, the paths have already been checked syntactically, and
'** the directory has been checked to see that it is in fact writeable.
'** Your obligation is to verify that the proposed new path is okay with
'** you. If, not, put up a dialog telling the user and return
'** gBACK.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** destdirsym$: The destdir symbol that has changed. e.g. "INSTDIR"
'** mainprodsonly%: (TRUE | FALSE) , when TRUE this means that only
'** your top level product directory should change,
'** probably "INSTDIR"
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION PathChangeINST (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DIM path$
PathChangeINST = gNEXT
path$ = GetSymbolValue (destdirsym$)
'' The following is a psudocode example
''''''rc$ = DetectVersionPriorToDarwin(path$)
''''''If rc$ = "BEAGLE" then
'''''' ShowPathError SID_BEAGLE_FOUND, SID_ERR_EXISTBEAGLE, path$
'''''' PathChangeINST = gBACK
''''''end if
END FUNCTION
'*************************************************************************
'** FUNCTION InitCopyListINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: Product must Initialize the copylist
'**
'** Must Do: You must initialize the copy list. However,
'** ======= if you leve the code totally untouched as is,
'** it will probably work for you.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION InitCopyListINST (prodno%, network$, direction$) AS STRING
DIM i%, sym$, chpt$
InitCopyListINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
sym$ = Reg_GetProductAcronym(prodno%) + gTOP$
chpt$ = Lot_GetChapterFromKeyWord(sym$)
if chpt$ = "" then
ErrorMsg 0, "Developers: You need to have install section with INSTTOP in INF file"
ERROR STFQUIT
end if
SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
CASE gCOMPLETE$
i% = F_COMPLETE
CASE gLAPTOP$
i% = F_LAPTOP
CASE gCUSTOM$
i% = F_CUSTOM
END SELECT
Lot_InitializeCopyList chpt$, i%
'** FOR STANDARD we only want to install the cinstall.ini file
If network$ <> gSERVER$ Then
If FIsKeywordinCopyList ("INSTFILES") <> FALSE Then
chpt$ = Lot_GetChapterFromKeyword("INSTFILES")
Lot_ToggleChapterFilesInCopyList chpt$
End If
End If
'For a language install, we don't overwrite the cinstall.ini and .INF files
'by turning off the INSTTOP section
IF network$ <> gSERVER$ THEN
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN
chpt$ = Lot_GetChapterFromKeyword("INSTTOP")
Lot_SetChapterFilesInCopyListInOrOut chpt$, 0
END IF
END iF
END FUNCTION
'*************************************************************************
'** FUNCTION UIINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: This is your chance to put up any User Interface
'** that you want. remeber, try to keep it short.
'** In Smart Suite, if every product puts up to extra
'** dialogs, then the Smart SUite will consist of 16 dialogs!
'**
'** Pay attention to the value of direction, if you are putting
'** up more than one dialog.
'**
'** The toolkit will do an acurate space computation later,
'** so you can tamper with the copy list. But you shouldn't
'** write out anything to the disk until PostCopyCofig!
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION UIINST (prodno%, network$, direction$) AS STRING
UIINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
END FUNCTION
'*************************************************************************
'** FUNCTION PreCopyConfigINST (prodno%, network$, direction$, lic%) AS STRING
'**
'** Purpose: This is the very last function called before the space is
'** acurately computed (to the last byte) and files are copied
'** by the toolkit. If you have any last minute changes to
'** do, this is the time to do them. example:
'** Test for monitor resolution, and turn on the chapter
'** in the copy list with the appropriate resoltuion.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** lic%: TRUE | FALSE; TRUE licensing is turned on else it is off
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION PreCopyConfigINST (prodno%, network$, direction$, lic%) AS STRING
DIM dirSym$
PreCopyConfigINST = gNEXT
'* Just in case product 1 changed.
If GetSymbolValue (SYM_SINGLESMARTSUITE) = gSINGLE$ Then
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
End If
SetSymbolValue "INSTDIR", GetSymbolValue(dirSym$)
Else
SetSymbolValue "INSTDIR", GetSymbolValue (SYM_BASEDIR$)
End If
'** TV: We have to reset this symbol for language/server install
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ AND _
GetSymbolValue(SYM_NETWORK$) =gSERVER$ THEN
SetLanguageSubdir "INSTDIR", "INSTDIR"
END IF
Lot_RefreshDestination ("INSTDIR")
'Set LOTUSUSERDIR for user files on node
'may have been changed if BASEDIR changes through UI
SetUserHomeDirectory
IF GetSymbolValue(SYM_LOTUSUSERDIR$) <> "" THEN _
Lot_RefreshDestination (SYM_LOTUSUSERDIR$)
END FUNCTION
'*************************************************************************
'** FUNCTION AddTheBillBoardsINST (prodno%, network$, direction$, nbytes&)
'**
'** Purpose: This is where to add the billboards using the function:
'** AddToBillboardList. Use nbytes& as the last parameter to
'** the MS-SETUP function AddToBillboardList
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** nbytes: Determines the duration of billboard timing.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION AddTheBillBoardsINST (prodno%, network$, direction$, nbytes&) AS STRING
AddTheBillBoardsINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
'psudo code follows as an example
''''If network$ <> gNODE$ Then
'''' SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD1_BMP)
'''' AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD1, "_FNameOrgDlgProc@16", nbytes&
' else
'''' AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD1, "FNameOrgDlgProc", nbytes&
''''End If
END FUNCTION
'*************************************************************************
'** FUNCTION PostCopyConfigINST (prodno%, network$, direction$, programgroup$) AS STRING
'**
'** Purpose: This is called just after file copy has completed.
'** This is your opportunity to do all the configuaration
'** you need. This includes:
'**
'** 1. Writing to all your ini files
'** 2. Writeing to OLE Reg database
'** 3. Writing to any other confi files you may support
'** 4. Writing out user registration information
'** 5. Add program manager icons of those features
'** thatwere installed.
'** 6. Create any working directories.
'** A working directory is one that does not contain any
'** files, thus the toolkit did not create it for you.
'**
'** NOTE: THERE are many subtlties in here if you are
'** dealing with node and CD installs. In particular,
'** you must be ***very*** careful to understand where the
'** things are that you are pointing to. They could
'** be on the node, server, or CD! This, in combination
'** with the INF file for Server/Node is probably the trickiest
'** part of writing a quality install. When configuring,
'** you must be careful to consider what happens if there is
'** a preexisting product on the machine, in the same location or
'** another one! This is very very tricky. What happens
'** if you had a full installation previously in location C:\FOO
'** and now the user is installing a minimum installation in loaction
'** D:\FOO.
'**
'** Each and every thing you do for configuartion needs very
'** careful thought.
'**
'** WE support a function Lot_WhereIsFeature("FeatureID")
'** This currrently tells you the location of a feature
'** If the feature appears both in the SERVER.INF and the
'** NODE.INF referred to by the same Keyword ID.
'** We do not support CDs with this command yet, but we will at some
'** time.
'**
'** Also look out for writing to a file when the directory
'** doesn't exist. If the user deselected one of your
'** you options, your install may still be running,
'** but since there were no files to copy into the directory
'** it wasn't created by the toolkit!
'**
'** Finally, remember that configuration files generally
'** hold the state that the user has customized earlier.
'** Sometimes you don't want to overwrite these!
'** You will primarily use three MS-SETUP functions
'** in here:
'** 1. CreateIniKeyValue (writing to ini files)
'** 2. SetRegKeyValue (writing to OLE reg DB)
'** 3. CreateProgmanItem (writing to progman)
'**
'** CreateProgmanGroup & ShowProgmanGroup are
'** done for you by the time you reach this
'** function.
'**
'** You will not have to do any configuration of LOTUS SHARED
'** tools. The toolkit will do this for you.
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** programgroup$: The name of the program group the user chose to
'** install the program manager icons
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION PostCopyConfigINST (prodno%, network$, direction$, programgroup$) AS STRING
PostCopyConfigINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
SKIPCONFIG:
END FUNCTION
'** PUBLIC FUNCTION AddIconsINST (prodno%, network$, direction$, programgroup$) AS STRING
'** Purpose: This is called just after file copy has completed.
'** 1. Add program manager icons of those features
'** thatwere installed.
'**
'** NOTE: THERE are many subtlties in here if you are
'** dealing with node and CD installs. In particular,
'** you must be ***very*** careful to understand where the
'** things are that you are pointing to. They could
'** be on the node, server, or CD! This, in combination
'** with the INF file for Server/Node is probably the trickiest
'** part of writing a quality install. When configuring,
'** you must be careful to consider what happens if there is
'** a preexisting product on the machine, in the same location or
'** another one! This is very very tricky. What happens
'** if you had a full installation previously in location C:\FOO
'** and now the user is installing a minimum installation in loaction
'** D:\FOO.
'**
'** Each and every thing you do for configuartion needs very
'** careful thought.
'**
'** WE support a function Lot_WhereIsFeature("FeatureID")
'** This currrently tells you the location of a feature
'** If the feature appears both in the SERVER.INF and the
'** NODE.INF referred to by the same Keyword ID.
'** We do not support CDs with this command yet, but we will at some
'** time.
'**
'** Also look out for writing to a file when the directory
'** doesn't exist. If the user deselected one of your
'** you options, your install may still be running,
'** but since there were no files to copy into the directory
'** it wasn't created by the toolkit!
'**
'** Finally, remember that configuration files generally
'** hold the state that the user has customized earlier.
'** Sometimes you don't want to overwrite these!
'** You will primarily use three MS-SETUP functions
'** in here:
'** 1. CreateProgmanItem (writing to progman)
'**
'** CreateProgmanGroup & ShowProgmanGroup are
'** done for you by the time you reach this
'** function.
'**
'** You will not have to do any configuration of LOTUS SHARED
'** tools. The toolkit will do this for you.
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** programgroup$: The name of the program group the user chose to
'** install the program manager icons
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MZ
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION AddIconsINST (prodno%, network$, direction$, programgroup$) AS STRING
DIM instdir$, notused%, Caption$
DIM LanguageQualifier$, LanguageAcronym$
AddIconsINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ = gSERVER Then
instdir$ = Lot_WhereIsFeature(prodno%, "INSTFILES", "install.exe")
Caption$ = LdString(SID_INST_VIEWSTRING)+ Reg_GetProductName(1)
'Add language qualifier for secondary languages
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN
LanguageAcronym$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
LanguageQualifier$ = LanguageAcronym$
Caption$ = Caption$ + " " + LanguageQualifier$
END IF
ASSERT instdir$ <> "", ""
If IsNewShell() THEN
notused%=Lot_AddLinkToFolder(prodno%, instdir$ + "install.exe", _
Caption$+".lnk", _
Caption$, "", instdir$)
Lot_RegisterObject "INSTFILES",UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(prodno%) + Caption$+".lnk"
Else
CreateProgmanItem programgroup$, Caption$, _
instdir$ + "install.exe", ",,,," + instdir$, cmoOverwrite
Lot_RegisterObject "INSTFILES", UNIN_CLASS_ICON$, programgroup$ + "\" + Caption$
End If
End If
' Register all the Windows system fonts installed
IF network$ = gNODE OR network$ = gSTANDARD THEN _
Lot_RegisterFonts
END FUNCTION
'*************************************************************************
'** FUNCTION PostSuccessRegINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: If you need to launch something after install runs
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION PostSuccessRegINST (prodno%, network$, direction$) AS STRING
DIM rc$, ExecError%, notused%, executable$, gInstallIniFile$, prodbaseDir$
DIM distribution$, automation$
DIM cwd$, TmpInstallIni$
PostSuccessRegINST = direction$
'' In the backwards case, keep backing up
'If direction$ = gBACK Then
' EXIT FUNCTION
'End If
'Build the path to the installed cinstall.ini
prodbaseDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodbaseDir$,gINSTALLINI$)
'** the following is to identify if the product currently being installed supports
'** the electronic registration. It sets up a global flag to indicate this
'** and makes the LAUNCHEXE entry to the installed cinstall.ini
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
TmpInstallIni$ = MakePath(cwd$,gINSTALLINI$)
executable$ = GetIniKeyString(TmpInstallIni$, "TOOLKIT","LAUNCHEXE")
IF executable$ <> "" THEN
gProdsupport% = 1
'** make the exe entry
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "LAUNCHEXE", executable$, cmoOverwrite
ELSE
'** The current product that is being installed does not support pipeline
gProdsupport% = 0
END IF
'** The following is to identify subsequent installs from a distribution install
'** to avoid launching the electronic registration. It makes an entry for
'** a distribution install
network$ = GetSymbolValue(SYM_NETWORK$)
automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
distribution$ = GetIniKeyString(gInstallIniFile$, "TOOLKIT", "DISTRIBUTION")
IF network$ <> gNODE$ AND distribution$ = "" AND automation$ <> gTRUE$ THEN
executable$ = GetIniKeyString(gInstallIniFile$, "TOOLKIT","LAUNCHEXE")
IF executable$ <> "" THEN
'*** The check below is because MakePath only works with
'** a file name of 12 characters .e.g. foo.exe and not reg\foo.exe
IF RIGHT$(prodbaseDir$, 1) <> "\" THEN _
prodbaseDir$ = prodbaseDir$ + "\"
executable$ = prodbaseDir$ + executable$
IF DoesFileExist(executable$,femExists) <> 0 AND gProdsupport% = 1 THEN
'' Don't launch pipeline if restart flag on
IF FExitExecRestart <> FALSE OR RebootLater% THEN
ExecError% = WinExec(executable$,SW_SHOWNORMAL)
IF ExecError% < 32 THEN _
ErrorMsg SID_ERR_EXECPIPELINE, executable$
ELSE
'' Put pipeline in the start once category on reboot
DIM RegKey$
DIM LReturn& : LReturn& = ERROR_SUCCESS
DIM CommandLine$ : CommandLine$ = executable$
DIM value$ : value$ = "Lotus Pipeline"
RegKey$= "Software\Microsoft\Windows\CurrentVersion\RunOnce"
IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, RegKey$) = FALSE THEN _
LReturn& = Lot_RegCreateKeyEx(HKEY_CURRENT_USER, RegKey$)
IF LReturn& <> ERROR_SUCCESS THEN
RegErrorMsg SID_ERR_REG_CREATE, gHLM$+"\"+RegKey$,"",""
ELSE
LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER, RegKey$,_
value$, REG_SZ, CommandLine$, LENBP(CommandLine$)+1)
END IF
IF LReturn& <> ERROR_SUCCESS THEN _
RegErrorMsg SID_ERR_REG_CREATE, gHLM$+"\"+RegKey$,"",""
END IF
END IF
END IF
END IF
'** Record the language of install -- but only for server
IF network$ = gSERVER$ THEN _
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "LANGUAGE",_
GetSymbolValue(SYM_INSTALL_LANGUAGE$), cmoOverwrite
IF network$ = gDISTRIBUTION$ THEN
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "DISTRIBUTION", "YES", cmoVital
END IF
END FUNCTION
'********************************
'********************************
'** Product Specific Functions **
'********************************
'********************************
'*************************************************************************
'** FUNCTION GetINSTPathfromLotusIni() AS STRING
'**
'** Purpose: Gets the product dir path from Lotus.ini file, and searches for
'** inst.exe in the dir.
'**
'** Author: JYOTI KEDIA
'** Arguments: None
'** Returns: if inst.exe does not exist in dir specified in lotus.ini, it
'** returns "", otherwise returns the full path to the product.
'*************************************************************************
FUNCTION GetINSTPathfromLotusIni() 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", "inst")
if defdir$ <> "" then
temp% = INSTR(1,LCASE$(defdir$),"inst.exe")
if temp% <> 0 then
ProdDir$ = MID$(defdir$,1,(temp%-1))
if ProdDir$ <> "" then
fullpath$ = ProdDir$ + "inst.exe"
if DoesFileExist(fullpath$, femExists) then
rv% = Lot_CleanPath(fullpath$)
GetINSTPathfromLotusIni = fullpath$
EXIT FUNCTION
end if
end if
end if
end if
end if
GetINSTPathfromLotusIni = ""
END FUNCTION
'*************************************************************************
'** PUBLIC FUNCTION InitLanguageINST (prodno%, network$, direction$)
'** Purpose: Placeholder, since all products must provide a function of this
'** name, does nothing.
'*************************************************************************
PUBLIC FUNCTION InitLanguageINST (prodno%, network$, direction$) AS STRING
InitLanguages "", "", prodno%
InitLanguageINST = ""
END FUNCTION
CONST UserPathRegValue$ = "User Path"
SUB SetUserHomeDirectory()
'*************************************************************************
'** Purpose: Sets the value of the special destination directory symbol
'** SYM_LOTUSUSERDIR$ for user specific files on node
'** For standard or server, set value to SYM_COMPONENTSDIR$
'**
'** Author: JMDonohue
'*************************************************************************
DIM Key$, rc&, user$, drive$, s$, Size&, Path$, i%, network$
network$ = GetSymbolValue(SYM_NETWORK$)
Key$ = gREGLOTUSCOMP
SELECT CASE network$
CASE gSTANDARD$
SetSymbolValue SYM_LOTUSUSERDIR$, GetSymbolValue(SYM_COMPONENTSDIR$)
CASE gSERVER$
SetSymbolValue SYM_LOTUSUSERDIR$, GetSymbolValue(SYM_COMPONENTSDIR$)
CASE gNODE$
' Use the local path for the user if it exists
Path$ = ""
IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, Key$) THEN
s$=CreateBuffer(256)
Size& = 256
IF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, Key$, UserPathRegValue$, 0, _
s$, Size&) = ERROR_SUCCESS THEN Path$=NullTrim(s$)
END IF
IF Path$ = "" THEN
s$ = GetSymbolValue(SYM_BASEDIR$)
Path$ = MakePath(s$,gCOMPONENTS$) + "\"
END IF
SetSymbolValue SYM_LOTUSUSERDIR$, Path$
CASE gDISTRIBUTION$
SetSymbolValue SYM_LOTUSUSERDIR$, ""
END SELECT
END SUB
%rem
****NOTE:
****This is not used in CIT 2.1
****Kept around for sentimental reasons
CONST UserDirRegKey$ = _
"SOFTWARE\Microsoft\Windows\CurrentVersion\ProfileList"
CONST UserDirRegValue$ = "ProfileImagePath"
SUB SetUserHomeDirectory()
'*************************************************************************
'** Purpose: Retrieves the value of the system supplied user home directory
'** and sets the value of the special destination directory symbol
'** SYM_LOTUSUSERDIR$
'**
'** Author: JMDonohue
'*************************************************************************
DIM Key$, rc&, user$, drive$, s$, Size&, Path$, i%
IF WhatPlatform() = PLATFORM_WIN95 THEN
Key$ = UserDirRegKey$
IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, Key$) THEN
user$=CreateBuffer(128)
Size&=128
i%=GetUserName(user$, Size&)
user$=NullTrim(user$)
Key$ = UserDirRegKey$ + "\" + user$
IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, Key$) = FALSE THEN
ErrorMsg 0, "Registry key "+Key$+" Does not Exist"
ERROR STFQUIT
END IF
s$=CreateBuffer(256)
Size& = 256
rc& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, Key$, UserDirRegValue$, 0, _
s$, Size&)
Path$=NullTrim(s$) + "\Lotus\"
ELSE
'For a single user, put it in desktop for want of a better place
Path = GetWindowsDir() + "Desktop\Lotus\"
END IF
ELSEIF WhatPlatform() = PLATFORM_WINNT THEN
drive$ = GetEnvVariableValue ("HOMEDRIVE")
s$ = GetEnvVariableValue ("HOMEPATH")
Path$ = drive$ + s$ + "\Lotus\"
ELSE
ErrorMsg 0, "Unsupported platform"
ERROR STFQUIT
END IF
SetSymbolValue SYM_LOTUSUSERDIR$, Path$
END SUB
%endrem