home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-09-18 | 194.8 KB | 5,048 lines |
-
- CONST gDebugNotes%=0 '** 1 for debug information, 0 for none
- CONST gDebugGetObs%=0 '** 1 to Debug GetObsolete()
- CONST gDebugAddReg=0 '** 1 to Debug AddRegistryKeysNOT()
- CONST gDebugNotesFromPath=0 '** 1 to Debug GetNotesFromPAth()
- CONST gDebugWriteNotesReg%=0 '** 1 to Debug WriteNotesReg
- CONST gDebugInitCopyList%=0 '** 1 to Debug InitCopyList
- CONST gDebugPartionedNotesIni%=0 '** 1 to Debug PartionedNotesIni
- CONST gDebugPathChangeNot=0 '** 1 to Debug PathChangeNOT
- CONST gDebugReadInf=0 '** 1 to Debug ReadInf
- CONST gDebugDoesFileExistOnPath=0 '** 1 to Debug DoesFileExistOnPath
- CONST gDebugWriteMapi=0 '** 1 to debug WriteMapi
- CONST gDebugNotesSingleLogon%=0 '** 1 to debug Notes Single logon
- CONST gDebugAddIcons%=0
- CONST gDebugPartition%=0
- CONST gDebugKittype%=0 '** 1 to track Kittype Variable
- CONST gDebugNotesIni%=0
- CONST gDebugNotesInRegistry%=0
- CONST gDebugIsNotesOnPath%=0
- CONST gDebugNotesFromLotus%=0
- CONST gDebugNotesIniFromSessionMgr%=0
- CONST gDebugNotesIniFromWinDir%=0
- CONST gDebugNotesIniFromPath=0
- CONST gDebugNotesPartition%=0
- CONST gDebugNotesDataRegistry%=0
- CONST gDebugInitNot%=0
- CONST gDebugValidateIni%=0
- %include "instsize.lss" '** Size of install for Server and Workstation
-
- '/*********************************************************************
- ''
- '' Module Name: NOT.lss
- ''
- '' Module Code: COMINST
- ''
- '' Author:
- ''
- '' Creation Date: Jan 26, 1994
- ''
- '' Copyright Lotus Development Corporation, (c) 1994
- ''
- ''
- ''
- '' Description:
- ''
- ''
- '' Additional authors:
- ''
- '' Change History:
- '' $Log:
- ''
- '' Rev 1.52 01 Sep 1995 13:11:38 amontalv
- '' Correction to how icons are named. Had used call to Lot_GetProgFolder, which was
- '' only needed when registering the link object.
- ''
- '' Rev 1.51 29 Aug 1995 14:16:52 tveerapp
- '' Commented out code to surface default preferences dialog.
- ''
- '' Rev 1.50 28 Aug 1995 16:59:30 tveerapp
- '' FIxed the node initcopylist code that turned off sections not installed on
- '' the server.
- ''
- '' Rev 1.49 28 Aug 1995 13:41:40 tveerapp
- '' No change.
- ''
- '' Rev 1.48 28 Aug 1995 13:40:12 tveerapp
- '' Removed the example for registering the Program Group for
- '' uninstall. This fixes an spr.
- ''
- '' Rev 1.47 25 Aug 1995 11:27:06 amontalv
- '' Made icons in all environments have same name.
- ''
- '' Rev 1.46 24 Aug 1995 10:30:48 jdonohue
- '' Added comment about USERDIR
- ''
- '' Rev 1.45 23 Aug 1995 12:26:54 tveerapp
- '' Added code to register work, masters and backup directories with the toolkit.
- ''
- '' Rev 1.44 22 Aug 1995 18:24:54 tveerapp
- '' Added the callback etc for work, smasters and backup.
- ''
- '' Rev 1.43 22 Aug 1995 15:17:10 jdonohue
- '' Do not register the uninstaller for language install
- ''
- '' Rev 1.42 22 Aug 1995 14:03:20 jdonohue
- '' Changed GetNOTPathfromLotusIni to check for registry entries
- '' Function GetNOTPathfromLotusIni returns path w/o filename now
- ''
- '' Rev 1.41 21 Aug 1995 15:50:54 amontalv
- '' Added global for registry entry.
- ''
- '' Rev 1.40 21 Aug 1995 10:23:48 jdonohue
- '' Added calls in Init for marking secondary language content directories
- '' Moved language directory symbol setting code to InitCopyList
- ''
- '' Rev 1.39 17 Aug 1995 09:34:14 amontalv
- '' Had put wrong number of arguments.
- ''
- '' Rev 1.38 16 Aug 1995 20:35:30 amontalv
- '' Added some error handling for registry.
- ''
- '' Rev 1.37 15 Aug 1995 11:53:12 jdonohue
- '' Removed SYM_INSTALLKIND$ -- in GLOBALS.LSS
- ''
- '' Rev 1.36 09 Aug 1995 09:18:16 jdonohue
- '' Don't add language qualifier to icon for first time install
- ''
- '' Rev 1.35 04 Aug 1995 15:53:38 jdonohue
- '' Added code to create icons with language switch and sublanguage name appended
- ''
- '' Rev 1.34 02 Aug 1995 16:54:54 jdonohue
- '' Changed calling syntax for InitLanguageNOT
- ''
- '' Rev 1.33 31 Jul 1995 16:28:10 pdonahue
- '' changed verison number from 2.1 to 0.0.
- '' Changed registry entry for installtype from type REG_SZ to REG_DWORD.
- ''
- '' Rev 1.32 20 Jul 1995 14:20:58 jdonohue
- '' Fixed uninstall command line string for language
- ''
- '' Rev 1.31 12 Jul 1995 17:07:18 jdonohue
- '' Added comments about language install subdirectories
- ''
- '' Rev 1.30 23 Jun 1995 13:55:56 mzgripce
- '' remove autoinst.rsp from the uninstaller registration example
- ''
- '' Rev 1.29 23 Jun 1995 13:24:56 mzgripce
- '' added an example for the Program_group class registration
- ''
- '' Rev 1.28 22 Jun 1995 18:38:14 mzgripce
- '' register the components that are going with the not product:aswan and its
- '' dependency: LotusScript,Bento and Shared help
- ''
- '' Rev 1.27 21 Jun 1995 18:01:26 mzgripce
- '' add examples for the other object clases registration for uninstall
- ''
- '' Rev 1.26 21 Jun 1995 12:48:08 jdonohue
- '' SYM_INSTALLKIND global symbol, not product specific
- ''
- '' Rev 1.25 21 Jun 1995 09:09:42 jdonohue
- '' Moved AddRegistryLanguage to AddRegistryKeysNOT
- ''
- '' Rev 1.24 19 Jun 1995 17:41:56 mzgripce
- '' change the not version to 2.1 and enable the uninstaller registration
- ''
- '' Rev 1.23 19 Jun 1995 16:53:24 mzgripce
- '' add examples calls to Lot_RegisterObject()
- ''
- '' Rev 1.22 16 Jun 1995 17:08:02 pdonahue
- '' added registry entries for not.
- ''
- '' Rev 1.21 09 Jun 1995 17:00:58 mzgripce
- '' added call example in PostCopyConfig to register the uninstaller
- ''
- '' Rev 1.20 07 Jun 1995 16:32:08 amontalv
- '' Changed the Win95 start folder so that it initializes
- '' earlier in the program. This should make automation
- '' easier to implement for it. There are still a couple of
- '' bugs that I need to work out, but I feel that I should
- '' check what I have now. I also changed the name of some
- '' of the functions to conform more to current names.
- ''
- '' Rev 1.19 01 Jun 1995 14:54:10 amontalv
- '' Had the check incorrect for creating links. It tried to create links
- '' when not in Win95 instead of when in Win95.
- ''
- '' Rev 1.18 01 Jun 1995 11:11:52 amontalv
- '' Added API function CreateLink to create shortcuts. Also added functions
- '' to save and get the link path to support the CreateLink. I also changed
- '' the startup program folder code to use the default dialog proc and changed
- '' the default dialog proc to process directory trees.
- ''
- '' Rev 1.17 30 May 1995 16:01:00 jdonohue
- '' Set symbols for product and version for language install
- ''
- '' Rev 1.16 21 May 1995 17:30:24 mzgripce
- '' add an example for share32 support
- ''
- '' Rev 1.15 19 May 1995 15:31:28 mzgripce
- '' use the parent dir in the product default destination
- ''
- '' Rev 1.14 19 May 1995 14:42:44 jdonohue
- '' Remove redundant symbol for language subdirectory
- ''
- '' Rev 1.13 19 May 1995 13:23:46 jdonohue
- '' Added call to Lot_SetLanguageSectionsOn
- ''
- '' Rev 1.12 18 May 1995 15:36:52 jdonohue
- '' Added language install code
- ''
- '' Rev 1.11 18 May 1995 10:18:52 jdonohue
- '' Added language install function InitLanguage
- ''
- '' Rev 1.9 02 May 1995 12:54:06 cmoy
- '' Merged c2 into cf build
- ''
- '' Rev 1.9 10 Apr 1995 18:11:28 amontalv
- '' Changed comments to reflect change of function reference.
- ''
- '' Rev 1.8 31 May 1994 13:54:42 mmeth
- ''
- '' Added PrevVersionNOT
- ''
- '' Rev 1.7 13 May 1994 14:09:20 thangv
- ''
- '' Added the else part to the default code in InitNOT case node.
- ''
- '' Rev 1.6 06 May 1994 09:24:52 mmeth
- '' wrong return for function
- ''
- '' Rev 1.5 02 May 1994 19:18:16 mzgripce
- ''
- '' add AddIconsNOT
- ''
- '' Rev 1.4 28 Mar 1994 17:25:50 thangv
- ''
- '' Resourced strings that were not. SID_NOT_SERVER_DIRNAME, SID_NOT_DIST_DIRNA
- ''
- '' Rev 1.3 22 Mar 1994 09:24:46 mmeth
- '' Modified AddTo Billboard List to use IDD_NOTBILLBD1,...
- ''
- '' Rev 1.2 17 Feb 1994 17:44:44 thangv
- '' Fixed the trailing \ and NOT_DIR
- ''
- '' Rev 1.1 15 Feb 1994 14:36:20 mmeth
- '' moved the EXIT FUNCTION CALL in
- ''
- '' Rev 1.0 11 Feb 1994 10:53:40 jbrodeur
- '' Initial Revision
- ''----------------------------------------------------------------------
- '' Date Vers. Pgmr SPR# Change
- ''----------------------------------------------------------------------
- '' !
- '' 02-07-94 0000 Initial Product Shipment
- ''
- ''----------------------------------------------------------------------
- ''
- ''*********************************************************************/
- '** This file contains detailed comments. PLEASE READ THEM! They provide
- '** information that will make writing Install much easier. In some
- '** cases, you will not find this information in any other sources.
- ''*********************************************************************/
- '**
-
- USE "TOOLKIT"
- USE "LANGUAGE"
- OPTION DECLARE
-
- '** These Are the Required Functions that Products must provide
- '***************************************************************
- DECLARE PUBLIC FUNCTION ProductRegNOT (prodno%, network$, direction$) AS STRING
- DECLARE PUBLIC FUNCTION DefaultUserRegNOT (prodno%, network$, direction$) AS STRING
- DECLARE PUBLIC FUNCTION InitNOT (prodno%, network$, direction$, basedir$) AS STRING
- DECLARE PUBLIC FUNCTION PrevVersionsNOT (prodno%, network$, direction$) AS STRING
- DECLARE PUBLIC FUNCTION PathChangeNOT (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
- DECLARE PUBLIC FUNCTION InitCopyListNOT (prodno%, network$, direction$) AS STRING
- DECLARE PUBLIC FUNCTION PreCopyConfigNOT (prodno%, network$, direction$, lic%) AS STRING
- DECLARE PUBLIC FUNCTION AddTheBillBoardsNOT (prodno%, network$, direction$, nbytes&) AS STRING
- DECLARE PUBLIC FUNCTION PostCopyConfigNOT (prodno%, network$, direction$, programgroup$) AS STRING
- DECLARE PUBLIC FUNCTION AddIconsNOT (prodno%, network$, direction$, programgroup$) AS STRING
- DECLARE PUBLIC FUNCTION UINOT (prodno%, network$, direction$) AS STRING
- DECLARE PUBLIC FUNCTION PostSuccessRegNOT (prodno%, network$, direction$) AS STRING
- DECLARE PUBLIC SUB AddRegistryKeysNOT (prodno%, network$)
- DECLARE PUBLIC FUNCTION InitLanguageNOT (prodno%, network$, direction$) AS STRING
- DECLARE SUB NOT_RegisterSharedComponent(Key$, FileName$, Version$)
-
-
- '** Product specific functions
- '*****************************
- DECLARE PUBLIC FUNCTION SERVERSWITCH(Chapter$,fInCopy%) AS INTEGER
- DECLARE PUBLIC FUNCTION PROGSWITCH(Chapter$,fInCopy%) AS INTEGER
- DECLARE PUBLIC FUNCTION PDATASWITCH(Chapter$,fInCopy%) AS INTEGER
- DECLARE PUBLIC FUNCTION ADVANCEDSWITCH(Chapter$,fInCopy%) AS INTEGER
- DECLARE PUBLIC FUNCTION AUTOLOGONSWITCH(Chapter$,fInCopy%) AS INTEGER
- DECLARE PUBLIC FUNCTION NETNOTESSWITCH(Chapter$,fInCopy%) AS INTEGER
- DECLARE PUBLIC FUNCTION NTUSERSYNC(Chapter$,fInCopy%) AS INTEGER
- DECLARE FUNCTION IsNotesInRegistry(NotesPath$) AS INTEGER
- DECLARE FUNCTION IsNotesOnPath(NotesFromPath$) AS INTEGER
- DECLARE FUNCTION IsNotesInLotusIni(NotesFromLotus$) AS INTEGER
- DECLARE FUNCTION IsNotesInSessMgr(NotesIniFromSessionMgr$) AS INTEGER
- DECLARE FUNCTION IsNotesIniOnPath(NotesIniFromPath$) AS INTEGER
- DECLARE FUNCTION IsNotesIniInWinDir(NotesIniFromWinDir$) AS INTEGER
- DECLARE FUNCTION IsNotesDataInRegistry(NotesDataFromRegistry$) As INTEGER
- DECLARE FUNCTION IsPartitonedInstall(PartitonProg$, PartitionData$)AS INTEGER
- DECLARE FUNCTION DetectPreviousVersion () AS STRING
- DECLARE FUNCTION GetNotesFromPath (network$)
- DECLARE FUNCTION LWP_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING
- 'DECLARE SUB WriteProgMan(network$, prodno%, title$)
- DECLARE SUB WriteWinIni(prodno%)
- DECLARE SUB WriteNOTIni(network$, prodno%)
- DECLARE SUB WriteOLERegForNOT(network$, prodno%)
- DECLARE SUB WriteNOTInLotusIni(prodno%)
- DECLARE SUB WriteMAPIRegForNOT(network$, prodno%)
- DECLARE FUNCTION WriteNotesReg(prodno%) AS INTEGER
- DECLARE FUNCTION WritePartionedinfo(prodno%, network$) AS INTEGER
- DECLARE FUNCTION ReadInf(direction$) AS INTEGER
- DECLARE FUNCTION DoesFileExistOnPath (Path$, FileName$) AS STRING
- DECLARE FUNCTION ValidateIni(IniFile$) AS INTEGER
-
- DECLARE PUBLIC FUNCTION PartionedCmdProc(instance%) AS INTEGER
- DECLARE FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
- DECLARE FUNCTION GetObsoleteFiles(direction$) AS STRING
- DECLARE FUNCTION GetLine(File%, mstr$) AS INTEGER
- DECLARE FUNCTION GetNotesPathFromLotusIni() AS String
- DECLARE SUB MCUSTOM2CB (hDlg&, CtrlId%, Classes$, Inst&)
-
-
-
-
-
- CONST MAX_PAGES = 4
- CONST NUMOFBILLBDS = 12
- CONST SYM_CUSTOMCOST$ = "CustomCostList" '** Use only in this module.
- CONST MAXKEYPATH = 256
- CONST INLIST = 1 '** Chapter is in copylist.
- CONST OUTOFLIST = 0 '** Chapter is out of copylist.
- CONST VISIBLE = 1 '** Display the chapter in the custom window.
- CONST INVISIBLE = 0 '** Don't display the chapter in the custom window.
-
- %include "lserr.lss"
-
-
- PUBLIC CONST LB_ADDSTRING = (&H0400+1)
- PUBLIC CONST LB_INSERTSTRING = (&H0400+2)
- PUBLIC CONST LB_DELETESTRING = (&H0400+3)
- PUBLIC CONST LB_RESETCONTENT = (&H0400+5)
- PUBLIC CONST LB_SETSEL = (&H0400+6)
- PUBLIC CONST LB_SETCURSEL = (&H0400+7)
- PUBLIC CONST LB_GETSEL = (&H0400+8)
- PUBLIC CONST LB_GETCURSEL = (&H0400+9)
- PUBLIC CONST LB_GETTEXT = (&H0400+10)
- PUBLIC CONST LB_GETTEXTLEN = (&H0400+11)
- PUBLIC CONST LB_GETCOUNT = (&H0400+12)
- PUBLIC CONST LB_SELECTSTRING = (&H0400+13)
- PUBLIC CONST LB_DIR = (&H0400+14)
- PUBLIC CONST LB_GETTOPINDEX = (&H0400+15)
- PUBLIC CONST LB_FINDSTRING = (&H0400+16)
- PUBLIC CONST LB_GETSELCOUNT = (&H0400+17)
- PUBLIC CONST LB_GETSELITEMS = (&H0400+18)
- PUBLIC CONST LB_SETTABSTOPS = (&H0400+19)
- PUBLIC CONST LB_GETHORIZONTALEXTENT = (&H0400+20)
- PUBLIC CONST LB_SETHORIZONTALEXTENT = (&H0400+21)
- PUBLIC CONST LB_SETCOLUMNWIDTH = (&H0400+22)
- PUBLIC CONST LB_SETTOPINDEX = (&H0400+24)
- PUBLIC CONST LB_GETITEMRECT = (&H0400+25)
- PUBLIC CONST LB_GETITEMDATA = (&H0400+26)
- PUBLIC CONST LB_SETITEMDATA = (&H0400+27)
- PUBLIC CONST LB_SELITEMRANGE = (&H0400+28)
- PUBLIC CONST LB_SETCARETINDEX = (&H0400+31)
- PUBLIC CONST LB_GETCARETINDEX = (&H0400+32)
- PUBLIC CONST LB_ERR = -1
- PUBLIC CONST MAXFILES = 500
-
- PUBLIC CONST SECTIONSTART = "[" '** Start of new section
- PUBLIC CONST SECTIONEND = "]" '** End of section
- PUBLIC CONST COMMENT = ";" '** Comment character
- PUBLIC CONST SEPERATOR = "=" '** File seperator
-
- PUBLIC CONST OBSFILE = "obsolete.nam" '** List of files to be deleted
-
- '** Files used to locat prior versions of Notes.
- PUBLIC CONST W16_NOTES = "_strings.dll"
- PUBLIC CONST P16_NOTES = "$strings.dll"
- PUBLIC CONST P32_NOTES = "istrings.dll"
- PUBLIC CONST ANYVERSION = "?strings.dll"
- PUBLIC CONST DEFAULTKIT = "1"
-
- TYPE PAGEINFO
- szChapter AS STRING '** Chapter that started the page
- idPage AS INTEGER '** Page ID
- hDlgPage AS INTEGER '** Page dialog handle
- nSel AS INTEGER '** Current Selection in page
- END TYPE
-
- '** Globals
- DIM ghDlg& '** Save the parent dialog
- DIM gCurrentPageIndex% '** The current page index (into array)
- DIM gNumPages% '** Number of pages in gPageArray
- DIM gPageArray(MAX_PAGES) AS PAGEINFO '** Page info for up to 8 pages
- DIM gDelete% '** Should we search for old files
- DIM gDeleteDialogText$
- '**
- '** The following setting should be
- '** filled in via GetNotesFromPath routine
- '** this routiene should only be called ONCE !!!!!
- '**
- DIM gKitType$ '** Type of install
- DIM gNotesProg$ '** Location of Notes Program Directory
- DIM gNotesData$ '** Location of Notes Data Directory
- DIM gNotesini$ '** Location of Notes.ini
- DIM gNotesNlm$ '** Location of Notes Program Directory
- DIM gNlmDir$ '** NOVELL Volume Name
- DIM gPreviousNotesInstalled% '** 0 = Notes not installed
- DIM gNotesReg$
- DIM gInstance% '** Instance if Virtual server
- DIM gNotesRegTmp$
- DIM gNodeDir$ '** This is the location of the Node Installer
- DIM gNotesPartitionedProg$ '** Partitioned Program directory
- DIM gPartitioned% '** 0 = Virtual Server Not installed
- DIM gPartitionsInstalled% '** Once set this should never be changed
- '** it's use is to allow the user to step
- '** back in the installer
- CONST INIFILE$ = "Notes.ini"
- DIM gInstallType% '** 0 - Standard Install
- '** 1 - Partioned Server
- '** 2 - NLM Server
- DIM OSTYPE LIST AS STRING
-
-
- '*************************************************************************
- '**************************** Required Functions *************************
- '*************************************************************************
-
- '*************************************************************************
- '** SUB Initialize
- '**
- '** Purpose: The only purpose of this routine is to register your product.
- '** This routine assigns your acronym to your product.
- '** Without this function, your product will not install.
- '** All you need to do in this subroutine is:
- '** modify NOT -> your acronym.
- '**
- '** ASSUMPTIONS: Many things in the toolkit key off of your
- '** acronym. These are the constraints:
- '** 1. Your top level chapter in the INF must
- '** have a KEYWORD of your acronym +"TOP"
- '** e.g. acronymTOP
- '** Author: Marcel Meth
- '** Arguments: None
- '** Returns: NONE
- '*************************************************************************
- SUB Initialize
- Reg_RegisterProductNames "NOT", LdString(SID_NOT_COMMERCIALNAME)
- END SUB
-
- '*************************************************************************
- '** FUNCTION ProductRegNOT (prodno%, network$, direction$) AS INTEGER
- '**
- '** Purpose: This function allows your product to register itself
- '** in the Install Product Registry. The toolkit stores
- '** 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 LOTUSAPP directory.
- '**
- '** For the most part you should use only Reg_Set... Functions.
- '**
- '**
- '** If you turn on ATM, LICENSING, or SHARED tools, then
- '** you must be sure to add the appropriate lines and files
- '** in your acronym.SCR and acronym.LYT, respectively.
- '** See Cookbook.
- '**
- '** If you support server install, (because you need the files
- '** for Licenser), you will have to make sure that you have
- '** the correct **entire** contents of install.lyt and install.scr
- '** for the install files in your acronym.SCR and acronym.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 part of SmartSuite, SmartSuite
- '** 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 ProductRegNOT (prodno%, network$, direction$) AS STRING
- DIM dum%, Str1$, Str2$
-
- ProductRegNOT = gNEXT
-
- '** FOR a complete set of things to register
- '** see API doc under Reg_Set...
-
- 'Reg_SetSupportedInstallTypes ProdNo%, Server%, Custom%, Client%
-
-
-
-
-
- Reg_SetSupportedInstallTypes prodno%, 1, 1, 1
- '** Set the sise of the Workstation and Server Installs.
- Reg_SetProdSizes prodno%, DESIGNERSIZE, WORKSIZE
-
-
-
-
-
-
-
-
-
-
- '** If you need Lotusapp or datalens support turn this on.
- Reg_SetShareFlags prodno%, 0, 0, 0, 0
-
- '** If you need Components directory turn this on.
- Reg_SetShare32Flag prodno%, 0
-
- '** Coming to an install program near you soon
- 'Reg_SetCDOption prodno%,Inst%,CDOptStr$
- 'Reg_SetCDOptionSelected ProdNo%,Inst%,Selection%
-
- '** Any options that you want your sys-admin and node user to see
- '** must be entered here. They must correspond with keywrods in the
- '** inf file. This functionality will be avilable March 4, but you
- '** can set these fields now!
- ' Reg_SetNodeOption ProdNo%,Inst%,NodeOptStr$
- ' Reg_SetNodeOptionSelected ProdNo%,Inst%,Selection%
-
- '** If the partitioned server isn't installed then display
- '** the install on file server option.
- dum% = IsPartitonedInstall(Str1$, Str2$)
- IF gPartitioned% = 0 THEN
- '** Toolkit default is for no file server supprt, turn on if desired.
-
- Reg_SetSrvSupport prodno%, 1
-
-
-
- Reg_SetExtraProdDirsNum prodno%, 1
-
- ELSE
- '** Toolkit default is for no server supprt, turn on if desired.
- Reg_SetSrvSupport prodno%, 0
- Reg_SetExtraProdDirsNum prodno%, 0
- END IF
-
- '** Toolkit default is for no server supprt, turn on if desired.
- '** license support only available for server install.
- Reg_SetLicenseSupport prodno%, 0
-
- '** Toolkit default is no ATM support
- 'Reg_SetATMSupport prodno%, 0
-
- '** This is the default value the user will see.
- Reg_SetProgManagerGroup prodno%, LdString(SID_NOT_DEFAULT_GROUP)
-
- '** Required if you have a work, smartmasters and backup directories
- '** register support with the toolkit to surface the dialog
- Reg_SetMoreDirsData prodno%, "NOTMOREDIRSCB", DBNOT_MOREDIRS, DBNOT_MOREDIRS
-
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION DefaultUserRegNOT (prodno%, network$, direction$) AS STRING
- '**
- '** Purpose: **Only** the first registered product gets called.
- '** For SmartSuite, this will be SmartSuite.
- '** This function allows you to set the default user registration
- '** 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 up to you how you store registration information.
- '** It will not be stored until later in PostCopyConfigNOT.
- '** 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 part of SmartSuite, SmartSuite
- '** 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 DefaultUserRegNOT (prodno%, network$, direction$) AS STRING
- DIM ripath$, defdir$, dum%, rc%
- DIM NotesDataFromRegistry$
-
- DefaultUserRegNOT = gNEXT
- '** Always find out if notes is installed.
- SetSymbolValue "SYM_COMPANY$", " "
-
- '** If this is a node install get the path of the node installer
- '** and save it. We will need this when update
- IF network$ = gNODE$ THEN gNodeDir$ = GetSymbolValue(SYM_STF_SRCDIR$)
-
- '** Only use the Registry to get this information. This means we are
- '** running Notes V4.0 or Better.
-
- rc% = IsNotesDataInRegistry(NotesDataFromRegistry$)
-
- IF network$ = gNODE$ THEN
- defdir$ = NotesDataFromRegistry$
- if defdir$ = "" goto rinotfound
- ripath$ = defdir$ + "notes.ri"
-
- ElSEIF network$ = gSTANDARD$ THEN
- defdir$ = gNotesProg$
- IF defdir$ = "" goto rinotfound
- ripath$ = defdir$ + "notes.ri"
-
- END IF
-
- '' RETURNS TRUE IF SUCCESSFULLY FOUND RI FILE AND READ INFORMATION
- rc% = Lot_ReadDefaultsfromRi(ripath$)
-
- rinotfound:
-
- END FUNCTION
-
-
- '*************************************************************************
- '** FUNCTION InitNOT (prodno%, network$, direction$, basedir$) AS STRING
- '**
- '** Purpose: This function will be called after the Welcome dialog has been
- '** filled in by the user. This is the first time you will be
- '** called when the server parameter is 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 LotusScript messagebox warning the user
- '** of a previous version of your product. If there is a previous
- '** version you might want to steer them towards overwriting it,
- '** deleting the old version, or allowing both versions to exist.
- '**
- '**
- '** 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 "NOTDIR", 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 LOTUSAPPDIR, NETLOTUSAPPDIR, 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 part of SmartSuite, SmartSuite
- '** 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 InitNOT (prodno%, network$, direction$, basedir$) AS STRING
- DIM sym$, symname$, defdir$, position%, proddir$, iniPath$, rv%
- DIM dum%, previousprod$, Program$, RCDialog$, notused%
- DIM tmpSym$, tmpToChange$, temp%, inidir$, tmpname$
- DIM parentdir$, nProducts%, i%
-
- gDelete = 0 'Default to no search
- '** On our way through here ALWAYS re-initialize the Global Notes dirs.
- '** GetgNotesProg and gNotesIni directories. Remember gNotesIni points
- '** to the location of the Notes.ini file not the NOTES DATA DIRECTORY.
- dum% = GetNotesFromPath(network$)
-
- IF gDebugInitNot = 1 THEN PRINT "basedir set it to :"basedir$
- '** Work around for CIT BUG on second call to InitNOT basedir $ is empty
- '** So we set it to the drive selected by the user.
- IF basedir$ = "" THEN
- basedir$ = LEFT$(GetSymbolValue("NOTDIR"),3)
- IF gDebugInitNot = 1 THEN PRINT "basedir is now set to :"basedir$
- END IF
-
- '** remove the Lotus path from the directory if it exists
- temp% = instr(basedir$, "\lotus\")
- IF temp% <> 0 THEN
- tmpname$ = LEFT$(basedir$, temp%)
- tmpSym$ = MID$(basedir$, temp%+7, LEN(basedir$))
- basedir$ = tmpname$+tmpSym$
- end if
-
- InitNOT = direction$
- '' In the backwards case, keep backing up
- IF direction$ = gBACK Then
- EXIT FUNCTION
- End IF
- '' Setup Default directory settings and the associated
- '' text that the user will see
-
- sym$ = Reg_GetDirSymbolList(prodno%)
- symname$ = sym$ + gNAME
-
- ''** Set Up default directories
- SetListItem sym$, 1, "NOTDIR" 'Drive+Initial Notes Directory
- SetListItem symname$, 1, "NOTDIRNAME" 'Notes Directory Name
-
- SetListItem sym$, 2, "NOTWORKDIR" 'Drive+Initial Notes Data Directory
- SetListItem symname$, 2, "NOTWORKDIR" 'Notes Data Directory Name
-
-
-
-
-
-
-
-
- '** If the global symbols for Notes are set then Notes has been installed on this
- '** system, so let the user know this via a dialog box.
-
- IF gNotesProg$ <> "" OR gNotesData$ <> "" Then
- direction$ = PopupModalDlg (DB_EXISTINGNOTES, DB_EXISTINGNOTES)
- IF direction$ = gBACK Then
- InitNOT = direction$
- EXIT FUNCTION
- End IF
- End If
-
- '** If the Global gNotesProg ("Notes Program Directory") hasen't
- '** been set because it's not installed then use the
- '** default Notes directory.
-
- IF gNotesProg$ = "" THEN
- SetSymbolValue "NOTDIR", basedir$ + Lot_TrimEndSlash(LdString(SID_NOT_DIR))
- gNotesProg$ = GetSymbolValue("NOTDIR")
- gNotesPartitionedProg$ = GetSymbolValue("NOTDIR")
- End If
-
- '** If the Global gNotesData ("Notes Data Directory") hasen't
- '** been set because it's not installed then use the
- '** default Notes data directory.
- IF gNotesData$ = "" THEN
- SetSymbolValue "NOTWORKDIR", basedir$ + Lot_TrimEndSlash(LdString(SID_NOT_WORKDIR))
- gNotesData$ = GetSymbolValue("NOTWORKDIR")
- End If
-
- '** Set up the common install symbols for the directories.
- SetListItem sym$, 1, "NOTDIR" 'Drive+Initial Notes Directory
- SetListItem symname$, 1, "NOTDIRNAME" 'Notes Directory Name
- SetSymbolValue "NOTDIR", gNotesProg$
-
- SetListItem sym$, 2, "NOTWORKDIR" 'Drive+Initial Notes Data Directory
- SetListItem symname$, 2, "NOTWORKDIRNAME" 'Notes Data Directory Name
- SetSymbolValue "NOTWORKDIR", gNotesData$
-
-
-
-
-
-
-
-
-
- '** Figure out why I added this !!!
- IF gNotesData$ = "" AND gNotesProg$ = "" THEN gPreviousNotesInstalled% = 0
-
-
- SELECT CASE network$
-
- CASE gSERVER$
- '** On a server Install i.e. FileServer install we want the Program and Data
- '** directories to be the same . This is because the NODE install script
- '** has all the proper directory information in it.
- gNotesData$ = gNotesProg$
- SetSymbolValue "NOTDIR", gNotesProg$
- SetSymbolValue "NOTWORKDIR", gNotesData$
- Lot_RefreshDestination("NOTDIR")
- Lot_RefreshDestination("NOTWORKDIR")
-
- CASE gDISTRIBUTION$
-
- CASE gSTANDARD$
- '** If by some chance we ended up here without the global symbol
- '** for the Notes program directory being set, make sure it's set
- '** to the default.
-
- IF gNotesProg$ = "" THEN
- SetSymbolValue "NOTDIR", basedir$ + Lot_TrimEndSlash(LdString(SID_NOT_DIR))
- gNotesProg$ = GetSymbolValue("NOTDIR")
- gNotesPartitionedProg$ = GetSymbolValue("NOTDIR")
- End If
-
- IF gNotesData$ = "" THEN
- SetSymbolValue "NOTWORKDIR", basedir$ + Lot_TrimEndSlash(LdString(SID_NOT_WORKDIR))
- gNotesData$ = GetSymbolValue("NOTWORKDIR")
- End If
-
-
-
-
-
-
-
-
- SetListItem sym$, 1, "NOTDIR" 'Drive+Initial Notes Directory
- SetListItem symname$, 1, "NOTDIRNAME" 'Notes Directory Name
- SetSymbolValue "NOTDIR", gNotesProg$
-
- SetListItem sym$, 2, "NOTWORKDIR" 'Drive+Initial Notes Data Directory
- SetListItem symname$, 2, "NOTWORKDIRNAME" 'Notes Data Directory Name
- SetSymbolValue "NOTWORKDIR", gNotesData$
-
-
-
-
-
-
-
-
-
- IF gNotesData$ = "" AND gNotesProg$ = "" THEN gPreviousNotesInstalled% = 0
-
-
- CASE gNODE$
-
- '** Since this is a node install then the program directory is the same as
- '** the data directory.
- gNotesProg$ = gNotesData$
- SetSymbolValue "NOTDIR", gNotesProg$
- SetSymbolValue "NOTWORKDIR", gNotesProg$
-
- '' ****** Language Install Code ******
- '' Mark language content directory symbols that need source file
- '' adjustment (adding language subdirectory)
- ' IF IsServerSecondaryLanguage THEN'
- ' MarkSourceLanguageSubdir("NOTLANGDIR")
- ' END IF
-
- END SELECT
-
-
-
-
-
-
- IF gDebugInitNot = 1 THEN PRINT "Notes dir is :"GetSymbolValue("NOTDIR")
- IF gDebugInitNot = 1 THEN PRINT "Notes dir name is :"GetSymbolValue("NOTDIRNAME")
- IF gDebugInitNot = 1 THEN PRINT "Notes Work dir is :"GetSymbolValue("NOTWORKDIR")
- IF gDebugInitNot = 1 THEN PRINT "Notes Work dir name is :"GetSymbolValue("NOTWORKDIRNAME")
- IF gDebugInitNot = 1 THEN PRINT "Notes NLM dir is :"GetSymbolValue("NOTNLMDIR")
- IF gDebugInitNot = 1 THEN PRINT "Notes NLM dir name is :"GetSymbolValue("NOTNLMDIRNAME")
- IF gDebugInitNot = 1 THEN PRINT "Notes NLM Work dir is :"GetSymbolValue("NOTNLMWORKDIR")
- IF gDebugInitNot = 1 THEN PRINT "Notes NLM Work dir name is :"GetSymbolValue("NOTNLMWORKDIRNAME")
-
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION PrevVersionsNOT (prodno%, network$, direction$) AS STRING
- '**
- '** Purpose: This function is called only for SmartSUite. It is called
- '** immediately after all the other product functions for
- '** InitNOT are called. It allows SmartSuite to assess whether
- '** there are older versions of products around.
- '**
- '** 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 part of SmartSuite, SmartSuite
- '** 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.
- '**
- '** 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 PrevVersionsNOT (prodno%, network$, direction$) AS STRING
- DIM nProducts%, prodIndex%, i%
-
- nProducts% = Reg_GetNumberOfProducts()
- FOR prodIndex% = 1 to nProducts%
- If Reg_GetPreviousVersion(prodIndex%) <> "" Then
- i% = DoMsgBox("Older Versions Found","", MB_OK)
- GOTO PREVPRODFOUND
- END IF
- NEXT
-
- PREVPRODFOUND:
-
- END FUNCTION
-
-
- '*************************************************************************
- '** FUNCTION PathChangeNOT (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 writeable.
- '** Your obligation is to verify that the proposed new path is ok
- '** with you. If not, put up a Lotus Script :"MESSAGEBOX"
- '** 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 part of SmartSuite, SmartSuite
- '** 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. "NOTDIR"
- '** mainprodsonly%: (TRUE | FALSE) , when TRUE this means that only
- '** your top level product directory should change,
- '** probably "NOTDIR". When it is false, it means that
- '** all related directories should change. It is **YOUR
- '** RESPONSIBILITY** to implement this functionality.
- '**
- '** 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.)
- '**
- '*************************************************************************
-
- '** in a node install the workdir never gets set so do it here.
- PUBLIC FUNCTION PathChangeNOT (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
- DIM path$, dum$, notused%
-
- ON ERROR GOTO NEWNOTES
- ' IF gDebugPathChangeNot = 1 THEN PRINT "Product number is :"+STR$(prodno%)
- ' IF gDebugPathChangeNot = 1 THEN PRINT "Install type is :"+network$
- ' IF gDebugPathChangeNot = 1 THEN PRINT "Direction is :"+Direction$
- IF gDebugPathChangeNot = 1 THEN PRINT "Desdirsym is :"+destdirsym
- IF gDebugPathChangeNot = 1 THEN PRINT "mainprodsonly is :"+STR$(mainprodsonly%)
- PathChangeNOT = gNEXT
-
-
- IF destdirsym$ = "NOTDIR" OR destdirsym$ = GetSymbolValue("NOTDIR") THEN
- IF gDebugPathChangeNot = 1 THEN PRINT "processing NOTDIR"
- path$ = GetSymbolValue(destdirsym$)
-
- gNotesProg$ = path$
-
- IF network$ = gSERVER$ OR network$ = gNODE$ THEN
- gNotesProg$ = GetSymbolValue("NOTDIR")
- gNotesData$ = gNotesProg$
-
- '** in a node install the workdir never gets set so do it here.
- IF network$ = gNODE$ THEN
- gNotesProg$ = GetSymbolValue("NOTDIR")
- gNotesData$ = gNotesProg$
- SetSymbolValue "NOTWORKDIR", gNotesData$
- Lot_RefreshDestination("NOTWORKDIR")
- END IF
- END IF
-
- IF gPartitioned = 1 then
- gNotesData$ = gNotesProg$
- ELSE
- gNotesPartitionedProg$ = gNotesProg$
- END IF
-
- SetSymbolValue "NOTDIR", gNotesProg$
- Lot_RefreshDestination("NOTDIR")
- END IF
-
- IF destdirsym$ = "NOTWORKDIR" OR destdirsym$ = GetSymbolValue("NOTWORKDIR") THEN
- IF gDebugPathChangeNot = 1 THEN PRINT "processing NOTWORKDIR"
- path$ = GetSymbolValue(destdirsym$)
-
-
-
-
- gNotesData$ = path$
-
- IF network$ = gSERVER$ OR network$ = gNODE$ THEN
- gNotesData$ = GetSymbolValue("NOTDIR")
- END IF
-
- IF network$ = gNODE$ THEN
- gNotesData$ = GetSymbolValue("NOTDIR")
- END IF
-
- IF gPartitioned = 1 then
- gNotesData$ = GetSymbolValue("NOTDIR")
- ELSE
- gNotesPartitionedProg$ = GetSymbolValue("NOTDIR")
- END IF
-
-
-
-
-
-
-
-
- SetSymbolValue "NOTWORKDIR", gNotesData$
- Lot_RefreshDestination("NOTWORKDIR")
-
- END IF
-
- IF gDebugPathChangeNot = 1 THEN PRINT "gNotesProg is :"+gNotesProg$
- IF gDebugPathChangeNot = 1 THEN PRINT "gNotesData is :"+gNotesData$
- IF gDebugPathChangeNot = 1 THEN PRINT "gNotesNnlm is :"+gNotesNlm$
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes dir is :"GetSymbolValue("NOTDIR")
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes dir name is :"GetSymbolValue("NOTDIRNAME")
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes Work dir is :"GetSymbolValue("NOTWORKDIR")
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes Work dir name is :"GetSymbolValue("NOTWORKDIRNAME")
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes NLM dir is :"GetSymbolValue("NOTNLMDIR")
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes NLM dir name is :"GetSymbolValue("NOTNLMDIRNAME")
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes NLM Work dir is :"GetSymbolValue("NOTNLMWORKDIR")
- IF gDebugPathChangeNot = 1 THEN PRINT "Notes NLM Work dir name is :"GetSymbolValue("NOTNLMWORKDIRNAME")
- '** User changed dir so default to new install
- dum$ = DIR(gNotesProg$,16)
- dum$ = DIR(gNotesData$,16)
-
-
-
- DONE:
- EXIT FUNCTION
-
- NEWNOTES:
- gPreviousNotesInstalled% = 0
- RESUME DONE
- END FUNCTION
-
-
-
-
- '*************************************************************************
- '** FUNCTION InitCopyListNOT (prodno%, network$, direction$) AS STRING
- '**
- '** Purpose: Product must Initialize the copylist
- '**
- '** Must Do: You must initialize the copy list. However,
- '** ======= if you leave the code as is (don't touch it at all),
- '** it will probably work for you. Copy list must be initialized.
- '** CAUTION: Make sure that your toplevel section in the
- '** acronym.SCR has a keyword of "acronymTOP"
- '**
- '** 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 part of SmartSuite, SmartSuite
- '** 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 InitCopyListNOT (prodno%, network$, direction$) AS STRING
- DIM i%, sym$, chpt$, nextprod$, notused%, FeatureToFind$, Platform%, ChapterNumber$
- DIM NetNotesChapter$, NotesIniChapter$, Dum%, szKey$, regStatus&, ThisSystem$
- DIM gInstallIniFile$, prodbasedir$, cwd$, TmpInstallIni$, exedir$, TmpChapter$
-
- ON Error STFQUIT GOTO COPYLISTERROR
-
- '' ****** Language Install Code ******
- '' For each component that will have language subdirectories for the
- '' non-primary language, set the symbols appropriately
- If GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ Then
-
- '' For content, that will have separate subdirectories for non-primary language
- '' versions, call this function for a language install
- SetLanguageSubdir "NOTLANGDIR", "NOTDIR"
- Else
- '' For non-language install, they will all go into the same directory
- '' same directory, for example:
- SetSymbolValue "NOTLANGDIR", GetSymbolValue("NOTDIR")
- End if
-
-
- InitCopyListNOT = direction$
- '' In the backwards case, keep backing up
- If direction$ = gBACK Then
- '** Reset the gPartitioned global to it's orignal
- if gDebugPartition = 1 THEN PRINT "Resetting gPartitioned global because user went gBack"
- gPartitioned% = gPartitionsInstalled%
- EXIT FUNCTION
- END IF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
-
- CASE gCOMPLETE$
- i% = F_COMPLETE
- if gDebugKittype = 1 OR gDebugNotes = 1 THEN PRINT "User selected Server Install"
- gKitType = "2" '' Complete default to server
-
- CASE gLAPTOP$
- i% = F_LAPTOP
- if gDebugKittype = 1 OR gDebugNotes = 1 THEN PRINT "User selected Workstation Install"
- gKitType$ = "1" '' Laptop default to Client
- CASE gCUSTOM$
- i% = F_CUSTOM
- if gDebugKittype = 1 OR gDebugNotes = 1 THEN PRINT "User selected Custom Install"
-
- ''** In the custom mode we must determine if the user selected
- ''** a server install so we can set Kittype.
- END SELECT
-
-
-
- RECALC:
-
- sym$ = Reg_GetProductAcronym(prodno%) + gTOP$
- chpt$ = Lot_GetChapterFromKeyWord(sym$)
- IF chpt$ = "" THEN
- ERROR STFQUIT
- END IF
-
- Lot_InitializeCopyList chpt$, i%
-
-
-
-
-
-
-
-
-
- '** Default the following 2 sections to OFF on a client install but allow the user to override.
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("DOCUMENTATION"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESHELP"),OUTOFLIST)
-
-
-
- IF gNotesIni$ <> "" THEN
- '** If we have a notes.ini here then don't install one now.
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because gNotesIni$ is not blank in InitCopyListNOT"
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESINI"),OUTOFLIST)
- if gDebugNotesIni = 1 THEN PRINT "Return from turning off notes.ini is :"+STR$(notused%)
-
- END IF
-
- IF ((network$ = gSTANDARD$) OR (network$ = gNODE$) OR (network$ = gSERVER)) THEN
- '** Find out the type of system and the OS
- ThisSystem$ = Environ("PROCESSOR_ARCHITECTURE")
- Platform% = WhatPlatform()
-
- if gDebugInitCopyList = 1 OR gDebugNotes = 1 THEN PRINT "Platform is "+STR$(Platform%)
- if gDebugInitCopyList = 1 OR gDebugNotes = 1 THEN PRINT "Processor is "+ThisSystem$
-
-
- '** ALPHA ONLY
- '** If this is an ALPHA system then turn off(Don't display!) the section listed below.
- IF ThisSystem$ = "ALPHA" THEN
- '** Notes viewers are not supported on ALPHA.
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESVIEWER"),F_DISPLAY,INVISIBLE)
- ELSE
- '** Force the viewers to be installed if the user selects to install SMTP on _x86_ only !
- chpt$ = Lot_GetChapterFromKeyword("NOTESSMTP")
- IF Lot_GetChapterValInt(chpt$,F_DISPLAY) = VISIBLE AND _
- Lot_GetChapterValInt(chpt$,F_INOROUT) = INLIST THEN
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESVIEWER"),F_INOROUT,INLIST)
- END IF
- END IF
-
-
- '** W95 ONLY
- '** If this is W95 then turn off all sections not avaiable on W95
- '** If this platfom is Win95
- IF (Platform% = PLATFORM_WIN95) THEN
- IF gDebugInitCopyList = 1 OR gDebugNotes = 1 THEN PRINT "Platform is Win 95"
-
- '** Don't display the following sections on W95
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESERVICE"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESAUTOLOGON"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NTDIRSYNC"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESPERF"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("PARTITION"),F_DISPLAY,INVISIBLE)
-
- '** Turn off the following sections on W95
- IF Platform% = PLATFORM_WIN95 THEN
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESPROGRAMWINNT"),OUTOFLIST)
- END IF
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESPERF"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("ADVSERVER"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("PARTITION"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("ADVANCEDSERVICE"),OUTOFLIST)
-
- END IF
-
- IF ((network$ = gNODE$) OR (network$ = gSERVER)) THEN
- '** Do Not allow the Node user or the Administrator to install the following services for Nodes.
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESERVICE"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESAUTOLOGON"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NTDIRSYNC"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESPERF"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("PARTITION"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESSERVER"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESERVERDATA"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("ADVSERVER"),F_DISPLAY,INVISIBLE)
- END IF
-
- '** If this is not W95 then do the following:
- IF Platform% <> PLATFORM_WIN95 THEN
- '** This is not Win95 so turn off Win95 specific sections.
- if gDebugInitCopyList = 1 OR gDebugNotes = 1 THEN PRINT "Platform is Winnt or Alpha"
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESPROGRAMWIN95"),OUTOFLIST)
-
- '** NOTES PERFORMANCE MONITOR COUNTERS.
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESPERF"),OUTOFLIST)
-
- '** NOTES/WINNT LOGON SYNCRONIZATION.
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESAUTOLOGON"),OUTOFLIST)
-
- '** NT DIRECTORY SYNCRONIZATION
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NTDIRSYNC"),OUTOFLIST)
-
- '** NOTES AS AN NT SERVICE.
- IF gPartitioned% = 1 THEN
- '** On Partioned Server don't install NOTESSERVICE
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESERVICE"),OUTOFLIST)
- END IF
-
-
- IF gDebugInitCopyList = 1 OR gDebugNotes = 1 THEN PRINT "Platform is NT"
-
- '** Nt x86 or Alpha
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("ADVANCEDSERVER"),F_INOROUT,INLIST)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("ADVANCEDSERVICES"),F_INOROUT,INLIST)
-
- '** If Partitioned Server is selected then turn
- '** off the installation of "notes.ini" in the system dir.
- NetNotesChapter$ = Lot_GetChapterFromKeyword("PARTITON")
- IF Lot_GetChapterValInt(NetNotesChapter$,F_DISPLAY) = VISIBLE AND _
- Lot_GetChapterValInt(NetNotesChapter$,F_INOROUT) = INLIST THEN
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because we are installing a partitioned server"
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyword("NOTESINI"),OUTOFLIST)
- END IF
-
- '** If this is a Service Grade Install, then don't install Notes.ini the normal way (i.e. in the system dir)
- '** and be sure to turn off all the correct sections,
- IF gPartitioned% = 1 THEN
- if gDebugPartition = 1 THEN PRINT "Setting up for second partitioned server Install"
-
- '** On the second pass through Don't select the Program Files.
- '** Make Notes Server selection de-selected
- ChapterNumber$ = Lot_GetChapterFromKeyword("NOTESSERVER")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, OUTOFLIST)
-
- '** Make Notes Server Program Data selection selected, keep in mind this section is hidden.
- ChapterNumber$ = Lot_GetChapterFromKeyword("NOTESSERVERDATA")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, INLIST)
-
- '** Make Notes Program selection de-selected
- ChapterNumber$ = Lot_GetChapterFromKeyword("NOTESPROGRAM")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, OUTOFLIST)
-
- '** Make Notes Program Data selection selected, keep in mind this section is hidden.
- ChapterNumber$ = Lot_GetChapterFromKeyword("NOTESPROGRAMDATA")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, INLIST)
-
- '** Make Notes International dictionaries selection OFF.
- ChapterNumber$ = Lot_GetChapterFromKeyword("NOTESINTLDIC")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, OUTOFLIST)
-
- '** Make Notes viewers selection de-selected
- ChapterNumber$ = Lot_GetChapterFromKeyword("NOTESVIEWER")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, OUTOFLIST)
-
- '** Make Notes viewers selection de-selected
- ChapterNumber$ = Lot_GetChapterFromKeyword("NOTESBROWSER")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, OUTOFLIST)
-
-
- '** Turn ON Partition for Second install
- ChapterNumber$ = Lot_GetChapterFromKeyword("PARTITION")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, INLIST)
- if gDebugInitCopyList = 1 OR gDebugNotes = 1 THEN PRINT "Return SetChapterFileInCopyListInOrOut for PARTITION :"+STR$(notused%)
-
- '** Turn ON Advanced Service Data on for Second Partition
- ChapterNumber$ = Lot_GetChapterFromKeyword("ADVANCEDSERVICEDATA")
- notused% = Lot_SetChapterFilesInCopyListInOrOut (ChapterNumber$, INLIST)
- dum% = Lot_GetChapterValInt(ChapterNumber$,F_INOROUT)
- if gDebugInitCopyList = 1 OR gDebugNotes = 1 THEN PRINT "Return SetChapterFileInCopyListInOrOut for ADVANCEDSERVICEDATA :"+STR$(notused%)
-
-
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because gNotesIni$ is not blank"
- notused% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyword("NOTESINI"),OUTOFLIST)
- if gDebugInitCopyList = 1 OR gDebugNotesIni = 1 THEN PRINT "'Notes.ini' will not be installed on this system, Partitions are ON"
- END IF
-
- END IF '** Platform Check.
- END IF '** gSTANDARD$ or gNETWORK$
-
- '' ****** Language Install Code ******
- '' We need to explicitly turn on all language sections for the current
- '' language, those whose keyword suffix matches language "LANG??"
- Lot_SetLanguageSectionsOn(prodno%)
-
- '** Make sure to turn off all sections not available on the NODE Install.
- IF network$ = gNODE THEN
- nextprod$ = Lot_GetNextSibling(chpt$, F_NOTHING)
- chpt$ = Lot_GetFirst(chpt$, F_KEYWORD)
- WHILE (chpt$ <> "" AND chpt$ <> nextprod$)
- FeatureToFind$ = Lot_GetChapterValStr(chpt$, F_KEYWORD)
- IF Lot_IsTheFeatureInstalled(FeatureToFind$) = FALSE THEN
- notused% = Lot_SetChapterFilesInCopyListInOrOut (chpt$, OUTOFLIST)
- END IF
- chpt$ = Lot_GetNext()
- WEND
- END IF
-
- SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
-
- CASE gCOMPLETE$
-
-
- '** Designer Client Default install
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE3"),INLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE4"),INLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE5"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE6"),INLIST)
-
-
-
-
-
-
-
-
-
- CASE gLAPTOP$
-
- '** Standard default Install
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE3"),INLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE4"),INLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE5"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESTEMPLATE6"),OUTOFLIST)
- '** On a Standard Client install don't show or allow the Designer stuff to install.
- IF network$ <> gNODE THEN
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGN"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNDATA"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNTUT"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNSAMPLE"),OUTOFLIST)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("WEBDESIGN"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("WEBDESIGNDATA"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("WEBDESIGNTUT"),F_DISPLAY,INVISIBLE)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("WEBDESIGNSAMPLE"),F_DISPLAY,INVISIBLE)
- END IF
-
- '** Laptop is Domino Server
-
- CASE gCUSTOM$
- '** always default the followin 2 as Not checked.
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESINTLDIC"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESAUTOLOGON"),OUTOFLIST)
-
- '** Default Webdesign to OFF
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGN"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNDATA"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNTUT"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNSAMPLE"),OUTOFLIST)
-
- '** In the custom install if the user de-selects Webdesign turn off the following sections.
- chpt$ = Lot_GetChapterFromKeyword("WEBDESIGN")
- IF Lot_GetChapterValInt(chpt$,F_INOROUT) = INLIST THEN
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNSAMPLE"),INLIST)
- ELSE
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNSAMPLE"),OUTOFLIST)
- END IF
-
- END SELECT
-
- IF network$ = gNODE THEN
- TmpChapter$ = Lot_GetChapterFromKeyWord("WEBDESIGN")
- TmpChapter$=Lot_GetChapterValStr(TmpChapter$,F_KEYWORD)
- IF Lot_IsTheFeatureInstalled(TmpChapter$) <> FALSE THEN
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGN"),OUTOFLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNTUT"),INLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNDATA"),INLIST)
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("WEBDESIGNSAMPLE"),INLIST)
- END IF
- END IF
-
- EXIT FUNCTION
-
- COPYLISTERROR:
- ErrorMsg 0, "Developers: You need to have licenser section with NOTTOP in INF file"
- ERROR STFQUIT
-
- END FUNCTION
-
-
- '*************************************************************************
- '** FUNCTION UINOT (prodno%, network$, direction$) AS STRING
- '**
- '** Purpose: This is your chance to put up any User Interface
- '** that you want. Remember, try to keep it short.
- '** In SmartSuite, if every product puts up two extra
- '** dialogs, then the SmartSuite 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 accurate 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 SmartSuite, SmartSuite
- '** 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 UINOT (prodno%, network$, direction$) AS STRING
-
-
- UINOT = direction$
- '' In the backwards case, keep backing up
- If direction$ = gBACK Then
- EXIT FUNCTION
- END IF
-
-
- if gNotesProg$ <> "" Then
- IF direction$ = gBACK Then
- UINOT$ = gBACK
- EXIT FUNCTION
- END IF
- END IF
-
-
- IF direction$ = gBACK Then
- UINOT$ = gBACK
- EXIT FUNCTION
- END IF
-
- END FUNCTION
-
-
-
-
- '*************************************************************************
- '** FUNCTION PreCopyConfigNOT (prodno%, network$, direction$, lic%) AS STRING
- '**
- '** Purpose: This is the very last function called before the space is
- '** accurately 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 (a memory residident version of the INF file)
- '** with the appropriate resolution.
- '**
- '** 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 part of SmartSuite, SmartSuite
- '** 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 PreCopyConfigNOT (prodno%, network$, direction$, lic%) AS STRING
- DIM dum%, notused%, RCDialog$, temp$, chapter$, product_name$, child$
- DIM ModemFile$, szDestFile$, rc%, szSourceFile$, ErrCode, Tmp$ ,ShellResult%
-
- ON Error RESUME NEXT
-
- PreCopyConfigNOT = direction$
-
- IF network$ <> gDISTRIBUTION$ Then
- direction$ = GetObsoleteFiles(direction$)
- END IF
- '' In the backwards case, keep backing up
- IF direction$ = gBACK Then
- EXIT FUNCTION
- END IF
-
- ''** Tell the toolkit how many billboards you will have during file copy.
- ''** This way the toolkit will be able to calculate how long each billboard
- ''** should stay up
- '** ALWAYS Remove the gina.dll from the registry on install
- IF Environ("PROCESSOR_ARCHITECTURE") = "ALPHA" THEN
- tmp$ = GetSymbolValue("NOTDIR")+"a"+"slinst.exe -d"
- if gDebugNotesSingleLogon% = 1 THEN print "SingleLogon string is :"+tmp$
- ShellResult% = SHELL(tmp$,0)
- ELSE
- tmp$ = GetSymbolValue("NOTDIR")+"n"+"slinst.exe -d"
- if gDebugNotesSingleLogon% = 1 THEN print "SingleLogon string is :"+tmp$
- ShellResult% = SHELL(tmp$,0)
- END IF
- IF network$ = gDISTRIBUTION$ Then
- Reg_SetBillboardNumber prodno%, NUMOFBILLBDS
- ''print "The user is here"
- ElseIf network$ = gNODE$ Then
- '** There's really no time for biilboards in a node install
- Reg_SetBillboardNumber prodno%, 0
- ''print "The user is here"
- Else
- ''** This is the default (Custom Install) .
- Reg_SetBillboardNumber prodno%, NUMOFBILLBDS
-
- END IF
-
- IF gPreviousNotesInstalled% <> 0 THEN
- MKDIR Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\modems"
- '** Check the err code returned from MKDIR
- '** If the error is can't create
- ErrCode = ERR()
- IF ErrCode <> 0 THEN
- 'PRINT "The error returned from MKDIR is :"+STR$(ErrCode)
- ModemFile$ = DIR$(gNotesData$+"*.mdm",0)
-
- DO WHILE ModemFile <> ""
- szDestFile$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\modems\"+ModemFile$
- szSourceFile$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\"+ModemFile$
- CopyFile szSourceFile$, szDestFile$, cmoCopy, 0
- RemoveFile szSourceFile$, cmoNone
- ModemFile = DIR$()
- LOOP
-
- END IF
-
- END IF
- IF gDebugNotes% = 1 THEN DumpCopyList "C:\tmp\copylst.dmp"
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION AddTheBillBoardsNOT (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 part of SmartSuite, SmartSuite
- '** 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.
- '** NOTE: Make sure to use billboard Ids that are unique to
- '** your product. e.g. IDD_NOTBILLBD1_BMP &
- '** DB_NOTBILLBD1_BMP
- '**
- '** 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 AddTheBillBoardsNOT (prodno%, network$, direction$, nbytes&) AS STRING
-
- AddTheBillBoardsNOT = direction$
- '' In the backwards case, keep backing up
- If direction$ = gBACK Then
- EXIT FUNCTION
- END IF
-
- If network$ = gDISTRIBUTION$ Then
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD1_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD1, "FNameOrgDlgProc", nbytes&
- END IF
-
- '** There's really no time for biilboards in a node install
- If network$ <> gNODE$ Then
-
-
-
- SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
-
- CASE gCOMPLETE$ ''* Designer for now.
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD1_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD1, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD2_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD2, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD3_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD3, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD4_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD4, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD5_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD5, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD6_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD6, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD7_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD7, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD8_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD8, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD9_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD9, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD10_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR1_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD10, "FNameOrgDlgProc", nbytes&
-
- CASE gLAPTOP$, gCUSTOM$
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD11_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD11, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD12_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD12, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD13_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD13, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD14_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD14, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD15_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD15, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD16_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD16, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD17_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD17, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD18_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD18, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD19_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD19, "FNameOrgDlgProc", nbytes&
-
- SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD20_BMP)
- SetListItem "IDC_BMP", 2, STR$(IDD_BILLBDHDR_BMP)
- AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD20, "FNameOrgDlgProc", nbytes&
- END SELECT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- END IF
-
-
- '''' SetListItem "IDC_BMP", 1, STR$(IDD_NOTBILLBD1_BMP)
- '''' AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_NOTBILLBD1, "_FNameOrgDlgProc@16", nbytes&
-
- END FUNCTION
-
-
- '*************************************************************************
- '** FUNCTION PostCopyConfigNOT (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
- '** Don't worry about ini files related to shared components
- '** 2. Writing to OLE registration database
- '** Don't worry about OLE registration related to shared
- '** components
- '** 3. Writing to any other config files you may support
- '** 4. Writing out user registration information,
- '** no matter how your product picks up this info
- '** 5. 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 subtleties 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 pre-existing 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
- '** 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)
- '**
- '** 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 part of SmartSuite, SmartSuite
- '** 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 where 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 PostCopyConfigNOT (prodno%, network$, direction$, programgroup$) AS STRING
- DIM ripath$, notused%, dum%, rval$, modenv%, ProdDir$, TmpChapter$, instance%
- DIM ShellResult%, tmp$
- if gDebugNotesSingleLogon% = 1 THEN print "In Post Copy"
-
-
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESAUTOLOGON")
- TmpChapter$=Lot_GetChapterValStr(TmpChapter$,F_KEYWORD)
-
- IF Lot_IsTheFeatureInstalled(TmpChapter$) <> FALSE THEN
- IF gDebugNotesSingleLogon% = 1 THEN print "SingleLogon feature is installed"
-
- IF Environ("PROCESSOR_ARCHITECTURE") = "ALPHA" THEN
- tmp$ = GetSymbolValue("NOTDIR")+"a"+"slinst.exe -c "+Lot_TrimEndSlash(GetSymbolValue("NOTDIR"))
- if gDebugNotesSingleLogon% = 1 THEN print "SingleLogon string is :"+tmp$
- ShellResult% = SHELL(tmp$,0)
- ELSE
- tmp$ = GetSymbolValue("NOTDIR")+"n"+"slinst.exe -c "+Lot_TrimEndSlash(GetSymbolValue("NOTDIR"))
- if gDebugNotesSingleLogon% = 1 THEN print "SingleLogon string is :"+tmp$
- ShellResult% = SHELL(tmp$,0)
- END IF
-
- if gDebugNotesSingleLogon% = 1 THEN print "SingleLogon feature is NOT installed "+TmpChapter$
- END IF
- if gDebugNotesSingleLogon% = 1 THEN print "Finished SingleLogon "+TmpChapter$
-
-
- '** Write product specific registry keys
- AddRegistryKeysNOT prodno%, network$
-
- PostCopyConfigNOT = direction$
- '' In the backwards case, keep backing up
- IF direction$ = gBACK Then
- EXIT FUNCTION
- END IF
-
- IF network$ <> gNODE$ Then
- SetSymbolValue SYM_CDDRIVE$, GetSymbolValue(SYM_INSTALL_SOURCE)
- END IF
-
- ''** WRITE TO RI FILE
- ''*******************
- if GetListLength("NOTDIR") <> 0 Then
- ProdDir$ = GetListItem("NOTDIR",1)
- ripath$ = ProdDir$ +"\"+"notes.ri"
- IF Lot_WriteToRiFile (ripath$) = FALSE Then
- ErrorMsg SID_ERR_WRITERI, ripath$
- END IF
- END IF
- IF network$ = gSERVER$ OR network$ = gDISTRIBUTION Then
- GOTO SKIPCONFIG
- END IF
- ' dum% = ReadInf(direction$)
-
- if gPartitioned% = 1 THEN
- if gDebugPartition = 1 THEN PRINT "Partitions are on so WritePartionedinfo."
- instance% = WritePartionedinfo(prodno%, network$)
- dum% = PartionedCmdProc(instance%)
- END IF
-
- '** Always update Notes.ini
- WriteNOTIni network$, prodno%
-
- '** Find out if were supposed to install Notes
- '** as a service, and if so then launch the
- '** service installer.
-
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESERVICE")
- dum%=Lot_GetChapterValInt(TmpChapter$,F_INOROUT)
- IF dum% = 1 THEN
- tmp$ = GetSymbolValue("NOTDIR")+"ntsvinst.exe -c"
- ShellResult% = SHELL(tmp$,0)
- END IF
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESPROGRAM")
- dum%=Lot_GetChapterValInt(TmpChapter$,F_INOROUT)
- IF dum% = 1 THEN
-
-
-
- '** Write entries in win.ini
- WriteWinIni prodno%
-
- '** Log the product into \windows\lotus.ini
- WriteNOTInLotusIni prodno%
-
- WriteMAPIRegForNOT network$, prodno%
-
- '** Write the Notes registration
- dum% = WriteNotesReg(prodno%)
- 'WriteOLERegForNOT network$, prodno%
-
- '** Write entries in Program Manager
- ' WriteProgMan network$, prodno%, programgroup$
-
- '** Write the uninstaller - but only for the primary language
-
-
- If GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ Then
- IF network$ <> gNODE$ THEN
- notused%=Lot_RegisterUninstaller(GetSymbolValue(SYM_REG_PRODUCTNAME$),_
- GetSymbolValue(SYM_REG_PRODUCTVER$),_
- LdString(SID_NOT_COMMERCIALNAME), _
- GetSymbolValue("NOTDIR")+"not.inf",_
- TRUE,FALSE,_
- GetSymbolValue(SYM_INSTALL_LANGUAGE$),_
- "c:\uninst.log","",_
- GetSymbolValue(SYM_NAME$))
-
- ELSE
- notused%=Lot_RegisterUninstaller(GetSymbolValue(SYM_REG_PRODUCTNAME$),_
- GetSymbolValue(SYM_REG_PRODUCTVER$),_
- LdString(SID_NOT_COMMERCIALNAME), _
- GetSymbolValue("NOTDIR")+"notnode.inf",_
- TRUE,FALSE,_
- GetSymbolValue(SYM_INSTALL_LANGUAGE$),_
- "c:\uninst.log","",_
- GetSymbolValue(SYM_NAME$))
-
- END IF
- END IF
- END IF
- SKIPCONFIG:
-
-
- END FUNCTION
-
- '*************************************************************************
- '** PUBLIC SUB AddRegistryKeysNOT (prodno%, network$)
- '**
- '** Purpose: This is called just after file copy has completed.
- '** 1. Add product specific Registry Keys.
- '**
- '** Each and every thing you do for configuartion needs very
- '** careful thought.
- '**
- '** 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 part of SmartSuite, SmartSuite
- '** 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 where the user chose to
- '** install the program manager icons
- '**
- '** Errors: No return code for errors, you must Raise them
- '** Author: PMD
- '**
- '*************************************************************************
- PUBLIC SUB AddRegistryKeysNOT (prodno%, network$)
- DIM LocPath$, Filename$, exedir$, instvalue&, Update%, Platform%, ShellResult%
- DIM RegStatus&, szKey$, nsize&, Buffer$, temp$, keyval$, keyval1$, keyval2&
- DIM ExeName$, Description$, Path$, Version$, KeyPath$, AppName$, dum%
- DIM CPath$, Insttype$, Responce%, szkey1$, Default$, datadir$, dPath$
- DIM temp2$, chpt$, keyword$, NewDir$, notused%
-
- Filename$ = LdString(SID_NOT_NOTES)
- exedir$ = GetSymbolValue("NOTDIR") '** Get Notes executable directory
-
- ExeName$ = "Name" '** Executable name
- Description$ = "Description" '** Description of the entry
- Path$ = "Path" '** Path to executable directory
- dPath$ = "DataPath" '** Path to data directory
- Version$ = "Version" '** Version Used for TeamMail only
- KeyPath$ = "KeyPath"
- AppName$ = "Application"
- CPath$ = "LocalPath"
- Insttype$ = "InstType"
- Default$ = "Default"
-
- SELECT CASE network$
-
- CASE gSERVER$
- '** On a server Install i.e. FileServer install we want the Program and Data
-
- CASE gDISTRIBUTION$
-
- CASE gSTANDARD$
- instvalue = 0
- exedir$ = Lot_TrimEndSlash(GetSymbolValue("NOTDIR")) '** Get Notes executable directory
- CreateIniKeyValue exedir$+"\cinstall.ini", "TOOLKIT", "LAUNCHEXE",exedir$+"\notes.exe" , cmoOverwrite
-
- CASE gNODE$
- instvalue = 1
- exedir$ = gNodeDir$
- exedir$ = Lot_TrimEndSlash(GetSymbolValue("NOTDIR")) '** Get Notes executable directory
- CreateIniKeyValue exedir$+"\cinstall.ini", "TOOLKIT", "LAUNCHEXE",exedir$+"\notes.exe" , cmoOverwrite
-
- END SELECT
-
- datadir$ = GetSymbolValue("NOTWORKDIR") '** Get Notes executable directory
- Filename$ = LdString(SID_NOT_NOTES) '** Get the Notes File name.
-
-
- IF ((network$ = gSTANDARD$) OR (network$ = gNODE$))THEN
-
- '** If the user has selected the main program group then register
- '** Notes in the registry.
- IF Lot_IsTheFeatureInstalled("NOTESPROGRAM") <> FALSE THEN
-
- '** Get the Notes Program path.
- locpath$ = Lot_WhereIsFeature(prodno%, "NOTESPROGRAM", LdString(SID_NOT_NOTES))
- nsize = len(LocPath$) + 1
-
- '**
- '** Remove the OLD "4.1" Notes Entry from the registry
- '**
- szKey$ = gREGLOTUS+LdString(SID_NOT_NOTES_NAME)+"\4.1"
- regStatus&= Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$)
- IF regStatus&= 1 THEN
- IF gDebugAddReg = 1 THEN PRINT "Removing Key "+szKey$
- regStatus&= Lot_RegDelAllSubKeys(HKEY_LOCAL_MACHINE, szKey$)
- END IF
-
- szKey$ = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notes V4.1"
- IF gDebugAddReg = 1 THEN PRINT "Attempting to remove Key "+szKey$
- regStatus&= Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$)
- IF regStatus&= 1 THEN
- IF gDebugAddReg = 1 THEN PRINT "Removing Key "+szKey$
- regStatus&= Lot_RegDelAllSubKeys(HKEY_LOCAL_MACHINE, szKey$)
- ELSE
- IF gDebugAddReg = 1 THEN PRINT "remove Key "+szKey$" FAILED Registry error :"+STR$(regStatus)
- END IF
-
- '**
- '** Create the Notes Entry in the registry
- '**
- szKey$ = gREGLOTUS+GetSymbolValue(SYM_REG_PRODUCTNAME$)+"\"+GetSymbolValue(SYM_REG_PRODUCTVER$)
- keyval$ = LdString(SID_NOT_NOTES)
- keyval1$ = LdString(SID_NOT_NOTES_NAME)
-
- '** Create the registration Key
- regStatus = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKey$)
-
- '** Add the registry values
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, ExeName$, REG_SZ, keyval$, LEN(keyval$) + 1)
-
-
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, Description$, REG_SZ, keyval1$, LEN(keyval1$) + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, Path$, REG_SZ, exedir$+"\", LEN(exedir$) + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, dPath$, REG_SZ, datadir$, LEN(datadir$) + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, InstType$, REG_SZ, network$, LEN(network$) + 1)
-
- '** Check for errors
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_NOTES, gHLM$+"\"+szKey$," Notes Registey Entry ",+STR$(regStatus&)
- END IF
-
-
- '** Remove any old Notes entry for AppPath and put the new one in.
-
- szKey$ = "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"+"\"+LdString(SID_NOT_NOTES)
- regStatus&= Lot_RegDelAllSubKeys(HKEY_LOCAL_MACHINE, szKey$)
- regStatus& = Lot_RegAppPath(FileName$, exedir$, "", FALSE, "NOTESPROGRAM")
-
- '** Get the current operating platform.
- Platform% = WhatPlatform()
-
- '**
- '** If the NT directory sync services was selected then register this option.
- '**
- IF Lot_IsTheFeatureInstalled("NTDIRSYNC") <> FALSE THEN
- '** Only do this on the WINNT platform.
- IF Platform% <> PLATFORM_WIN95 THEN
- '** The Key and Object to create
- szKey$ = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\UMAddOns"
-
- IF Environ("PROCESSOR_ARCHITECTURE") = "ALPHA" THEN
- regStatus= Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "NUME", REG_SZ, exedir$+"a"+LdString(SID_NOT_REG_NUME), LEN(exedir$+LdString(SID_NOT_REG_NUME)) + 2)
- IF gDebugAddReg = 1 THEN PRINT "Adding or updateing key NUME "+exedir$+"a"+LdString(SID_NOT_REG_NUME)
- IF gDebugAddReg = 1 THEN PRINT "Registration status is "+STR$(regStatus&)
- ELSE
- regStatus= Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "NUME", REG_SZ, exedir$+"n"+LdString(SID_NOT_REG_NUME), LEN(exedir$+LdString(SID_NOT_REG_NUME)) + 2)
- IF gDebugAddReg = 1 THEN PRINT "Adding or updateing key NUME "+exedir$+"n"+LdString(SID_NOT_REG_NUME)
- IF gDebugAddReg = 1 THEN PRINT "Registration status is "+STR$(regStatus&)
- END IF
- regStatus&= Lot_RegisterObject("NTDIRSYNC",UNIN_CLASS_REGISTRY_HIVE$,"HKEY_LOCAL_MACHINE\"+szKey$)
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_NOTES, gHLM$+"\"+szKey$," Nt Directory sync service",STR$(regStatus&)
- END IF
-
- END IF
- END IF
- END IF
-
- IF (network$ = gSTANDARD$) THEN
- '**
- '** If we are installing a Notes Server then and the Performance monitor
- '** was selected then create the shell command to execute the "notesreg.bat".
- '** NEED WORK HERE look at LPW_istTheFeatureInstalled and make registry.
-
- IF Lot_IsTheFeatureInstalled("NOTESSERVER") <> FALSE THEN
- IF Platform% <> PLATFORM_WIN95 THEN
- IF Lot_IsTheFeatureInstalled("NOTESPERF") <> FALSE THEN
- temp$ = exedir$+"notesreg.bat "+Lot_TrimEndSlash(exedir$)
- IF gDebugAddReg = 1 THEN PRINT "About to execute the following :"+temp$
- ShellResult = SHELL(temp$,0)
- END IF
- END IF
- ON ERROR resume NEXT
-
- '** Create the paths if they don't exist
- '** and register the directory under the first product
-
- '** Make sure the following directories exist on the Notes Server.
- '** and register them so the un-installer can remove them.
- keyword$ = Lot_GetChapterValStr(_
- Lot_GetChapterFromKeyword(Reg_GetProductAcronym(1) + gTOP$), F_KEYWORD)
-
- NewDir$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\domino\html"
- IF NOT DoesDirExist(NewDir$) THEN
- Lot_CreateDirectory(NewDir$)
- notused% = Lot_RegisterObject (keyword$,UNIN_CLASS_DIRECTORY$, NewDir$)
- END IF
-
- NewDir$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\domino\cgi-bin"
- IF NOT DoesDirExist(NewDir$) THEN
- Lot_CreateDirectory(NewDir$)
- notused% = Lot_RegisterObject (keyword$,UNIN_CLASS_DIRECTORY$, NewDir$)
- END IF
-
- temp$ = DIR$(Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\domino\admin-bin\*.exe", 0)
- DO WHILE temp$ <> ""
- kill(Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\domino\admin-bin\"+temp$)
- temp$ = DIR$()
- temp2$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\domino\admin-bin\"+temp$
- LOOP
- RMDIR(Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\domino\admin-bin")
- END IF
- END IF
-
- '**
- '** Create the LocalPath entry for the components dir.
- '**
-
- szKey$ = gREGLOTUS+LdString(SID_NOT_REG_COMPONENTS)
-
- '** Find out if the Components LocalPath is set if it's not set set to NULL
- '** if it is set then don't do anything at all otherwise we might break
- '** some other component. (Notes: has no use for this setting but it must
- '** be set for the Uninstaller to work properly.
-
- regStatus&= Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$)
-
- IF regStatus&= 1 then
- IF gDebugAddReg = 1 THEN PRINT "Regstatus for Localpath is 1"
- regStatus = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LocPath$, 0, buffer$, nsize)
- ELSE
- IF gDebugAddReg = 1 THEN PRINT "RegStatus for localpath is not 1"
- regStatus = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKey$)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, CPath$, REG_SZ, "", 1)
- END IF
-
- '**
- '** Update/Add Shared dll entries
- '**
- ' IF Lot_IsTheFeatureInstalled("NOTESPROGRAMWINNT") <> FALSE THEN
- ' szKey$ = "SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls"
- ' regStatus&= Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$)
- '
- ' ELSE IF Lot_IsTheFeatureInstalled("NOTESPROGRAMWIN95") <> FALSE THEN
-
-
- '**
- '** Create the LotusScriptExtensions Entry in the registry
- '**
-
- szKey$ = gREGLOTUS+LdString(SID_NOT_REG_COMPONENTS)+"\"+LdString(SID_NOT_LS_EXTENSIONS)+"\"+LdString(SID_NOT_LS_VERSION)
-
- temp$ = GetSymbolValue("NOTDIR")+"nlsxbe.dll"
- nsize = LEN(temp$)
-
- regStatus = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKey$)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "NOTES", REG_SZ, temp$, nsize + 1)
-
- temp$ = GetSymbolValue("NOTDIR")+"nlsxodbc.dll"
- nsize = LEN(temp$)
-
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "LSXODBC", REG_SZ, temp$, nsize + 1)
-
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_LSEXT, gHLM$+"\"+szKey$,"Lotus Script Extensions",STR$(regStatus&)
- END IF
-
- regStatus&= Lot_RegisterObject("NOTESPROGRAM",UNIN_CLASS_REGISTRY_HIVE$,"HKEY_LOCAL_MACHINE\"+szKey$)
-
- '**
- '** Create the TeamMail Mail Entry in the registry
- '**
-
- szKey$ = gREGLOTUS+LdString(SID_NOT_REG_COMPONENTS)+"\"+LdString(SID_NOT_REG_TEAM_MAIL)
- keyval$ = LdString(SID_NOT_DSC_TEAM_MAIL)
- keyval1$ = LdString(SID_NOT_REG_NOTES_NAME)
- szKey1$ =gREGLOTUS+GetSymbolValue(SYM_REG_PRODUCTNAME$)+"\"+GetSymbolValue(SYM_REG_PRODUCTVER$)
- regStatus& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKey$)
-
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, Description$, REG_SZ, keyval$, LEN(keyval$) + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, Version$, REG_SZ,"1.0" , LEN("1.0") + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, KeyPath$, REG_SZ, szKey1$, LEN(szKey1$) + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, AppName$, REG_SZ, keyval1$, LEN(keyval1$) + 1)
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_TM, gHLM$+"\"+szKey$,"",""
- END IF
- '** Removal of _X86_ only code
-
- '** Find out if a Debugger is already installed, If it's QNC.exe or Dr. Watson then
- '** update it otherwise leave the current debugger alone.
-
- '**
- '** Create the QNC entry in the registry
- '**
- IF gDebugAddReg = 1 THEN PRINT "Registering QNC"
-
- '** Load the dafault registry key string for the debugger
- szKey$ = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug"
-
- '** Check to see if the key exists.
- regStatus& = Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$)
- IF gDebugAddReg = 1 THEN PRINT "Regstatus for :"+szKey$" is "+STR$(regStatus&)
-
- '** If the key does exist, then check to see if it's QNC or Dr. Watson.
- '** If it's one of the 2 then Updated the debugger to point to the location
- '** of QNC. If it's any other debugger then do nothing here.
-
- IF regStatus& = 1 THEN
- regStatus& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "Debugger", 0, buffer$, MAXKEYPATH)
-
- IF gDebugAddReg = 1 THEN PRINT "Currently installed debugger is :"+Buffer$
-
- IF INSTR(Buffer$,LdString(SID_NOT_QNC)) <> 0 OR INSTR(Buffer$,LdString(SID_NOT_DRWTSN)) <> 0 THEN
- Update% = 1
- IF gDebugAddReg = 1 THEN PRINT "Dr Watson installed so update with QNC"
- IF gDebugAddReg = 1 THEN PRINT "Updateing QNC, or overwritting DR. Watson"
- ELSE
- Update% = 0
- END IF
-
- ELSE '** Add QNC as the debugger
- Update% = 1
- IF gDebugAddReg = 1 THEN PRINT "Adding QNC"
- END IF
-
- IF Update% = 1 THEN
-
- '** Find out if QNC Go installed.
- responce% = Lot_IsTheFeatureInstalled("NOTESQNC")
- IF gDebugAddReg = 1 THEN PRINT "QNC Status is "+STR$(responce%)
-
- '** If QNC was installed then add the information to the registry.
- if responce% = 1 THEN
-
- '** IF the key "AEDEBUG" didn't exist then this is were we will create it.
- if Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$) = 0 THEN
- regStatus& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,szKey$)
- END IF
- '** Now create the key values for "AEDEBUG".
-
- '** Key "Auto"
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "Auto", REG_SZ, "0", LEN("0") + 1)
-
- '** QNC Key value for Auto.
- keyval$ = exedir$+LdString(SID_NOT_QNC)+" "+LdString(SID_NOT_QNC_OPTIONS)
-
- '** Key "Debugger"
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "Debugger", REG_SZ, keyval$, LEN(keyval$) + 1)
-
- '** register the object so the un-installer can remove it when Notes goes away.
- 'regStatus&= Lot_RegisterObject("NOTESQNC",UNIN_CLASS_REGISTRY_HIVE$,szKey$)
-
- '** Check to see if an error has occured, if so display the error to the user.
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_NOT_QNC_REG, gHLM$+"\"+szKey$,"",""
- END IF
-
- '** Load the name of the dubbger we are installing.
- szKey$ = gREGLOTUS+LdString(SID_NOT_QNC_REG)
-
- '** Register the Debugger with un-install
- 'regStatus&= Lot_RegisterObject("NOTESQNC",UNIN_CLASS_REGISTRY_KEY$,szKey$)
-
- IF gDebugAddReg = 1 THEN PRINT "Key to create is"+szKey$
- '** Find out if the entry for Quinsy exists.
- if Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$) = 0 THEN
- regStatus& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,szKey$)
- END IF
-
- regStatus& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,szKey$)
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_NOT_QNC_REG, gHLM$+"\"+szKey$,STR$(regStatus),""
- END IF
- keyval2& = 00000000
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_NUMCRASH), REG_DWORD, keyval2&, 4)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_LOGFILPATH), REG_SZ,"",LEN("") + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_WAVEFILE), REG_SZ, "",LEN("") + 1)
- keyval2& = 00000000
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_DUMPSYM), REG_DWORD, keyval2&, 4)
- keyval2& = 00000001
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_DUMPALLTHRDS), REG_DWORD, keyval2&, 4)
- keyval2& = 00000001
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_APPTOLOGFILE), REG_DWORD, keyval2&, 4)
- keyval2& = 00000001
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_VISNOTIFICATION), REG_DWORD, keyval2&, 4)
- keyval2& = 00000001
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_SNDNOTIFICATION), REG_DWORD, keyval2&, 4)
- keyval2& = 00000010
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_INSTRUCTIONS), REG_DWORD, keyval2&, 4)
- keyval2& = 00000010
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_MAXCRASHES), REG_DWORD, keyval2&, 4)
- keyval2& = 00000000
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, LdString(SID_NOT_QNC_DUMPALLMODS), REG_DWORD, keyval2&, 4)
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_NOT_QNC_REG, gHLM$+"\"+szKey$,"",""
- END IF
- END IF
- END IF
-
- END IF '** gNODE$ or gSTANDARD$
- END SUB
-
- '*************************************************************************
- '** FUNCTION AddIconsNOT (prodno%, network$, direction$, programgroup$) AS STRING
- '**
- '** Purpose: This is called just after file copy has completed.
- '** 1. Add program manager icons of those features
- '** that were installed.
- '** NOTE: THERE are many subtleties 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 pre-existing 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
- '** 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.
- '** 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 part of SmartSuite, SmartSuite
- '** 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 where 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 AddIconsNOT (prodno%, network$, direction$, programgroup$) AS STRING
- DIM ripath$, exepath$, exename$, szArgument$, notused%, dum%
- DIM LanguageQualifier$, LanguageAcronym$, ProgramChapter$
- DIM CurrentInstance$, datapath$
-
- AddIconsNOT = direction$
- '** In the backwards case, keep backing up
- If direction$ = gBACK Then
- EXIT FUNCTION
- END IF
-
- LanguageQualifier$ = ""
- LanguageAcronym$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
- szArgument$ = "/L" + LanguageAcronym$
- exename$ = LdString(SID_NOT_NOTES)
- exepath$ = Lot_WhereIsFeature(prodno%, "NOTESPROGRAM", exename$)
-
- '** If language install, add qualifier
- If GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ Then _
- LanguageQualifier$ = Lot_SetLanguageDirectory ( LanguageAcronym$ )
-
- '** Don't Install Icons for Shared Install.
- IF network$ <> gSERVER$ THEN
-
- '** Get the chapter name for the Notes program chapter.
- ProgramChapter$ = Lot_GetChapterFromKeyWord("NOTESPROGRAM")
-
-
- IF (Lot_GetChapterValInt(ProgramChapter$, F_INOROUT) OR (gPartitioned% = 1)) THEN
- IF gDebugPartition = 1 THEN PRINT "Partitions on so install icons"
- IF IsNewShell() THEN
- IF gPartitioned% = 1 THEN
- IF gDebugAddIcons = 1 THEN PRINT" VClient is on"
- datapath$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))
- CurrentInstance$ ="Client"+STR$(gInstance%)
- notused%=Lot_AddLinkIconToFolder(prodno%, datapath$+"\"+LdString(SID_NOT_NCLIENT), LdString(SID_NOT_COMMERCIALNAME)+" "+CurrentInstance$+".lnk", LdString(SID_NOT_COMMERCIALNAME),"",datapath$,datapath$+"\"+LdString(SID_NOT_CLIENTICON),0)
- notused% = Lot_RegisterObject ("NOTES",UNIN_CLASS_FILE$, datapath$+"\"+LdString(SID_NOT_NCLIENT))
- ELSE
- '** Non Virtual Server New Shell
- IF gDebugAddIcons = 1 THEN PRINT" Adding Notes Icon for new shell"
- IF gDebugAddIcons = 1 THEN PRINT" Notes exepath is "+exepath$
- IF gDebugAddIcons = 1 THEN PRINT" NotesString is "+LdString(SID_NOT_NOTES)
- IF gDebugAddIcons = 1 THEN PRINT" Notes Commerical name is is "+LdString(SID_NOT_COMMERCIALNAME)
- notused%=Lot_AddLinkToFolder(prodno%, exepath$+LdString(SID_NOT_NOTES), LdString(SID_NOT_COMMERCIALNAME)+".lnk", LdString(SID_NOT_COMMERCIALNAME),"",exepath$)
- END IF
- notused% = Lot_RegisterObject("NOTESPROGRAM",UNIN_CLASS_SHORTCUT$,Lot_GetProgFolder(prodno%)+LdString(SID_NOT_COMMERCIALNAME)+".lnk")
- ELSE
- IF gPartitioned% = 1 THEN
- IF gDebugAddIcons = 1 THEN PRINT" VClient is on"
- datapath$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))
- CurrentInstance$ ="Client"+STR$(gInstance%)
- CreateProgmanItem programgroup$, LdString(SID_NOT_COMMERCIALNAME)+" "+CurrentInstance$,datapath$+"\"+LdString(SID_NOT_NCLIENT),datapath$+"\"+LdString(SID_NOT_CLIENTICON), cmoOverwrite
- notused% = Lot_RegisterObject ("NOTES",UNIN_CLASS_FILE$, datapath$+"\"+LdString(SID_NOT_NCLIENT))
- ELSE
- '** Non Virtual Server Old Shell
- IF gDebugAddIcons = 1 THEN PRINT" Adding Notes Icon for old shell"
- CreateProgmanItem programgroup$, LdString(SID_NOT_COMMERCIALNAME),exepath$+LdString(SID_NOT_NOTES),"", cmoOverwrite
- END IF
-
- notused% = Lot_RegisterObject("NOTESPROGRAM", UNIN_CLASS_ICON$, programgroup$+"\"+LdString(SID_NOT_COMMERCIALNAME))
- END IF
- END IF
-
-
-
- '** Don't Install Server for Node Install
- IF network$ <> gNODE$ THEN
-
-
-
-
-
-
- exename$ = LdString(SID_NOT_NOTESSERVEREXE)
- exepath$ = Lot_WhereIsFeature(prodno%, "NOTESSERVER", exename$)
-
- '** check exepath because if the user reinstall the Client after
- '** doing a Server install the Lot_WhereIsFeature would return "".
- IF exepath$ = "" THEN
- exepath$ = Lot_WhereIsFeature(prodno%, "NOTESPROGRAM", exename$)
- END IF
- IF gDebugAddIcons = 1 THEN PRINT" SID_NOT_NOTES is :"exename$
-
- '** Write entries in Program Manager
- ProgramChapter$ = Lot_GetChapterFromKeyWord("NOTESSERVER")
- dum% = Lot_GetChapterValInt(ProgramChapter$, F_INOROUT)
- IF ( dum% = 1 OR (gPartitioned% = 1)) THEN
- IF IsNewShell() THEN
- IF gPartitioned% = 1 THEN
- IF gDebugAddIcons = 1 THEN PRINT" Vserver is on"
- datapath$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))
- CurrentInstance$ =STR$(gInstance%)
- notused%=Lot_AddLinkIconToFolder(prodno%, datapath$+"\"+LdString(SID_NOT_NSERVER), LdString(SID_NOT_SERVER_TITLE)+CurrentInstance$+".lnk", LdString(SID_NOT_COMMERCIALNAME),"",datapath$,datapath$+"\"+LdString(SID_NOT_SERVERICON),0)
- notused% = Lot_RegisterObject ("NOTES",UNIN_CLASS_FILE$, datapath$+"\"+LdString(SID_NOT_NSERVER))
- ELSE
-
-
-
- notused%=Lot_AddLinkToFolder(prodno%, exepath$+LdString(SID_NOT_SERVER), LdString(SID_NOT_SERVER_TITLE)+".lnk", LdString(SID_NOT_SERVER_TITLE),"",exepath$)
- notused%=Lot_AddLinkToFolder(prodno%, exepath$+LdString(SID_NOT_NOTES), LdString(SID_NOT_SERVER_ADMIN_TITLE)+".lnk", LdString(SID_NOT_SERVER_ADMIN),"ADMINONLY",exepath$)
-
- END IF
- notused% = Lot_RegisterObject("NOTESSERVER",UNIN_CLASS_SHORTCUT$,Lot_GetProgFolder(prodno%)+LdString(SID_NOT_SERVER_TITLE)+".lnk")
- ELSE
- IF gPartitioned% = 1 THEN
- IF gDebugAddIcons = 1 THEN PRINT" Vserver is on"
- datapath$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))
- CurrentInstance$ =STR$(gInstance%)
- CreateProgmanItem programgroup$, LdString(SID_NOT_SERVER_TITLE)+CurrentInstance$ ,datapath$+"\"+LdString(SID_NOT_NSERVER),datapath$+LdString(SID_NOT_SERVERICON), cmoOverwrite
- notused% = Lot_RegisterObject ("NOTES",UNIN_CLASS_FILE$, datapath$+"\"+LdString(SID_NOT_NSERVER))
- ELSE
-
-
-
- CreateProgmanItem programgroup$, LdString(SID_NOT_SERVER_TITLE) ,exepath$+LdString(SID_NOT_SERVER),"", cmoOverwrite
-
- END IF
- notused% = Lot_RegisterObject("NOTESSERVER", UNIN_CLASS_ICON$, programgroup$+"\"+LdString(SID_NOT_SERVER_TITLE))
- END IF
- END IF
- END IF
-
- END IF
-
- SKIPCONFIG:
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION PostSuccessRegNOT (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 part of SmartSuite, SmartSuite
- '** 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 PostSuccessRegNOT (prodno%, network$, direction$) AS STRING
- DIM dum%, tmp$, exepath$
-
- PostSuccessRegNOT = direction$
- '' In the backwards case, keep backing up
- If direction$ = gBACK Then
- EXIT FUNCTION
- End If
- '** Query the user if they would like to automaticlly launch Notes.
- IF ((GetSymbolValue(SYM_AUTOMATIONINST$) = gFALSE$) AND (network$ <> gSERVER)) THEN
- dum% = DoMsgBox(LdString(SID_NOT_RUN_NOTES), LdString(SID_NOT_NOTES_NAME),MB_YESNO + MB_ICONQUESTION)
- IF dum% = IDYES THEN
- '** If the user selected to Launch Notes then find out the Install type and generate the string
- '** to be passed to "inst.lss".
- IF gPartitioned% = 1 THEN
- gNotesInstallType$ = Lot_TrimEndSlash(GetSymbolValue("NOTWORKDIR"))+"\"+"nclient.bat"
- ELSE
-
-
-
-
- exepath$ = Lot_WhereIsFeature(prodno%, "NOTESPROGRAM", LdString(SID_NOT_NOTES))
- gNotesInstallType$ = exepath$+LdString(SID_NOT_NOTES)
-
- END IF
- END IF
- END IF
- END FUNCTION
-
-
- '*************************************************************************
- '** NOTMOREDIRSCB
- '** Purpose: This SUB handles the processing for the MORE DIRECTORIES
- '** dialog.
- '**
- '** IN SYMBOLS handle to dialog, Control ID, Class, Instance
- '**
- '** Author: Michael Natsis
- '** Arguments:
- '**
- '**
- '** Returns:
- '**
- '*************************************************************************
- SUB NOTMOREDIRSCB (hDlg&, CtrlId%, Classes$, LInst&)
- DIM dirChanged1%, dirChanged2%, dirChanged3%, i%, notused%
- DIM drvSel%,Inst%, dirToChange1$, dirToChange2$,dirToChange3$
- STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS)
-
- '** unc start
- DIM uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo& '** MZ
- DIM curCombo$, uncOff&, unusedPath$, NumDirs%
- DIM comboBox$, editBox$,dirToChange$
- '** unc end
-
- Inst% = CINT(LInst&)
-
- '** unc start
- '** Handle all the combo boxes here (if any)
- IF INSTR(Classes$, "IDC_COMBO") THEN
- i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
- comboBox = "IDC_COMBO"+Right$(Str$(i%),1)
- editBox = "IDC_EDIT"+Right$(Str$(i%),1)
- drvIndex%(i%) = Inst%
- curCombo$ = GetListItem(comboBox, Inst%)
- fullPath$ = GetListItem("IDC_EDIT",i)
- Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
- uncOff& = INSTR(1, curCombo$, "\\")
- IF uncOff > 0 THEN
- Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
- ELSE
- uncPath$ = ""
- END IF
- SetListItem "IDC_EDIT", i, uncPath$ + dirPath$
- AddListItem SYM_UPDATELIST$, editBox
- EXIT SUB
- END IF
- '** unc end
-
-
-
- SELECT CASE Classes$
-
- CASE "__DLGINIT"
-
- '** This is the directory for the Work Files
- Lot_GetDriveFreeSpaceList "IDC_COMBO1"
- SetListItem "IDC_EDIT", 1, GetSymbolValue("NOTWORKDIR")
- drvIndex%(1) = ValidateEditBox(hDlg& , 1)
- AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
-
-
- '** This is the directory for the Smart Master Files
- Lot_GetDriveFreeSpaceList "IDC_COMBO2"
- SetListItem "IDC_EDIT", 2, GetSymbolValue("NOTMASTERSDIR")
- drvIndex%(1) = ValidateEditBox(hDlg& , 2)
- AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
-
- '** This is the directory for the Backup Files
- Lot_GetDriveFreeSpaceList "IDC_COMBO3"
- SetListItem "IDC_EDIT", 3, GetSymbolValue("NOTBACKUPDIR")
- drvIndex%(1) = ValidateEditBox(hDlg& , 3)
- AddListItem SYM_UPDATELIST$, "IDC_EDIT3"
-
- CASE "IDC_COMBO"
- SELECT CASE Inst%
- CASE 1
- dirChanged1% = TRUE
-
- CASE 2
- dirChanged2% = TRUE
-
- CASE 3
- dirChanged3% = TRUE
-
- END SELECT
-
- CASE "IDC_BRWSDIR"
- drvSel% = ValidateBrowse(hDlg&,Inst%)
- SELECT CASE Inst%
-
- CASE 1
- dirChanged1% = TRUE
-
- CASE 2
- dirChanged2% = TRUE
-
- CASE 3
- dirChanged3% = TRUE
-
- END SELECT
-
- CASE "IDC_EDIT"
- SELECT CASE Inst%
- CASE 1
- dirChanged1% = TRUE
-
- CASE 2
- dirChanged2% = TRUE
-
- CASE 3
- dirChanged3% = TRUE
-
- END SELECT
-
- CASE "IDC_OK"
- '** Validate Paths always: to check for a file with the same name
-
- '** WorkDir
- '** unc start 1
- drvSel% = ValidateEditBox(hDlg& , 1)
- IF drvSel% = 0 THEN
- SetListItem "__LASTSTATUS", 1, "Q"
- EXIT SUB
- ELSE
- drvIndex%(1) = drvSel%
- END IF
- Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
- IF uncPath$ = "" THEN
- drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%(1)), 2)
- ELSE
- drvPath = ""
- END IF
- dirToChange1$ = drvPath$ + uncPath + dirPath$
- '** unc end
-
- IF ValidatePath(dirToChange1$) = FALSE THEN
- SetListItem "_LASTSTATUS",1,"Q"
- EXIT SUB
-
- ELSE
- SetSymbolValue "NOTWORKDIR", dirToChange1$
-
- END IF
-
-
- '** SMasters
- '** unc start 2
- drvSel% = ValidateEditBox(hDlg& , 2)
- IF drvSel% = 0 THEN
- SetListItem "__LASTSTATUS", 1, "Q"
- EXIT SUB
- ELSE
- drvIndex%(2) = drvSel%
- END IF
- Lot_SplitUNCPath GetListItem("IDC_EDIT",2), uncPath$, dirPath$
- IF uncPath$ = "" THEN
- drvPath = LEFT$(GetListItem("IDC_COMBO2",drvIndex%(2)), 2)
- ELSE
- drvPath = ""
- END IF
- dirToChange2$ = drvPath$ + uncPath + dirPath$
- '** unc end
- IF ValidatePath(dirToChange2$) = FALSE THEN
- SetListItem "_LASTSTATUS",1,"Q"
- ELSE
- SetSymbolValue "NOTMASTERSDIR", dirToChange2$
- END IF
-
-
- '** Backup
- '** unc start 3
- drvSel% = ValidateEditBox(hDlg& , 3)
- IF drvSel% = 0 THEN
- SetListItem "__LASTSTATUS", 1, "Q"
- EXIT SUB
- ELSE
- drvIndex%(3) = drvSel%
- END IF
- Lot_SplitUNCPath GetListItem("IDC_EDIT",3), uncPath$, dirPath$
- IF uncPath$ = "" THEN
- drvPath = LEFT$(GetListItem("IDC_COMBO3",drvIndex%(3)), 2)
- ELSE
- drvPath = ""
- END IF
- dirToChange3$ = drvPath$ + uncPath + dirPath$
- IF ValidatePath(dirToChange3$) = FALSE THEN
- SetListItem "_LASTSTATUS",1,"Q"
-
- ELSE
- SetSymbolValue "NOTBACKUPDIR", dirToChange3$
- END IF
-
-
- '** Refresh destination
- 'Lot_RefreshDestination("NOTWORKDIR")
- 'Lot_RefreshDestination("NOTMASTERSDIR")
- 'Lot_RefreshDestination("NOTBACKUPDIR")
-
- END SELECT 'Classes
-
- END SUB
-
- '********************************
- '********************************
- '** Product Specific Functions **
- '********************************
- '********************************
-
- '*************************************************************************
- '** FUNCTION DetectPreviousVersion () AS STRING
- '**
- '** Purpose: Find a previous version of Notes
- '** Author: Fareed Assarpour
- '** Arguments: None
- '** Returns: What product we found
- '*************************************************************************
-
- FUNCTION DetectPreviousVersion () AS STRING
-
- DetectPreviousVersion = ""
-
- END FUNCTION
-
-
- '*************************************************************************
- '** SUB WriteWinIni(prodno%)
- '**
- '** Purpose: Writes configuration entries in Win.ini
- '** Author: FA
- '** Arguments: None
- '** Returns: SUCCESS
- '*************************************************************************
-
- SUB WriteWinIni(prodno%)
- Dim DestDir$, ProdDir$, WKDir$, dum%
-
- DestDir$ = GetWindowsDir() + gWININI$
- '** This is the top level directory where the Notes.exe lives
- ProdDir$ = Lot_GetTheRealProdDir(prodno%)
- ' dum% = DoMsgBox("Lot_GetTheRealProdDir() returned: "+ProdDir$, "WriteWinIni", MB_OK)
-
- WKDir$ = ProdDir$ + "NOTES.EXE"
- CreateIniKeyValue DestDir$, "Extensions", "nsf", WKDir$+" ^.nsf", cmoOverwrite
- CreateIniKeyValue DestDir$, "Extensions", "ns3", WKDir$+" ^.ns3", cmoOverwrite
- CreateIniKeyValue DestDir$, "Extensions", "nsg", WKDir$+" ^.nsg", cmoOverwrite
- CreateIniKeyValue DestDir$, "Extensions", "nsh", WKDir$+" ^.nsh", cmoOverwrite
- CreateIniKeyValue DestDir$, "Extensions", "ns2", WKDir$+" ^.ns2", cmoOverwrite
- CreateIniKeyValue DestDir$, "Extensions", "ntf", WKDir$+" ^.ntf", cmoOverwrite
- ' CreateIniKeyValue DestDir$, "MAIL", "CMCDLLNAME", ProdDir$+"cmc.dll", cmoOverwrite
- CreateIniKeyValue DestDir$, "Mail", "SMI", "1", cmoOverwrite
- CreateIniKeyValue DestDir$, "LotusMail", "Application", "Notes", cmoOverwrite
- CreateIniKeyValue DestDir$, "LotusMail", "Program", ProdDir$+"Notes.exe NoDialogs", cmoOverwrite
-
- END SUB
-
- '*************************************************************************
- '** SUB WriteNOTIni(network$)
- '**
- '** Purpose: Write the configuration entries in notes.ini
- '** Author: FA
- '** Arguments: None
- '** Returns: SUCCESS
- '*************************************************************************
-
- SUB WriteNOTIni(network$, prodno%)
- Dim DestDir$, dum%, ProgramChapter$, DataDir$, BootDrive$
-
- ON Error RESUME NEXT
- BootDrive$ = Lot_TrimEndSlash(GetBootDrive())
- MKDIR BootDrive$+"\temp"
-
- '** If this is a virtual server install then the NOTES.INI file
- '** resides in the Notes data directory and not in the windows
- '** directory, So set the notes.ini dir (DestDir) to point to the data dir.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- IF gPartitioned% = 1 THEN
- '** Set the notes.ini dir to the Data directory.
- if gDebugPartition = 1 THEN PRINT "Partitions on so install (notes.ini) in data dir :"+DestDir$
- DestDir$ = GetSymbolValue("NOTWORKDIR")+"\"+"notes.ini"
- if gDebugKittype = 1 OR gDebugNotes = 1 THEN PRINT "Install thinks Partitioned Server selected so Kittype = 2"
- gKitType$="2"
- CreateIniKeyValue DestDir$, LdString(SID_NOT_REG_NOTES_NAME), "NOTESPROGRAM", gNotesPartitionedProg$, cmoOverwrite
- ELSE
- '** Set the notes.ini dir to the Windows directory.
- IF gDebugNotesIni = 1 THEN Print "Notes ini dir "+gNotesIni$
- DestDir$ = GetWindowsDir() + "notes.ini"
- IF gNotesIni$ <> "" THEN
- IF gNotesIni$ <> DestDir$ THEN
- DestDir$ = gNotesIni$
- END IF
- END IF
- '** Is the Notes Server chapter installed
- IF Lot_IsTheFeatureInstalled("NOTESSERVER") <> FALSE Then
- ProgramChapter$ = Lot_GetChapterFromKeyWord("NOTESSERVER")
- '** Is the Notes Server chapter selected ?
- IF Lot_GetChapterValInt(ProgramChapter$, F_INOROUT) THEN
- if gDebugKittype = 1 OR gDebugNotes = 1 THEN PRINT "Install thinks Server selected so Kittype = 2"
- gKitType$="2"
- END IF
- ELSE
- gKitType$ = "1" '' Laptop default to Client
- if gDebugKittype = 1 OR gDebugNotes = 1 THEN PRINT "Install thinks Workstation selected so Kittype = 1"
- END IF
- END IF
-
- '** Get the notes data directory
- datadir$ = GetSymbolValue("NOTWORKDIR")
- CreateIniKeyValue DestDir$, "Notes", "KitType", gKitType, cmoOverwrite
- CreateIniKeyValue DestDir$, "Notes", "Directory", datadir$, cmoOverwrite
- CreateIniKeyValue DestDir$, "Notes", "SETUPDB", "SETUP.NSF", cmoOverwrite
- CreateIniKeyValue DestDir$, "Notes", "USERNAME", GetSymbolValue(SYM_NAME), cmoOverwrite
- CreateIniKeyValue DestDir$, "Notes", "COMPANYNAME", GetSymbolValue(SYM_COMPANY), cmoOverwrite
- CreateIniKeyValue DestDir$, "Notes", "MTATEMP", BootDrive$+"\TEMP", cmoOverwrite
- CreateIniKeyValue DestDir$, "Notes", "NOTESPROGRAM", GetSymbolValue("NOTDIR"), cmoOverwrite
- IF GetIniKeyString(DestDir$,"NOTES","LITEKIT") <> "" THEN
- RemoveIniKey DestDir$,"Notes", "LITEKIT", cmoOverwrite
- END IF
-
-
-
- IF GetIniKeyString(DestDir$,"NOTES","RemoteServer") <> "" THEN
- RemoveIniKey DestDir$,"Notes", "RemoteServer", cmoOverwrite
- END IF
- IF GetIniKeyString(DestDir$,"NOTES","Windows_Title") <> "" THEN
- RemoveIniKey DestDir$,"Notes", "Windows_Title", cmoOverwrite
- END IF
- IF gPartitioned% = 1 THEN
- if gDebugPartition = 1 THEN PRINT "Partitions on so ADD special values."
- CreateIniKeyValue DestDir$, "Notes", "NPN", "1", cmoOverwrite
- END IF
-
- END SUB
-
- '*************************************************************************
- '** SUB WriteOLERegForNOT(network$, prodno%)
- '**
- '** Purpose: This function writes OLE registration needed
- '** Author: FA
- '** Arguments:
- '** Returns: SUCCESS
- '*************************************************************************
-
- SUB WriteOLERegForNOT(network$, prodno%)
- DIM ShellCommand$, ShellResult%
-
- ShellCommand = GetWindowsDir() + "regedit.exe /s " + GetWindowsSysDir()+ "ole2.reg"
- 'print "shell command is: "+ ShellCommand
- ShellResult = SHELL(ShellCommand,0)
-
- END SUB
-
-
- '*************************************************************************
- '** SUB WriteNOTInLotusIni(prodno%)
- '**
- '** Purpose: This function logs Notes product in lotus.ini
- '** Author: FA
- '** Arguments:
- '** Returns: SUCCESS
- '*************************************************************************
-
- SUB WriteNOTInLotusIni(prodno%)
- Dim DestDir$, Program$, dum%
-
- DestDir$ = GetWindowsDir() + "lotus.ini"
- Program$ = Lot_GetTheRealProdDir(prodno%)+"notes.exe"
- CreateIniKeyValue DestDir$, "Lotus Applications", "Notes", Program$, cmoOverwrite
-
- END SUB
-
- '*************************************************************************
- '** SUB WriteProgMan(network$, prodno%, title$)
- '**
- '** Purpose: Create Program Items in the program mamager
- '** Author: FA
- '** Arguments:None
- '** Returns: SUCCESS
- '*************************************************************************
-
- 'SUB WriteProgMan(network$, prodno%, title$)
- '
- '
- ' IF Lot_IsTheFeatureInstalled("NOTA") <> FALSE Then
- ' gProdDir$ = Lot_WhereIsFeature(prodno%, "NOTTOP", "notes.exe")
- ' Program$ = ProgDir + "notes.exe"
- ' CreateProgmanItem title$, "Notes 4.0", Program, "", cmoOverwrite
- ' END IF
- '
- ' IF Lot_IsTheFeatureInstalled("NOTK") <> FALSE Then
- ' gProdDir$ = Lot_WhereIsFeature(prodno%, "NOTK", "notetour.exe")
- '
- ' Program$ = GetSymbolValue("NOTDIR") + "notetour\notetour.exe"
- ' CreateProgmanItem title$, "Lotus Guided Tour", Program, "", cmoOverwrite
- ' END IF
- '
- '
- 'END SUB
-
- '** SUB REMOVEOLDFILESCB (hDlg&, CtrlId%, Classes$, Inst%)
- '**
- '** Purpose: Fill in the list box with as set of files found, and allow
- '** the use to select the files they wish removed.
- '**
- '** Note: The Inst% var passed to this routien is a One(1) base array
- '** and the var returnd from Windows is Zero(0) based.
- '**
- '** Author: Michael Clark
- '** Arguments: Callback args
- '** Returns: NONE
- '*************************************************************************
-
- SUB REMOVEOLDFILESCB (hDlg&, CtrlId%, Classes$, Inst&)
-
- DIM ProgManIni$, Group$, GroupId%,count%, Index%,notused%,DefaultGroup$
- DIM GroupPath$,GroupName$, SelectedName$, EnteredName$,order%, failed%
- DIM dum%, x%, MyStr$, chapter$, ProdNumber%, Product_Name$, child$
- DIM section$, filename$, lastfilename$, found%, tmpname$, destdir$
- DIM description$, listcount%, Deletefiles%
- DIM Buffer$
-
- Buffer$ = string(256,0)
-
-
- SELECT CASE Classes$
-
- CASE "__DLGINIT"
- ' set up dlgbox
- AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
- AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
- AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
- SetListItem "IDC_TEXT",2, gDeleteDialogText$
- AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
-
-
- CASE "IDC_LIST1"
-
- CASE "IDC_B"
- ''** Get the number of items that were added to the list.
- ''** Number of files found. And select each file in the list.
- listcount% = SendDlgItemMessage(hDlg&,IDC_LIST1,LB_GETCOUNT,0,0)
- 'print str$(listcount%)+" Files were found in the list"
- FOR DeleteFiles = 0 to listcount% - 1
- dum% = SendDlgItemMessage(hdlg&,IDC_LIST1,LB_SETSEL,1,DeleteFiles%)
- IF dum% = -1 THEN
- 'print "File index is:"+str$(DeleteFiles)
- END IF
- ' Print "LB_SETSEL returned :"+str$(dum%)
- NEXT
-
- CASE "IDC_OK"
-
- listcount% = SendDlgItemMessage(hdlg&,IDC_LIST1,LB_GETCOUNT,0,0)
- IF listcount% <> 0 Then
- 'print " We have "+str$(listcount%)+" Items in the list"
- FOR count% = 0 TO listcount% -1
- IF SendDlgItemMessage(hdlg&, IDC_LIST1, LB_GETSEL, count%,0) <> 0 Then
- dum% = SendDlgItemMessageLb(hdlg&,IDC_LIST1,LB_GETTEXT,count%,Buffer$)
- IF dum% <> LB_ERR Then
- 'print "File :"+Buffer$+" Will be deleted!"
- RemoveFile Buffer$, cmoNone
- else
- 'print "ERROR item "+str$(count%)+" ERROR#:"+str$(dum%)+" File :"+Buffer$+"!"
- END IF
- END IF
- NEXT
- 'print "Finished removing files"
- END IF
- ''Print "Finished doing delete of files"
-
- CASE "IDC_BACK"
-
- CASE "IDC_HELP"
- CASE "IDC_EXIT"
- END SELECT
- END SUB
-
- FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
- '** Purpose: Takes a list of directories and puts up an error message
- '** listing all the directories which have files in them.
- '** In Symbols:
- '** OUT symbols:
- '**
- '**
- '** Author: JYOTI KEDIA
- '** Arguments: list of directories
- '**
- '**
- '** Returns: TRUE
- '**
- '*************************************************************************
- DIM errstr$, n%, i%, dirname$, RC%, temp$, sz$
-
- DoesFileExistInDir = TRUE
- errstr$ = ""
- n% = GetListLength(dirlist$)
- for i% = 1 to n%
- dirname$ = GetListItem(dirlist$,i%)
- rc% = DoesDirExist(dirname$)
- If DoesDirExist(dirname$)Then
- temp$ = Lot_Dir(dirname$+"\*.*")
- if temp$ <> "" Then
- errstr$ = errstr$ + CHR$(10) + CHR$(10) + " " + dirname$
- end if
- end if
- Next
-
- if errstr$ <> "" Then
- sz$ = LdString(SID_DIR_NOT_EMPTY) + errstr$
- RC% = DoMsgBox(sz$,LdString(SID_TKT_STD_TITLE),MB_OKCANCEL + MB_ICONEXCLAMATION)
- if RC% <> 1 Then
- SetListItem "__LASTSTATUS",1,"Q"
- EXIT FUNCTION
- end if
- end if
-
- END FUNCTION
- '*************************************************************************
- '** FUNCTION GetNotesFromPath(network$)
- '** Purpose: Search for Notes on the users System.
- '** 1.) For V4 we can find the Notes program directory in the registry
- '** by looking for HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\NOTES\4.0 and
- '** retrieve the PATH entry.
- '** 2.) Search for a prior version of the notes ?strings.dll on the path
- '** 3.) Search for lotus.ini and see if Notes is located in it.
- '** 4.) Search the registry for Notes.
- '** For V3 search for the following registry key:
- '** "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
- '** If this key is found then search all the paths associated
- '** with this key for "Notes.ini".
- '** 5.) Search for notes.ini on the Path and/or in the windows\system dir or in Lotus.ini
- '**
- '** OUT symbols:
- '** gKitType$ = 1=Client, 2=Server.
- '** gNotesProg$ = Prior location of Notes executables.
- '** gNotesData$ = Prior location of Notes data files.
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '**
- '*************************************************************************
- FUNCTION GetNotesFromPath(network$)
- DIM NotesPath$ '** Location of Notes as returned from registry.
- DIM NotesFromPath$ '** Notes Program returned from Path Search for Notes.
- DIM NotesFromReg$ '** Notes Program from Registry Search for Notes.
- DIM NotesFromLotus$ '** Notes Program from Lotus.ini Search for Notes.
- DIM NotesIniFromWinDir$ '** Notes.ini returned from Windows directory Search for Notes.
- DIM NotesIniFromSessionMgr$ '** Notes.ini returned from V3 registry entry Search for Notes.
- DIM NotesIniFromPath$ '** Notes.ini returned from V3 registry entry Search for Notes.
- DIM NotesProgDirFromPartitioned$ '** Notes Program directory returned from Partitioned search.
- DIM NotesDataDirFromPartitioned$ '** Notes Data directoryreturned from Partitioned search.
-
- NotesFromReg$ = String(256,0)
-
- '' ON ERROR RESUME NEXT
-
- IF IsNotesInRegistry(NotesFromReg$) = TRUE THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Notes Program directory Via Registry :"+NotesFromReg$
- ELSE
- IF gDebugNotesFromPath = 1 THEN PRINT "Notes not found in registry"
- END IF
-
- IF IsNotesOnPath(NotesFromPath$) = TRUE THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Notes Program directory Via Path :"+NotesFromPath$
- ELSE
- IF gDebugNotesFromPath = 1 THEN PRINT "Notes not found on path"
- END IF
-
- IF IsNotesInLotusIni(NotesFromLotus$) = TRUE THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Notes Program directory Via Path :"+NotesFromLotus$
- ELSE
- IF gDebugNotesFromPath = 1 THEN PRINT "Notes not found in Lotus.ini"
- END IF
-
-
- IF IsNotesInSessMgr(NotesIniFromSessionMgr$) = TRUE THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Notes.ini using session manager setting in registry :"+NotesIniFromSessionMgr$
- ELSE
- IF gDebugNotesFromPath = 1 THEN PRINT "Notes.ini not found in Session Manager setting."
- END IF
-
-
- IF IsNotesIniOnPath(NotesIniFromPath$) = TRUE THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Notes.ini using PATH :"+NotesIniFromPath$
- ELSE
- IF gDebugNotesFromPath = 1 THEN PRINT "Notes.ini not found in PATH."
- END IF
-
- IF IsNotesIniInWinDir(NotesIniFromWinDir$) = TRUE THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Notes.ini in Windows directory :"+NotesIniFromWinDir$
- ELSE
- IF gDebugNotesFromPath = 1 THEN PRINT "Notes.ini not found Windows directory."
- END IF
-
-
- '** Now Find out if the is a Partitioned Server Install.
- '**
- '**
- IF IsPartitonedInstall(NotesProgDirFromPartitioned$, NotesDataDirFromPartitioned$) = TRUE THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Partitioned Program Dir :"+NotesProgDirFromPartitioned$
- IF gDebugNotesFromPath = 1 THEN PRINT "Found Partitioned Data Dir :"+NotesDataDirFromPartitioned$
- gPartitionsInstalled% = 1
- gPartitioned% = 1
- ELSE
- IF gDebugNotesFromPath = 1 THEN PRINT "Partitions are not installed. (YET)."
- gPartitioned% = 0
- gPartitionsInstalled% = 0
- END IF
-
- '** if the Registry and the path agree to the location of the Notes program dir then
- '** set gNotesProg to This value. If it doesn't then set gNotesProg to the directory
- '** found using the path search.
-
- '** Figure out what to do with the information we just gathered
-
- IF NotesFromPath <> "" THEN
- IF NotesFromReg$ = NotesFromPath$ THEN
- gNotesProg$ = NotesFromReg$
- ELSE
- gNotesProg$ = NotesFromPath$ '** NOTE the path ALWAYS wins.
- END IF
- ELSEIF NotesFromReg$ <> "" THEN
- gNotesProg$ = NotesFromReg$
- ELSEIF NotesFromLotus$ <> "" THEN
- gNotesProg$ = NotesFromLotus$
- ELSE
- gNotesProg$ = ""
- END IF
-
- IF NotesIniFromSessionMgr$ = NotesIniFromPath$ THEN
- gNotesIni$ = NotesIniFromSessionMgr$
- ELSE
- gNotesIni$ = NotesIniFromPath$ '** NOTE the path ALWAYS wins.
- END IF
-
- IF NotesIniFromPath$ <> "" THEN
- IF ValidateIni(NotesIniFromPath$) = TRUE THEN
- gNotesIni$ = NotesIniFromPath
- ELSE
- gNotesIni$ = ""
- END IF
- END IF
-
- '** if this is a node install then the program directory is the same as
- '** the data directory.
- IF network$ = gNODE$ THEN gNotesProg$ = gNotesData$
- SetSymbolValue SYM_BASEDIR$, gNotesProg$
- IF gNotesProg$ <> "" OR gNotesData$ <> "" Then
- gPreviousNotesInstalled% = 1
- END IF
-
-
-
-
-
-
- '** While we are here lets also find out the Type of install (e.g KitType) and
- '** the NotesData Directory.
- IF gNotesIni$ <> "" THEN
- IF gDebugNotesFromPath = 1 THEN PRINT "gNotesIni Found in OS system path "+gNotesIni$
- gKitType$ = LCASE$(GetIniKeyString(gNotesIni$,"NOTES","KitType"))
- IF gDebugNotesFromPath = 1 THEN PRINT "gKitType Found in OS system path "+gKitType
- gNotesData$ = LCASE$(GetIniKeyString(gNotesIni$,"NOTES","Directory"))
- IF gDebugNotesFromPath = 1 THEN PRINT "gNotesData Found in OS system path "+gNotesData$
- END IF
-
- '** If this is a partitioned server then ALWAYS do this.
- IF (gPartitioned% = 1) THEN
- gNotesProg$ = NotesDataDirFromPartitioned$
- gNotesData$ = NotesDataDirFromPartitioned$
- gNotesPartitionedProg$ = NotesProgDirFromPartitioned$
- END IF
-
- END FUNCTION
-
- FUNCTION GetObsoleteFiles(direction$) AS STRING
- '** Purpose: Read through all the file sections listed in the file
- '** "obsolete.nam" if the file exists add it to the list
- '** of files to be deleted or if the section being read is
- '** part of the auto delete section then delete each file
- '** as we check for it's existance. If the section was not
- '** part of the auto delete section then after processing
- '** the whole section display a list box with all the files
- '** found and allow the user the choice of deleteing the
- '** files listed.
- '**
- '** OUT symbols: Direction$
- '**
- '** Author: Michael Clark
- '**
- '**
- '*************************************************************************
- DIM Obsolete$ '** File name of obsolete file list.
- DIM FileNumber% '** File Handle.
- DIM Buffer$ '** Line Buffer.
- DIM Title$ '** Title of group being processed.
- DIM FileName$ '** Name of file to be deleted.
- DIM ItemsInGroup% '** Number of items in the current group.
- DIM LineType% '** Type of line being processed (See GetLine Function)
- DIM ChapterName$ '** Chapter number that the file belongs to.
- DIM DisplayGroup% '** 1 = Do Display group, 0 = Don't display group
- DIM RCDialog$ '** Return from Dialog (indicates direction)
-
- DIM InGroup%, LineLength%
- DIM tmp$, notused%
- DIM FoundStr%, FoundStr1%, Found%
-
- '** Default selection of "go to next" .
- GetObsoleteFiles = gNEXT
-
- GetObsoleteFiles = direction$
- '** In the backwards case, keep backing up
- If direction$ = gBACK Then
- EXIT FUNCTION
- END IF
-
- InGroup% = 0 '** 0 - Not in group of files to be deleted (DEFAULT)
- '** 1 - in group of files to be deleted
- ItemsInGroup% = 1 '** Number of items in group
- LineType%=0 '** Current switch selector
- DisplayGroup% = 0 '** Default to Don't display group.
-
- '** Get the location of the obsolete files list
- Obsolete$ = MakePath (GetSymbolValue(SYM_STF_CWDDIR$), OBSFILE$)
-
- AddListItem SYM_UPDATELIST$, "IDC_LIST1"
-
- '** Allocate a file handle
- FileNumber = FREEFILE()
- OPEN Obsolete$ FOR INPUT as FileNumber%
-
- DO
- '** Read a line of text, and get the type of line we are processing.
- '** SEE GetLine for types of lines processed.
- LineType% = GetLine(FileNumber%,Buffer$)
-
- SELECT CASE LineType%
- CASE 1 '** End of file found.
- IF gDebugGetObs% = 1 THEN PRINT "Processing LineType"
- '** Find out if we were in a group and if we were the process the files
- '** otherwise do nothing.
- IF InGroup = 1 THEN
- '** If the group has files in it's list and we are supposed to display
- '** the files then do so here.
- IF ItemsInGroup > 1 AND DisplayGroup = 1 THEN
- '** Register the callback and bring up the dialog.
- notused% = RegisterCallback("NOT", "REMOVEOLDFILESCB")
- RCDialog$ = PopupModalDlg(DBM_DELETELISTBOX, DBM_DELETELISTBOX)
- IF RCDialog$ = gBACK Then
- GetObsoleteFiles = gBACK
- Close(FileNumber%)
- EXIT FUNCTION '** User elected to go back to last dialog.
- END IF
- '** I think here we should be deleteing the files, but I'll come back to this later.
- END IF
- '** Reset to not display group
- DisplayGroup = 0
- END IF
-
- CASE 2 '** Comment or whitespace
- if gDebugGetObs% = 1 THEN PRINT "Processing Comment"
- ''** Don't do anything just skip the line.
-
- CASE 3 '** Start of a new section.
- IF InGroup = 1 THEN '** This is a new group so display the old stuff.
- if gDebugGetObs% = 1 THEN PRINT "Processing a new section"
-
- '** If we are comming from an old group to a new group then
- '** be sure to process the last group.
- IF ItemsInGroup > 1 AND DisplayGroup = 1 THEN
- if gDebugGetObs% = 1 THEN PRINT "Processing a new section, so cleaning up the last section."
- '** Register the callback and bring up the dialog.
- notused% = RegisterCallback("NOT", "REMOVEOLDFILESCB")
- RCDialog$ = PopupModalDlg(DBM_DELETELISTBOX, DBM_DELETELISTBOX)
- IF RCDialog$ = gBACK Then
- GetObsoleteFiles = gBACK
- Close(FileNumber%)
- EXIT FUNCTION '** User elected to go back to last dialog.
- END IF
- '** I think here we should be deleteing the files, but I'll come back to this later.
- END IF
-
- '** Reset to not display group
- DisplayGroup = 0
- END IF
-
- '** Find out if this is the start of a new section or the end of an old section.
- FoundStr% = INSTR(1,LCASE$(Buffer$), SECTIONSTART)
- if (FoundStr% <> 0) THEN
- FoundStr1% = INSTR(1,LCASE$(Buffer$), SECTIONEND)
- if (FoundStr% <> 0) THEN
- Title$ = MID$(Buffer$, (FoundStr% + 1), (FoundStr1% - FoundStr% - 1))
- gDeleteDialogText$ = Title$
- tmp$ = MID$(Buffer$, 2, 1)
- IF tmp$ <> "*" THEN DisplayGroup% = 1
- ''IF tmp$ = "*" THEN PRINT "Won't be showing Group !"+Title
- ''IF tmp$ <> "*" THEN PRINT "Will be showing Group !"+Title
-
- End IF
- END IF
- ItemsInGroup% = 1
- InGroup=1
-
- CASE 4 '** Normal line of text.
- FoundStr = INSTR(1,LCASE$(Buffer$),SEPERATOR) '' Search line for seperator
- IF FoundStr% <> 0 Then
- LineLength% = LEN(Buffer$)
- FileName$ = LEFT$(Buffer$,FoundStr% - 1)
- ChapterName$ = RIGHT$(Buffer$,LineLength - (FoundStr%))
- FileName$ = Lot_GetChapterValStr(ChapterName$,F_DESTDIR)+FileName$
- Found% = DoesFileExist(FileName$,0)
-
- IF Found% <> 0 Then
- '** We need to check here if the group is on of the groups currently
- '** selected for install. If not then we should not delete these files.
- IF Lot_GetChapterValInt(ChapterName$,F_DISPLAY) = VISIBLE AND _
- Lot_GetChapterValInt(ChapterName$,F_INOROUT) = INLIST THEN
-
- SetListItem "IDC_LIST1", ItemsInGroup%, FileName$
- AddListItem SYM_UPDATELIST$, "IDC_LIST1"
- ItemsInGroup% = ItemsInGroup% + 1
- IF DisplayGroup = 0 AND gDebugGetObs% = 1 THEN PRINT "Removing File :"+FileName$
- IF DisplayGroup = 0 THEN RemoveFile FileName$, cmoNone
- IF DisplayGroup = 1 AND gDebugGetObs% = 1 THEN Print "Processing file: "FileName$
- END IF
- END IF
- ELSE
- IF LENB(Buffer$) <> 0 THEN
- notused% = DoMsgBox("File "+OBSFILE+" Error on: "+Buffer$, "not.lso", MB_OK)
- END IF
- END IF
-
- CASE Else
- IF gDebugGetObs% = 1 THEN PRINT "Doing Default"
-
- End Select
- LOOP UNTIL LineType% = 1
- CLOSE(FileNumber%)
- End Function
-
- FUNCTION GetLine(File%,buffer$) AS INTEGER
- '** Purpose: Read in a new line from file and determine the format of
- '** the line.
- '**
- '** OUT symbols: GetLine = 1; End of file found.
- '** GetLine = 2; Line is a comment.
- '** GetLine = 3; Line is start of new section.
- '** GetLine = 4; Normal line of text.
- '** IDC_TEXT is the group description.
- '** In Symbols: File% - File handle
- '** buffer$ - To return string.
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '**
- '*************************************************************************
-
- LINE INPUT #File%, buffer$
-
- if EOF(File%) Then
- GetLine = 1
- ElseIf (Left$(buffer$,1) = COMMENT) Then
- GetLine = 2
- ElseIf (Left$(buffer$,1) = SECTIONSTART) Then
- GetLine = 3
- Else
- GetLine = 4
- END IF
- End Function
-
- PUBLIC FUNCTION SERVERSWITCH(Chapter$,fInCopy%) AS INTEGER
- DIM notused%
-
- IF Lot_GetChapterValInt(Chapter$,F_INOROUT) = INLIST THEN
- '** If the user Turned On the Server be sure that the Program file are selected.
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESPROGRAM"),F_INOROUT,INLIST)
- gKitType = "2"
- ELSE
- '** If the user Turned Off the Server be sure that the Program file are de-selected.
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("NOTESPROGRAM"),OUTOFLIST)
- gKitType$ = "1"
- END IF
-
- ServerSwitch = SUCCESS
- END FUNCTION
-
- PUBLIC FUNCTION AUTOLOGONSWITCH(Chapter$,fInCopy%) AS INTEGER
- DIM dum%
- IF fInCopy% = 1 THEN
- IF GetSymbolValue(SYM_AUTOMATIONINST$) = gFALSE$ THEN
- dum% = DoMsgBox("If you are selecting to install Notes Single Password Logon, be sure you are the Administrator of this system.","WARNING",MB_OK)
- END IF
- END IF
- AUTOLOGONSWITCH = SUCCESS
- END FUNCTION
-
- PUBLIC FUNCTION NTUSERSYNC(Chapter$,fInCopy%) AS INTEGER
- DIM dum%
- IF fInCopy% = 1 THEN
- IF GetSymbolValue(SYM_AUTOMATIONINST$) = gFALSE$ THEN
- dum% = DoMsgBox("If you are selecting to install NT User synchronization, be sure you are the Administrator of this system.","WARNING",MB_OK)
- END IF
- END IF
- NTUSERSYNC = SUCCESS
- END FUNCTION
-
- PUBLIC FUNCTION PDATASWITCH(Chapter$,fInCopy%) AS INTEGER
- DIM TmpChapter$, dum%
-
- IF Lot_GetChapterValInt(Chapter$,F_INOROUT) = 1 THEN
-
- '** Turn on Notes.ini Section
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESSMI")
- dum% = Lot_SetChapterFilesInCopyListInOrOut(TmpChapter$ ,1)
-
- '** Turn on CTL3DNT files.
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESPROGRAMWIN95")
- dum% = Lot_SetChapterFilesInCopyListInOrOut(TmpChapter$ ,1)
-
- '** Turn on CTL3DNT files.
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESPROGRAMWINNT")
- dum% = Lot_SetChapterFilesInCopyListInOrOut(TmpChapter$ ,1)
-
- ELSE
-
- '** Turn off Notes.ini Section
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESSMI")
- dum% = Lot_SetChapterFilesInCopyListInOrOut(TmpChapter$ ,0)
-
- '** Turn off CTL3DNT files.
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESPROGRAMWIN95")
- dum% = Lot_SetChapterFilesInCopyListInOrOut(TmpChapter$ ,0)
-
- '** Turn off CTL3DNT files.
- TmpChapter$ = Lot_GetChapterFromKeyWord("NOTESPROGRAMWINNT")
- dum% = Lot_SetChapterFilesInCopyListInOrOut(TmpChapter$ ,0)
-
- END IF
- PDATASWITCH = SUCCESS
-
- END FUNCTION
-
- PUBLIC FUNCTION PROGSWITCH(Chapter$,fInCopy%) AS INTEGER
- DIM TmpChapter$, dum%
-
- '** Turn on Notes.ini Section
- IF gNotesIni$ <> "" THEN
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because gNotesIni$ is not blank and the user turned off the Notes program seciton"
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyWord("NOTESINI") ,OUTOFLIST)
- END IF
-
- IF Lot_GetChapterValInt(Chapter$,F_INOROUT) = 1 THEN
-
- '** Turn on Notes Program data
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyWord("NOTESPROGRAMDATA") ,INLIST)
-
- '** Turn on CTL3DNT files.
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyWord("NOTESPROGRAMWIN95") ,INLIST)
-
- '** Turn on CTL3DNT files.
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyWord("NOTESPROGRAMWINNT") ,INLIST)
-
- ELSE
- '** Turn off Notes Program data
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyWord("NOTESPROGRAMDATA") ,OUTOFLIST)
-
- '** Turn off CTL3DNT files.
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyWord("NOTESPROGRAMWIN95") ,OUTOFLIST)
-
- '** Turn off CTL3DNT files.
- dum% = Lot_SetChapterFilesInCopyListInOrOut(Lot_GetChapterFromKeyWord("NOTESPROGRAMWINNT") ,OUTOFLIST)
-
- END IF
- PROGSWITCH = SUCCESS
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION ADVANCEDSWITCH(Chapter$,fInCopy%) AS INTEGER
- '**
- '** Purpose: This is module display the Advanced server Lic. information.
- '** for Billing and Clusters.
- '** Author: Michael Clark
- '** Arguments: None
- '** Returns:
- '**
- '*************************************************************************
- PUBLIC FUNCTION ADVANCEDSWITCH(Chapter$,fInCopy%) AS INTEGER
- Dim WorkChapter$, dum%, direction$
-
- IF fInCopy% = 1 THEN '** User has selected to Install Advanced Services.
- direction$ = PopupModalDlg (DB_LICENCES, DB_LICENCES)
- IF direction$ = gBACK Then
- ADVANCEDSWITCH = FAILURE
- EXIT FUNCTION
- End IF
- END IF
- ADVANCEDSWITCH = SUCCESS
-
- END FUNCTION
- '*************************************************************************
- '** FUNCTION NETNOTESSWITCH(Chapter$,fInCopy%) AS INTEGER
- '**
- '** Purpose: This function sets up for a Partioned Server Install
- '**
- '** Author: Michael Clark
- '** Arguments: Chapter - Chapter being processed
- '** fInCopy - 1 Chapter is selected 2 Chapter is de-selected
- '** Returns: SUCCESS/FAILURE
- '**
- '*************************************************************************
- PUBLIC FUNCTION NETNOTESSWITCH(Chapter$,fInCopy%) AS INTEGER
- Dim WorkChapter$, dum%, direction$, notused%
- '** Get the chapter for Notes.ini so we can turn it off
- '** if we want.
-
- '** If the Partitioned Server hasn't been installed on this system
- '** then display the Lic. dialog. If the partitioned server has already
- '** been selected or this is a second install then don't show the lic.
- IF fInCopy% = 1 THEN '** User selected Item
- '** If the Partitioned server hasn't been installed Display Lic.
- IF gPartitioned = 0 THEN
- '** Show the user the Lic. Warning. DO this only on the First Install
- direction$ = PopupModalDlg (DB_LICENCES, DB_LICENCES)
-
- '** User has not excepted the lic aggrement so DON'T install
- '** this option.
- IF direction$ = gBACK Then '** User does not accept.
-
- '** Install standard Notes.ini file on if we have not found one already.
- IF gNotesIni$ <> "" THEN
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because the user did not accept the Lic. and we already have a notes.ini"
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESINI"),F_INOROUT,OUTOFLIST)
- ELSE
- if gDebugNotesIni = 1 THEN PRINT "Turning on notes.ini because the user did not accept the Lic. and we do not have a notes.ini"
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESINI"),F_INOROUT,INLIST)
- END IF
- '** Default setting for Server.
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESSERVER"),F_INOROUT,INLIST)
-
- '** Make Notes Advanced Services (Program files) selection de-selected
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("PARTITION"),F_INOROUT,OUTOFLIST)
-
- '** Make Notes Advanced Services (Program files) selection de-selected
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("ADVANCEDSERVICE"),F_INOROUT,OUTOFLIST)
-
- '** Make Notes Advanced Services (Program files) selection de-selected
- notused% = Lot_SetChapterFilesInCopyListInOrOut (Lot_GetChapterFromKeyword("ADVANCEDSERVICEDATA"),OUTOFLIST)
-
- gPartitioned% = 0
- if gDebugPartition = 1 THEN PRINT "Setting Partitons OFF because User doesn't agree."
- NETNOTESSWITCH = SUCCESS
- EXIT FUNCTION '** Because user doesn't agree to Lic.
-
- ELSE '** User excepts the Lic. so set for Partioned install.
- if gDebugPartition = 1 THEN PRINT "Setting Partitons ON because User agrees."
- gPartitioned% = 1
- '** Turn of install of Normal notes.ini in system dir.
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because of partitions have been selected"
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESINI"),F_INOROUT,OUTOFLIST)
- END IF
-
- ELSE
- '** gPartitioned is already on so don't display lic and
- '** set for another Partitioned Server install.
- if gDebugPartition = 1 THEN PRINT "Partitons are ON, so set up default selections."
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because gNotesIni$ because partitions"
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESINI"),F_INOROUT,OUTOFLIST)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESSERVER"),F_INOROUT,OUTOFLIST)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("ADVANCEDSERVICEDATA"),F_INOROUT,OUTOFLIST)
- gPartitioned% = 1
- END IF
-
- ELSE
- '** If this is a second partition install the user shouldn't be turning off
- '** any of the partition stuff
- '** User de-selected Partioned server so reset everything.
- '** keep in mind this is not the way to Install a Server or Client
- '** if you have already Installed a Partioned server.
- '** ADD User Warning for 4.51 !!!!!!
-
- if gDebugPartition = 1 THEN PRINT "If partitions were orignaly on the user shouldn't change this, it turns off gPatrtitioned."
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because gNotesIni$ is not blank"
- IF gNotesIni$ <> "" THEN
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because gNotesIni$ because partitions"
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESINI"),F_INOROUT,OUTOFLIST)
- ELSE
- if gDebugNotesIni = 1 THEN PRINT "Turning off notes.ini because gNotesIni$ because partitions"
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESINI"),F_INOROUT,INLIST)
- END IF
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("NOTESSERVER"),F_INOROUT,INLIST)
- notused% = Lot_SetChapterValInt (Lot_GetChapterFromKeyword("PARTITION"),F_INOROUT,OUTOFLIST)
-
- gPartitioned% = 0
- END IF
- NETNOTESSWITCH = SUCCESS
-
- END FUNCTION
-
- FUNCTION WriteNotesReg(prodno%) AS INTEGER
- '*************************************************************************
- '** FUNCTION WriteNotesReg(prodno%) AS INTEGER
- '**
- '** Purpose: To register a bunch of different things into the registry
- '**
- '** Author: Michael Clark (items to register by Jack Ozzie)
- '** Arguments: None
- '** Returns:
- '**
- '*************************************************************************
- DIM Pos%, Buffer AS STRING, Buffer1 AS STRING
- DIM NotesFile AS INTEGER, NotesFileTmp AS INTEGER, exepath$
- DIM ShellCommand$, ShellResult%, Buffer2$, Pos2%, notused%
- DIM RegKey$, RegValue$, ErrCode%, RegKeyId$, RegStatus&, Answer&
- DIM HKEYVAL&
- ON ERROR RESUME NEXT '** Allow error handeling
-
- IF gDebugWriteNotesReg% = 1 OR gDebugNotes% = 1 THEN PRINT "Notes Reg Called"
- '** Create the file names
- gNotesReg$ = MakePath (GetSymbolValue("NOTDIR"), "notesw32.reg")
- gNotesRegTmp$ = MakePath (GetSymbolValue("NOTDIR"), "notesw32.tmp")
-
- '** Get input file handle
- NotesFile = FREEFILE()
- OPEN gNotesReg$ FOR INPUT as NotesFile
-
- '** Get output file handle
- NotesFileTmp = FREEFILE()
- OPEN gNotesRegTmp$ FOR OUTPUT as NotesFileTmp
-
- exepath$ = Lot_WhereIsFeature(prodno%, "NOTESPROGRAM", LdString(SID_NOT_NOTES))
-
- DO WHILE NOT EOF(NotesFile)
- LINE INPUT #NotesFile, Buffer
- Pos% = instr(1, Buffer$, "%notesdir%")
- if Pos% > 0 Then
- '' We found a string now insert the paths to notes.
- Pos2% = LEN(Buffer$) - (Pos% + LEN("%notesdir%") - 1)
- Buffer1$ = LEFT$(Buffer$, Pos% - 1)
- Buffer2$ = RIGHT$(Buffer$, Pos2%)
-
- Buffer1$ = Buffer1$+exepath$+Buffer2$
- Print #NotesFileTmp, Buffer1$
- else
- Print #NotesFileTmp, Buffer$
- END IF
-
- LOOP
- CLOSE NotesFile%
- CLOSE NotesFileTmp%
-
- '** Get input file handle
- NotesFileTmp = FREEFILE()
- OPEN gNotesRegTmp$ FOR input as NotesFileTmp
- IF ErrCode <> 0 THEN PRINT "The error returned from Opening "+gNotesRegTmp$+" is "+STR$(ErrCode)
-
- DO WHILE NOT EOF(NotesFileTmp)
- LINE INPUT #NotesFileTmp, Buffer$
- Pos% = instr(1,Buffer$,"=")
- IF Pos% > 0 THEN
- Pos2% = LEN(Buffer$) - Pos% + 1
- RegKey$ = TRIM$(LEFT$(Buffer$, Pos% - 1))
- RegValue$ = TRIM$(RIGHT$(Buffer$, Pos2% - 1))
- Pos% = instr(1,RegKey,"\")
- RegKeyId$ = TRIM$(LEFT$(RegKey$, Pos% - 1))
- RegKey$ = TRIM$(RIGHT$(RegKey$, (LEN(RegKey$) - Pos%)))
- '** If the registration key already exist then don't try to create,
- '** just add the new value.
-
- SELECT CASE RegKeyId$
-
- CASE "HKEY_CLASSES_ROOT"
- HKEYVAL& = HKEY_CLASSES_ROOT
-
- CASE "HKEY_CURRENT)USER"
- HKEYVAL& = HKEY_CLASSES_ROOT
-
- CASE "HKEY_LOCAL_MACHINE"
- HKEYVAL& = HKEY_CLASSES_ROOT
-
- CASE "HKEY_USERS"
- HKEYVAL& = HKEY_CLASSES_ROOT
-
- CASE "HKEY_PERFORMANCE_DATA"
- HKEYVAL& = HKEY_CLASSES_ROOT
-
- CASE "HKEY_PERFORMANCE_TEXT"
- HKEYVAL& = HKEY_CLASSES_ROOT
-
- CASE "HKEY_PERFORMANCE_NLSTEXT"
- HKEYVAL& = HKEY_CLASSES_ROOT
- END SELECT
-
- '** Check to see if the key already exist.
- regStatus&= Lot_DoesRegKeyExistEx(HKEYVAL&, RegKey$)
- IF regStatus&= 1 THEN
- '** If the key already exist then add our value.
- regStatus&= Lot_createRegKeyValueEx(HKEYVAL&, RegKey$,"",REG_SZ,RegValue$, LEN(RegValue) + 1)
- regStatus&= Lot_RegisterObject("NOTESPROGRAM",UNIN_CLASS_REGISTRY_HIVE$,RegKeyId$+"\"+RegKey$)
- if gDebugWriteNotesReg% = 1 OR gDebugNotes% = 1 THEN PRINT " Modified registry with :"+RegKeyId$+RegKey$+"="+RegValue$
- ELSE
- '** Otherwise the key didnt' exist so we need to create it.
- regStatus&= Lot_RegCreateKeyEx(HKEYVAL&, RegKey$)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEYVAL&, RegKey$, "", REG_SZ, RegValue$, LEN(RegValue$) + 1)
- regStatus&= Lot_RegisterObject("NOTESPROGRAM",UNIN_CLASS_REGISTRY_HIVE$,RegKeyId$+"\"+RegKey$)
- if gDebugWriteNotesReg% = 1 OR gDebugNotes% = 1 THEN PRINT " Added registry with :"+RegKeyId$+RegKey$+"="+RegValue$
- END IF
- END IF
- LOOP
-
- CLOSE NotesFileTmp%
-
- ' notused% = Lot_RegisterObject("NOTESPROGRAM",UNIN_CLASS_FILE$,+GetListItem("NOTDIR",1) + "notesw32.reg")
- FILECOPY GetSymbolValue("NOTDIR")+"notesw32.tmp", GetSymbolValue("NOTDIR")+"notesw32.reg"
- KILL GetSymbolValue("NOTDIR")+"notesw32.tmp"
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION FUNCTION GetNotesPathFromLotusIni() AS String
- '**'** Purpose: Gets the product dir path from Lotus.ini file, and searches for
- '** notes.exe in the dir.
- '**
- '** Author: JYOTI KEDIA
- '** Arguments: None
- '** Returns: if notes.exe does not exist in dir specified in lotus.ini, it
- '** returns "", otherwise returns the full path to the product.
- '*************************************************************************
- FUNCTION GetNotesPathFromLotusIni() AS String
- DIM DestDir$, lotusinipath$, defdir$, temp%, proddir$, fullpath$, rv%
-
- DestDir$ = GetWindowsDir()
- lotusinipath$ = MakePath(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
- rv% = Lot_CleanPath(fullpath$)
- GetNotesPathfromLotusIni = fullpath$
- EXIT FUNCTION
- end if
- end if
- end if
- end if
- end if
-
- GetNotesPathfromLotusIni = ""
-
- END FUNCTION
-
- '*************************************************************************
- '** SUB WriteMAPIRegForNOT(network$, prodno%)
- '**
- '** Purpose: This function writes OLE registration needed
- '** Author: Michael Clark
- '** Arguments:
- '** Returns: SUCCESS
- '*************************************************************************
-
- SUB WriteMAPIRegForNOT(network$, prodno%)
- DIM DestDir$, Found%
-
- '** Get the location of the Windows System Directory. Keep in mind that if this is
- '** a shared install i.e. W95 system files reside on a READ-ONLY file server then
- '** the WINSYSDIR symbol in CIT will be set to the users Local Win dir.
-
- DestDir$ = MakePath (GetSymbolValue("WINSYSDIR"), "mapisvc.inf")
- if gDebugWriteMapi = 1 THEN PRINT "The destination dir for MAPI is :"+DestDir$
- found% = DoesFileExist(DestDir$, 0)
- IF Found = 1 Then
- GOTO WriteFile
- ELSE
- DestDir$ = MakePath (GetSymbolValue("WINSYSDIR"), "notespis.inf")
- END IF
- WriteFile:
- CreateIniKeyValue DestDir$, "Services", "NOTES", "Lotus Notes Mail", cmoOverwrite
-
- CreateIniKeyValue DestDir$, "NOTES", "PR_SERVICE_DLL_NAME", "nwnsp.dll", cmoOverwrite
- CreateIniKeyValue DestDir$, "NOTES", "PR_SERVICE_SUPPORT_FILES", "nwnsp.dll", cmoOverwrite
- CreateIniKeyValue DestDir$, "NOTES", "PR_SERVICE_DELETE_FILES", "nwnsp.dll", cmoOverwrite
- CreateIniKeyValue DestDir$, "NOTES", "PR_SERVICE_ENTRY_NAME", "ServiceEntry", cmoOverwrite
- CreateIniKeyValue DestDir$, "NOTES", "Providers", "NAB,NMS,NXP", cmoOverwrite
- CreateIniKeyValue DestDir$, "NOTES", "WIZARD_ENTRY_NAME", "ServiceWizard", cmoOverwrite
- CreateIniKeyValue DestDir$, "NOTES", "PR_RESOURCE_FLAGS", "SERVICE_SINGLE_COPY|SERVICE_PRIMARY_IDENTITY", cmoOverwrite
-
- CreateIniKeyValue DestDir$, "NAB", "PR_PROVIDER_DLL_NAME", "nwnsp.dll", cmoOverwrite
- CreateIniKeyValue DestDir$, "NAB", "PR_RESOURCE_TYPE", "MAPI_AB_PROVIDER", cmoOverwrite
- CreateIniKeyValue DestDir$, "NAB", "PR_DISPLAY_NAME", "Lotus Notes Address Book", cmoOverwrite
- CreateIniKeyValue DestDir$, "NAB", "PR_PROVIDER_DISPLAY", "Lotus Notes Address Book", cmoOverwrite
- CreateIniKeyValue DestDir$, "NAB", "PR_RESOURCE_FLAGS", "STATUS_PRIMARY_IDENTITY", cmoOverwrite
-
- CreateIniKeyValue DestDir$, "NMS", "PR_PROVIDER_DLL_NAME", "nwnsp.dll", cmoOverwrite
- CreateIniKeyValue DestDir$, "NMS", "PR_RESOURCE_TYPE", "MAPI_STORE_PROVIDER", cmoOverwrite
- CreateIniKeyValue DestDir$, "NMS", "PR_RESOURCE_FLAGS", "STATUS_PRIMARY_IDENTITY|STATUS_DEFAULT_STORE", cmoOverwrite
- CreateIniKeyValue DestDir$, "NMS", "PR_PROVIDER_DISPLAY", "Lotus Notes Message Store", cmoOverwrite
- CreateIniKeyValue DestDir$, "NMS", "PR_DISPLAY_NAME", "Lotus Notes Message Store", cmoOverwrite
- CreateIniKeyValue DestDir$, "NMS", "PR_MDB_PROVIDER", "395d475fecf1cd1193dc5aab3C478538", cmoOverwrite
-
- CreateIniKeyValue DestDir$, "NXP", "PR_PROVIDER_DLL_NAME", "nwnsp.dll", cmoOverwrite
- CreateIniKeyValue DestDir$, "NXP", "PR_RESOURCE_TYPE", "MAPI_TRANSPORT_PROVIDER", cmoOverwrite
- CreateIniKeyValue DestDir$, "NXP", "PR_RESOURCE_FLAGS", "STATUS_PRIMARY_IDENTITY", cmoOverwrite
- CreateIniKeyValue DestDir$, "NXP", "PR_PROVIDER_DISPLAY", "Lotus Notes Transport", cmoOverwrite
- CreateIniKeyValue DestDir$, "NXP", "PR_DISPLAY_NAME", "Lotus Notes Transport", cmoOverwrite
- END SUB
-
-
- '*************************************************************************
- '** PUBLIC FUNCTION InitLanguageNOT (prodno%, network$, direction$)
- '** Purpose: Finds out the installed languages and determines the nature
- '** of the install. If not running automated, displays a message box for
- '** a reinstall or language install, for an upgrade, just continues
- '**
- '** Author: JMDonohue
- '** Arguments: (Not used -- to conform to product function spec)
- '** Returns: Install kind string
- '**
- '** Sets the following global symbols for later processing:
- '** SYM_INSTALLKIND$
- '** SYM_REG_PRODUCTNAME$
- '** SYM_REG_PRODUCTVER$
- '*************************************************************************
- PUBLIC FUNCTION InitLanguageNOT (prodno%, network$, direction$) AS STRING
- DIM szProductName$, szProductVersion$, szInstallKind$, szLanguageSubdir$
- szProductName$ = LdString(SID_NOT_NOTES_NAME)
- szProductVersion$ = LdString(SID_NOT_CURRENT_VERSION)
- if prodno% = 1 THEN
- SetSymbolValue SYM_REG_PRODUCTNAME$ , szProductName$
- SetSymbolValue SYM_REG_PRODUCTVER$ , szProductVersion$
- END IF
- InitLanguages szProductName$, szProductVersion$, prodno%
- InitLanguageNOT = ""
- END FUNCTION
- SUB NOT_RegisterSharedComponent(Key$, FileName$, Version$)
- '*************************************************************************
- '** Purpose: This product routines registers the shared component for the
- '** product and writes an entry in cinstall.ini for uninstall
- '**
- '** IN SYMBOLS handle to dialog, Control ID, Class, Instance
- '**
- '** Author: Michael Natsis (stolen from flw.lss by JMD)
- '** Arguments:
- '** Key$ Shared section keyword, "WIN32SHRSMARTICONPRG", e.g.
- '** FileName$ Name of shared component, "Icon Palette", e.g.
- '** Version$ Version of shared component, "6.0", e.g.
- '**
- '*************************************************************************
- DIM szProductName$, szProductVersion$, RegKeyName$
-
- szProductName$ = LdString(SID_NOT_NOTES_NAME)
- szProductVersion$ = LdString(SID_NOT_CURRENT_VERSION)
-
- IF Lot_IsTheFeatureInstalled(Key$) <> FALSE THEN
- RegKeyName$ = gREGLOTUS + szProductName$ + "\" + szProductVersion$ + _
- "\Components\" + FileName$ + "\" + Version$
- Lot_RegCreateKeyEx HKEY_LOCAL_MACHINE, RegKeyName$
- Lot_RegisterObject Key$, UNIN_CLASS_REGISTRY_KEY$, gHLM$ + "\" + RegKeyName$
- END IF
-
- END SUB
- FUNCTION WritePartionedinfo(prodno%, network$) AS INTEGER
- '*************************************************************************
- '** Purpose: This function get called every time an Partioned server is installed
- '** It will open the file vserver.ncf if it exist and increment
- '** the instance of the server. If the file doesn't exist it will
- '** be created and the instance of the server will be set to ONE.
- '**
- '** IN SYMBOLS prodno%, network%
- '**
- '** Author: Michael Clark
- '**
- '** Returns: Instance of the server as an integer.
- '**
- '**
- '*************************************************************************
- DIM lpBuf$, regStatus&, szKey$, InstanceLen&, Instance%, Tmp$, szkey2$
-
- lpBuf$ = String(256,0)
- InstanceLen& = CLNG(128)
- szKey$ = gREGLOTUS+GetSymbolValue(SYM_REG_PRODUCTNAME$)+"\VSERVER"
-
- '** Find out if VSERVER is already installed.
- if gDebugPartionedNotesIni% = 1 THEN PRINT "Checking existance of :"+szKey$
- regStatus&= Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$)
-
- if regStatus&= 1 then
- '** VSERVER is installed so retrieve the previous values.
- '** INSTANCE
- regStatus&= Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "INSTANCE", REG_SZ, lpBuf$, InstanceLen&)
- Instance% = VAL(lpBuf$)
-
- '** Increment the INSTANCE
- if gDebugPartionedNotesIni% = 1 THEN PRINT szKey$+" Value is :"+STR$(Instance%)
- IF (Instance% <=99) THEN
- Instance% = Instance% + 1
- END IF
- if gDebugPartionedNotesIni% = 1 THEN PRINT "The next instance is :"STR$(Instance%)
- WritePartionedInfo = Instance%
- gInstance% = Instance
-
- '** Update the registry with the new INSTANCE.
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "INSTANCE", REG_SZ, MID$(NULLTRIM(STR$(Instance%)),2,LEN(STR$(Instance%))) ,LEN(STR$(Instance%)))
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_NOTES, gHLM$+"\"+szKey$,"",""
- END IF
-
- '** Make a registry entry for the for the data directory using the instance
- szkey2$ = szKey$+"\"+"1"
- regStatus&= Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szkey2$)
- regStatus&= Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey2$,"CLIENT"+MID$(NULLTRIM(STR$(Instance%)),2,LEN(STR$(Instance%))), REG_SZ, GetSymbolValue("NOTWORKDIR") ,LEN(GetSymbolValue("NOTWORKDIR")) + 1)
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_NOTES, gHLM$+"\"+szKey$,"",""
- END IF
-
- ELSE
- '** Key Didn't exist so create the key and set the intital values.
- IF gDebugPartionedNOtesIni = 1 THEN PRINT "RegStatus for vserver is not 1"
- regStatus& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKey$)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "PATH", REG_SZ, GetSymbolValue("NOTDIR"), LEN(GetSymbolValue("NOTDIR")) + 1)
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "INSTANCE", REG_SZ, "1" ,LEN("1") + 1)
-
- '** Enter Each instance of the client directory
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "CLIENT", REG_SZ, GetSymbolValue("NOTWORKDIR") ,LEN(GetSymbolValue("NOTWORKDIR")) + 1)
- WritePartionedinfo = 1
- gInstance% = 1
-
- '** Make a registry entry for the for the data directory using the instance
- regStatus&= Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKey$+"\"+"1")
- Tmp$= MID$(NULLTRIM(STR$(gInstance%)),2,LEN(NULLTRIM(STR$(gInstance%))))
- regStatus&= regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$+"\"+"1", "1"+Tmp$, REG_SZ, GetSymbolValue("NOTWORKDIR") ,LEN(GetSymbolValue("NOTWORKDIR")) + 1)
- IF regStatus& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_NOTES, gHLM$+"\"+szKey$,"",""
- END IF
-
- END IF
- END FUNCTION
-
- PUBLIC FUNCTION PartionedCmdProc(instance%) AS INTEGER
- DIM Buffer$, Partionedcmd$, FileNum as INTEGER
- ON ERROR RESUME NEXT
-
- Partionedcmd = MakePath(GetSymbolValue("NOTWORKDIR"), "nserve.bat")
- IF DoesFileExist(Partionedcmd$, 0) = 0 THEN
- if gDebugPartionedNotesIni% = 1 THEN PRINT "Createing Batch procedure "+Partionedcmd$
- FileNum = FREEFILE()
- Buffer$ = Lot_TrimEndSlash(NULLTRIM(gNotesPartitionedProg$))+"\"+LdString(SID_NOT_SERVER)+" ="+Lot_TrimEndSlash(GetSymbolvalue("NOTWORKDIR"))+"\notes.ini"
- OPEN Partionedcmd FOR OUTPUT As FileNum
- PRINT #FileNum, "Set NOTESPARTITION="+MID$(STR$(instance%),2,LEN(STR$(instance%)))
- PRINT #FileNum, "Start "Buffer$
- Close (FileNum%)
- END IF
-
- Partionedcmd = MakePath(GetSymbolValue("NOTWORKDIR"), "nclient.bat")
- IF DoesFileExist(Partionedcmd$, 0) = 0 THEN
- if gDebugPartionedNotesIni% = 1 THEN PRINT "Createing Batch procedure "+Partionedcmd$
- FileNum = FREEFILE()
- Buffer$ = Lot_TrimEndSlash(NULLTRIM(gNotesPartitionedProg$))+"\"+LdString(SID_NOT_NOTES)+" ="+Lot_TrimEndSlash(GetSymbolvalue("NOTWORKDIR"))+"\notes.ini"
- OPEN Partionedcmd FOR OUTPUT As FileNum
- PRINT #FileNum, "Set NOTESPARTITION="MID$(STR$(instance%),2,LEN(STR$(instance%)))
- PRINT #FileNum, "start "Buffer$
- Close (FileNum%)
- END IF
- END FUNCTION
-
-
- FUNCTION ReadInf(direction$) AS INTEGER
- DIM InGroup%, LineType%, gNotesInf$, FileNumber%, Buffer$, Section$
- DIM LineLength%, KeyValue$, KeyName$, FoundStr%, FoundStr1%, Buffer1$
- DIM Buffer2$, Pos%, Pos2%
-
- InGroup% = 0 '** 0 - Not in group, 1 - in group
- LineType%=0 '** Current switch selector
-
- gNotesInf$ = MakePath (GetSymbolValue("WINSYSDIR"), "notespis.inf")
- FileNumber = FREEFILE()
- OPEN gNotesInf$ FOR INPUT as FileNumber%
-
- Do
- LineType% = GetLine(FileNumber%,Buffer$)
-
- Select Case LineType%
- CASE 1
- Section$ = Buffer$
- if gDebugReadInf% = 1 THEN PRINT "1 Current Section is :"+Buffer
-
- CASE 2 '** Comment or whitespace
- ''** Don't do anything just skip the line.
-
- CASE 3 ''** Start of a new section.
- FoundStr% = INSTR(1,LCASE$(Buffer$), SECTIONSTART)
- if (FoundStr% <> 0) THEN
- FoundStr1% = INSTR(1,LCASE$(Buffer$), SECTIONEND)
- if (FoundStr% <> 0) THEN
- Section$ = MID$(Buffer$, (FoundStr% + 1), (FoundStr1% - FoundStr% - 1))
- if gDebugReadInf% = 1 THEN PRINT "3 Current Section is :"+Section$
- END IF
- END IF
-
- InGroup=1
-
- CASE 4
- FoundStr = INSTR(1,LCASE$(Buffer$),SEPERATOR) '' Search line for seperator
- IF FoundStr% <> 0 THEN
- LineLength% = LEN(Buffer$)
- KeyName$ = LEFT$(Buffer$,FoundStr% - 1)
- KeyValue$ = RIGHT$(Buffer$,LineLength - (FoundStr%))
- if gDebugReadInf% = 1 THEN PRINT "KeyName is :"+KeyName$
- if gDebugReadInf% = 1 THEN PRINT "KeyValue is :"+KeyValue$
-
- Pos% = instr(1, KeyValue$, "%notesdir%")
- if Pos% > 0 Then
- '' We found a string now insert the paths to notes.
- Pos2% = LEN(KeyValue$) - (Pos% + LEN("%notesdir%") - 1)
- Buffer1$ = LEFT$(KeyValue$, Pos% - 1)
- Buffer2$ = RIGHT$(KeyValue$, Pos2%)
-
- Buffer1$ = Buffer1$+GetListItem("NOTDIR",1)+Buffer2$
- if gDebugReadInf% = 1 THEN PRINT "inf File entry is :"+KeyName$+" = "+Buffer2$
- else
- if gDebugReadInf% = 1 THEN PRINT "inf File entry is :"+KeyName$+" = "+KeyValue$
- END IF
- END IF
- CASE Else
-
- End Select
- LOOP UNTIL LineType% = 1
- Close(FileNumber%)
- End Function
- '*************************************************************************
- '** Purpose: This function return the location of a given file
- '**
- '** IN SYMBOLS Path$, FileName$
- '**
- '** Author: Michael Clark
- '**
- '** Returns: Path of FileName or "" if not found
- '**
- '**
- '*************************************************************************
- FUNCTION DoesFileExistOnPath (Path$, FileName$) AS STRING
-
- DIM Str1$, StrLoc1%, EnvPos1%, EnvPos2%, LengthOfRemainingString%
- DIM LocString%, DUM%
- DIM SearchString$
- DIM TmpStr$, TmpStr1$, RemainingString$
- DIM SEPERATOR$
- DIM ENVCHAR$
- DIM StringLength%
-
- ENVCHAR$="%"
- SEPERATOR$=";"
-
- '** Chack to see if we even have a path
- IF Path$ = "" THEN Path$=GetEnvVariableValue("PATH")
-
- '** Trim off any traling spaces.
- Str1$ = RTRIM(path$)
- '** Get the strings current length.
- StringLength% = LEN(Str1$)
- IF gDebugDoesFileExistOnPath = 1 THEN Print "(DoesFileExistOnPath) Path variable returned :"+Str1$
- IF gDebugDoesFileExistOnPath = 1 THEN Print "Length of string is :"+STR$(StringLength)
-
- '** While the string length is not 0 search the string for individual
- '** paths to search for notes.ini.
- WHILE StringLength% <> 0
- IF gDebugDoesFileExistOnPath = 1 THEN Print "Next SearchString is: "+Str1$
-
- '** Find the seperator in the line.
- StrLoc1% = 0 '** NOTE. Strings start at one (1).
- StrLoc1% = INSTR(1, str1$, SEPERATOR)
-
- '** If we don't have a seperator then treat the remaining string
- '** as the current search string. The end result should be that
- '** SearchString is some valid path.
- IF StrLoc1% <> 0 THEN
-
- '** Handel the case of the first character being a SEPERATOR.
- IF StrLoc1% = 1 THEN
- '** Find the second SEPERATOR
- StrLoc1% = INSTR(2, str1$, SEPERATOR)
- IF gDebugDoesFileExistOnPath = 1 THEN Print "First character was a seperator in: "+Str1$
- IF gDebugDoesFileExistOnPath = 1 THEN Print "The next seperator is located at position: "+STR$(StrLoc1)
- '** Make sure we do not go past the end of line.
- IF StrLoc1% = 0 THEN
- LengthOfRemainingString = StrLoc1%
- StrLoc1% = LEN(str1$)
- IF gDebugDoesFileExistOnPath = 1 THEN Print "No trialing sepeartor was found so we used the string length of: "+STR$(StrLoc1)
- ELSE
- LengthOfRemainingString = LEN(str1$) - StrLoc1% - 2
- END IF
- SearchString$ = MID$(str1$, 2, StrLoc1% - 1)
- IF gDebugDoesFileExistOnPath = 1 THEN Print "Search String is: "+SearchString$
-
- ELSE
- '** otherwise copy the current string.
- SearchString$ = LEFT$(str1$, StrLoc1% - 1)
- LengthOfRemainingString = LEN(str1$) - StrLoc1% - 1
- END IF
- IF gDebugDoesFileExistOnPath = 1 THEN Print "The search String is: "+SearchString$
-
- '** Now save the remaining string and get the new length of the string.
- Str1$ = RIGHT$(str1$, LengthOfRemainingString + 1)
- StringLength% = LEN(str1$)
- IF gDebugDoesFileExistOnPath = 1 THEN Print "The Remaining String is :"+Str1$" With a length of :"+STR$(LengthOfRemainingString)
- ELSE
- '** No seperator was found in the current string so treate the
- '** string as the current path to search. And set teh remaining
- '** string length to zero.
- SearchString$ = Str1$
- StringLength% = 0
- IF gDebugDoesFileExistOnPath = 1 THEN Print "Seperator not found so the Search String is :"+SearchString$
- END IF
-
-
- '** Find out if the current search string has any environment variables.
- IF gDebugDoesFileExistOnPath = 1 THEN Print "Searching current string: "+SearchString$+" for environment variables"
- EnvPos1% = INSTR(1, SearchString, ENVCHAR)
- IF EnvPos1% <> 0 THEN '** Env char found
- EnvPos2% = INSTR(EnvPos1% + 1, SearchString, ENVCHAR)
- TmpStr$ = MID$(SearchString$, EnvPos1% + 1, EnvPos2% - 2)
- RemainingString$ = MID$(SearchString$, EnvPos2%+2, LEN(SearchString))
-
- IF gDebugDoesFileExistOnPath = 1 THEN PRINT "The un-translated environment variable is: "+TmpStr$
- TmpStr$ = Lot_TrimEndSlash(GetEnvVariableValue(TmpStr$))
- IF RemainingString <>"" THEN
- TmpStr$ = TmpStr$+"\"+RemainingString$
- ELSE
- TmpStr$ = TmpStr$+RemainingString$
- END IF
- IF gDebugDoesFileExistOnPath = 1 THEN PRINT "Environment variable found so search :"+TmpStr$+"\"+FileName$
- dum% = DoesFileExist(TmpStr$+"\"+FileName$,0)
- IF dum% = 1 THEN
- IF gDebugDoesFileExistOnPath = 1 THEN PRINT "Notes.ini found in :"+TmpStr$
- DoesFileExistOnPath = NULLTRIM(TmpStr$)
- EXIT FUNCTION
- END IF
- ELSE
- TmpStr1$=NULLTRIM(SearchString$)+"\"+FileName$
- IF gDebugDoesFileExistOnPath = 1 THEN PRINT "No enviorenment variable found so search for FileName :"SearchString$+"\"+FileName$
- dum% = DoesFileExist(TmpStr1$,0)
- IF dum% = 1 THEN
- IF gDebugDoesFileExistOnPath = 1 THEN PRINT "Notes.ini found in :"+TmpStr$
- DoesFileExistOnPath = NULLTRIM(SearchString$)
- EXIT FUNCTION
- END IF
- END IF
-
- WEND
- DoesFileExistOnPath = ""
- END FUNCTION
-
-
- '*************************************************************************
- '** FUNCTION IsNotesInRegistry(NotesPath$) As INTEGER
- '** Purpose: Search for Notes entry in the registry.
- '** For V4 we can find the Notes program directory in the registry
- '** by looking for HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\NOTES\4.0 and
- '** retrieve the PATH entry.
- '**
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesPath$ = location of Notes executables.
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '**
- '*************************************************************************
- FUNCTION IsNotesInRegistry(NotesFromRegPath$) As INTEGER
-
- DIM regStatus& '** Return status from registry calls.
- DIM szKey$ '** Registry key.
- DIM NotesFromRegLen& '** Length of string returned from registry.
- DIM SearchFile$ '**
-
- ON Error RESUME NEXT
- '****************************************************************
- '** Set Up the default key to search for and see if we can find it in the registry.
- '** HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\NOTES\SID_NOT_CURRENT_VERSION
- '** i.e.
- '** HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\NOTES\4.0
- '**
- '**
-
-
- '** Find out if the registry key for Notes is installed on this system.
- '** If the key is found, retrieve the executabel path from the PATH key word.
-
- szKey$ = gREGLOTUS+LdString(SID_NOT_NOTES_NAME)+"\"+LdString(SID_NOT_CURRENT_VERSION)
- IF gDebugNotesInRegistry% = 1 THEN PRINT "Search for key :"+szKey$
- regStatus& = Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szkey$)
-
- IF regStatus& = 1 THEN
- IF gDebugNotesInRegistry% = 1 THEN PRINT "Key found. regStatus is:"+STR$(regStatus&)" Retrieving Path Now"
- regStatus&= Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, _
- szKey$,_
- "PATH", _
- REG_SZ, _
- NotesFromRegPath$, _
- NotesFromRegLen&)
-
- '** Make sure the string is not NULL terminated.
- NotesFromRegPath$ = NULLTRIM(NotesFromRegPath$)
- IF gDebugNotesInRegistry% = 1 THEN PRINT "Path to Notes is:"+NotesFromRegPath$
-
- '** Validate the path we found and verify that the registry call was successful.
- '** Also verify that the user din't delete notes.
- '** if it is then set the global Notes directory to point to this directory,
- '** otherwise set it = "".
- SearchFile$ = Lot_TrimEndSlash(NotesFromRegPath$)+"\"+ANYVERSION
-
- IF (ValidatePath(NotesFromRegPath$) = FALSE) OR (DIR$(SearchFile$,0) = "") THEN
- NotesFromRegPath$ = ""
- IsNotesInRegistry% = FALSE
- END IF
- IsNotesInRegistry% = TRUE
- ELSE
- NotesFromRegPath$ = ""
- IsNotesInRegistry% = FALSE
- END IF
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION IsNotesDataInRegistry(NotesDataFromRegistry$) As INTEGER
- '** Purpose: Search for Notes entry in the registry.
- '** For V4 we can find the Notes program directory in the registry
- '** by looking for HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\NOTES\4.0 and
- '** retrieve the PATH entry.
- '**
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesPath$ = location of Notes executables.
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '**
- '*************************************************************************
- FUNCTION IsNotesDataInRegistry(NotesDataFromRegistry$) As INTEGER
-
- DIM regStatus& '** Return status from registry calls.
- DIM szKey$ '** Registry key.
- DIM NotesDataFromRegLen& '** Length of string returned from registry.
-
- '****************************************************************
- '** Set Up the default key to search for and see if we can find it in the registry.
- '** HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\NOTES\SID_NOT_CURRENT_VERSION
- '** i.e.
- '** HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\NOTES\4.0
- '**
- '**
-
-
- '** Find out if the registry key for Notes is installed on this system.
- '** If the key is found, retrieve the executabel path from the PATH key word.
-
- szKey$ = gREGLOTUS+LdString(SID_NOT_NOTES_NAME)+"\"+LdString(SID_NOT_CURRENT_VERSION)
- IF gDebugNotesInRegistry% = 1 THEN PRINT "Search for key :"+szKey$
- regStatus& = Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szkey$)
-
- IF regStatus& = 1 THEN
- IF gDebugNotesInRegistry% = 1 THEN PRINT "Key found. regStatus is:"+STR$(regStatus&)" Retrieving Path Now"
- regStatus&= Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, _
- szKey$,_
- "DATAPATH", _
- REG_SZ, _
- NotesDataFromRegistry$, _
- NotesDataFromRegLen&)
-
- '** Make sure the string is not NULL terminated.
- NotesDataFromRegistry$ = NULLTRIM(NotesDataFromRegistry$)
- IF gDebugNotesDataRegistry% = 1 THEN PRINT "Path to Notes is:"+NotesDataFromRegistry$
-
- '** Validate the path we found and verify that the registry call was successful.
- '** if it is then set the global Notes directory to point to this directory,
- '** otherwise set in the an empty string.
- IF ValidatePath(Lot_TrimEndSlash(NotesDataFromRegistry$)) = FALSE THEN
- NotesDataFromRegistry$ = ""
- IsNotesDataInRegistry% = FALSE
- END IF
- IsNotesDataInRegistry% = TRUE
- ELSE
- NotesDataFromRegistry$ = ""
- IsNotesDataInRegistry% = FALSE
- END IF
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION IsNotesOnPath(NotesFromPath$) As INTEGER
- '** Purpose: Search for Notes entry in the on the Enviornment PATH
- '**
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesFromPath$ = location of Notes executables.
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '**
- '*************************************************************************
- FUNCTION IsNotesOnPath(NotesFromPath$) AS INTEGER
-
- DIM foundstr%
- DIM szNotesW32StringsDll$ '** On NT this could be ALPAH or X86 so we need to swap strings (RESOURCE THIS)
- DIM rc%
-
- IF gDebugIsNotesOnPath = 1 THEN PRINT "Search for ?strings.dll on the Enviorment variable (PATH)."
- foundstr% = 0
- NotesFromPath$ = LCASE$(FindTargetOnEnvVar(W16_NOTES,"PATH"))
- IF NotesFromPath$ <> "" Then
- foundstr% = INSTR(1,LCASE$(NotesFromPath$),W16_NOTES)
- else
- '** Find out if the is ALPHA or INTEL.
- IF Environ("PROCESSOR_ARCHITECTURE") = "ALPHA" THEN
- szNotesW32StringsDll$ = "astrings.dll"
- ELSE
- szNotesW32StringsDll$ = "nstrings.dll"
- END IF
- NotesFromPath$ = LCASE$(FindTargetOnEnvVar(szNotesW32StringsDll$,"PATH"))
- IF NotesFromPath$ <> "" Then
- foundstr% = INSTR(1,LCASE$(NotesFromPath$),szNotesW32StringsDll$)
- else
- NotesFromPath$ = LCASE$(FindTargetOnEnvVar(P16_NOTES,"PATH"))
- IF NotesFromPath$ <> "" Then
- foundstr% = INSTR(1,LCASE$(NotesFromPath$),P16_NOTES)
- else
- NotesFromPath$ = LCASE$(FindTargetOnEnvVar(P32_NOTES,"PATH"))
- IF NotesFromPath$ <> "" Then
- foundstr% = INSTR(1,LCASE$(NotesFromPath$),P32_NOTES)
- else
- NotesFromPath$ = ""
- END IF
- END IF
- END IF
- END IF
- '** If we found ?strings then we know that notes is installed, so trim the strings.dll
- '** from the returned value and save it. We don't need to validate the path because
- '** we know that the search did that.
- IF foundstr% <> 0 Then
- '** Strip "?strings.dll" from string
- NotesFromPath$ = MID$(NotesFromPath$,1,(foundstr%-1))
- rc% = Lot_CleanPath(NotesFromPath$)
- IF gDebugIsNotesOnPath%= 1 THEN PRINT "Notes program directory was found on the path and is set to :"+NotesFromPath$
- IsNotesOnPath = TRUE
- ELSE
- NotesFromPath$ = ""
- IsNotesOnPath = FALSE
- END IF
-
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION IsNotesInLotusIni (NotesFromLotus$) AS INTEGER
- '** Purpose: Search for Notes entry in the in the Lotus.ini file
- '**
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesFromLotus$ = location of Notes executables.
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '**
- '*************************************************************************
- FUNCTION IsNotesInLotusIni (NotesFromLotus$) AS INTEGER
- DIM rc%
- DIM foundstr%
-
- IF gDebugNotesFromLotus = 1 THEN PRINT "Searching for notes using the Lotus.ini file"
- NotesFromLotus$ = LCASE$(GetIniKeyString(GetWindowsDir() + "lotus.ini","Lotus Applications","NOTES"))
-
- '** Verify that the file really exist, not just the path because the user may have
- '** moved or deleted Notes.
- '** rc% = DoesFileExist(gNotesProg$, 0)
- IF rc% = 1 THEN
- '' Strip "NOTES.EXE" from string
- foundstr% = INSTR(1,LCASE$(gNotesProg$),"\notes.exe")
- NotesFromLotus$ = MID$(NotesFromLotus$,1,(foundstr%-1))
- rc% = Lot_CleanPath(NotesFromLotus$)
- IF gDebugNotesFromLotus% = 1 THEN PRINT "Notes program Directory was found in Lotus.ini."
- IsNotesInLotusIni = TRUE
- ELSE
- IF gDebugNotesFromLotus% = 1 THEN PRINT "Notes program Directory was not found in Lotus.ini."
- NotesFromLotus$ = ""
- IsNotesInLotusIni = FALSE
- END IF
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION IsNotesInSessMgr (NotesFromLotus$) AS INTEGER
- '** Purpose: Search "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
- '** for Notes.ini
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesIniFromSessionMgr$ = location of Notes.ini
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '** NOTES:
- '** for V3 we told the user to make this entry so the Notes.ini could be found on the path
- '** so in V4 to find out if a NT V3 server has been installed query the registry looking
- '** for the following key "SYSTEM\CurrentControlSet\Session Manager\Environment", this
- '** Key should always be found. Then using the path setting in this key search for
- '** "notes.ini" on this path.
- '** NOTES.INI WILL ALWAYS BE HONORED ON THE PATH.
- '**
- '*************************************************************************
- FUNCTION IsNotesInSessMgr(NotesIniFromSessionMgr$) AS INTEGER
- DIM szKey$ '** Registry key.
- DIM regStatus& '** Return status from registry calls.
- DIM KeyBuffer$ '** String stored in registry.
- DIM KeyBufferLen& '** Size of string returned.
-
- '** Verify that the Key exists before we do anything else, This key should always exist.
- szKey$ ="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
- IF gDebugNotesIniFromSessionMgr% = 1 THEN PRINT "Searching Session Manager key :"+szKey$+" for notes.ini"
-
- regStatus&= Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szkey$)
- IF regStatus&= 1 THEN '** The key was found.
- '** Get the value of the PATH key from the registry entry.
- regStatus& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, _
- szKey$, _
- "Path", _
- REG_EXPAND_SZ, _
- KeyBuffer$, _
- KeyBufferLen&)
-
- '** See if the ini file exists on the path returned in KeyBuffer$
- NotesIniFromSessionMgr$ = DoesFileExistOnPath(KeyBuffer$, LdString(SID_NOT_NOTESINI))
- IF NotesIniFromSessionMgr$ <> "" THEN
- NotesIniFromSessionMgr$ = NotesIniFromSessionMgr$+"\"+LdString(SID_NOT_NOTESINI)
- IsNotesInSessMgr% = TRUE
- END IF
- ELSE '** The key wasn't found.
- IF gDebugNotesIniFromSessionMgr% = 1 THEN PRINT "Key :"+STR$(regStatus)" Doesn't exist"
- IsNotesInSessMgr% = FALSE
- END IF
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION IsNotesIniOnPath(NotesIniFromPath$) AS INTEGER
- '** Purpose: Search the current PATH for "notes.ini"
- '**
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesIniFromPath$ = location of Notes.ini
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '** NOTES.INI WILL ALWAYS BE HONORED ON THE PATH.
- '**
- '*************************************************************************
- FUNCTION IsNotesIniOnPath(NotesIniFromPath$) AS INTEGER
-
- '** See if the ini file exists on the path, if we find it on the path
- '** the get the Current KitType and Data Path.
-
- IF gDebugNotesFromPath = 1 THEN PRINT "Searching (PATH) for notes.ini"
- NotesIniFromPath$ =""
- NotesIniFromPath$ = FindTargetOnEnvVar(INIFILE$,"PATH")
- IF NotesIniFromPath$ <> "" THEN
- IF gDebugNotesIniFromPath% = 1 THEN PRINT "NotesIniFromPath Found on PATH statment "+NotesIniFromPath$
- IsNotesIniOnPath% = TRUE
- ELSE
- IsNotesIniOnPath% = FALSE
- END IF
-
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION IsNotesIniInWinDir(NotesIniFromPath$) AS INTEGER
- '** Purpose: Search the current PATH for "notes.ini"
- '**
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesIniFromPath$ = location of Notes.ini
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '** NOTES.INI WILL ALWAYS BE HONORED ON THE PATH.
- '**
- '*************************************************************************
- FUNCTION IsNotesIniInWinDir(NotesIniFromWinDir$) AS INTEGER
-
- IF gDebugNotesIniFromWinDir% = 1 THEN PRINT " Searching windows directory "GetWindowsDir()+INIFILE$+" for this file."
- IF DoesFileExist(GetWindowsDir()+INIFILE$, 0) = 1 THEN
- NotesIniFromWinDir$ = GetWindowsDir()+INIFILE$
- IF gDebugNotesIniFromWinDir = 1 THEN PRINT "NotesIniFromSys Found in windows directory "+NotesIniFromWinDir$
- IsNotesIniInWinDir = TRUE
- ELSE
- IsNotesIniInWinDir = FALSE
- END IF
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION GetPartitionInformation(NotesIniFromPath$) AS INTEGER
- '** Purpose: Search the current PATH for "notes.ini"
- '**
- '** RETURNS: TRUE if found
- '**
- '** OUT symbols:
- '** NotesIniFromPath$ = location of Notes.ini
- '**
- '**
- '** Author: Michael Clark
- '** Arguments:
- '**
- '** NOTES.INI WILL ALWAYS BE HONORED ON THE PATH.
- '**
- '*************************************************************************
- FUNCTION IsPartitonedInstall(PartitionProg$, PartitionData$)AS INTEGER
- DIM szKey$ '** Registry key.
- DIM szKey2$ '** Registry key.
- DIM KeyBuffer$ '** String stored in registry.
- DIM KeyBufferLen& '** Size of string returned.
- DIM KeyBuffer2$ '** String stored in registry.
- DIM KeyBufferLen2& '** Size of string returned.
- DIM Instance$ '** Instance of virtual server installed.
- DIM LastInstallPath$'** Location of Last virtual server install.
- DIM regStatus&
- DIM POS%
- KeyBuffer$ = String$(256,0) '** Initialize storage
- KeyBufferLen& = CLNG(256)
- KeyBuffer2$ = String$(256,0) '** Initialize storage
- KeyBufferLen2& = CLNG(256)
-
- '** Load up the registry key for Virtual Server Install and find out if it exists.
- szKey$ = gREGLOTUS+LdString(SID_NOT_NOTES_NAME)+LdString(SID_NOT_REG_VSERVER)
- if gDebugNotesPartition% = 1 THEN PRINT "Searching for registry key "+szKey$
- regStatus&= Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$)
-
- IF regStatus&= 1 THEN
- IF gDebugNotesPartition% = 1 THEN PRINT "The registry entry for Partioned servers '"+szKey$+"' exists so the virtual server is installed "
- '** VSERVER is installed so retrieve the previous values INSTANCE and the Program directory.
-
- regStatus&= Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "PATH", REG_SZ, KeyBuffer2$, KeyBufferLen2&)
- IF regStatus& = 0 THEN
- IF gDebugNotesPartition% = 1 THEN PRINT "The Key "+szKey$+"PATH exists so retrieve the instance value."
- PartitionProg$ = KeyBuffer2$
- IF gDebugNotes% = 1 OR gDebugNotesPartition% = 1 THEN PRINT "Partitioned server ProgDir is :"+KeyBuffer2$
- END IF
- regStatus&= Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$, "INSTANCE", REG_SZ, KeyBuffer$, KeyBufferLen&)
- IF regStatus& = 0 THEN
- IF gDebugNotesPartition% = 1 THEN PRINT "The Key "+szKey$+"INSTANCE exists so retrieve the instance value."
- Instance$ = Lot_TrimEndSlash(NULLTRIM(KeyBuffer$))
- ' Instance$ = MID$(Instance$,2,LEN(Instance$))
- IF gDebugNotes% = 1 OR gDebugNotesPartition% = 1 THEN PRINT "Last install instance of a partitioned server is :"+Instance$
-
- '** Retrieve the path from the last install
- szkey2$ = szKey$+"\"+"1"
- regStatus&= Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey2$, "CLIENT"+Instance$, REG_SZ, KeyBuffer$, KeyBufferLen&)
- IF gDebugNotes% = 1 OR gDebugNotesPartition% = 1 THEN PRINT "Search for key "+szKey2$+" returned "+KeyBuffer$
- LastInstallPath$ = Lot_TrimEndSlash(NULLTRIM(KeyBuffer$))
- IF gDebugNotes% = 1 OR gDebugPartition% = 1 THEN PRINT "Last installed in Directory from registry was:"+LastInstallPath$
-
- '** If the instance is included in the path then increment the instance
- '** an setup the next suggested path. If the instance is not included in
- '** the path then just append the instance onto the previous path.
-
- '** Try and locate the instance in the last installed directory.
- IF gDebugNotes% = 1 OR gDebugNotesPartition% = 1 THEN PRINT "Searching LastInstalledPath "+LastInstallPath$+" for the instance :"+Instance$
- pos% = INSTR(LastInstallPath$,Instance$)
- If pos% <> 0 THEN
- '** Convert the instance to a number, increment by one and return a string.
- Instance$ = MID$(STR$(VAL(Instance$)+1),2, LEN(STR$(VAL(Instance$)+1)))
- IF gDebugNotesPartition% = 1 THEN PRINT "Next instance is :"+Instance$
- LastInstallPath$ = Left$(LastInstallPath$, LEN(LastInstallPath$) - LEN(Instance$))
- IF gDebugNotesPartition% = 1 THEN PRINT "Directory to append to :"+LastInstallPath$
- LastInstallPath$ = LastInstallPath$+Instance$
- ELSE
- Instance$ = MID$(STR$(VAL(Instance$)+1),2, LEN(STR$(VAL(Instance$)+1)))
- LastInstallPath$ = NULLTRIM(LastInstallPath$)+Instance$
- IF gDebugNotesPartition% = 1 THEN PRINT "Appended directory to last path :"+LastInstallPath$
- END IF
-
- IF gDebugNotesPartition% = 1 THEN PRINT "Setting Partitons ON because it's installed."
- IsPartitonedInstall% = TRUE
- PartitionData$ = LastInstallPath$
-
- gPartitioned% = 1
- gPartitionsInstalled% = 1
- ELSE
- IF gDebugNotesPartition% = 1 THEN PRINT "Turning OFF service grade install because the key."+szKey$+" was not found."
- IsPartitonedInstall% = FALSE
- gPartitioned% = 0
- gPartitionsInstalled% = 0
- END IF
- END IF
- END FUNCTION
-
- '*************************************************************************
- '** FUNCTION LWP_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING
- '**
- '** Purpose: Lot_WhereIsFeature fails if the feature to find is not
- '** being copied in this particular session. In a reinstallation
- '** situation, this is bad since some features will already be
- '** installed and we'd like to know where, even if we aren't installing
- '** them this time around. This function give CIT a chance, and if
- '** it fails then it tries to find the location itself.
- '** Author: TLB
- '** Arguments: As in Lot_WhereIsFeature
- '** Returns: The directory path
- '*************************************************************************
-
- FUNCTION LWP_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING
- DIM WhereIs$, chpt$, DestDir$, DestDirSym$
- WhereIs$ = Lot_WhereIsFeature(prodno%, featureId$, filetolookfor$)
- IF WhereIs$ = "" THEN
- chpt$ = Lot_GetChapterFromKeyWord(featureId$)
- DestDirSym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
- DestDir$ = Lot_GetDestDirValueFromInstallIni(DestDirSym$)
- IF DoesFileExist(DestDir$ + filetolookfor$, femExists) THEN
- WhereIs$ = DestDir$
- END IF
- END IF
-
- LWP_WhereIsFeature = WhereIs$
- END FUNCTION
-
- '** SUB NetWareNotFoundCB (hDlg&, CtrlId%, Classes$, Inst%)
- '**
- '** Purpose: Query the user for the Novell Volume name
- '**
- '**
- '** Author: Michael Clark
- '** Arguments: Callback args
- '** Returns: NONE
- '*************************************************************************
- SUB NetWareNotFoundCB (hDlg&, CtrlId%, Classes$, Inst&)
- DIM newproddir$, notused%, temp%, StrLen%, tmp$
-
- ' print "No NetwareDrive Found, NOTNLMDIR is :"+GetSymbolValue("NOTNLMDIR")
-
- SELECT CASE Classes$
-
- CASE "__DLGINIT"
- ' set up dlgbox
- 'print "No NetwareDrive Found, NOTNLMDIR is :"+GetSymbolValue("NOTNLMDIR")
- SetListItem "IDC_EDIT", 1, GetSymbolValue("NOTNLMDIR")
- SetListItem "IDC_EDIT", 2, ""
-
- AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
- AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
-
- AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
-
- AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
- AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
-
- AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
- AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
-
- IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE)
- ELSE
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE)
- END IF
-
- CASE "IDC_LIST1"
-
- CASE "IDC_EDIT"
-
- If LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE)
- ELSE
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE)
- END IF
-
- CASE "IDC_CANCEL"
-
- CASE "IDC_OK"
-
- IF GetListLength("IDC_EDIT") <> 0 Then
- '** Get the current directory setting
- tmp$ = GetSymbolValue("NOTNLMDIR")
- '** Get the entry the user made.
- gNlmDir$ = GetListItem("IDC_EDIT",2)
- '** See if the use suppliedthe trailing colon, if they did not add it.
- if INSTR(gNlmDir$,":") = 0 THEN gNlmDir$=gNlmDir$+":"
- '** Get the length of the current directory.
- StrLen% = LEN (tmp$)
- '** Search the current directory for the the colon.
- temp% = INSTR(tmp$, ":")
- gNlmDir$ = gNlmDir$+RIGHT$(tmp$,StrLen% - temp%)
- 'PRINT "The gNlmDir is :"gNlmDir$
- END IF
- 'print "the new product dir is: "+newproddir$
- CASE "IDC_HELP"
- CASE "IDC_EXIT"
- END SELECT
- END SUB
-
- '** SUB SELECTVALIDNETWAREDRIVE (hDlg&, CtrlId%, Classes$, Inst&)
- SUB SELECTVALIDNETWAREDRIVE (hDlg&, CtrlId%, Classes$, Inst&)
- DIM newproddir$, notused%
-
- SELECT CASE Classes$
-
- CASE "__DLGINIT"
- ' set up dlgbox
- ' print "No NetwareDrive Found"
- SetListItem "IDC_EDIT", 1, GetSymbolValue("NOTDIR")
- SetListItem "IDC_EDIT", 2, ""
-
- AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
- AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
-
- AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
-
- AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
- AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
-
- AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
- AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
-
- IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE)
- ELSE
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE)
- END IF
-
- CASE "IDC_LIST1"
-
- CASE "IDC_EDIT"
-
- If LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE)
- ELSE
- notused% = EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE)
- END IF
-
- CASE "IDC_CANCEL"
-
- CASE "IDC_OK"
-
- if GetListLength("IDC_EDIT") <> 0 Then
- gNlmDir$ = GetListItem("IDC_EDIT",2)
- End If
- 'print "the new product dir is: "+newproddir$
- CASE "IDC_HELP"
- CASE "IDC_EXIT"
- END SELECT
- END SUB
-
- FUNCTION ValidateIni(IniFile$) AS INTEGER
- DIM dum%, DestDir$, Result$, szVol$, Temp$
-
- ON ERROR GOTO NOINI
- '** Get the directory that DIRECTORY entry poinst to
- DestDir$ = Lot_TrimEndSlash(GetIniKeyString(IniFile$,"NOTES","Directory"))
- '** Check the directory for any valid notes templates.
- Result$ = DIR$ (DestDir$+"\pernames.ntf", 0)
-
- ON ERROR RESUME NEXT
-
- NOINI:
- IF gDebugValidateIni% = 1 THEN PRINT "Result from DIR$("+DestDir$+"\*.ntf) is :"Result$
- dum% = Instr(1,Result$, "pernames.ntf",1)
- IF gDebugValidateIni% = 1 THEN PRINT "The search returned "+STR$(dum%)
-
- IF dum% = 0 THEN
- Result$ = LdString(SID_NOT_INIFOUND1)+IniFile$+LdString(SID_NOT_INIFOUND2)+LdString(SID_NOT_INIFOUND3)
- IF GetSymbolValue(SYM_AUTOMATIONINST$) = gFALSE$ THEN
- dum% = DoMsgBox(Result$, LdString(SID_NOT_NOTES_NAME),MB_YESNO+ MB_ICONQUESTION)
- ELSE
- ValidateIni = 2
- END IF
-
- IF dum% <> IDYES THEN
- ValidateIni = TRUE
- ELSE
- '** Strip the current extension
- dum% = InStr(1,IniFile$, ".ini",1)
- Temp$ = Left$(IniFile$,dum%)
- '** Save a copy of the file
- FileCopy IniFile$, Temp$+"bak"
- '** Delete the file.
- RemoveFile IniFile$, cmoNone
- ValidateIni = FALSE
- END IF
- ELSE
- ValidateIni = TRUE
- END IF
- RESUME DONE
-
-
- DONE:
- EXIT FUNCTION
-
- END FUNCTION
-
-