home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1997-01-23 | 175.1 KB | 4,764 lines
''/********************************************************************* '' '' Module Name: 123.lss '' '' Module Code: COMINST '' '' Author: '' '' Creation Date: '' '' Copyright Lotus Development Corporation, (c) 1991 '' Description: '' '' '' Additional authors: '' '' Change History: '' $Log: //bluebird/logfiles/GEMINI/cisdk/123/123.lss $ '' '' Rev 1.213 23 Jan 1997 16:42:18 jlu '' SPR 31298. '' '' Rev 1.212 05 Dec 1996 08:58:24 mhishinu '' Fixed DBCS string truncation problem. (SPR #29486) '' '' Rev 1.211 01 Dec 1996 00:53:24 mhishinu '' Changed the disk space requirements, 32MB for default, 25MB for minimum. '' (SPR #8694) '' '' Rev 1.210 20 Nov 1996 08:41:06 jsgrant '' '' Checking in correct version of previous fix. '' '' Rev 1.209 19 Nov 1996 17:11:14 jsgrant '' SPR 28047. Added NEW_lotRegisterTypeLib call for 123 type library. '' CR=Jeannie Lu '' '' Rev 1.208 05 Nov 1996 16:57:02 jlu '' SPR 27733 '' '' Rev 1.207 01 Nov 1996 16:28:02 jlu '' Fixed SPR 27319, not use SID_123_PROGDIR to determine 123r5 path. '' '' Rev 1.206 16 Oct 1996 15:38:32 amello '' No longer need 123wcmpt.grg '' '' Rev 1.205 11 Oct 1996 15:46:30 jlu '' Turn all node options visiable in Node. '' '' Rev 1.204 09 Oct 1996 20:12:16 mhishinu '' Modified for the LOTUS.BCF file. '' '' Rev 1.203 09 Oct 1996 11:23:52 jlu '' Check for embedded running Gemini. '' '' Rev 1.202 08 Oct 1996 20:20:28 jlu '' Added readme.wri icons. '' '' Rev 1.201 08 Oct 1996 13:22:20 amello '' Added new function get_and_set_registry. This function uses new version '' of regspt.dll. The new version allows us to use the 123w97.grg file to '' update the registry for the DBASE drivers. '' '' Rev 1.200 05 Oct 1996 14:20:28 jlu '' Added HCU\SW\L\123\97.0\Paths\Personal '' '' Rev 1.199 05 Oct 1996 13:13:58 jlu '' Modified WriteMapRegFor123 to handle MLC *.tvc files. '' '' Rev 1.198 02 Oct 1996 15:14:58 jlu '' Fixed SPR 24860 by changing HLM\Software to HLM\SOFTWARE. '' '' Rev 1.197 26 Sep 1996 16:45:28 jlu '' Modified CleanRegistrys123 to clean up the new CLSID number for gemini. '' '' Rev 1.196 20 Sep 1996 17:30:00 jlu '' Delete grg files in PostCopyConfig. '' '' Rev 1.195 16 Sep 1996 17:30:16 mhishinu '' Modified code for Run From ROM. '' '' Rev 1.194 16 Sep 1996 13:55:26 mhishinu '' Deleted debug messages. '' '' Rev 1.193 13 Sep 1996 10:26:02 mhishinu '' Modified Get123PathFromRegistry function. (SPR #23828) '' '' Rev 1.192 11 Sep 1996 20:30:10 mhishinu '' Added code to copy LTSCSN10.DLL to the node. '' '' Rev 1.191 11 Sep 1996 14:34:40 mhishinu '' Added code to copy ltscsn10.tlb on the server to the compoents directory '' on the node. That's a workaround for a ccStr bug. (SPR #22549) '' '' Rev 1.190 10 Sep 1996 20:11:00 mhishinu '' Added code for Run From Rom. LOTUSROM.BCF on the server is copied to '' LOTUS.BCF on the node. '' '' Rev 1.189 05 Sep 1996 11:01:48 mhishinu '' Modified PreCopyConfig and PostCopyConfig so that entries in LOTUS.BCF are '' appended on a first install or on a customize install. '' '' Rev 1.188 04 Sep 1996 14:59:12 jlu '' Fixed MLC build lannching bug with /L <Lang> switch. '' '' Rev 1.187 04 Sep 1996 10:38:50 jlu '' Modified Lot_WriteMapRegFor123 to fixed MLC MapDataPath. '' '' Rev 1.186 03 Sep 1996 17:31:22 jlu '' Modified CleanRegistry123. '' '' Rev 1.185 03 Sep 1996 16:05:44 jlu '' Added NodeOptions for ODBC drivers. '' '' Rev 1.184 22 Aug 1996 15:52:08 jlu '' Modified DoBackupMaps(). '' '' Rev 1.183 21 Aug 1996 16:06:44 jlu '' Move TeamConsolidate to PreCopyConfig123(). '' '' Rev 1.182 16 Aug 1996 16:28:58 mhishinu '' Modified AddIcons123 function. (SPR #16767) '' Modified CleanRegistryKeys123 sub so that Install doesn't delete '' HCU\S.\L.\123\97.0 key. '' '' Rev 1.181 16 Aug 1996 15:04:50 mhishinu '' Modified Init123, PathChange123 and PostCopyConfig so that SmartIcons files '' are copied to appropriate language directory. '' '' Rev 1.180 15 Aug 1996 16:53:22 mhishinu '' Deleted duplicated odbccp32.dll. (SPR #21850) '' Modified for MLC paths. '' '' Rev 1.179 14 Aug 1996 14:51:48 mhishinu '' Modified PostCopyConfig123 function. '' Added GetDestinationSymbolValue123 function. '' '' Rev 1.178 13 Aug 1996 14:23:14 mhishinu '' Replaced "SYBASE_SHRCNT" with "SYBASEPRG_SHRCNT". (SPR #21414, 21417) '' '' Rev 1.177 09 Aug 1996 14:32:16 mhishinu '' Modified PostCopyConfig so that values under HCU/S/Lotus/123/97.0/Paths/* '' are written correctly. (SPR #19498) '' '' Rev 1.176 07 Aug 1996 16:47:58 jlu '' Modified AddRegistryKeys(). '' '' Rev 1.175 06 Aug 1996 13:20:42 jlu '' Removed DoBackUpMaps from node install '' '' Rev 1.174 01 Aug 1996 16:45:32 pdonahue '' '' Changed write_bcf to only write entries if a feature is being '' installed in the current install. '' '' Rev 1.173 01 Aug 1996 16:27:04 pdonahue '' added code to supress sqlsevername dialog in case of a node install. '' '' Rev 1.172 31 Jul 1996 13:56:54 jlu '' Modified GetNotesPath123() to fix Notes v4.0 problem. '' '' Rev 1.171 30 Jul 1996 15:07:40 jlu '' Modified GetNotesPath123() to handle Notes v5 v4.5 and v4.11. '' '' Rev 1.170 29 Jul 1996 16:11:38 pdonahue '' '' removed comment from the line of code that increments the shared '' dll counter. This function has been fixed in the new CIT build. '' '' Rev 1.169 29 Jul 1996 14:46:58 jlu '' Made AltComp registry key point to where 123w.exe is installed. '' '' Rev 1.168 29 Jul 1996 13:51:26 pdonahue '' changed sqlprg to sqlprg_shrcnt in 123ui to surface dialog '' when SQL drivers are selected. '' '' Rev 1.167 25 Jul 1996 16:43:56 jlu '' Fixed SPR# 20051 '' '' Rev 1.166 25 Jul 1996 16:11:02 pdonahue '' added code to increment counter for odbc driver. However, Cit function '' IncrementSharedDllcount is not working. Commented out function call '' until this function is fixed. '' '' Rev 1.165 25 Jul 1996 15:27:32 pdonahue '' added shrcnt section to odbc section names '' '' Rev 1.164 23 Jul 1996 11:06:10 chelon '' Removed unneeded print statement. '' '' Rev 1.163 22 Jul 1996 15:24:40 jlu '' Put back changes to CleanRegistryFor123() '' '' Rev 1.162 22 Jul 1996 13:13:12 pdonahue '' '' change sql_server sqlserver '' '' Rev 1.161 22 Jul 1996 12:03:00 pdonahue '' fixed notes sql entry in write_bcf_file. '' '' Rev 1.160 21 Jul 1996 17:51:36 ihachem '' Backed out JLU change made in rev 1.158 because they are distroying '' Windows 95 machines. It seems that all HKEY_CLASSES_ROOT keywords are deleted. '' '' '' Rev 1.159 19 Jul 1996 16:27:48 mhishinu '' Modified Write_BCF_FILE SUB. '' '' Rev 1.158 19 Jul 1996 15:43:36 jlu '' Modified CleanRegistryKeys123(). '' '' Rev 1.157 18 Jul 1996 18:32:06 pdonahue '' added code to write server name to bcf file for sql 4.0 '' '' Rev 1.156 18 Jul 1996 18:00:54 pdonahue '' removed shrcnt suffix from odbc sections. '' '' Rev 1.155 16 Jul 1996 14:14:48 mhishinu '' Removed node options feature. '' '' Rev 1.154 15 Jul 1996 19:24:40 muehara '' Changed Pitch to FontPich to remove the error. Is this reserved word? '' '' Rev 1.153 15 Jul 1996 15:40:30 muehara '' Changed pitch1 to Pitch for Asia. '' '' Rev 1.152 15 Jul 1996 12:16:38 pdonahue '' added a new symbol for sql server name. '' '' Rev 1.151 13 Jul 1996 18:58:08 mhishinu '' Fixed SPR #19433. '' '' Rev 1.150 12 Jul 1996 20:00:56 mhishinu '' Modified ProductReg123 and PreCopyConfig123 functions '' for node options feature. '' '' Rev 1.149 11 Jul 1996 19:05:44 muehara '' Moved string data to 123ui.rc for Asia. '' '' Rev 1.148 11 Jul 1996 11:04:02 pdonahue '' changed driver32 to driver '' '' Rev 1.147 10 Jul 1996 17:36:38 jlu '' Removed Animation 1.0 key from shared component's list. '' '' Rev 1.146 09 Jul 1996 20:01:28 jlu '' Removed helps from minimum install, also help keys for uninstall. '' '' Rev 1.145 09 Jul 1996 11:03:20 jlu '' Fixed Altcomp key to point to where the latest statusbar lives. '' '' Rev 1.144 08 Jul 1996 20:00:02 mhishinu '' CIT BLD 2130_3 '' '' Rev 1.143 08 Jul 1996 18:27:22 pdonahue '' added code to surface dialog for SQL server name. '' '' Rev 1.142 08 Jul 1996 15:29:22 pdonahue '' added code to write lotus.bcf file. '' '' Rev 1.141 07 Jul 1996 14:03:54 ihachem '' Defined IgnoreEvenAlignment$ (see muehara change) '' '' Rev 1.140 06 Jul 1996 18:33:40 muehara '' Added CodePage and IgnoreEvenAlignment for Asia. '' '' Rev 1.139 28 Jun 1996 16:53:02 muehara '' Added Kinsouku strings and Font information for CKT. '' '' Rev 1.138 25 Jun 1996 18:13:44 jlu '' Added Lot_WriteHlpRegFor123(). '' '' Rev 1.137 24 Jun 1996 17:04:14 pdonahue '' added code for notes_SQL drivers. '' '' Rev 1.136 22 Jun 1996 17:48:46 ihachem '' Changed DESK.exe to 123W.exe (per: Jim Snyder-Grant) '' '' Rev 1.135 19 Jun 1996 14:31:52 jlu '' Fixed SPR #16082 '' '' Rev 1.134 18 Jun 1996 16:24:46 mhishinu '' Added RegisterObject call to delete PANOSE.DAT. '' '' Rev 1.133 17 Jun 1996 14:13:34 jlu '' Removed lcrttb4.dll from Lot_WriteOCXRegFor123 '' '' Rev 1.132 12 Jun 1996 16:13:42 mhishinu '' Fixed SPR #16204. '' HLM\S.\L.\123\97.0 and HCU\S.\L.\123\97.0 don't need to be registered '' by RegisterObject calls. '' '' Rev 1.131 10 Jun 1996 11:02:28 jlu '' Mdified MigrateUserPrefReg() to migrate currency_display '' '' Rev 1.130 06 Jun 1996 17:04:12 jlu '' Changed CCstr version to 1.0 '' '' Rev 1.129 05 Jun 1996 15:41:38 mhishinu '' Fixed SPR #14092 and 13655. '' '' Rev 1.128 03 Jun 1996 13:14:08 pdonahue '' changed paradox connectfuntions from YYY to YYN '' '' Rev 1.127 31 May 1996 18:00:06 jlu '' Change mapdatapath registry from HLM to HCU. '' '' Rev 1.126 30 May 1996 16:07:58 jlu '' Fixed shortcut uninstall problem for suite. '' '' Rev 1.125 30 May 1996 14:47:38 mhishinu '' Changed product size (C.R. JLU) '' '' Rev 1.124 28 May 1996 16:28:42 mhishinu '' Changed Product Size for Gemini. (C.R. JLU) '' '' Rev 1.122 23 May 1996 19:58:04 pdonahue '' '' added missing OEM to the first DBase entry. '' '' Rev 1.121 23 May 1996 19:10:48 pdonahue '' created new section for paradox driver in 123.std and add a check '' to see if the section is installed. '' '' Rev 1.120 23 May 1996 17:38:34 pdonahue '' fixed registry entry for paradox api level. '' '' Rev 1.119 22 May 1996 17:50:50 amello '' Added odbc files and commented out remove prior version call from precopyconfig. '' '' Rev 1.118 22 May 1996 16:18:08 jlu '' Corrected ProdSize for minimum/default install. '' '' Rev 1.117 22 May 1996 15:24:56 jlu '' Removed 123TEAMCONS are a NodeOption '' '' Rev 1.116 21 May 1996 19:18:22 jlu '' Modified PrecopyConfig using xxx template. '' '' Rev 1.115 21 May 1996 15:26:18 jlu '' Fixed shortcut path for uninstall. '' '' Rev 1.114 20 May 1996 17:03:24 pdonahue '' Added Registry entries for ODBC '' '' Rev 1.113 17 May 1996 19:44:44 jlu '' Modified AddRegistryFor123 '' '' Rev 1.112 16 May 1996 16:31:16 jlu '' Modified PostCopyConfig for path registry. '' '' Rev 1.111 15 May 1996 19:47:16 jlu '' Modified PostCopyConfig. '' '' Rev 1.110 15 May 1996 19:29:08 jlu '' Added path values to registry. '' '' Rev 1.109 14 May 1996 20:03:32 jlu '' CIT BLD 2122_4 '' '' Rev 1.108 13 May 1996 15:21:36 jlu '' Modified Lot_WriteMapRegFor123. '' '' Rev 1.107 13 May 1996 14:50:42 jlu '' Removed OLd_WriteOLERegFor123 and Old_WriteFexRegFor123. '' '' Rev 1.106 09 May 1996 14:39:52 pdonahue '' modified upgrade code for MLC. In case of an MLC install do surface '' upgrade dialog or set path to previous install path. '' '' Rev 1.105 08 May 1996 19:47:54 jlu '' Modified init123() '' '' Rev 1.104 07 May 1996 20:04:14 jlu '' Modified PostCopyConfig() '' '' '' Rev 1.103 07 May 1996 12:34:34 chelon '' Added a space between /L and LanguageAcronym. '' '' Rev 1.102 06 May 1996 18:51:30 jlu '' CIT BLD 2121_4 '' '' Rev 1.101 02 May 1996 22:57:52 ihachem '' Changed ENMAPS.DLL to MAPSEN.DLL '' '' Rev 1.100 01 May 1996 19:13:42 jlu '' Modified AddRegistryFor123() '' '' Rev 1.99 30 Apr 1996 17:17:24 jlu '' CIT BLD 2120_4 '' '' Rev 1.98 30 Apr 1996 17:10:12 jlu '' CIT BLD 2120_4 '' '' Rev 1.97 26 Apr 1996 20:58:38 jlu '' Modified CleanRegistryKeys123() '' '' Rev 1.96 26 Apr 1996 20:37:46 jlu '' Modified CleanRegistry() '' '' Rev 1.95 26 Apr 1996 20:15:30 jlu '' Modified Lot_OLEregfor123() '' '' Rev 1.94 26 Apr 1996 10:27:46 jlu '' Enabled new OLE registration that utilized regspt.dll '' '' Rev 1.93 23 Apr 1996 15:31:00 pdonahue '' removed obsolete calls to markfixupsourcedirsymbol and added '' marklanguagesubdir for MLC '' '' Rev 1.92 22 Apr 1996 18:31:16 jlu '' CIT BLD 2119_4 '' '' Rev 1.91 22 Apr 1996 19:11:02 muehara '' Changed Gemini Version to 97.0 for WWEXE '' '' Rev 1.90 20 Apr 1996 13:55:10 jlu '' Enabled MigrateFillsPref(). '' '' Rev 1.89 19 Apr 1996 18:48:48 jlu '' Added MigrateFillsPrefReg() '' '' Rev 1.88 19 Apr 1996 11:02:50 amello '' WWEXE Code: Merged in for Masato Uehara, (sorry it took so long, I am very slow) AMM. '' '' Rev 1.87 18 Apr 1996 19:18:48 jlu '' Changed Gemini Version to 97.0 '' '' Rev 1.86 17 Apr 1996 19:30:34 jlu '' CIT BLD 2118_4 '' '' Rev 1.85 16 Apr 1996 19:29:24 jlu '' Changed all map keynames. '' '' Rev 1.84 12 Apr 1996 19:00:04 jlu '' Added code to check for running of Raptor/Monrue. '' '' Rev 1.83 11 Apr 1996 20:34:50 jlu '' Added China Map. '' '' Rev 1.82 10 Apr 1996 18:45:16 jlu '' Modified Team Consolidate Install Section. '' '' Rev 1.81 10 Apr 1996 10:09:10 jlu '' CIT BLD 2117_4 '' '' Rev 1.80 05 Apr 1996 18:57:42 jlu '' Added code to remove old maps for un-install '' '' Rev 1.79 04 Apr 1996 17:36:18 jlu '' Added code to register Old Maps copied from Rator. '' '' Rev 1.78 04 Apr 1996 17:01:40 pdonahue '' changed shrhelpprg to shrhelpdata '' '' Rev 1.77 04 Apr 1996 16:41:30 pdonahue '' modified shared components version numbers and added registration. '' for new components. '' '' Rev 1.76 03 Apr 1996 16:40:46 jlu '' Added DoBackupMaps(). '' '' Rev 1.75 02 Apr 1996 19:47:30 jlu '' Added Lot_WriteImgRegFor123. '' '' Rev 1.74 02 Apr 1996 13:54:18 jlu '' CIT BLD 2116_4 '' '' Rev 1.73 02 Apr 1996 12:12:18 jlu '' Fixed 123SAMPLESLANGDIR. '' '' Rev 1.72 02 Apr 1996 10:42:06 jlu '' Added symbols NOTES41DIR and NOTES41DATADIR. '' '' Rev 1.71 01 Apr 1996 18:44:46 jlu '' Added TeamComputing Registration. '' '' Rev 1.70 01 Apr 1996 14:51:02 pdonahue '' fixed langdirname '' '' Rev 1.69 29 Mar 1996 17:55:08 jlu '' Changed all map titles to RC strings in Lot_WriteMapRegFor123(). '' '' Rev 1.68 29 Mar 1996 10:33:24 jlu '' Cleaned up init123() '' '' Rev 1.67 27 Mar 1996 11:29:04 amello '' Migrate Monroe settings again. '' '' Rev 1.66 26 Mar 1996 18:30:56 jlu '' Fix Node Install UI problem. '' '' Rev 1.65 25 Mar 1996 18:13:12 jlu '' CIT BLD 2115_4 '' '' Rev 1.64 22 Mar 1996 18:57:42 jlu '' Added CleanRegistryKeys123(). '' '' Rev 1.63 21 Mar 1996 20:59:00 amello '' We are not migrate monroe/raptor settings until Alex P. fixes problems with Win95 registry settings '' '' Rev 1.62 20 Mar 1996 19:35:08 jlu '' Added GetInstTypeFromRegistry(). '' '' Rev 1.61 19 Mar 1996 19:42:44 jlu '' Fix Lot_WriteMapRegFor123 for map registration. '' '' Rev 1.59 18 Mar 1996 17:51:34 jlu '' CIT BLD 2114_4 '' '' Rev 1.58 18 Mar 1996 16:29:34 jlu '' Fixed Lot_WriteMapRegFor123() for node install. '' '' Rev 1.57 17 Mar 1996 18:09:02 jlu '' Modified Lot_WriteOLERegFor123. '' '' Rev 1.56 15 Mar 1996 18:58:00 jlu '' Added Lot_RegFexFor123() for file extensions. '' '' Rev 1.53 14 Mar 1996 18:55:54 jlu '' Added Lot_RegMapFor123() '' '' Rev 1.52 12 Mar 1996 18:58:46 jlu '' CIT BLD 2113_4 '' '' Rev 1.51 11 Mar 1996 17:43:38 jlu '' Fix BackupMaster. '' '' Rev 1.50 07 Mar 1996 18:12:18 jlu '' Added BackupMaster Dialogue. '' '' Rev 1.48 05 Mar 1996 15:02:20 amello '' Added AltComponent Value under and it points to local path '' '' Rev 1.46 04 Mar 1996 14:02:38 pdonahue '' Added code to register shared components. '' '' Rev 1.45 01 Mar 1996 19:35:34 jlu '' Corrected Lot_RegOLEfor123() '' '' Rev 1.44 29 Feb 1996 16:25:50 jlu '' Write the OLE registration database '' '' Rev 1.43 29 Feb 1996 15:06:36 pdonahue '' removed 16bit code from moredirs. '' '' Rev 1.42 29 Feb 1996 14:36:48 pdonahue '' fixed detect previous version. '' '' Rev 1.41 28 Feb 1996 18:30:38 jlu '' Added seporator support for MigratePrefReg(). '' '' Rev 1.40 27 Feb 1996 10:35:04 jlu '' CIT BLD 2111_4 '' '' Rev 1.39 26 Feb 1996 14:10:04 pdonahue '' changed init 123 to fix problem with obsolete file directory path. '' '' Rev 1.38 23 Feb 1996 14:57:44 jlu '' Added work-around for RegCreateKeyValueEx() for REG_BINARY and REG_MULTI_SZ '' '' Rev 1.37 22 Feb 1996 19:26:22 jlu '' Modified MigratePrefReg(). '' '' Rev 1.36 22 Feb 1996 17:30:38 jlu '' Modified MigratePrefReg(). '' '' Rev 1.35 21 Feb 1996 19:00:52 jlu '' Added @Func registry settings '' '' Rev 1.34 20 Feb 1996 12:29:20 jlu '' CIT BLD 2110_4 '' '' Rev 1.33 18 Feb 1996 18:44:46 jlu '' Added setion for map files in MigratePrefReg() '' '' Rev 1.32 15 Feb 1996 18:54:34 jlu '' Turned on 123OBSDIR for obseleting old files. '' '' Rev 1.31 14 Feb 1996 18:54:54 jlu '' Set upgrade flag for MONROE and RAPTOR '' '' Rev 1.30 14 Feb 1996 18:27:12 jlu '' Modified MigrateIniReg() '' '' Rev 1.29 13 Feb 1996 19:12:18 jlu '' Modified DetectPreviousVersion(). '' '' Rev 1.28 13 Feb 1996 14:41:22 jlu '' Backed out changes made yesterday. (CR: Chelon) '' '' Rev 1.27 12 Feb 1996 18:38:06 jlu '' Added MigrateUserPrefReg(). '' '' Rev 1.26 12 Feb 1996 18:32:24 jlu '' Added MigrateUserPrefReg(). '' '' Rev 1.25 12 Feb 1996 17:07:34 pdonahue '' added code to find out if Gemini is already installed. '' '' Rev 1.24 08 Feb 1996 20:43:34 jlu '' Corrected product size values. '' '' Rev 1.23 08 Feb 1996 11:19:58 pdonahue '' fixed upgrade code to surface remove obsolete file dialog for Monroe. '' '' Rev 1.22 07 Feb 1996 15:52:30 pdonahue '' removed programs subdirectory moved file to the 123 directory. '' '' Rev 1.21 07 Feb 1996 15:00:20 jlu '' Corrected typo mistake. '' '' Rev 1.20 06 Feb 1996 15:19:12 jlu '' CIT build 2108_4 '' '' Rev 1.19 05 Feb 1996 11:43:40 pdonahue '' added code to find LegoAppMdiView window. '' '' Rev 1.18 02 Feb 1996 19:50:44 jlu '' Modified AddIcon123(). '' '' Rev 1.17 02 Feb 1996 18:23:06 jlu '' Added PrevVersions123(), AddRegistryKeys123() and RegisterSharedComponent(). '' '' Rev 1.16 01 Feb 1996 11:08:32 jlu '' Added Write123Reg() for 1-2-3 registry entries. '' '' Rev 1.15 29 Jan 1996 18:24:08 jlu '' New CIT build 2107_4 '' '' Rev 1.14 25 Jan 1996 16:21:00 jlu '' Added OLE registry Info. (CR: Pam Donahue) '' '' Rev 1.13 22 Jan 1996 12:18:52 pdonahue '' set compdir to 123dir in pathchange. This should be remove when '' the shared components are install to the components directory. '' '' Rev 1.12 18 Jan 1996 14:49:52 pdonahue '' added support for share32 and created a temporary symbol for the '' shared components directory. '' '' Rev 1.11 11 Jan 1996 14:20:56 pdonahue '' added code to check for previous version of 123. ''*********************************************************************/ USE "LANGUAGE" OPTION DECLARE PUBLIC vmflag AS INTEGER PUBLIC oleregflag AS INTEGER PUBLIC upgrade AS INTEGER PUBLIC BackupSmartMasters123% DIM fWriteBCF% TYPE RegComponents hkey AS LONG registeruninstall AS LONG deletekey AS LONG subkeylen AS LONG valuenamelen AS LONG valuelen AS LONG subkey AS STRING * 255 valuename AS STRING * 255 value AS STRING * 255 END TYPE CONST VERTRES = 10 CONST FILE_ATTRIBUTE_NORMAL& = &h00000080 '** These Are the Required Functions that Products must provide '*************************************************************** DECLARE PUBLIC FUNCTION ProductReg123 (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION DefaultUserReg123 (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION Init123 (prodno%, network$, direction$, basedir$) AS STRING DECLARE PUBLIC FUNCTION PrevVersions123 (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION PathChange123 (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING DECLARE PUBLIC FUNCTION InitCopyList123 (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION PreCopyConfig123 (prodno%, network$, direction$, lic%) AS STRING DECLARE PUBLIC FUNCTION AddTheBillBoards123 (prodno%, network$, direction$, nbytes&) AS STRING DECLARE PUBLIC FUNCTION PostCopyConfig123 (prodno%, network$, direction$, programgroup$) AS STRING DECLARE PUBLIC FUNCTION AddIcons123 (prodno%, network$, direction$, programgroup$) AS STRING DECLARE PUBLIC FUNCTION UI123 (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION PostSuccessReg123 (prodno%, network$, direction$) AS STRING DECLARE PUBLIC SUB AddRegistryKeys123 (prodno%, network$) DECLARE PUBLIC FUNCTION InitLanguage123 (prodno%, network$, direction$) AS STRING DECLARE FUNCTION DetectPreviousVersion (Productfound$) AS STRING DECLARE SUB RemoveObsoleteFiles123 (hDlg&, CtrlId%, Classes$, LInst&) DECLARE SUB SQLSERVERNAMECB (hDlg&, CtrlId%, Classes$, Inst&) '** Product specific functions '***************************** DECLARE FUNCTION Get123PathfromLotusIni() AS STRING DECLARE SUB RegisterSharedComponent(Key$, FileName$, Version$) DECLARE FUNCTION Lot_WriteOLERegFor123(network$, prodno%) AS INTEGER DECLARE FUNCTION Get_and_Set_Registry_Entries(FeatureKeyWord$, grgPath$, exePath$, winsysPath$, sectionName$) AS INTEGER DECLARE FUNCTION FindWindowA LIB "user32" (ByVal lpClassName As Any, ByVal lpCaption As Any) AS LONG DECLARE FUNCTION CopyFileA LIB "kernel32" ALIAS "CopyFileA" (Byval szSrc$, Byval szDest$, Byval cmo&) AS LONG DECLARE FUNCTION SetFileAttributesA LIB "kernel32" ALIAS "SetFileAttributesA" (Byval szFile$, Byval dwFileAttributes&) AS LONG DECLARE FUNCTION GetPrivateProfileString LIB "kernel32" ALIAS "GetPrivateProfileStringA" (ByVal szSect$, ByVal szKey$,_ ByVal szDefault$,ByVal szBuf$,ByVal cbBuf AS Long,ByVal szFile$) AS LONG '*****************************WWEXE[[ DECLARE FUNCTION GetACP LIB "kernel32" ALIAS "GetACP" () AS LONG '*****************************WWEXE]] DECLARE FUNCTION Lot_GetPrivateProfileString LIB "kernel32" ALIAS "GetPrivateProfileStringA"_ (ByVal szSect$, ByVal szKey AS Long, ByVal szDefault$,ByVal szBuf$,ByVal cbBuf AS Long,ByVal szFile$) AS LONG DECLARE FUNCTION WritePrivateProfileString LIB "kernel32" ALIAS "WritePrivateProfileStringA" (ByVal szSect$, ByVal szKey$,_ ByVal szString$,ByVal szFile$) AS LONG DECLARE PUBLIC FUNCTION RegSetValueExM LIB "advapi32" ALIAS "RegSetValueExA" (ByVal hKey&, ByVal lpValueName$, ByVal Reserved&, ByVal dwType&, ByVal lpData$, ByVal cbData&) AS LONG DECLARE PUBLIC FUNCTION RegDeleteKey LIB "advapi32" ALIAS "RegDeleteKeyA" (ByVal hKey&, ByVal szKey$) AS LONG DECLARE PUBLIC FUNCTION RegDeleteValue LIB "advapi32" ALIAS "RegDeleteValueA" (ByVal hKey&, ByVal szKey$) AS LONG DECLARE PUBLIC FUNCTION RegOpenKeyEx LIB "advapi32" ALIAS "RegOpenKeyExA" (ByVal hKey&, ByVal lpSubKey$, ByVal ulOptions&, ByVal samDesired&, phkResult&) AS LONG DECLARE PUBLIC FUNCTION RegCloseKeyEx LIB "advapi32" ALIAS "RegCloseKey" (ByVal hKey&) AS LONG DECLARE PUBLIC FUNCTION RegEnumKey LIB "advapi32" ALIAS "RegEnumKeyA" (ByVal hKey&, ByVal dwIndex&, lpName$, ByVal cbName&) AS LONG '** This Three Functions are expoted from regspt.dll listed in install.lst ** DECLARE PUBLIC FUNCTION OpenGRG Lib "regspt.dll" Alias "_OpenGRGFile@8" (Byval filename As String, fileHandle As Long) AS LONG DECLARE PUBLIC SUB CloseGRG Lib "regspt.dll" Alias "_CloseGRGFile@4" (Byval fileHandle As Long) DECLARE PUBLIC FUNCTION ParseLine Lib "regspt.dll" Alias "_ParseNextLine@24" (Byval fileHandle As Long, Byval replacement As String, Byval replacement2 As String, components As RegComponents, Byval sectionName As String, sectionFound As LONG ) AS LONG DECLARE FUNCTION DetectVersionPriorToDarwin (destination$) AS STRING DECLARE FUNCTION Get123PathfromRegistry() AS STRING DECLARE FUNCTION GetInstTypefromRegistry() AS LONG DECLARE FUNCTION GetPreviousMastersDir() AS STRING DECLARE FUNCTION GetPreviousMapsDir() AS STRING DECLARE SUB MigrateUserPrefReg() DECLARE SUB MigrateFillsPrefReg() DECLARE SUB DoBackupSmartMasters() DECLARE SUB DoBackupMaps() DECLARE SUB Write_ODBC_Reg(prodno%, network$) DECLARE SUB Write_BCF_FILE(prodno%, network$) DECLARE SUB CleanRegistryKeys123(prodno%) DECLARE FUNCTION Lot_WriteMapRegFor123(network$, prodno%) AS INTEGER DECLARE FUNCTION Lot_WriteOCXRegFor123(network$, prodno%) AS INTEGER DECLARE FUNCTION Lot_WriteImgRegFor123(network$, prodno%) AS INTEGER DECLARE FUNCTION Lot_WriteHlpRegFor123(network$, prodno%) AS INTEGER DECLARE FUNCTION Lot_RegUninstFilFor123(network$, prodno%) AS INTEGER DECLARE FUNCTION GetNotesPath123(notespath$, notesdatapath$) AS INTEGER DECLARE FUNCTION GetDestinationSymbolValue123(dirsym$, flang%) AS STRING '** EXCEPTION FUNCTIONS (OPTIONAL: Regiseterd in the INF File) '************************************************************* DECLARE PUBLIC FUNCTION HELPEX123 (Chapter$,fInCopy%) AS INTEGER '************************************************************************* '**************************** 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 123 -> 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 "123", LdString(SID_123) END SUB '************************************************************************* '** FUNCTION ProductReg123 (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 COMPNENT 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 parameters 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 ProductReg123 (prodno%, network$, direction$) AS STRING ProductReg123 = gNEXT '** FOR a complete set of things to register '** see API doc under Reg_Set... Reg_SetSupportedInstallTypes prodno%, 1, 1, 1 If network$ = gNODE$ Then Reg_SetProdSizes prodno%, 2 * 1048576, 2 * 1048576 Else Reg_SetProdSizes prodno%, 32 * 1048576, 25 * 1048576 End If '** If you need Lotusapp or datalens support turn this on. 'Reg_SetShareFlags prodno%, 1, 1, 1, 1 '** If you need Components directory turn this on. Reg_SetShare32Flag prodno%, 1 '** 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% Reg_SetNodeOption prodno%,1,"DBASEPRG_SHRCNT" Reg_SetNodeOptionSelected prodno%,1,1 Reg_SetNodeOption prodno%,2,"PARADOXPRG_SHRCNT" Reg_SetNodeOptionSelected prodno%,2,1 Reg_SetNodeOption prodno%,3,"SQLPRG_SHRCNT" Reg_SetNodeOptionSelected prodno%,3,1 Reg_SetNodeOption prodno%,4,"NOTESSQLPRG_SHRCNT" Reg_SetNodeOptionSelected prodno%,4,1 Reg_SetNodeOption prodno%,5,"SYBASEPRG_SHRCNT" Reg_SetNodeOptionSelected prodno%,5,1 Reg_SetNodeOption prodno%,6,"ODBCTEXTPRG_SHRCNT" Reg_SetNodeOptionSelected prodno%,6,1 '** Toolkit default is for no server supprt, turn on if desired. Reg_SetSrvSupport prodno%, 1 '** 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_123_GROUPTITLE) '** Required if you have a work, smartmasters and backup directories '** register support with the toolkit to surface the dialog Reg_SetMoreDirsData prodno%, "MOREDIRSCB", DB123_MOREDIRS4, _ DB123_MOREDIRS4 END FUNCTION '************************************************************************* '** FUNCTION DefaultUserReg123 (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 PostCopyConfig123. '** 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 parameters 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 DefaultUserReg123 (prodno%, network$, direction$) AS STRING DIM ripath$, defdir$, temp%, rc% DefaultUserReg123 = gNEXT If network$ = gNODE$ Then ripath$ = MakePath (GetSymbolValue(SYM_STF_SRCDIR$), "123w.ri") ElseIf network$ = gSTANDARD$ Then '** Get123.... is in this file and illustrates how to '** retrieve you prod. from lotus.ini defdir$ = Get123PathfromRegistry() if defdir$ = "" Then defdir$ = Get123PathfromLotusIni() if defdir$ = "" Then goto rinotfound End if else ripath$ = MakePath(defdir$, "123w.ri") End If End if '' RETURNS TRUE IF SUCCESSFULLY FOUND RI FILE AND READ INFORMATION '' This functions populates: SYM_NAME$, SYM_COMPANY$, SYM_SERIALNUM$ rc% = Lot_ReadDefaultsfromRi(ripath$) rinotfound: END FUNCTION '************************************************************************* '** FUNCTION Init123 (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 "123DIR", basedir$ '** Of course you may be more intelligent. You should preface your '** directory with basedir$. The toolkit is finding a good drive '** letter and basedirectory. Also, remeber all paths end in a '** \ and are lower case. '** '** You should **NOT** define LOTUSFONTSDIR, WINDIR, '** USERDIR & 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 parameters 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 Init123 (prodno%, network$, direction$, basedir$) AS STRING DIM sym$, previousprod$, symname$, defdir$, position%, proddir$, iniPath$ DIM rv%, def$, parentdir$, Productfound$, chpt2$, notused%, nfind&, Title$, nFind2& DIM nFind1&, nFind3& Productfound$ = False Init123 = direction$ '' In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If '' Setup Default directory settings basedir$ = GetSymbolValue(SYM_BASEDIR$) '' Setup Default directory settings and the associated '' text that the user will see sym$ = Reg_GetDirSymbolList(prodno%) symname$ = sym$ + gNAME ''These two line register it with the toolkit. SetListItem sym$, 1, "123DIR" SetListItem symname$, 1, "123DIRNAME" ''the names aren't used, but register anyway SetListItem sym$, 2, "123WORKDIR" SetListItem symname$, 2, "123WORKDIRNAME" SetListItem sym$, 3, "123MASTERSDIR" SetListItem symname$, 3, "123MASTERSDIRNAME" SetListItem sym$, 4, "123BACKUPDIR" SetListItem symname$, 4, "123BACKUPDIRNAME" SetListItem sym$, 5, "123SAMPLESDIR" SetListItem symname$, 5, "123SAMPLEDIRNAME" SetListItem symname$, 6, "SYM_SQLSERVERNAME" SetSymbolValue SYM_SQLSERVERNAME, "" '** NOTE The path in the string table is lower case and ends with a slash SetSymbolValue "123DIR", basedir$ + LdString(SID_123_DIR) SetSymbolValue "123WORKDIR", basedir$ + LdString(SID_123WORK_DIR) + LdString(SID_123_DIR) SetSymbolValue "123MASTERSDIR", basedir$ + LdString(SID_123MASTERS_DIR) + LdString(SID_123_DIR) SetSymbolValue "123BACKUPDIR", basedir$ + LdString(SID_123BACKUP_DIR) + LdString(SID_123_DIR) SetSymbolValue "123SAMPLESDIR", basedir$ + LdString(SID_123SAMPLES_DIR) + LdString(SID_123_DIR) SetSymbolValue "123LANGDIR", GetSymbolValue("123DIR") SetSymbolValue "123SAMPLESLANGDIR", GetSymbolValue("123SAMPLESDIR") SetSymbolValue "123MASTERSLANGDIR", GetSymbolValue("123MASTERSDIR") SetSymbolValue "123ICONLANGDIR", GetSymbolValue("123DIR") & LdString(SID_123ICONS_DIR) SetSymbolValue "123MAPLANGDIR", GetSymbolValue("123DIR") & LdString(SID_123MAPS_DIR) SetSymbolValue "NOTES41DIR", GetSymbolValue("123DIR") SetSymbolValue "NOTES41DATADIR", GetSymbolValue("123DIR") '** This will be the name of the directory that shows up in captions in '** toolkit dialogs (Static text) SetSymbolValue "123DIRNAME", LdString(SID_123_DIRNAME) SetSymbolValue "123WORKDIRNAME", LdString(SID_123WORK_DIRNAME) SetSymbolValue "123MASTERSDIRNAME", LdString(SID_123MASTERS_DIRNAME) SetSymbolValue "123BACKUPDIRNAME", LdString(SID_123BACKUP_DIRNAME) SetSymbolValue "123SAMPLESDIRNAME", basedir$ + LdString(SID_123SAMPLES_DIRNAME) SetSymbolValue "123LANGDIRNAME", GetSymbolValue("123DIRNAME") '** Put up dialog box, if a version of app is currently running '========================================================== '** Use the window address of the Window name - Caption '** You can alternatly use the address of the class name...MAN '** Use the window class name and see if we can find it nFind& = FindWindowA("LegoAppMdiView",0&) nFind1& = FindWindowA("LegoAppSDIView",0&) nFind2& = FindWindowA("123WParent",0&) nFind3& = FindWindowA("OLEInPlaceAppView",0&) while direction$ = gNEXT$ AND (nFind&<>0 or nFind1&<>0 or nFind2&<>0 or nFind3&<>0) direction$ = PopupModalDlg (DB123_RUNNING, DB123_RUNNING) if direction$ = gBACK$ then Init123 = direction$ EXIT FUNCTION end if nFind& = FindWindowA("LegoAppMdiView",0&) nFind2& = FindWindowA("123WParent",0&) wend '** Put up a dlg box, if previous version of product found '========================================================== If network$ = gSTANDARD$ or network$ = gNODE$ Then previousprod$ = DetectPreviousVersion(Productfound$) If Productfound$ = "True" and _ (previousprod$ = "MONROE" or previousprod$ = "RAPTOR") Then Reg_SetObsFiles prodno%,1 end if proddir$ = Get123PathfromRegistry() If proddir$ <> "" and _ GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ Then if GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ then Reg_SetPreviousVersion prodno%,"1" else direction$ = PopupModalDlg (DB_EXISTING123, DB_EXISTING123) If direction$ = gBACK Then Init123 = direction$ EXIT FUNCTION End If End if End if End if '** Set up directory variables for 123 '** ================================================== SELECT CASE network$ CASE gSERVER$ SetSymbolValue "123NAME", LdString(SID_123_SERVER_DIRNAME) CASE gDISTRIBUTION$ SetSymbolValue "123NAME", LdString(SID_123_DIST_DIRNAME) CASE gSTANDARD$, gNODE$ '' check if there is an existing product proddir$ = Get123PathfromRegistry() if proddir$ <> "" and _ GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ Then SetSymbolValue "123DIR", proddir$ end if IF previousprod$ = "MONROE" or previousprod$ = "RAPTOR" THEN defdir$ = Get123PathfromLotusIni() proddir$ = defdir$ dim defdirlen%, lastposition% '' Get the last position of "\" in path while defdir$ <> "" defdirlen% = len(defdir$) lastposition% = lastposition% + position% position% = INSTR(1, defdir$, "\") defdir$ = RIGHT(defdir$, defdirlen% - position%) wend ''Get the 1-2-3 directory, excluding <programs> dir IF proddir$ <> "" and lastposition% > 0 THEN proddir$ = MID$(proddir$, 1, lastposition%) SetSymbolValue "123OBSDIR1", proddir$ END IF END IF '' CASE gNODE$ '' if GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ then '' IF previousprod$ = "MONROE" or previousprod$ = "RAPTOR" THEN '' defdir$ = Get123PathfromLotusIni() '' IF defdir$ <> "" THEN '' ''Get The directory, including the trailing slash, but not "programs\\" '' position% = INSTR(1, defdir$, LdString(SID_123_PROGDIR)) '' '' IF defdir$ <> "" or position% > 0 THEN '' proddir$ = MID$(defdir$,1, position% - 1) '' SetSymbolValue "123OBSDIR1", proddir$ '' END IF '' END IF '' END IF '' end if END SELECT '' Mark directory symbols that need source file adjustment '' Bare filename in .inf file, symbol will be set to the installed location '' on the server obtained by reading the server cinstall.ini file MarkFixupSourceDirSymbol("123WORKDIR") MarkFixupSourceDirSymbol("123MASTERSLANGDIR") MarkFixupSourceDirSymbol("123SAMPLESLANGDIR") '' secondary language on the SERVER MarkLanguageSubdir("123LANGDIR") MarkLanguageSubdir("123SAMPLESLANGDIR") MarkLanguageSubdir("123MASTERSLANGDIR") MarkLanguageSubdir("123ICONLANGDIR") MarkLanguageSubdir("123MAPLANGDIR") END FUNCTION '************************************************************************* '** FUNCTION PrevVersions123 (prodno%, network$, direction$) AS STRING '** '** Purpose: This function is called only for SmartSUite. It is called '** immediately after all the other product functions for '** Init123 are called. It allows SmartSuite to assess whether '** there are older versions of products around. '** '** In Symbols : '** Out Symbols: '** '** Arguments: All parameters 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 PrevVersions123 (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 PathChange123 (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 parameters 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. "123DIR" '** mainprodsonly%: (TRUE | FALSE) , when TRUE this means that only '** your top level product directory should change, '** probably "123DIR". 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.) '** '************************************************************************* PUBLIC FUNCTION PathChange123 (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING DIM path$ PathChange123 = gNEXT IF destdirsym$ = "123DIR" OR destdirsym$ = GetSymbolValue("123DIR") THEN path$ = GetSymbolValue("123DIR") SetSymbolValue "123LANGDIR", path$ Lot_RefreshDestination("123DIR") Lot_RefreshDestination("123LANGDIR") ' icons direcotry must be under 123DIR SetSymbolValue "123ICONLANGDIR", path$ & LdString(SID_123ICONS_DIR) Lot_RefreshDestination("123ICONLANGDIR") ' maps direcotry must be under 123DIR SetSymbolValue "123MAPLANGDIR", path$ & LdString(SID_123MAPS_DIR) Lot_RefreshDestination("123MAPLANGDIR") END IF END FUNCTION '************************************************************************* '** FUNCTION InitCopyList123 (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 parameters 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 InitCopyList123 (prodno%, network$, direction$) AS STRING DIM i%, sym$, chpt$, nextprod$, notused%, featuretofind$,chpt2$,section$,SourceWorkDir$,chpt1$ ON Error STFQUIT GOTO COPYLISTERROR InitCopyList123 = direction$ '' In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If sym$ = Reg_GetProductAcronym(prodno%) + gTOP$ chpt$ = Lot_GetChapterFromKeyWord(sym$) If chpt$ = "" Then ErrorMsg 0, "No chapter in INF for 123TOP" ERROR STFQUIT End IF SELECT CASE Reg_GetProdSelectedInstallType(prodno%) CASE gCOMPLETE$ i% = F_COMPLETE CASE gLAPTOP$ i% = F_LAPTOP CASE gCUSTOM$ i% = F_CUSTOM END SELECT Lot_InitializeCopyList chpt$, i% '** Make sure to turn off all sections not available on the server. 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$, 0) End If chpt$ = Lot_GetNext() WEND End If EXIT FUNCTION COPYLISTERROR: ErrorMsg 0, "Developers: You need to have licenser section with 123TOP in INF file" ERROR STFQUIT END FUNCTION '************************************************************************* '** FUNCTION UI123 (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 parameters 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 UI123 (prodno%, network$, direction$) AS STRING DIM notused%, chpt$,chpt2$ '*** If custom and not Suite then surface the more dirs dlg '*** IF network = gSTANDARD$ then IF Reg_GetProdSelectedInstallType(prodno%) = gCUSTOM$ AND _ GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ Then notused% = RegisterCallback("123","MOREDIRSCB") direction$ = PopupModalDlg (DB123_MOREDIRS4, DB123_MOREDIRS4) END IF END IF UI123 = direction$ '' In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If IF network = gSTANDARD$ or network = gNODE$ then chpt2$ = Lot_GetChapterFromKeyWord("SQLPRG_SHRCNT") if Lot_GetChapterValInt(chpt2$, F_INOROUT) = 1 then notused% = RegisterCallback("123", "SQLSERVERNAMECB") direction$ = PopupModalDlg (DBM_SQL_SERVER_NAME, DBM_SQL_SERVER_NAME) IF direction$ = gBACK$ THEN ' UI123 = direction$ SetSymbolValue SYM_SQLSERVERNAME, "" ' EXIT FUNCTION END IF End If END IF '*** Remove Obsolete Files dlg for 123 if Reg_GetObsFiles (prodno%) = 1 AND GetSymbolValue (SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _ network$ = gSTANDARD$ _ then notused% = RegisterCallback("123", "RemoveObsoleteFiles123") direction$ = PopupModalDlg (DB123_REMOVEPRODFILES, DB123_REMOVEPRODFILES) '* the callback did the work, on both IDC_OK and IDC_BACK we '* actually want to go next if direction$ = gBACK then direction$ = gNEXT end if end if '******Method 2 ********** '*** This method ensures that the dialog will NOT surface during a Language Install '*** And handles some other stuff differently ' Another method taken from LWP.LSS ' Give user option to backup currently installed masters IF upgrade = 1 AND network$ = gSTANDARD$ AND _ direction$ <> gBACK AND _ GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ _ THEN IF DoesDirExist(GetPreviousMastersDir()) THEN IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN BackupSmartMasters123% = Lot_GetKeyValFromResponseFile(_ "123", "BackupSmartMasters") <> "0" ELSE chpt$ = Lot_GetChapterFromKeyword("123MASTERS") IF (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) THEN notused% = RegisterCallback("123", "DB_123BACKUPMASTERSCB") direction$ = PopupModalDlg(DB123_BACKUPMASTERS, _ DB123_BACKUPMASTERS) END IF END IF IF (BackupSmartMasters123% = TRUE) THEN DoBackupSmartMasters END IF END IF END IF END FUNCTION '************************************************************************* '** FUNCTION PreCopyConfig123 (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 parameters 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 PreCopyConfig123 (prodno%, network$, direction$, lic%) AS STRING DIM notused%, hDC&, numypixels%, scrnres$, chpt$, chptname$, chpt1$, used% ,proddir$ DIM bcfpath$, insttype$ PreCopyConfig123 = gNEXT '' ****** Language Install Code ****** '' For each destination directory that will have language subdirectories for '' the non-primary language, reset the symbols appropriately '' For a language install SetLanguageSubdir will append the language element '' to the subdirectory name: e.g., '' \lotus\smasters for german becomes \lotus\smasters\deutsch If GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ THEN SetLanguageSubdir "123LANGDIR", "123LANGDIR" END IF IF network$ <> gDISTRIBUTION$ THEN Lot_RefreshDestination("123LANGDIR") END IF ''** Tell the toolkit how many billboards you will have during file copy. ''** This way the toolkit will be avle to calculate how long each billboard ''** should stay up If network$ <> gNODE Then Reg_SetBillboardNumber prodno%, 12 Else Reg_SetBillboardNumber prodno%, 1 End If hDC& = GetDC(HwndFrame()) numYPixels% = GetDeviceCaps(hDC&,VERTRES) notused% = ReleaseDC(HwndFrame(), hDC&) If numYPixels% <= 480 Then ScrnRes$ = "VGA" Else ScrnRes$ = "SVGA" End If If network$ = gSTANDARD$ Then '' RI FILE STANDARD chptname$ = Lot_GetChapterFromKeyword("123SNDATSVR") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) End If If network$ = gSTANDARD$ OR network$=gNODE$ Then ''** Team Consolidate DIM notespath$, notesdatapath$, tcchpt$ tcchpt$ = Lot_GetChapterFromKeyword("123TEAMCONS") If Lot_GetChapterValInt(tcchpt$, F_INOROUT) = 1 Then notused% = Lot_SetChapterFilesInCopyListInOrOut(tcchpt$, 0) IF GetNotesPath123(notespath$, notesdatapath$) THEN ' Notes installed SetSymbolValue "NOTES41DIR", notespath$ SetSymbolValue "NOTES41DATADIR", notesdatapath$ notused% = Lot_SetChapterFilesInCopyListInOrOut(tcchpt$, 1) Lot_RefreshDestination("NOTES41DIR") Lot_RefreshDestination("NOTES41DATADIR") ELSE notused% = Lot_SetChapterFilesInCopyListInOrOut(tcchpt$, 0) END IF End If '** TURN OFF SERVER SPECIFIC BITMAPS chptname$ = Lot_GetChapterFromKeyword("123SVGASRV") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) If ScrnRes$ = "VGA" Then chptname$ = Lot_GetChapterFromKeyword("123VGA") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) chptname$ = Lot_GetChapterFromKeyword("123SVGA") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) ElseIf ScrnRes$ = "SVGA" Then chptname$ = Lot_GetChapterFromKeyword("123VGA") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) chptname$ = Lot_GetChapterFromKeyword("123SVGA") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) End If ''Cleanning up Registry before copy files. CleanRegistryKeys123 prodno% '' Only MigrareFills and BackupMaps for first language IF GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ THEN '' Fills - migrating fills.ini to the registry MigrateFillsPrefReg '' Mapping - copying outside maps over, and set up registry If network$<>gNODE$ Then If upgrade = 1 Then chpt$ = Lot_GetChapterFromKeyword("123CORE") IF (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) THEN DoBackupMaps END IF End If End If END IF '*** REMOVE PRIOR VERSION DIM ProdKey$, Value$, ObsProdDir$, cbBuf&, installDir$ ProdKey$ = "Software\Lotus\123\97.0\" Value$ = "Path" '***Get the directory for the version to be removed IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, ProdKey$) THEN notused% = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, ProdKey$, _ Value$, REG_DWORD, ObsProdDir$, cbBuf&) '***prepare the 2 paths for a string compare installDir$ = NullTrim(GetSymbolValue("123DIR")) ObsProdDir$ = NullTrim(ObsProdDir$) IF RIGHT$(installDir$,1) <> "\" THEN installDir$ = installDir$ + "\" IF RIGHT$(ObsProdDir$,1) <> "\" THEN ObsProdDir$ = ObsProdDir$ + "\" notused% = StrCompare(installDir$,ObsProdDir$,1) IF StrCompare(installDir$,ObsProdDir$,1) = 0 AND _ notused% = ERROR_SUCCESS THEN ' notused% = RemovePriorVersion( "123" , "97.0") END IF END IF '*** DONE REMOVING PRIOR VERSION ElseIf network$ = gSERVER$ Then '' RI FILE FOR SERVER chptname$ = Lot_GetChapterFromKeyword("123VERSTD") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) chptname$ = Lot_GetChapterFromKeyword("123VGA") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) chptname$ = Lot_GetChapterFromKeyword("123SVGA") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) chptname$ = Lot_GetChapterFromKeyword("123SVGASRV") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) End If '** set fWriteBCF% so that entries are added to LOTUS.BCF '** fWriteBCF should be 1 in case of: '** 1) node install '** 2) customized standalone install '** 3) standard (not minimum) install AND LOTUS.BCF not exists fWriteBCF% = 0 IF network$ = gNODE$ THEN fWriteBCF% = 1 ELSEIF network$ = gSTANDARD$ THEN insttype$ = Reg_GetProdSelectedInstallType(prodno%) IF insttype$ = gCUSTOM$ THEN fWriteBCF% = 1 ELSEIF insttype$ = gCOMPLETE$ THEN bcfpath$ = MakePath(GetSymbolValue("123DIR"), "lotus.bcf") IF Lot_DoesFileExist(bcfpath$) = 0 THEN fWriteBCF% = 1 END IF END IF END IF END FUNCTION '************************************************************************* '** FUNCTION AddTheBillBoards123 (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 parameters 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_123BILLBD1_BMP & '** DB_123BILLBD1_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 AddTheBillBoards123 (prodno%, network$, direction$, nbytes&) AS STRING DIM notused% AddTheBillBoards123 = direction$ '' In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If '** For node only display one billboard. If network$ <> gNODE$ Then SetListItem "NORMALFONT",1, STR$(IDC_TEXT2) SetListItem "NORMALFONT",2, STR$(IDC_TEXT3) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD1_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd1, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT2) SetListItem "NORMALFONT",2, STR$(IDC_TEXT3) SetListItem "NORMALFONT",3, STR$(IDC_TEXT4) SetListItem "NORMALFONT",4, STR$(IDC_TEXT5) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD2_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd2, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT3) SetListItem "NORMALFONT",2, STR$(IDC_TEXT5) SetListItem "NORMALFONT",3, STR$(IDC_TEXT7) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD3_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd3, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT3) SetListItem "NORMALFONT",2, STR$(IDC_TEXT5) SetListItem "NORMALFONT",3, STR$(IDC_TEXT7) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD4_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd4, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT3) SetListItem "NORMALFONT",2, STR$(IDC_TEXT5) SetListItem "NORMALFONT",3, STR$(IDC_TEXT7) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123billbd5_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd5, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT2) SetListItem "NORMALFONT",2, STR$(IDC_TEXT3) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123billbd6_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd6, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT3) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123billbd7_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd7, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT2) SetListItem "NORMALFONT",2, STR$(IDC_TEXT4) SetListItem "NORMALFONT",3, STR$(IDC_TEXT6) SetListItem "NORMALFONT",4, STR$(IDC_TEXT8) SetListItem "NORMALFONT",5, STR$(IDC_TEXT10) SetListItem "NORMALFONT",6, STR$(IDC_TEXT13) SetListItem "NORMALFONT",7, STR$(IDC_TEXT14) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123billbd8_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd8, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT2) SetListItem "NORMALFONT",2, STR$(IDC_TEXT4) SetListItem "NORMALFONT",3, STR$(IDC_TEXT6) SetListItem "NORMALFONT",4, STR$(IDC_TEXT8) SetListItem "NORMALFONT",5, STR$(IDC_TEXT10) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123billbd12_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd12, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT3) SetListItem "NORMALFONT",2, STR$(IDC_TEXT5) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD9_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd9, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT3) SetListItem "NORMALFONT",2, STR$(IDC_TEXT5) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD10_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd10, "FNameOrgDlgProc", nbytes& SetListItem "NORMALFONT",1, STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD11_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd11, "FNameOrgDlgProc", nbytes& else SetListItem "NORMALFONT",1, STR$(IDC_TEXT2) SetListItem "NORMALFONT",2, STR$(IDC_TEXT3) SetListItem "IDC_BMP", 1, STR$(IDD_123TITLE_BMP) SetListItem "IDC_BMP", 2, STR$(IDD_123BILLBD1_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_123billbd1, "FNameOrgDlgProc", nbytes& End If END FUNCTION '************************************************************************* '** FUNCTION PostCopyConfig123 (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 parameters 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 PostCopyConfig123 (prodno%, network$, direction$, programgroup$) AS STRING DIM ripath$, workdir$,proddir$,progdir$,pathtowinhelp$,Helpdir$,progdir1$,progdir2$ DIM addinsdir$,Backupdir$,notused%, chpt$, ret%, InfFile$, LanguageAcronym$, langsubdir$ DIM srcbcf$, destbcf$, errcode&, loccompdir$, srvcompdir$, locfile$, srvfile$, dwtype& CONST tlbfile$ = "ltscsn10.tlb" CONST dllfile$ = "ltscsn10.dll" PostCopyConfig123 = 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 IF fWriteBCF% = 1 THEN Write_BCF_FILE prodno%, network$ END IF If network$ = gNODE$ Then '** WORKAROUND: copying LTSCSN10.TLB & .DLL to the node dwtype& = REG_SZ errcode& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, gREGLOTUSCOMP, _ "LocalPath", dwtype&, loccompdir$, 1024) IF loccompdir$ <> "" THEN loccompdir$ = NullTrim(loccompdir$) srvcompdir$ = GetSymbolValue(SYM_NETCOMPONENT$) ' LTSCSN10.TLB locfile$ = MakePath(loccompdir$, tlbfile$) IF Lot_DoesFileExist(locfile$) THEN srvfile$ = MakePath$(srvcompdir$, tlbfile$) IF Lot_DoesFileExist(srvfile$) THEN errcode& = CopyFileA(srvfile$, locfile$, 0) END IF END IF ' LTSCSN10.DLL locfile$ = MakePath(loccompdir$, dllfile$) IF Lot_DoesFileExist(locfile$) THEN srvfile$ = MakePath$(srvcompdir$, dllfile$) IF Lot_DoesFileExist(srvfile$) THEN errcode& = CopyFileA(srvfile$, locfile$, 0) END IF END IF END IF End If ''** WRITE TO RI FILE ''******************* ripath$ = GetSymbolValue("123DIR") + "123w.ri" If Lot_WriteToRiFile (ripath$) = FALSE Then '*** SHOULD BE RESOURCED STRING ErrorMsg SID_123,LdString(SID_123_ERR_RI) + ripath$ End If If network$ = gSERVER$ OR network$ = gDISTRIBUTION Then GOTO SKIPCONFIG End If '** Write entries in win.ini '** Write entries in 123.ini '** Log the product into \windows\lotus.ini '** Write the OLE registration '** Only write this stuff if program files installed IF network = gSTANDARD$ or network = gNODE$ Then 'Create directories, if they aren't there already DIM NewDir$ IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ THEN langsubdir$ = GetSymbolValue(SYM_LANGUAGE_SUBDIR$) & "\" ELSE langsubdir$ = "" END IF NewDir$ = GetSymbolValue("123WORKDIR") IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF LanguageAcronym$=GetSymbolValue(SYM_INSTALL_LANGUAGE$) ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\Work",_ LanguageAcronym$,_ REG_SZ,_ NewDir,_ LENBP(NewDir)+1) IF network$ = gSTANDARD$ THEN NewDir$ = GetSymbolValue("123MASTERSLANGDIR") & langsubdir$ IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF ELSE ' network$ = gNODE$ NewDir$ = GetDestinationSymbolValue123("123MASTERSLANGDIR", TRUE) IF DoesDirExist(NewDir$) = 0 THEN NewDir$ = Lot_TrimEndSlash(GetSymbolValue("123MASTERSLANGDIR")) CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF NewDir$ = NewDir$ & "\" END IF ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\SMasters",_ LanguageAcronym$,_ REG_SZ,_ NewDir$,_ LENBP(NewDir$)+1) NewDir$ = GetSymbolValue("123BACKUPDIR") IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF ' ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ ' gREGLOTUS+"123\97.0\Paths\Backup,_ ' LanguageAcronym$,_ ' REG_SZ,_ ' NewDir$,_ ' LEN(NewDir$)+1) IF Lot_IsTheFeatureInstalled("123TOUR") THEN NewDir$ = Lot_WhereIsFeature(prodno%, "123TOUR", "tour\ssnnet"+LanguageAcronym$+".prz") NewDir$ = Lot_TrimEndSlash(NewDir$) & "\Tour\" ELSE NewDir$ = MakePath(GetSymbolValue("123DIR"), "Tour") + "\" IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF END IF ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\Tour",_ LanguageAcronym$,_ REG_SZ,_ NewDir$,_ LENBP(NewDir$)+1) NewDir$ = GetSymbolValue("123ICONLANGDIR") & langsubdir$ IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\SmartIcons",_ LanguageAcronym$,_ REG_SZ,_ NewDir$,_ LENBP(NewDir$)+1) NewDir$ = "123SAMPLELANG" & LanguageAcronym$ IF Lot_IsTheFeatureInstalled(NewDir$) THEN IF network$ = gSTANDARD$ THEN NewDir$ = GetSymbolValue("123SAMPLESLANGDIR") & langsubdir$ ELSE ' network$ = gNODE$ NewDir$ = GetDestinationSymbolValue123("123SAMPLESLANGDIR", TRUE) & "\" END IF ELSE NewDir$ = GetSymbolValue("123SAMPLESLANGDIR") & langsubdir$ IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF END IF ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\Samples",_ LanguageAcronym$,_ REG_SZ,_ NewDir$,_ LENBP(NewDir$)+1) NewDir$ = MakePath(GetSymbolValue("123DIR"), "Auto") + "\" IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\AutoOpen",_ "",_ REG_SZ,_ NewDir$,_ LENBP(NewDir$)+1) IF Lot_IsTheFeatureInstalled("123CORE") THEN NewDir$ = Lot_WhereIsFeature(prodno%, "123CORE", "addins\publhtml.12a") NewDir$ = Lot_TrimEndSlash(NewDir$) & "\Addins\" ELSE NewDir$ = MakePath(GetSymbolValue("123DIR"), "Addins") + "\" IF NOT DoesDirExist(Lot_TrimEndSlash(NewDir$)) THEN CreateDir NewDir$, cmoNone notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_DIRECTORY$, NewDir$) END IF END IF ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\AddIns",_ "",_ REG_SZ,_ NewDir$,_ LENBP(NewDir$)+1) '** Write product specific registry keys AddRegistryKeys123 prodno%, network$ ' ** Write the ODBC registration Write_ODBC_Reg prodno%, network$ If Lot_IsTheFeatureInstalled("123CORE") <> FALSE Then '** Write the OLE registration database ret% = Lot_WriteOLERegFor123(network$, prodno%) '** Write the OCX registration database ret% = Lot_WriteOCXRegFor123(network$, prodno%) '** Write the MAP registration database ret% = Lot_WriteMapRegFor123(network$, prodno%) '** Write the ImageMark registration database ret% = Lot_WriteImgRegFor123(network$, prodno%) '** Write the Help registration database ret% = Lot_WriteHlpRegFor123(network$, prodno%) '** Write the uninstall file(not in INF) registration database ret% = Lot_RegUninstFilFor123(network$, prodno%) '** Write the User Preference registration database IF GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ THEN If upgrade = 1 Then MigrateUserPrefReg End if END IF '** Clean up GRG files for standard install If network = gSTANDARD$ Then Dim grgPath$ grgPath$ = Lot_WhereIsFeature(prodno%, "123CORE", "123w97.grg") grgPath$ = MakePath(grgPath$, "123w97.grg") If DoesFileExist(grgPath$, femExists) Then 'SetFileAttr grgPath$, 0 Kill grgPath$ End If End If proddir$ = GetSymbolValue("123DIR") ret% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\Personal",_ "",_ REG_SZ,_ proddir$,_ LENBP(proddir$)+1) End If END IF '** Write the uninstaller - but only for the primary language If GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ Then IF network$ = gSTANDARD$ THEN InfFile$ = GetSymbolValue("INSTDIR") + "123.INF" ELSE IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN InfFile$ = GetSymbolValue("SUITDIR") + "123NODE.INF" ELSE InfFile$ = GetSymbolValue("123DIR") + "123NODE.INF" END IF END IF notused%=Lot_RegisterUninstaller(LdString(SID_123_PROD_NAME),_ LdString(SID_123_PROD_VER),_ LdString(SID_123_OFFICIALNAME),_ InfFile$,_ TRUE,FALSE,_ GetSymbolValue(SYM_INSTALL_LANGUAGE$),_ "c:\uninst.log","",_ "") End If SKIPCONFIG: END FUNCTION '************************************************************************* '** PUBLIC SUB AddRegistryKeys123 (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 parameters 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 AddRegistryKeys123 (prodno%, network$) DIM LocPath$, Filename$, descript$, gbuf$, instvalue& DIM szkey$, szkey2$, nsize&, nsize1&,nsize2&,Insttype$,nsize3,Altcomp$ DIM RegStatus&, keyvalue$, keyvalue1$,keyvalue2$, keyvalue3$, keyvalue4$, ComPath$ DIM ProdDir$, TypeLibDir$ '*****************************WWEXE[[ DIM BeginKinsoku$, EndKinsoku$, FontName$, FontSize&, FontPitch&, CharSet&, CodePage&, IgnoreAlign$ DIM keyvalue10$, keyvalue11$, keyvalue12$, keyvalue13$, keyvalue14$, keyvalue15$, keyvalue16$, keyvalue17$ DIM nsize10&, nsize11&, nsize12&, nsize13&, nsize14&, nsize15&, nsize16&, nsize17& DIM szkeyKinsoku$, szkeyPanelPref$ DIM Local szkeyKinsoku$ = gREGLOTUS+"123\97.0\Kinsoku" szkeyPanelPref$ = gREGLOTUS+"123\97.0\Panel Preferences" '*****************************WWEXE]] szkey$ = gREGLOTUS+"123\97.0" descript$ = "Lotus 1-2-3 97.0" keyvalue$ = "Path" keyvalue1$ = "Description" keyvalue2$ = "Name" Insttype$ = "InstallType" AltComp$ = "AltComponents" Filename = "123w.exe" nsize1 = lenbp(Filename) + 1 nsize2 = lenbp(descript$) + 1 nsize3 = lenbp(instvalue) '*****************************WWEXE[[ keyvalue10$ = "BeginKinsoku" keyvalue11$ = "EndKinsoku" keyvalue12$ = "FontName" keyvalue13$ = "FontSize" keyvalue14$ = "FontPitch" keyvalue15$ = "CharSet" Keyvalue16$ = "CodePage" Keyvalue17$ = "IgnoreEvenAlignment" CodePage = GetACP() Local = 0 BeginKinsoku$ = LdString(SID_123_BEGINKINSOKU) EndKinsoku$ = LdString(SID_123_ENDKINSOKU) IgnoreAlign$ = LdString(SID_123_IGNOREALIGN) FontName$ = LdString(SID_123_FONTNAME) '*** for Japan If CodePage = 932 Then FontSize& = 10 FontPitch& = 0 CharSet = 128 Local = 1 '*** for PRC ElseIf CodePage = 936 Then FontSize& = 9 FontPitch& = 1 CharSet = 134 Local = 1 '*** for Korea ElseIf CodePage = 949 Then FontSize& = 9 FontPitch& = 2 CharSet = 129 Local = 1 '*** for Taiwan ElseIf CodePage = 950 Then FontSize& = 9 FontPitch& = 2 CharSet = 136 Local = 1 ' Else ' FontSize& = 10 ' FontPitch& = 0 ' CharSet = 1 ' Local = 0 End if If Local = 1 Then nsize10 = lenbp(BeginKinsoku$) + 1 nsize11 = lenbp(EndKinsoku$) + 1 nsize12 = lenbp(FontName$) + 1 nsize13 = lenbp(FontSize) nsize14 = lenbp(FontPitch) nsize15 = lenbp(CharSet) nsize16 = lenbp(CodePage) nsize17 = lenbp(IgnoreAlign$) + 1 End if '*****************************WWEXE]] If network$ = gNODE$ Then instvalue = 1 ElseIf network$ = gSTANDARD$ Then instvalue = 0 End if locpath$ = Lot_WhereIsFeature(prodno%, "123CORE", LdString(SID_123_123EXE)) nsize = lenbp(LocPath$) + 1 regStatus = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szkey) ' Register for uninstall 'regStatus = Lot_RegisterObject("123TOP", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\"+szkey$) 'regStatus = Lot_RegisterObject("123TOP", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CURRENT_USER\"+szkey$) regStatus = Lot_RegisterObject("123TOP", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_USERS\.DEFAULT\"+szkey$) regStatus = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue$, REG_SZ, LocPath$, nsize) regStatus = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue2$, REG_SZ, Filename, nsize1) regStatus = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue1$, REG_SZ, descript$, nsize2) regStatus = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, Insttype$, REG_DWORD, instvalue, nsize3) keyvalue$ = GetSymbolValue(SYM_NAME$) nsize = LENBP(keyvalue$)+1 regStatus = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER, szkey, "UserName", REG_SZ, keyvalue$, nsize) keyvalue$ = GetSymbolValue(SYM_COMPANY$) nsize = LENBP(keyvalue$)+1 regStatus = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER, szkey, "CompanyName", REG_SZ, keyvalue$, nsize) '*****************************WWEXE[[ If Local = 1 Then regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyKinsoku, keyvalue10$, REG_SZ, BeginKinsoku$, nsize10) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyKinsoku, keyvalue11$, REG_SZ, EndKinsoku$, nsize11) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyPanelPref, keyvalue12$, REG_SZ, FontName$, nsize12) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyPanelPref, keyvalue13$, REG_DWORD, FontSize, nsize13) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyPanelPref, keyvalue14$, REG_DWORD, FontPitch, nsize14) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyPanelPref, keyvalue15$, REG_DWORD, CharSet, nsize15) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyPanelPref, keyvalue16$, REG_DWORD, CodePage, nsize16) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkeyPanelPref, keyvalue17$, REG_SZ, IgnoreAlign, nsize17) End if '*****************************WWEXE]] ComPath$ = Lot_WhereIsFeature(prodno%, "123CORE", "123w.exe") nsize = lenbp(ComPath$) + 1 regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, AltComp$, REG_SZ, ComPath$, nsize) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\App Paths\123w.exe", "", REG_SZ, ComPath$+"123w.exe", nsize+Lenbp("123w.exe")) regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\App Paths\123w.exe", "Path", REG_SZ, ComPath$, nsize) regStatus = Lot_RegisterObject("123CORE", UNIN_CLASS_REGISTRY_HIVE$,_ "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\123w.exe") IF regStatus& <> ERROR_SUCCESS THEN RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+szkey,"","" END IF '** Write the registry value to add the new language AddRegistryLanguage LdString(SID_123_PROD_NAME), _ LdString(SID_123_PROD_VER) 'regStatus = DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szkey$) 'if RegStatus = 1 then ' this is used to check the current value of an existing key. ' gbuf$ receives the key values data. 'regStatus& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue$, 0, gbuf$, nsize) 'end if 'Register the 123 type library ProdDir$ = GetSymbolValue("123DIR") TypeLibDir$ = MakePath(ProdDir$, "L123TYP.TLB") New_RegisterTypeLib TypeLibDir$, ProdDir$ '*** Register the components installed with the product RegisterSharedComponent "WIN32SHRQUICKDEMOPRG", "Animations", "1.1" RegisterSharedComponent "WIN32SHRASWANPRG", "Aswan", "1.4" RegisterSharedComponent "WIN32SHRBENTOPRG", "Bento", "3.0" RegisterSharedComponent "WIN32SHRBUBBHELPPRG", "Bubble Help", "1.2" RegisterSharedComponent "WIN32SHRCCSTRPRG", "ccStr", "1.0" RegisterSharedComponent "WIN32SHRCHARTPRG", "Chart", "2.1" RegisterSharedComponent "WIN32SHRCUSTSUPPHELPPRG", "CustomerSupportHelp", "4.0" RegisterSharedComponent "WIN32SHRDIALOGDLLPRG", "Dialog DLL", "3.0" RegisterSharedComponent "WIN32SHRGRAPHFILEFILTERPRG", "GraphicFilters", "1.1" RegisterSharedComponent "WIN32SHRSHAREDHELPPRG", "Help", "3.1" RegisterSharedComponent "WIN32SHRSMARTICONPRG", "Icon Palette", "7.1" RegisterSharedComponent "WIN32SHRUIMSPRG", "InfoBox", "2.1" RegisterSharedComponent "WIN32SHRINTERNETPRG", "Internet", "1.0" RegisterSharedComponent "WIN32SHRLISDBPRG", "LISDB", "1.0" RegisterSharedComponent "WIN32SHRLOTUSSCRIPTPRG", "LotusScript", "3.1" RegisterSharedComponent "WIN32SHRNOTESOPENSAVEPRG", "NotesOpenSave", "1.0" RegisterSharedComponent "WIN32SHRSTDPLAYERPRG", "Player", "1.1" RegisterSharedComponent "WIN32SHRSPELLDATA", "Spell", "4.0" RegisterSharedComponent "WIN32SHRSPELLPRG", "Spell", "4.0" RegisterSharedComponent "WIN32SHRSTATUSBARPRG", "Status Bar", "6.1" RegisterSharedComponent "WIN32SHRCHARTPRG", "SystemServices", "3.1" RegisterSharedComponent "WIN32TEAMMAILSHRPRG", "TeamMail", "1.1" RegisterSharedComponent "WIN32SHRTITLEBARPRG", "Title Bar", "1.0" RegisterSharedComponent "WIN32SHRUINST", "Uninstall", "1.0" RegisterSharedComponent "WIN32SHRUNSPRG", "UNS", "2.0" END SUB '************************************************************************* '** FUNCTION AddIcons123 (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 parameters 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 AddIcons123 (prodno%, network$, direction$, programgroup$) AS STRING DIM ripath$, exepath$, exename$, szArgument$, notused%, LinkName$ DIM LanguageQualifier$, LanguageAcronym$, IconName$, FilePath$ DIM FeatureKeyWord$ AddIcons123 = direction$ '' In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If If network$=gSERVER$ or network$=gDISTRIBUTION$ Then EXIT FUNCTION End If LanguageQualifier$ = "" LanguageAcronym$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) szArgument$ = "/L " + LanguageAcronym$ exename$ = LdString(SID_123_123EXE) exepath$ = Lot_WhereIsFeature(prodno%, "123CORE", exename$) '** If language install, add qualifier If GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then _ LanguageQualifier$ = " - " & LanguageAcronym$ '** Write entries in Program Manager If Lot_IsTheFeatureInstalled("123CORE") <> FALSE Then IconName$ = LdString(SID_123_OFFICIALNAME)+LanguageQualifier LinkName$ = IconName$ + ".LNK" IF network$ = gNODE THEN FeatureKeyWord$ = "123TOP" ELSE FeatureKeyWord$ = "123CORE" END IF IF IsNewShell() THEN notused%=Lot_AddLinkToFolder(prodno%, exepath$+exename$, LinkName$, _ "123 Program Description", szArgument$, exepath$) 'To register a shortcut object for uninstall you use for the path the full path of the link file notused%=Lot_RegisterObject(FeatureKeyWord$, UNIN_CLASS_SHORTCUT$,_ Lot_GetProgFolder(1)+_ IconName$+".LNK") ELSE CreateProgmanItem programgroup$, IconName$,_ exepath$+exename$+ " " + szArgument$, "", cmoOverwrite 'To register an icon object for uninstall the path is: ProgramGroup$\+ ' IconName notused%=Lot_RegisterObject(FeatureKeyWord$, UNIN_CLASS_ICON$,_ programgroup$+"\"+IconName$) END IF IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ THEN IconName$ = LdString(SID_123_VIEWSTRING)+LanguageQualifier LinkName$ = IconName$ + ".LNK" ELSE IconName$ = LdString(SID_123_VIEWSTRING) LinkName$ = IconName$ + ".LNK" END IF szArgument$ = "" DIM readme_wri$ readme_wri = LdString(SID_123_README) IF IsNewShell() THEN LinkName$ = LdString(SID_123_LOTUS_UA) + LinkName$ notused%=Lot_AddLinkToFolder(prodno%, exepath$+readme_wri, LinkName$, _ LinkName$, szArgument$, exepath$) 'To register a shortcut object for uninstall you use for the path the full path of the link file notused%=Lot_RegisterObject(FeatureKeyWord$, UNIN_CLASS_SHORTCUT$,_ Lot_GetProgFolder(1)+_ LinkName$) ELSE CreateProgmanItem programgroup$, IconName$,_ exepath$+readme_wri+ " " + szArgument$, "", cmoOverwrite 'To register an icon object for uninstall the path is: ProgramGroup$\+ ' IconName notused%=Lot_RegisterObject(FeatureKeyWord$, UNIN_CLASS_ICON$,_ programgroup$+"\"+IconName$) END IF 'To register a file object for uninstall that is not in the inf but is created at install time to 'be used by a feature 'notused%=Lot_RegisterObject("123CORE", UNIN_CLASS_FILE$, FilePath$) 'To register a file_group object for uninstall that is not in the inf but is created at install time to 'be used by a feature of a product (that needs to be cleanup by uninstall). 'The FilePath$ is the full path to a directory including a wildcard (*) as a file name 'notused%=Lot_RegisterObject("123CORE", UNIN_CLASS_FILE_GROUP$, FilePath$) 'To register a directory object for uninstall that is not in the inf (as a destination directory) but is created 'at install time to be used by a feature of a product (that needs to be cleanup by uninstall). 'The DirectoryPath$ is the full path to the directory 'notused%=Lot_RegisterObject("123CORE", UNIN_CLASS_DIRECTORY$, DirectoryPath$) End If If Lot_IsTheFeatureInstalled("123TOP") <> FALSE Then 'To register a registry key for uninstall to cleanup when a feature is uninstalled. 'The KeyString$ is the full Key specification: 'KeyString$="HKEY_LOCAL_MACHINE\SOFTWARE\lOTUS\123\97.0" 'notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_REGISTRY_KEY$, KeyString$) 'To register a registry key Value for uninstall to cleanup when a feature is uninstalled. 'The KeyValueString$ is the full Key+SubKey+ValueName specification: 'HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\123\2.1\Description 'notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_REGISTRY_VALUE$, KeyValueString$) 'To register a registry key hive for uninstall to cleanup when a feature is uninstalled (the complet ' hive will be deleted). 'The KeyHive$ is the full Key Hive specification: ' HKEY_LOCAL_MACHINE\SOFTWARE\LOTUS\123 'notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_REGISTRY_HIVE$, KeyHive$) End If SKIPCONFIG: END FUNCTION '************************************************************************* '** FUNCTION PostSuccessReg123 (prodno%, network$, direction$) AS STRING '** '** Purpose: If you need to launch something after install runs '** In Symbols : '** Out Symbols: '** '** Arguments: All parameters 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 PostSuccessReg123 (prodno%, network$, direction$) AS STRING PostSuccessReg123 = direction$ '' In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If END FUNCTION '******************************** '******************************** '** Product Specific Functions ** '******************************** '******************************** '************************************************************************* '** FUNCTION Get123PathfromLotusIni() AS STRING '** '** Purpose: Gets the product dir path from Lotus.ini file, and searches for '** acronym.exe in the product dir path. '** '** Author: JYOTI KEDIA, JMD '** Arguments: None '** Returns: if acronym.exe does not exist in dir specified in lotus.ini, it '** returns "", otherwise returns the full path to the product. '** NOTE: changed to not include product name by JMD '** includes trailing backslash '************************************************************************* FUNCTION Get123PathfromLotusIni() AS STRING DIM DestDir$, lotusinipath$, defdir$, temp%, proddir$, fullpath$, rv% DIM szkey$, keyvalue$, nsize&, gbuf$, ret& DestDir$ = GetWindowsDir() lotusinipath$ = DestDir$ +"lotus.ini" if DoesFileExist(lotusinipath$,femExists) then defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "123w") if defdir$ <> "" then temp% = INSTR(1,LCASE$(defdir$),"123w.exe") if temp% <> 0 then ProdDir$ = MID$(defdir$,1,(temp%-1)) if ProdDir$ <> "" then fullpath$ = ProdDir$ + "123w.exe" if DoesFileExist(fullpath$, femExists) then rv% = Lot_CleanPath(fullpath$) Get123PathfromLotusIni = ProdDir$ EXIT FUNCTION end if end if end if end if end if '** Now try the registry szkey$ = "SOFTWARE\Lotus\" + _ LTRIM$(LdString(SID_123_PROD_NAME)) + "\" + _ LTRIM(LdString(SID_123_PROD_VER)) keyvalue$ = "Path" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, 0, gbuf$, nsize&) IF gbuf$ <> "" THEN gbuf$ = TRIM$(gbuf$) gbuf$ = LEFT$(gbuf$, LEN(gbuf$)-1) Get123PathfromLotusIni = gbuf$ ELSE Get123PathfromLotusIni = "" END IF END FUNCTION PUBLIC FUNCTION InitLanguage123 (prodno%, network$, direction$) AS STRING '************************************************************************* '** Purpose: Finds out the installed languages and determines the nature '** of the install. If not running automated, displays a message box for '** a language install '** '** Author: JMDonohue '** Arguments: All parameters 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 '** '** Returns: (not used) '** '** Implicitly sets the following global symbols for later processing: '** SYM_INSTALLKIND$ '** SYM_INSTALLKINDS$ (list) '** Sets the following global symbols (based on product #1) for later '** processing: '** SYM_REG_PRODUCTNAME$ '** SYM_REG_PRODUCTVER$ '************************************************************************* DIM szProductName$, szProductVersion$, szInstallKind$, szLanguageSubdir$ szProductName$ = LdString(SID_123_PROD_NAME) szProductVersion$ = LdString(SID_123_PROD_VER) if prodno% = 1 THEN SetSymbolValue SYM_REG_PRODUCTNAME$ , szProductName$ SetSymbolValue SYM_REG_PRODUCTVER$ , szProductVersion$ END IF InitLanguages szProductName$, szProductVersion$, prodno% InitLanguage123 = "" END FUNCTION '************************************************************************* FUNCTION Get_and_Set_Registry_Entries(FeatureKeyWord$, grgPath$, exePath$, winsysPath$, sectionName$) AS INTEGER '** Purpose: This function retrieves Registry entries from GRG files '** and writes both to the registry and to the uninstall files. '** Author: AMELLO '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* Dim components As RegComponents DIM retval%, hkey&, subkey$, value$, valuename$, LReturn&, fileHandle& DIM valuelen&, phkResult&, hkeyName$, chpt$ DIM sectionFound& DIM registerUninstall&, deleteKey& DIM subkeylen& If grgPath$ <> "" and exePath$ <> "" Then retval = OpenGRG(grgPath$, fileHandle) sectionFound& = FALSE retval = ParseLine(fileHandle, exePath$, winsysPath$, components, sectionName, sectionFound) ' Only fill in if ParseLine was successfull DO WHILE retval = 0 hkey = components.hkey valuelen = components.valuelen subkey = Trim$(components.subkey) value = Trim$(components.value) valuename = Trim$(components.valuename) registerUninstall = components.registeruninstall deleteKey = components.deletekey If hkey <> 0 Then SELECT CASE hkey& case HKEY_LOCAL_MACHINE hkeyName$ = "HKEY_LOCAL_MACHINE" case HKEY_CLASSES_ROOT hkeyName$ = "HKEY_CLASSES_ROOT" case HKEY_USERS hkeyName$ = "HKEY_USERS" case HKEY_CURRENT_USER hkeyName$ = "HKEY_CURRENT_USER" END SELECT If ( deleteKey& = 1 ) Then If ( valuelen& <> 0 ) Then LReturn& = RegOpenKeyEx(hkey&, subkey$, 0, KEY_ALL_ACCESS,phkResult&) LReturn& = RegDeleteValue(phkResult&, valuename$) LReturn& = RegCloseKeyEx(phkResult&) Else IF WhatPlatform() = PLATFORM_WIN95 THEN LReturn& = RegDeleteKey(hkey&, subkey$) ElseIF WhatPlatform() = PLATFORM_WINNT THEN LReturn& = Lot_DeleteRegKeyEx(hkey&, subkey$) End If End If Else LReturn& = Lot_CreateRegKeyValueEx(hkey,_ subkey,_ valuename,_ REG_SZ,_ value,_ valuelen+1) If ( registerUninstall& = 1 ) Then LReturn& = Lot_RegisterObject(FeatureKeyWord$, UNIN_CLASS_REGISTRY_HIVE$,_ hkeyName$+"\"+subkey) End If End If End If retval = ParseLine(fileHandle, exePath$, winsysPath$, components, sectionName, sectionFound) LOOP CloseGRG(fileHandle) End If END FUNCTION '************************************************************************* '** 123MOREDIRSCB '** 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 MOREDIRSCB (hDlg&, CtrlId%, Classes$, LInst&) DIM dirChanged1%, dirChanged2%, dirChanged3%, dirChanged4%, i%, notused% DIM drvSel%,Inst%, dirToChange1$, dirToChange2$,dirToChange3$,dirToChange4$ STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS) Inst% = CINT(LInst&) SELECT CASE Classes$ CASE "__DLGINIT" '** This is the directory for the Work Files Lot_GetDriveFreeSpaceList "IDC_COMBO1" SetListItem "IDC_EDIT", 1, GetSymbolValue("123WORKDIR") 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("123MASTERSLANGDIR") 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("123BACKUPDIR") drvIndex%(1) = ValidateEditBox(hDlg& , 3) AddListItem SYM_UPDATELIST$, "IDC_EDIT3" '** This is the directory for the Sample Files Lot_GetDriveFreeSpaceList "IDC_COMBO4" SetListItem "IDC_EDIT", 4, GetSymbolValue("123SAMPLESLANGDIR") drvIndex%(1) = ValidateEditBox(hDlg& , 4) AddListItem SYM_UPDATELIST$, "IDC_EDIT4" CASE "IDC_COMBO1" ComboSelChanged 1, Inst% DirChanged1% = TRUE CASE "IDC_COMBO2" ComboSelChanged 2, Inst% DirChanged2% = TRUE CASE "IDC_COMBO3" ComboSelChanged 3, Inst% DirChanged3% = TRUE CASE "IDC_COMBO4" ComboSelChanged 4, Inst% DirChanged4% = TRUE CASE "IDC_BRWSDIR" drvSel% = ValidateBrowse(hDlg&,Inst%) SELECT CASE Inst% CASE 1 dirChanged1% = TRUE CASE 2 dirChanged2% = TRUE CASE 3 dirChanged3% = TRUE CASE 4 dirChanged3% = TRUE END SELECT CASE "IDC_EDIT" SELECT CASE Inst% CASE 1 dirChanged1% = TRUE CASE 2 dirChanged2% = TRUE CASE 3 dirChanged3% = TRUE CASE 4 dirChanged4% = TRUE END SELECT CASE "IDC_OK" '** Validate Paths always: to check for a file with the same name '** WorkDir drvSel% = ValidateEditBox(hDlg& , 1) IF drvSel% = 0 THEN SetListItem "__LASTSTATUS", 1, "Q" EXIT SUB ELSE drvIndex%(1) = drvSel% END IF dirToChange1$ = GetPathFromComboEdit(hDlg&, 1) IF ValidatePath(dirToChange1$) = FALSE THEN SetListItem "__LASTSTATUS",1,"Q" EXIT SUB ELSE SetSymbolValue "123WORKDIR", dirToChange1$ END IF '** SMasters drvSel% = ValidateEditBox(hDlg& , 2) IF drvSel% = 0 THEN SetListItem "__LASTSTATUS", 1, "Q" EXIT SUB ELSE drvIndex%(2) = drvSel% END IF dirToChange2$ = GetPathFromComboEdit(hDlg&, 2) IF ValidatePath(dirToChange2$) = FALSE THEN SetListItem "__LASTSTATUS",1,"Q" EXIT SUB ELSE SetSymbolValue "123MASTERSLANGDIR", dirToChange2$ END IF '** Backup drvSel% = ValidateEditBox(hDlg& , 3) IF drvSel% = 0 THEN SetListItem "__LASTSTATUS", 1, "Q" EXIT SUB ELSE drvIndex%(3) = drvSel% END IF dirToChange3$ = GetPathFromComboEdit(hDlg&, 3) IF ValidatePath(dirToChange3$) = FALSE THEN SetListItem "__LASTSTATUS",1,"Q" EXIT SUB ELSE SetSymbolValue "123BACKUPDIR", dirToChange3$ END IF '** Samples drvSel% = ValidateEditBox(hDlg& , 4) IF drvSel% = 0 THEN SetListItem "__LASTSTATUS", 1, "Q" EXIT SUB ELSE drvIndex%(4) = drvSel% END IF dirToChange4$ = GetPathFromComboEdit(hDlg&, 4) IF ValidatePath(dirToChange4$) = FALSE THEN SetListItem "__LASTSTATUS",1,"Q" EXIT SUB ELSE SetSymbolValue "123SAMPLESLANGDIR", dirToChange4$ END IF '** Refresh destination Lot_RefreshDestination("123WORKDIR") Lot_RefreshDestination("123MASTERSLANGDIR") Lot_RefreshDestination("123BACKUPDIR") Lot_RefreshDestination("123SAMPLESLANGDIR") END SELECT 'Classes END SUB SUB 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_123_PROD_NAME) szProductVersion$ = LdString(SID_123_PROD_VER) IF Lot_IsTheFeatureInstalled(Key$) <> FALSE THEN RegKeyName$ = gREGLOTUS + szProductName$ + "\" + szProductVersion$ + _ "\Components\" + FileName$ + "\" + Version$ Lot_RegCreateKeyEx HKEY_LOCAL_MACHINE, RegKeyName$ END IF END SUB '**************************************************************************** '** FUNCTION DetectPreviousVersion ( Productfound$ ) AS STRING '** '** Purpose: Check Previous Version is install.. '** '** Author: Pamela Donahue '** Arguments: Productfound$ '** Returns: YES or NO '**************************************************************************** FUNCTION DetectPreviousVersion (Productfound$) AS STRING DIM destpath$, temp%, dirpath$, adwpath$, ole2dllpath$, path123$,ivcpath$ '** DND: More path assumptions dirpath$ = Get123PathfromLotusIni() If dirpath$ <> "" Then ole2dllpath$ = MakePath(dirpath$, "ole2Drag.dll") ivcpath$ = MakePath(dirpath$, "ivcw.dll") If DoesFileExist(ole2dllpath$, femExists) Then If DoesFileExist(ivcpath$, femExists) Then DetectPreviousVersion = "RAPTOR" Productfound = True else DetectPreviousVersion = "MONROE" Productfound = True end if upgrade = 1 else DetectPreviousVersion = "" end if end if END FUNCTION '**************************************************************************** '** SUB RemoveObsoleteFiles123(hDlg&, CtrlId%, Classes%, Inst&) '** '** Purpose: callback to handle Remove Files dialog. '** '** Author: BMK 7/18/95 (significantly modified by TLB, and then jshaw) '** Arguments: hDlg%, CtrlId%, Classes$, Inst% '** Returns: NONE '**************************************************************************** SUB RemoveObsoleteFiles123(hDlg&, CtrlId%, Classes$, Inst&) DIM nSections%, count%, chpt$, sym$, notused% nSections% = 2 SELECT CASE Classes$ case "__DLGINIT" AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1) AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2) AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$ case "IDC_OK" for count% = 1 to nSections% sym$ = "123OBSFILES" + LTRIM$(STR$(count%)) chpt$ = Lot_GetChapterFromKeyWord(sym$) if chpt$ <> "" then notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 1) end if next case "IDC_BACK" ' reset INF sections to OFF in case user changes his/her mind for count% = 1 TO nSections% sym$ = "123OBSFILES" + LTRIM$(STR$(count%)) chpt$ = Lot_GetChapterFromKeyWord(sym$) if chpt$ <> "" then notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 0) end if next case "IDC_EXIT" ' reset INF sections to OFF in case user changes his/her mind for count% = 1 TO nSections% sym$ = "123OBSFILES" + LTRIM$(STR$(count%)) chpt$ = Lot_GetChapterFromKeyWord(sym$) if chpt$ <> "" then notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 0) end if next END SELECT END SUB '************************************************************************* FUNCTION Lot_WriteOLERegFor123(network$, prodno%) AS INTEGER '** Purpose: This function writes OLE registration needed '** Author: JLU '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* Dim components As RegComponents DIM retval%, LReturn&, grgPath$, ret% DIM exePath$, chpt$, FeatureKeyWord$ DIM sectionName$ DIM winsysPath$ winsysPath$ = GetWindowsSysDir() winsysPath$ = Lot_TrimEndSlash(winsysPath$) grgPath$ = Lot_WhereIsFeature(prodno%, "123CORE", "123w97.grg") grgPath$ = MakePath(grgPath$, "123w97.grg") exePath$ = Lot_WhereIsFeature(prodno%, "123CORE", "123w.exe") exePath$ = Lot_TrimEndSlash(exePath$) IF network$ = gNODE THEN FeatureKeyWord$ = "123TOP" ELSE FeatureKeyWord$ = "123CORE" END IF ' Update OLE Default Registry settings sectionName = "OLE_DEFAULT" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) ' Update OLE Compatible Registry settings if is not an upgrade or ' if Raptor and/or Monroe are being obsoleted. chpt$ = Lot_GetChapterFromKeyWord("123OBSFILES1") retval = Lot_GetChapterValInt(chpt$, F_INOROUT) If (upgrade <> 1 or (upgrade = 1 and retval <> 0))_ and (grgPath$ <> "") and (exePath$ <> "") Then sectionName = "OLE_COMPAT" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) End If END FUNCTION '************************************************************************* FUNCTION Lot_WriteOCXRegFor123(network$, prodno%) AS INTEGER '** Purpose: This function writes OCX registration needed '** Author: JLU '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* DIM featPath$, notused% ' Lotus Script IDE If Lot_IsTheFeatureInstalled("WIN32SHRLOTUSSCRIPTIDE") <> FALSE Then 'featPath$ = Lot_WhereIsFeature(prodno%, "WIN32SHRLOTUSSCRIPTIDE", "lcrttb4.dll") 'featPath$ = Lot_TrimEndSlash (featPath$) 'notused% = Lot_RegisterOCX (featPath$ + "\lcrttb4.dll") featPath$ = Lot_WhereIsFeature(prodno%, "WIN32SHRLOTUSSCRIPTIDE", "ltsctn31.ocx") featPath$ = Lot_TrimEndSlash (featPath$) notused% = Lot_RegisterOCX (featPath$ + "\ltsctn31.ocx") End If If Lot_IsTheFeatureInstalled("WIN32SHRLOTUSSCRIPTPRG") <> FALSE Then featPath$ = Lot_WhereIsFeature(prodno%, "WIN32SHRLOTUSSCRIPTPRG", "lcsrtn10.dll") featPath$ = Lot_TrimEndSlash (featPath$) notused% = Lot_RegisterOCX (featPath$ + "\lcsrtn10.dll") End If END FUNCTION '************************************************************************* '** PUBLIC SUB DB_123BACKUPMASTERSCB(hDlg%, CtrlId%, Classes$, Inst%) AS INTEGER '** '** Purpose: Handles Dialog for Backup of currently installed smasters '** '** Author: Michael Natsis '** Arguments: hDlg%, CtrlId%, Classes$, Inst% '** Returns: SUCCESS '************************************************************************* PUBLIC SUB DB_123BACKUPMASTERSCB(hDlg&, CtrlId%, Classes$, Inst&) SELECT CASE Classes$ CASE "IDC_OK" BackupSmartMasters123% = TRUE case "IDC_BACK" BackupSmartMasters123% = FALSE case "IDC_EXIT" BackupSmartMasters123% = FALSE END SELECT END SUB '************************************************************************* '** FUNCTION HELPEX123 (Chapter$,fInCopy%) AS INTEGER '** '** Purpose: THIS FUNCTION IS CALLED BECAUSE IT APPEARS AS AN EXCEPTION '** FUNCTION IN THE INF FILE. IT IS CALLED WHENEVER THE USER '** TOGGLES a HELP SECTION. THUS ALLOWING US TO DO SOME '** SPECIAL CASE WORK FOR THE ALIAS FILES. '** Author: '** Arguments: '** Returns: SUCCESS '************************************************************************* PUBLIC FUNCTION HELPEX123 (Chapter$,fInCopy%) AS INTEGER DIM helpalias$ '** Since a helpo file must be installed, '** either the real help file, or the alias, '** we toggle the alias file, when the main help file is '** is toggled by the user. helpalias$ = Lot_GetNextSibling (Chapter$, F_NOTHING) Lot_ToggleChapterFilesInCopyList helpalias$ HELPEX123 = SUCCESS END FUNCTION '************************************************************************* '** FUNCTION Get123PathfromRegistry() AS STRING '** '** Purpose: Gets the product dir path from registry, and searches for '** 123w.exe in the product dir path. '** '** Author: JoeG '** Arguments: None '** Returns: if 123w.exe does not exist in dir specified in registry, it '** returns "", otherwise returns the full path to the product. '** NOTE: changed to not include product name by JMD '** includes trailing backslash '** NOTE: if Gemini is installed from the server to the node, '** returns the full path to the node '************************************************************************* FUNCTION Get123PathfromRegistry() AS STRING DIM szkey$, keyvalue$, nsize&, gbuf$, ret&, path123$ DIM dwtype&, infpath$, idx%, instval&, reg123$ Get123PathfromRegistry = "" reg123$ = LTRIM$(LdString(SID_123_PROD_NAME)) & "\" & _ LTRIM(LdString(SID_123_PROD_VER)) szkey$ = "SOFTWARE\Lotus\" & reg123$ keyvalue$ = "Path" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, 0, gbuf$, nsize&) IF gbuf$ <> "" THEN gbuf$ = NullTrim(gbuf$) path123$ = gbuf$ + "\123w.exe" IF gbuf$ = "" OR Lot_DoesFileExist(path123$) = 0 THEN EXIT FUNCTION END IF instval& = GetInstTypefromRegistry() IF instval& = 0 THEN ' standalone Get123PathfromRegistry = gbuf$ ELSEIF instval& = 1 THEN ' node dwtype& = REG_SZ gbuf$ = "" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, _ gREGLOTUS & "123Suite\97.0\products\" & reg123$, _ "InfFileName", dwtype&, gbuf$, 1024) IF gbuf$ = "" THEN dwtype& = REG_SZ ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, _ gREGLOTUS & "SmartSuite\97.0\products\" & reg123$, _ "InfFileName", dwtype&, gbuf$, 1024) END IF IF gbuf$ <> "" THEN gbuf$ = UCASE$(NullTrim(gbuf$)) idx% = INSTR(gbuf$, "123NODE.INF") IF idx% <> 0 THEN gbuf$ = LEFT$(gbuf$, idx% - 1) & "CINSTNOD.INI" IF Lot_DoesFileExist(gbuf$) THEN Get123PathfromRegistry = GetIniKeyString(gbuf$, _ "Destination Symbols And Values", "123DIR") END IF END IF END IF END IF END IF END FUNCTION '************************************************************************* FUNCTION GetInstTypefromRegistry() AS LONG '** '** Purpose: Gets the product Installed Type from Registry '** '** Author: JLU '** Arguments: None '** Returns: InstType '************************************************************************* DIM szkey$, keyvalue$, nsize&, gbuf&, ret& szkey$ = "SOFTWARE\Lotus\" + _ LTRIM$(LdString(SID_123_PROD_NAME)) + "\" + _ LTRIM(LdString(SID_123_PROD_VER)) keyvalue$ = "InstallType" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, REG_DWORD, gbuf&, nsize&) If ret& <> 0 Then GetInstTypefromRegistry=-1 Else GetInstTypefromRegistry=gbuf& End If END FUNCTION '**************************************************************************** '** SUB MigrateUserPrefReg() '** '** Purpose: Migrate user preferences from 123r5.ini to the OS registry. '** '** Author: JLU '** Arguments: NONE '** Returns: NONE '**************************************************************************** SUB MigrateUserPrefReg() DIM winDir$, iniPath$, stringVal$, intVal&, tmpintVal&, tmpstrVal$ DIM uPref$, vPref$, dbOpt$, mPref$, LReturn&, index&, s1&, s2&, uFrmt$ DIM strArray(1 to 10) AS STRING DIM sidArray(1 to 10) AS STRING DIM atsArray(0 to 300) AS STRING DIM binArray AS STRING winDir$ = GetWindowsDir() iniPath$ = winDir$ +"123r5.ini" if DoesFileExist(iniPath$,femExists) then uPref$ = LdString(SID_HKYEY_DEFAULT)+_ LdString(SID_KEY_USER_PREFS) vPref$ = LdString(SID_HKYEY_DEFAULT)+_ LdString(SID_KEY_VIEW_PREFS) dbOpt$ = LdString(SID_HKYEY_DEFAULT)+_ LdString(SID_KEY_DBOPT) mPref$ = LdString(SID_HKYEY_DEFAULT)+_ LdString(SID_KEY_MAP_PREFS) uFrmt$ = LdString(SID_HKYEY_DEFAULT)+_ LdString(SID_KEY_FORMATS) ''----------- [CONFIG] ----------- strArray(1) = "beep" sidArray(1) = LdString(SID_BEEPSONERROR) strArray(2) = "filelinkrefresh" sidArray(2) = LdString(SID_UPDATELINKSONOPENDOC) strArray(3) = "undo" sidArray(3) = LdString(SID_ISUNDOENABLED) strArray(4) = "autoexec" sidArray(4) = LdString(SID_ENABLEAUTOEXECMACRO) strArray(5) = "dragdrop" sidArray(5) = LdString(SID_ENABLEDRAGDROP) strArray(6) = "autosave" sidArray(6) = LdString(SID_AUTOSAVE) FOR tmpintVal = 1 TO 6 stringVal$ = GetIniKeyString(iniPath$,"CONFIG", strArray(tmpintVal)) if stringVal$ <> "" Then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uPref$,_ sidArray(tmpintVal),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if NEXT stringVal$ = GetIniKeyString(iniPath$,"CONFIG", "currency_display") if stringVal$ <> "" Then intVal& = (CLNG(stringVal$) + 1) MOD 2 LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uFrmt$,_ LdString(SID_CURRENCYASISO),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if ''----------- [ICON PALETTE] ----------- stringVal$ = GetIniKeyString(iniPath$,"ICON PALETTE", "visible") if stringVal$ <> "" then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uPref$,_ LdString(SID_SHOWSMARTICONS),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if ''----------- [VIEW DEFAULTS] ----------- strArray(1) = "worksheet_frame" sidArray(1) = LdString(SID_SHOWWORKSHEETFRAME) strArray(2) = "worksheet_tabs" sidArray(2) = LdString(SID_SHOWWORKSHEETTABS) strArray(3) = "grid_on" sidArray(3) = LdString(SID_SHOWGRIDLINES) strArray(4) = "scroll_bars" sidArray(4) = LdString(SID_SHOWSCROLLBARS) strArray(5) = "screen_ratio" sidArray(5) = LdString(SID_ZOOMSCALE) strArray(6) = "drawings" sidArray(6) = LdString(SID_SHOWDRAWLAYER) strArray(7) = "pagebreaks" sidArray(7) = LdString(SID_SHOWAUTOMATICPAGEBREAKS) strArray(8) = "pagebreaks" sidArray(8) = LdString(SID_SHOWMANUALPAGEBREAKS) FOR tmpintVal = 1 TO 8 stringVal$ = GetIniKeyString(iniPath$,"VIEW DEFAULTS", strArray(tmpintVal)) if stringVal$ <> "" Then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ vPref$,_ sidArray(tmpintVal),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if NEXT ''----------- [STATUS BAR] ----------- stringVal$ = GetIniKeyString(iniPath$,"STATUS BAR", "state") if stringVal$ <> "" then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uPref$,_ LdString(SID_SHOWSTATUSBAR),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if ''----------- [CONTROL PANEL] ----------- stringVal$ = GetIniKeyString(iniPath$,"CONTROL PANEL", "cpstate") if stringVal$ <> "" then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uPref$,_ LdString(SID_SHOWCONSOLE),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if ''----------- [START UP] ----------- stringVal$ = GetIniKeyString(iniPath$,"START UP", "Maximized") if stringVal$ <> "" then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uPref$,_ LdString(SID_SHOWMAXIMIZED),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if ''----------- [FILES] ----------- stringVal$ = GetIniKeyString(iniPath$,"FILES", "recfiles") if stringVal$ <> "" then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uPref$,_ LdString(SID_NUMBEROFMOSTRECENTFILES),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if ''----------- [DATABASE OPTIONS] ----------- strArray(1) = "AllowUpdates" sidArray(1) = LdString(SID_ALLOWUPDATES) strArray(2) = "UniqueRecords" sidArray(2) = LdString(SID_UNIQUERECORDS) strArray(3) = "ShowSamples" sidArray(3) = LdString(SID_SHOWSAMPLES) strArray(4) = "AutoRefresh" sidArray(4) = LdString(SID_AUTOREFRESH) strArray(5) = "AutoConnect" sidArray(5) = LdString(SID_AUTOCONNECT) strArray(6) = "LimitRecords" sidArray(6) = LdString(SID_LIMITRECORDS) strArray(7) = "ShowExternalPrimerValue" sidArray(7) = LdString(SID_SHOWEXAMPLE) strArray(8) = "ExternalRowLimit" sidArray(8) = LdString(SID_EXTROWLIMIT) strArray(9) = "InternalRowLimit" sidArray(9) = LdString(SID_INTROWLIMI) FOR tmpintVal = 1 TO 9 stringVal$ = GetIniKeyString(iniPath$,"DATABASE OPTIONS", strArray(tmpintVal)) if stringVal$ <> "" Then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ dbOpt$,_ LdString(SID_NUMBEROFMOSTRECENTFILES),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if NEXT ''----------- [CONFIG] ----------- ''----------- with inverted values ----- strArray(1) = "skip_welcome" sidArray(1) = LdString(SID_SHOWWELCOMESCREEN) strArray(2) = "skip_smartmasters" sidArray(2) = LdString(SID_REQUESTSMARTMASTERONNEWDOC) FOR tmpintVal = 1 TO 2 stringVal$ = GetIniKeyString(iniPath$, "CONFIG", strArray(tmpintVal)) if stringVal$ <> "" Then intVal& = (CLNG(stringVal$) + 1) MOD 2 LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ uPref$,_ sidArray(tmpintVal),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if NEXT ''----------- [VIEW DEFAULTS] ----------- stringVal$ = GetIniKeyString(iniPath$,"VIEW DEFAULTS", "pagebreaks") if stringVal$ <> "" then intVal& = CLNG(stringVal$) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ vPref$,_ LdString(SID_SHOWAUTOMATICPAGEBREAKS),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) LReturn& = Lot_CreateRegKeyValueEx(HKEY_USERS,_ vPref$,_ LdString(SID_SHOWMANUALPAGEBREAKS),_ REG_DWORD,_ intVal&,_ LENBP(intVal&) ) end if ''----------- [FILES] ----------- tmpstrVal$ = "" FOR intVal = 1 TO 5 stringVal$ = GetIniKeyString(iniPath$,"FILES", "LastOpen"&CSTR(intVal)) if stringVal$ = "" Then EXIT FOR End if tmpstrVal$ = tmpstrVal$ + stringVal$ + Chr$(0) NEXT DIM phkResult& tmpstrVal$ = tmpstrVal$ + Chr$(0) '' Create this key value no matter what (required by Gemini) LReturn& = Lot_RegCreateKeyEx(HKEY_USERS, uPref$) LReturn& = RegOpenKeyEx(HKEY_USERS, uPref$, 0, KEY_ALL_ACCESS,phkResult&) LReturn& = RegSetValueExM(phkResult&,_ LdString(SID_MRFLIST),_ 0,_ REG_MULTI_SZ,_ tmpstrVal$,_ LEN(tmpstrVal$)+1) LReturn& = RegCloseKeyEx(phkResult&) ''----------- [ATFUNCS] ----------- atsArray(0)="NA" atsArray(1)="ERR" atsArray(2)="ABS" atsArray(3)="INT" atsArray(4)="SQRT" atsArray(5)="LOG" atsArray(6)="LN" atsArray(7)="PI" atsArray(8)="SIN" atsArray(9)="COS" atsArray(10)="TAN" atsArray(11)="ATAN2" atsArray(12)="ATAN" atsArray(13)="ASIN" atsArray(14)="ACOS" atsArray(15)="EXP" atsArray(16)="MOD" atsArray(17)="CHOOSE" atsArray(18)="ISNA" atsArray(19)="ISERR" atsArray(20)="FALSE" atsArray(21)="TRUE" atsArray(22)="RAND" atsArray(23)="DATE" atsArray(24)="NOW" atsArray(25)="PMT" atsArray(26)="PV" atsArray(27)="FV" atsArray(28)="IF" atsArray(29)="DAY" atsArray(30)="MONTH" atsArray(31)="YEAR" atsArray(32)="ROUND" atsArray(33)="TIME" atsArray(34)="HOUR" atsArray(35)="MINUTE" atsArray(36)="SECOND" atsArray(37)="ISNUMBER" atsArray(38)="ISSTRING" atsArray(39)="LENGTH" atsArray(40)="VALUE" atsArray(41)="STRING" atsArray(42)="MID" atsArray(43)="CHAR" atsArray(44)="CODE" atsArray(45)="FIND" atsArray(46)="DATEVALUE" atsArray(47)="TIMEVALUE" atsArray(48)="CELLPOINTER" atsArray(49)="SUM" atsArray(50)="AVG" atsArray(51)="COUNT" atsArray(52)="MIN" atsArray(53)="MAX" atsArray(54)="VLOOKUP" atsArray(55)="NPV" atsArray(56)="VAR" atsArray(57)="STD" atsArray(58)="IRR" atsArray(59)="HLOOKUP" atsArray(60)="DSUM" atsArray(61)="DAVG" atsArray(62)="DCOUNT" atsArray(63)="DMIN" atsArray(64)="DMAX" atsArray(65)="DVAR" atsArray(66)="DSTD" atsArray(67)="INDEX" atsArray(68)="COLS" atsArray(69)="ROWS" atsArray(70)="REPEAT" atsArray(71)="UPPER" atsArray(72)="LOWER" atsArray(73)="LEFT" atsArray(74)="RIGHT" atsArray(75)="REPLACE" atsArray(76)="PROPER" atsArray(77)="CELL" atsArray(78)="TRIM" atsArray(79)="CLEAN" atsArray(80)="S" atsArray(81)="N" atsArray(82)="EXACT" atsArray(83)="-CALL" atsArray(84)="@" atsArray(85)="RATE" atsArray(86)="TERM" atsArray(87)="CTERM" atsArray(88)="SLN" atsArray(89)="SYD" atsArray(90)="DDB" atsArray(91)="-SPLFUNCS" atsArray(92)="SHEETS" atsArray(93)="INFO" atsArray(94)="SUMPRODUCT" atsArray(95)="ISRANGE" atsArray(96)="DGET" atsArray(97)="DQUERY" atsArray(98)="COORD" atsArray(99)="-MATCH" atsArray(100)="TODAY" atsArray(101)="VDB" atsArray(102)="DVARS" atsArray(103)="DSTDS" atsArray(104)="VARS" atsArray(105)="STDS" atsArray(106)="D360" atsArray(107)="-BLANK" atsArray(108)="ISAPP" atsArray(109)="ISAAF" atsArray(110)="WEEKDAY" atsArray(111)="DATEDIF" atsArray(112)="RANK" atsArray(113)="NUMBERSTRING" atsArray(114)="DATESTRING" atsArray(115)="DECIMAL" atsArray(116)="HEX" atsArray(117)="DB" atsArray(118)="PMTI" atsArray(119)="SPI" atsArray(120)="FULLP" atsArray(121)="HALFP" atsArray(122)="PUREAVG" atsArray(123)="PURECOUNT" atsArray(124)="PUREMAX" atsArray(125)="PUREMIN" atsArray(126)="PURESTD" atsArray(127)="PUREVAR" atsArray(128)="PURESTDS" atsArray(129)="PUREVARS" atsArray(130)="PMT2" atsArray(131)="PV2" atsArray(132)="FV2" atsArray(133)="TERM2" atsArray(134)="?AAF?" atsArray(135)="DARWIN" atsArray(136)="FACT" atsArray(137)="FVAL" atsArray(138)="PVAL" atsArray(139)="SINH" atsArray(140)="ASINH" atsArray(141)="ROUNDUP" atsArray(142)="ROUNDDOWN" atsArray(143)="ROUNDM" atsArray(144)="GAMMALN" atsArray(145)="GAMMA" atsArray(146)="COMBIN" atsArray(147)="FACTLN" atsArray(148)="BETA" atsArray(149)="COSH" atsArray(150)="TANH" atsArray(151)="SECH" atsArray(152)="COTH" atsArray(153)="ACOSH" atsArray(154)="ATANH" atsArray(155)="ASECH" atsArray(156)="ACSCH" atsArray(157)="ACOTH" atsArray(158)="ACCRUED" atsArray(159)="AVEDEV" atsArray(160)="BESSELI" atsArray(161)="BESSELJ" atsArray(162)="BESSELK" atsArray(163)="BESSELY" atsArray(164)="BETAI" atsArray(165)="BINOMIAL" atsArray(166)="CHIDIST" atsArray(167)="CHITEST" atsArray(168)="CORREL" atsArray(169)="COV" atsArray(170)="CRITBINOMIAL" atsArray(171)="DEVSQ" atsArray(172)="ERF" atsArray(173)="ERFC" atsArray(174)="ERFD" atsArray(175)="EXP2" atsArray(176)="FDIST" atsArray(177)="FTEST" atsArray(178)="GAMMAI" atsArray(179)="GEOMEAN" atsArray(180)="HARMEAN" atsArray(181)="KURTOSIS" atsArray(182)="NORMAL" atsArray(183)="DAYS360" atsArray(184)="PERCENTILE" atsArray(185)="PERMUT" atsArray(186)="PRANK" atsArray(187)="REGRESSION" atsArray(188)="SKEWNESS" atsArray(189)="SQRTPI" atsArray(190)="TDIST" atsArray(191)="TTEST" atsArray(192)="ZTEST" atsArray(193)="IPAYMT" atsArray(194)="IRATE" atsArray(195)="MEDIAN" atsArray(196)="MIRR" atsArray(197)="NPER" atsArray(198)="PPAYMT" atsArray(199)="POISSON" atsArray(200)="PRICE" atsArray(201)="YIELD" atsArray(202)="PRODUCT" atsArray(203)="ACOT" atsArray(204)="ACSC" atsArray(205)="ASEC" atsArray(206)="COT" atsArray(207)="CSC" atsArray(208)="CSCH" atsArray(209)="DATEINFO" atsArray(210)="DAYS" atsArray(211)="DEGTORAD" atsArray(212)="DPURECOUNT" atsArray(213)="ISFILE" atsArray(214)="GRANDTOTAL" atsArray(215)="MATCH" atsArray(216)="PAYMT" atsArray(217)="RADTODEG" atsArray(218)="SEC" atsArray(219)="SIGN" atsArray(220)="SUMSQ" atsArray(221)="TRUNC" atsArray(222)="WEIGHTAVG" atsArray(223)="WORKDAY" atsArray(224)="XINDEX" atsArray(225)="SUBTOTAL" atsArray(226)="EVEN" atsArray(227)="LARGE" atsArray(228)="ODD" atsArray(229)="QUOTIENT" atsArray(230)="REFCONVERT" atsArray(231)="SEMEAN" atsArray(232)="SERIESSUM" atsArray(233)="SMALL" atsArray(234)="SUMXMY2" atsArray(235)="ISMACRO" atsArray(236)="DDELINK" atsArray(237)="PMTC" atsArray(238)="RANGENAME" atsArray(239)="-USER" atsArray(240)="VERSIONINFO" atsArray(241)="VERSIONDATA" atsArray(242)="VERSIONCURRENT" atsArray(243)="SCENARIOINFO" atsArray(244)="SCENARIOLAST" atsArray(245)="ACCRUED2" atsArray(246)="PRICE2" atsArray(247)="YIELD2" atsArray(248)="SOLVER" atsArray(249)="DURATION" atsArray(250)="ISEMPTY" atsArray(251)="MAXLOOKUP" atsArray(252)="MDURATION" atsArray(253)="MINLOOKUP" atsArray(254)="NETWORKDAYS" atsArray(255)="NEXTMONTH" atsArray(256)="SETSTRING" atsArray(257)="SUMPOSITIVE" atsArray(258)="SUMNEGATIVE" atsArray(259)="NPV2" atsArray(260)="MIRR2" atsArray(261)="MODULO" atsArray(262)="YEAR2" atsArray(263)="FVAMOUNT" atsArray(264)="PVAMOUNT" atsArray(265)="XIRR" atsArray(266)="XNPV" atsArray(267)="ISBETWEEN" atsArray(268)="DECILE" atsArray(269)="FORECAST" atsArray(270)="NSUM" atsArray(271)="PUREMEDIAN" atsArray(272)="QUARTILE" atsArray(273)="FINDB" atsArray(274)="LEFTB" atsArray(275)="LENGTHB" atsArray(276)="MIDB" atsArray(277)="REPLACEB" atsArray(278)="RIGHTB" atsArray(279)="DATECONVERT" atsArray(280)="TLENGTH" atsArray(281)="TLEFT" atsArray(282)="TRIGHT" atsArray(283)="TMID" atsArray(284)="TFIND" atsArray(285)="TREPLACE" atsArray(286)="TDIGIT" atsArray(287)="EDIGIT" atsArray(288)="TNUMBERSTRING" atsArray(289)="TDOW" atsArray(290)="TDATESTRING" atsArray(291)="TLDATESTRING" intVal=0 binArray$ = "" stringVal$ = GetIniKeyString(iniPath$,"ATFUNCS", "AtFunc"&CSTR(intVal)) WHILE stringVal$<>"" tmpintVal& = inStr(stringVal$, ",") tmpstrVal$ = Left(stringVal$, tmpintVal-1) if tmpstrVal$="-" Then ''SEPERATOR binArray$=binArray$+Chr$(0)+Chr$(0)+Chr$(0)+Chr$(64) else FOR index = 0 to 291 ''LOOK UP TABLE if tmpstrVal$=atsArray(index) Then if (index + 31) > 255 Then s1=1 s2=(index+31) Mod 256 else s1=index+31 s2=0 end if binArray$=binArray$+Chr$(s1)+Chr$(s2)+Chr$(0)+Chr$(0) end if NEXT end if intVal = intVal + 1 stringVal$ = GetIniKeyString(iniPath$,"ATFUNCS", "AtFunc"&CSTR(intVal)) WEND '' Create this key value no matter what (required by Gemini) LReturn& = Lot_RegCreateKeyEx(HKEY_USERS, uPref$) LReturn& = RegOpenKeyEx(HKEY_USERS, uPref$, 0, KEY_ALL_ACCESS,phkResult&) LReturn& = RegSetValueExM(phkResult&,_ LdString(SID_FAVORITEATFUNCTIONS),_ 0,_ REG_BINARY,_ binArray,_ LEN(binArray)) End if END SUB '************************************************************************* '** FUNCTION GetPreviousMastersDir() '** '** Purpose: Determines existing path to SmartMasters or Styles '** Author: TLB '** Arguments: '** Returns: The directory as a string '************************************************************************* FUNCTION GetPreviousMastersDir() AS STRING DIM PrevMasters$, UserIni$, Ini123$, idx% Ini123$ = GetWindowsDir() + "123r5.ini" PrevMasters$ = GetIniKeyString(Ini123$, "CONFIG", "template_directory") ' Only take first path if more than one idx% = INSTR(PrevMasters$, ";") IF idx% <> 0 THEN PrevMasters$ = LEFT$(PrevMasters$, idx% - 1) END IF GetPreviousMastersDir = Lot_TrimEndSlash(PrevMasters$) END FUNCTION '************************************************************************* '** SUB DoBackupSmartMasters() '** '** Purpose: Does the work of backing up currently installed masters '** '** Author: Troy Bartlett '** Arguments: NONE '** Returns: NONE '************************************************************************* SUB DoBackupSmartMasters() DIM PrevMasters$, NewMasters$, idx%, Master$, OrigMaster$, BackupMaster$ PrevMasters$ = GetPreviousMastersDir() NewMasters$ = MakePath(GetSymbolValue("123MASTERSDIR"), "backup") IF DoesDirExist(PrevMasters$) AND _ NOT DoesDirExist(NewMasters$) _ THEN CreateDir NewMasters$, cmoNone Master$ = DIR$(PrevMasters$ + "\*.*") WHILE Master$ <> "" OrigMaster$ = PrevMasters$ + "\" + Master$ BackupMaster$ = NewMasters$ + "\" + Master$ CopyFile OrigMaster$, BackupMaster$, cmoNone, 0 Master$ = DIR$() WEND END IF END SUB '************************************************************************* FUNCTION Lot_WriteMapRegFor123(network$, prodno%) AS INTEGER '** Purpose: This function writes Map registration needed '** Author: Jeannie Lu '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* DIM mapDatapath$, mapConfpath$, LReturn&, notused%, lang$, langsubdir$ lang$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ THEN langsubdir$ = GetSymbolValue(SYM_LANGUAGE_SUBDIR$) & "\" ELSE langsubdir$ = "" END IF If Lot_IsTheFeatureInstalled("123CORE") <> FALSE Then mapDatapath$ = Lot_WhereIsFeature(prodno%, "123CORE", "maps"+lang$+".dll") mapDatapath$ = Makepath(mapDatapath$, LdString(SID_123_MAPS_DIR)) IF network$ = gSTANDARD$ THEN mapConfpath$ = GetSymbolValue("123MAPLANGDIR") & langsubdir$ & "\" ELSE ' network$ = gNODE$ mapConfpath$ = GetDestinationSymbolValue123("123MAPLANGDIR", TRUE) & "\" END IF LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\MapData",_ lang$,_ REG_SZ,_ mapDatapath$,_ LENBP(mapDatapath$)+1) LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ gREGLOTUS+"123\97.0\Paths\MapConfig",_ lang$,_ REG_SZ,_ mapConfpath$,_ LENBP(mapConfpath$)+1) 'notused%=Lot_RegisterObject("123CORE", UNIN_CLASS_FILE_GROUP$, mapDatapath$+"*.*") End If END FUNCTION '************************************************************************* SUB CleanRegistryKeys123(prodno%) '** Purpose: This function cleans registry Keys for 123. '** Author: Jeannie Lu '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* DIM CR_Keys(0 to 15) AS STRING, tmpintVal%, LReturn& DIM featPath$, notused%, chpt$, phkResult& chpt$ = Lot_GetChapterFromKeyword("123CORE") IF (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) THEN ' Remove HCU/S/L/123/97.0/Product Version if it exists LReturn& = RegOpenKeyEx(HKEY_CURRENT_USER, gREGLOTUS+"123\97.0", 0, KEY_ALL_ACCESS,phkResult&) LReturn& = RegDeleteValue(phkResult&, "Product Version") LReturn& = RegCloseKeyEx(phkResult&) IF WhatPlatform() = PLATFORM_WIN95 THEN '' [HKEY_LOCAL_MACHINE] '' LReturn& = RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\Components") '' LReturn& = RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\GraphicFilters") '' LReturn& = RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\ConfigCache") '' LReturn& = RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\Tools") LReturn& = RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\Map Preferences\Installed Maps") LReturn& = RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\Lotus\123\6.0") '' [HKEY_USERS] LReturn& = RegDeleteKey(HKEY_USERS, ".DEFAULT\Software\Lotus\123\6.0") '' LReturn& = RegDeleteKey(HKEY_USERS, ".DEFAULT\Software\Lotus\123\97.0") '' [HKEY_CURRENT_USER] LReturn& = RegDeleteKey(HKEY_CURRENT_USER, "Software\Lotus\123\6.0") '' IF GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ THEN '' LReturn& = RegDeleteKey(HKEY_CURRENT_USER, "Software\Lotus\123\97.0") '' END IF '' [HKEY_CLASSES_ROOT] CR_Keys(0) = "123.Application.6" CR_Keys(1) = "123.Worksheet.6" CR_Keys(2) = "123.Worksheet.32" CR_Keys(3) = "CLSID\{29130101-2EED-1069-BF5D-00DD011186B7}" CR_Keys(4) = "CLSID\{29130100-2EED-1069-BF5D-00DD011186B7}" CR_Keys(5) = "CLSID\{29130007-2EED-1069-BF5D-00DD011186B7}" '' CR_Keys(5) = "Lotus123.Workbook.97" '' CR_Keys(6) = "Lotus123.Workbook" '' CR_Keys(7) = ".123" FOR tmpintVal = 0 TO 5 LReturn& = RegDeleteKey(HKEY_CLASSES_ROOT, CR_Keys(tmpintVal)) NEXT ELSEIF WhatPlatform() = PLATFORM_WINNT THEN '' [HKEY_LOCAL_MACHINE] '' LReturn& = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\Components") '' LReturn& = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\GraphicFilters") '' LReturn& = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\ConfigCache") '' LReturn& = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\Tools") LReturn& = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, "Software\Lotus\123\97.0\Map Preferences\Installed Maps") LReturn& = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, "Software\Lotus\123\6.0") '' [HKEY_USERS] LReturn& = Lot_DeleteRegKeyEx(HKEY_USERS, ".DEFAULT\Software\Lotus\123\6.0") '' LReturn& = Lot_DeleteRegKeyEx(HKEY_USERS, ".DEFAULT\Software\Lotus\123\97.0") '' [HKEY_CURRENT_USER] LReturn& = Lot_DeleteRegKeyEx(HKEY_CURRENT_USER, "Software\Lotus\123\6.0") '' IF GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ THEN '' LReturn& = Lot_DeleteRegKeyEx(HKEY_CURRENT_USER, "Software\Lotus\123\97.0") '' END IF '' [HKEY_CLASSES_ROOT] CR_Keys(0) = "123.Application.6" CR_Keys(1) = "123.Worksheet.6" CR_Keys(2) = "123.Worksheet.32" CR_Keys(3) = "CLSID\{29130101-2EED-1069-BF5D-00DD011186B7}" CR_Keys(4) = "CLSID\{29130100-2EED-1069-BF5D-00DD011186B7}" CR_Keys(5) = "CLSID\{29130007-2EED-1069-BF5D-00DD011186B7}" '' CR_Keys(5) = "Lotus123.Workbook.97" '' CR_Keys(6) = "Lotus123.Workbook" '' CR_Keys(7) = ".123" FOR tmpintVal = 0 TO 5 LReturn& = Lot_DeleteRegKeyEx(HKEY_CLASSES_ROOT, CR_Keys(tmpintVal)) NEXT END IF END IF END SUB '************************************************************************* FUNCTION Lot_WriteImgRegFor123(network$, prodno%) AS INTEGER '** Purpose: This function writes Map registration needed '** Author: Jeannie Lu '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* DIM typArray(0 to 3) AS STRING, tmpintVal%, LReturn& DIM filArray(0 to 3) AS STRING If Lot_IsTheFeatureInstalled("WIN32SHRGRAPHFILEFILTERPRG") <> FALSE Then typArray(0) = "BMP" typArray(1) = "CGM" typArray(2) = "PIC" typArray(3) = "WMF" filArray(0) = "ibbmp32.flt" filArray(1) = "imcgm32.flt" filArray(2) = "impic32.flt" filArray(3) = "imwmf32.flt" FOR tmpintVal = 0 TO 3 LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_ "SOFTWARE\Lotus\123\97.0\GraphicFilters",_ typArray(tmpintVal),_ REG_SZ,_ filArray(tmpintVal),_ LENBP(filArray(tmpintVal))+1) NEXT End If END FUNCTION '************************************************************************* '** FUNCTION GetPreviousMapsDir() '** '** Purpose: Determines existing path to Maps '** Author: Jeannie Lu '** Arguments: '** Returns: The directory as a string '************************************************************************* FUNCTION GetPreviousMapsDir() AS STRING DIM PrevMap$, UserIni$, Ini123$, idx% Ini123$ = GetWindowsDir() + "123r5.ini" PrevMap$ = GetIniKeyString(Ini123$, "MAPS", "datapath") ' Only take first path if more than one idx% = INSTR(PrevMap$, ";") IF idx% <> 0 THEN PrevMap$ = LEFT$(PrevMap$, idx% - 1) END IF GetPreviousMapsDir = Lot_TrimEndSlash(PrevMap$) END FUNCTION '************************************************************************* '** SUB DoBackupMaps() '** '** Purpose: Does the work of backing up currently installed maps '** '** Author: Jeannie Lu '** Arguments: NONE '** Returns: NONE '************************************************************************* SUB DoBackupMaps() DIM PrevMap$, NewMap$, Map$, OrigMap1$, OrigMap2$, BackupMap1$, BackupMap2$, iniFil$ DIM total%, ini123$, tmpStr$, x%, template$, initName$, iniPath$, title$ DIM LReturn&, notused%, mInstKey$, mapKey$, lang$ PrevMap$ = GetPreviousMapsDir() If PrevMap$="" Then '' Can't locate existing maps EXIT SUB End If ini123$ = GetWindowsDir() + "123r5.ini" iniPath$ = GetIniKeyString(ini123$, "MAPS", "inipath") If iniPath$ = "" Then '' Can't locate existing maps inis EXIT SUB End If iniPath$ = Lot_TrimEndSlash(iniPath$) tmpStr$ = GetIniKeyString(ini123$, "MAPS", "Total") If tmpStr$ = "11" Then '' No Maps from outside vendor EXIT SUB End If lang$=GetSymbolValue(SYM_INSTALL_LANGUAGE$) total% = Val(tmpStr$) NewMap$ = MakePath(GetSymbolValue("123DIR"), "Maps") CreateDir NewMap$, cmoNone FOR x = 12 TO total template$ = GetIniKeyString(ini123$,"MAPS", "Template"&CSTR(x)) If template$ <> "" Then initName$ = GetIniKeyString(ini123$, template$, "ininame") title$ = GetIniKeyString(ini123$, template$, "name") iniFil$ = iniPath$ + "\" + initName$ mInstKey$ = LdString(SID_KEY_MAP_PREFS) + "\Installed Maps" If DoesFileExist(iniFil$, femExists) Then Map$=GetIniKeyString(iniFil$, "CONFIG", "overlay1") '' *.tv file OrigMap1 = PrevMap$ + "\" + Map$ '' *.tvc file OrigMap2 = PrevMap$ + "\" + Map$ + "c" If DoesFileExist(OrigMap1, femExists) And _ DoesFileExist(OrigMap2, femExists) Then BackupMap1$ = NewMap$ + "\" + Map$ ' Wait til *.tvc files get copy to the right place (JBrodeur) ' BackupMap2$ = NewMap$ + "\" + lang$ + "\" + Map$ + "c" BackupMap2$ = NewMap$ + "\" + Map$ + "c" If DoesFileExist(BackupMap1$, femExists) Then SetFileAttr BackupMap1$, 0 Kill BackupMap1$ End If If DoesFileExist(BackupMap2$, femExists) Then SetFileAttr BackupMap2$, 0 Kill BackupMap2$ End If If DoesFileExist(BackupMap1$, femExists) = 0 And _ DoesFileExist(BackupMap1$, femExists) = 0 Then FileCopy OrigMap1$, BackupMap1$ FileCopy OrigMap2$, BackupMap2$ mapKey$ = mInstKey$ + "\" + template$ '' Register Copied Over Old Maps LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_ mapKey$,_ "File",_ REG_SZ,_ Map$,_ LENBP(Map$)+1) LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_ mapKey$ + "\Title",_ lang$,_ REG_SZ,_ title$,_ LENBP(title$)+1) End If End If End If End If NEXT END SUB '************************************************************************* FUNCTION Lot_RegUninstFilFor123(network$, prodno%) AS INTEGER '** Purpose: This function registers uninstall files not in INF '** Author: Jeannie Lu '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* DIM notused%, Path123$ Path123$ = GetSymbolValue("123DIR") notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_FILE$, Path123$+"gemtimer.dat") notused%=Lot_RegisterObject("123TOP", UNIN_CLASS_FILE$, Path123$+"panose.dat") END FUNCTION '**************************************************************************** SUB MigrateFillsPrefReg() '** '** Purpose: Migrate Fills from fills.ini to the OS registry. '** '** Author: JLU '** Arguments: NONE '** Returns: NONE '**************************************************************************** DIM fillsIniPath$, value$, setVal&, itemVal&, fillsSubKey$, valueName$, lang$ DIM fillsKey$, LReturn& fillsIniPath$ = Get123PathfromLotusIni() If fillsIniPath$ <> "" Then fillsIniPath$ = MakePath(fillsIniPath$, "fills.ini") If DoesFileExist(fillsIniPath$, femExists) Then lang$ = LCase(GetSymbolValue(SYM_INSTALL_LANGUAGE$)) setVal = 1 itemVal = 1 fillsKey$ = "SOFTWARE\Lotus\Components\Fills\" + lang$ + "\" value$ = GetIniKeyString(fillsIniPath$,_ "SET "&CSTR(setVal),_ "Item"&CSTR(itemVal)) DO WHILE value$ <> "" DO WHILE value$ <> "" fillsSubKey$ = fillsKey$ + "SET "&CSTR(setVal) valueName$ = "Item"&CSTR(itemVal) LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ fillsSubKey$,_ valueName$,_ REG_SZ,_ value$,_ LENBP(value$) ) value$ = GetIniKeyString(fillsIniPath$,_ "SET "&CSTR(setVal),_ "case") If value$ <> "" Then _ LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ fillsSubKey$,_ "case",_ REG_SZ,_ value$,_ LENBP(value$) ) itemVal = itemVal + 1 value$ = GetIniKeyString(fillsIniPath$,_ "SET "&CSTR(setVal),_ "Item"&CSTR(itemVal)) LOOP itemVal = 1 setVal = setVal + 1 value$ = GetIniKeyString(fillsIniPath$,_ "SET "&CSTR(setVal),_ "Item"&CSTR(itemVal)) LOOP End If End If END SUB '**************************************************************************** SUB Write_ODBC_Reg(prodno%, network$) '** '** '** Author: PMD '** Arguments: NONE '** Returns: NONE '**************************************************************************** DIM KEY_LOTUS$, gbuf$, keyval$, Desc$, nsize&, regStatus&, chpt2$, WINSYSDIR$,shrpath$ DIM FeatureKeyword$, grgPath$, exePath$, winsysPath$, sectionName$, ret% chpt2$ = Lot_GetChapterFromKeyWord("DLENF") if Lot_GetChapterValInt(chpt2$, F_INOROUT) = 1 then WINSYSDIR$ = GetSymbolValue(SYM_WINSYSDIR$) DIM commonFiles(6) as string DIM i as integer commonFiles(0) = "odbc32.dll" commonFiles(1) = "odbcad32.exe" commonFiles(2) = "odbccp32.dll" commonFiles(3) = "odbccp32.cpl" commonFiles(4) = "odbccr32.dll" commonFiles(5) = "odbcint.dll" FOR i = 0 to (ubound(commonFiles) - 1) shrpath$ = WINSYSDIR$ + commonFiles(i) IncrementSharedDLLCount(shrpath$) NEXT END IF winsysPath$ = GetWindowsSysDir() winsysPath$ = Lot_TrimEndSlash(winsysPath$) grgPath$ = Lot_WhereIsFeature(prodno%, "123CORE", "123w97.grg") grgPath$ = MakePath(grgPath$, "123w97.grg") exePath$ = Lot_WhereIsFeature(prodno%, "123CORE", "123w.exe") exePath$ = Lot_TrimEndSlash(exePath$) IF network$ = gNODE THEN FeatureKeyWord$ = "123TOP" ELSE FeatureKeyWord$ = "123CORE" END IF IF Lot_IsTheFeatureInstalled("DBASEPRG_SHRCNT") <> FALSE THEN 'dBASE sectionName = "DBASE" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) END IF 'Paradox IF Lot_IsTheFeatureInstalled("PARADOXPRG_SHRCNT") <> FALSE THEN sectionName = "PARADOX" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) END IF 'Sybase System 10 IF Lot_IsTheFeatureInstalled("SYBASEPRG_SHRCNT") <> FALSE THEN sectionName = "SYBASE" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) END IF IF Lot_IsTheFeatureInstalled("SQLPRG_SHRCNT") <> FALSE THEN 'SQLServer sectionName = "SQLSERVER" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) 'SQLServer6 sectionName = "SQLSERVER6" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) END IF IF Lot_IsTheFeatureInstalled("ODBCTEXTPRG_SHRCNT") <> FALSE THEN 'Textfile sectionName = "TEXTFILE" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) END IF IF Lot_IsTheFeatureInstalled("NOTESSQLPRG_SHRCNT") <> FALSE THEN 'NotesSQL sectionName = "NOTES_SQL" ret% = Get_and_Set_Registry_Entries(FeatureKeyWord, grgPath, exePath, winsysPath, sectionName) END IF END SUB '************************************************************************* FUNCTION Lot_WriteHlpRegFor123(network$, prodno%) AS INTEGER '** Purpose: This function writes Help registration needed '** Author: Jeannie Lu '** Arguments: '** Returns: SUCCESS '** NOTE: '************************************************************************* DIM hlpArray(1 to 5) AS STRING DIM hlpPath(1 to 5) AS STRING DIM feature(1 to 5) AS STRING DIM LangAcronym$, LReturn&, tmpintVal LangAcronym$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) If Lot_IsTheFeatureInstalled("123MAINHELP") <> FALSE Then hlpArray(1) = "ss1n60" hlpPath$(1) = Lot_WhereIsFeature(prodno%, "123MAINHELP",_ hlpArray(1)+LangAcronym$+".hlp") feature(1) = "123MAINHELP" End If If Lot_IsTheFeatureInstalled("123SCRIPTHELP") <> FALSE Then hlpArray(2) = "sssn60" hlpPath(2) = Lot_WhereIsFeature(prodno%, "123SCRIPTHELP",_ hlpArray(2)+LangAcronym$+".hlp") feature(2) = "123SCRIPTHELP" 'hlpArray(4) = "heading.cnt" 'hlpPath(4) = hlpPath(2) 'feature(4) = feature(2) 'hlpArray(5) = "shared.cnt" 'hlpPath(5) = hlpPath(2) 'feature(5) = feature(2) End If If Lot_IsTheFeatureInstalled("123ATFUNCHELP") <> FALSE Then hlpArray(3) = "ssfn60" hlpPath(3) = Lot_WhereIsFeature(prodno%, "123ATFUNCHELP",_ hlpArray(3)+LangAcronym$+".hlp") feature(3) = "123ATFUNCHELP" End If FOR tmpintVal = 1 TO 3 If hlpPath(tmpintVal) <> "" Then If network$ = gNODE$ Then feature(tmpintVal) = "123TOP" LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_ "SOFTWARE\Microsoft\Windows\Help",_ hlpArray(tmpintVal)+LangAcronym$+".hlp",_ REG_SZ,_ hlpPath(tmpintVal),_ LENBP(hlpPath(tmpintVal))+1) LReturn& = Lot_RegisterObject(feature(tmpintVal), UNIN_CLASS_REGISTRY_VALUE,_ "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+_ hlpArray(tmpintVal)+LangAcronym$+".hlp") LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_ "SOFTWARE\Microsoft\Windows\Help",_ hlpArray(tmpintVal)+LangAcronym$+".cnt",_ REG_SZ,_ hlpPath(tmpintVal),_ LENBP(hlpPath(tmpintVal))+1) LReturn& = Lot_RegisterObject(feature(tmpintVal), UNIN_CLASS_REGISTRY_VALUE$,_ "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+_ hlpArray(tmpintVal)+LangAcronym$+".cnt") End If NEXT 'FOR tmpintVal = 4 TO 5 ' If hlpArray(tmpintVal) <> "" Then ' LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_ ' "SOFTWARE\Microsoft\Windows\Help",_ ' hlpArray(tmpintVal),_ ' REG_SZ,_ ' hlpPath(tmpintVal),_ ' LEN(hlpPath(tmpintVal))+1) ' ' LReturn& = Lot_RegisterObject(feature(tmpintVal), UNIN_CLASS_REGISTRY_VALUE$,_ ' "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+_ ' hlpArray(tmpintVal)) ' End If 'NEXT END FUNCTION '**************************************************************************** SUB Write_BCF_FILE(prodno%, network$) '** '** '** Author: PMD '** Arguments: NONE '** Returns: NONE '**************************************************************************** DIM line1$,line2$,line3$,ProdDir$,tmpline$,filenum%,chpt$ If Lot_IsTheFeatureInstalled("123CORE") <> FALSE Then ''ProdDir$ = Lot_WhereIsFeature(prodno%, "123CORE", "Lotus.bcf") ProdDir$ = GetSymbolValue("123DIR") If ProdDir$ <> "" AND _ Lot_DoesFileExist(MakePath(ProdDir$, "lotus.bcf")) then filenum% = FreeFile() OPEN ProdDir$ + "lotus.bcf" FOR APPEND AS filenum% PRINT #filenum%, 'dBASE chpt$ = Lot_GetChapterFromKeyWord("DBASEPRG_SHRCNT") if Lot_GetChapterValInt(chpt$, F_INOROUT) = 1 then line1$ = |Dn="dBASE_IV" DL="DLODBC32"| line2$ = |DD="ODBC Driver for dBASE IV Tables"| line3$ = |DC="driver=LODBF09.DLL";| PRINT #filenum%, PRINT #filenum%, line1$ PRINT #filenum%, line2$ PRINT #filenum%, line3$ END IF 'Paradox chpt$ = Lot_GetChapterFromKeyWord("PARADOXPRG_SHRCNT") if Lot_GetChapterValInt(chpt$, F_INOROUT) = 1 then line1$ = |DN="Paradox" DL="DLODBC32"| line2$ = |DD="ODBC 32-bit Driver for Paradox Tables"| line3$ = |DC="driver=LOIDP09.DLL";| PRINT #filenum%, PRINT #filenum%, line1$ PRINT #filenum%, line2$ PRINT #filenum%, line3$ END IF 'Sybase System 10 chpt$ = Lot_GetChapterFromKeyWord("SYBASEPRG_SHRCNT") if Lot_GetChapterValInt(chpt$, F_INOROUT) = 1 then line1$ = |DN="Sybase_System_10" DL="DLODBC32"| line2$ = |DD="ODBC 32-bit Driver for Sybase System 10" AC=UI,PW| line3$ = |DC="driver=LOSYB09.DLL";| PRINT #filenum%, PRINT #filenum%, line1$ PRINT #filenum%, line2$ PRINT #filenum%, line3$ END IF 'SQLServer chpt$ = Lot_GetChapterFromKeyWord("SQLPRG_SHRCNT") if Lot_GetChapterValInt(chpt$, F_INOROUT) = 1 then tmpline$ = |"| + "SQLServer_" + GetSymbolValue(SYM_SQLSERVERNAME) + |"| line1$ = "DN=" + tmpline$ + " DL=""DLODBC32""" line2$ = |DD="ODBC 32-bit Driver for SQLServer 4.X" AC=UI,PW| line3$ = |DC="driver=LOSS09.DLL";| PRINT #filenum%, PRINT #filenum%, line1$ PRINT #filenum%, line2$ PRINT #filenum%, line3$ 'SQLServer6 line1$ = |DN="SQLServer_6.0" DL="DLODBC32"| line2$ = |DD="ODBC 32-bit Driver for SQLServer 6.0" AC=UI,PW| line3$ = |DC="driver=LOSS609.DLL";| PRINT #filenum%, PRINT #filenum%, line1$ PRINT #filenum%, line2$ PRINT #filenum%, line3$ END IF 'Textfile chpt$ = Lot_GetChapterFromKeyWord("ODBCTEXTPRG_SHRCNT") if Lot_GetChapterValInt(chpt$, F_INOROUT) = 1 then line1$ = |DN="Text_Files" DL="DLODBC32"| line2$ = |DD="ODBC 32-bit Driver for Text File Tables"| line3$ = |DC="driver=LOTXT09.DLL";| PRINT #filenum%, PRINT #filenum%, line1$ PRINT #filenum%, line2$ PRINT #filenum%, line3$ END IF 'NotesSQL chpt$ = Lot_GetChapterFromKeyWord("NOTESSQLPRG_SHRCNT") if Lot_GetChapterValInt(chpt$, F_INOROUT) = 1 then line1$ = |DN="Lotus_Notes_ODBC" DL="DLODBC32"| line2$ = |DD="ODBC 32-bit Driver for Lotus Notes"| line3$ = |DC="driver=NSQL32.DLL";| PRINT #filenum%, PRINT #filenum%, line1$ PRINT #filenum%, line2$ PRINT #filenum%, line3$ END IF CLOSE filenum% End If End If END SUB '************************************************************************* '*********************** Dialog Callback Functions *********************** SUB SQLSERVERNAMECB (hDlg&, CtrlId%, Classes$, Inst&) '** Purpose: '** Author: '** Arguments: hDlg&, CtrlId&, Classes$, Inst& '** Returns: '************************************************************************* DIM tempbuf$ SELECT CASE Classes$ case "__DLGINIT" AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1) AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$ tempbuf$ = GetSymbolValue (SYM_SQLSERVERNAME$) SetListItem "IDC_EDIT",1,tempbuf$ AddListItem "UPDATELIST","IDC_EDIT1" case "IDC_OK" IF LEN( GetListItem ("IDC_EDIT", 1)) > 0 THEN SetSymbolValue SYM_SQLSERVERNAME$, GetListItem ("IDC_EDIT", 1) END IF END SELECT END SUB '************************************************************************* '************************************************************************* '** Purpose: gets notes paths '** Author: Hishi '** Arguments: '** npath$: buffer that will receive notes path '** dpath$: buffer that will receive notes data path '** Returns: TRUE if successfull, otherwise FALSE '************************************************************************* FUNCTION GetNotesPath123(npath$, dpath$) AS INTEGER DIM notespath$, notesdatapath$, notesname$, notesregkey$ DIM notused& GetNotesPath123 = FALSE npath$ = "" dpath$ = "" '' Notes v5.0 notesregkey$ = gREGLOTUS & "Notes" notused& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_ notesregkey$, "Path", REG_SZ,_ notespath$, 1024) notespath$ = NullTrim(notespath$) '' Notes v4.0, v4.11 and v4.5 IF notespath$ = "" THEN notesregkey$ = gREGLOTUS & "Notes\4.0" notused& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_ notesregkey$, "Path", REG_SZ,_ notespath$, 1024) notespath$ = NullTrim(notespath$) '' Notes v4.1 IF notespath$ = "" THEN notesregkey$ = gREGLOTUS & "Notes\4.1" notused& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_ notesregkey$, "Path", REG_SZ,_ notespath$, 1024) notespath$ = NullTrim(notespath$) IF notespath$ = "" THEN EXIT FUNCTION END IF END IF END IF notused& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_ notesregkey$, "DataPath", REG_SZ,_ notesdatapath$, 1024) notesdatapath$ = NullTrim(notesdatapath$) notused& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_ notesregkey$, "Name", REG_SZ,_ notesname$, 1024) notesname$ = NullTrim(notesname$) IF notesname$ = "" OR notesdatapath$ = "" THEN EXIT FUNCTION END IF notesname$ = MakePath$(notespath$, notesname$) IF DoesFileExist(notesname$, femExists) THEN npath$ = notespath$ dpath$ = notesdatapath$ GetNotesPath123 = TRUE END IF END FUNCTION '************************************************************************* '** FUNCTION GetDestinationSymbolValue123 (dirsym$, flang%) AS STRING '** Purpose: gets directory symbol value from CINSTALL.INI '** during node install. '** Author: Hishi '** Arguments: '** dirsym$: directory symbol (e.g. "123DIR") '** flang%: TRUE if the directory symbol are language dependent, '** FALSE otherwise '** Returns: directory without tailing backslash '************************************************************************* FUNCTION GetDestinationSymbolValue123(dirsym$, flang%) AS STRING DIM srcdir$, srcvol$, srcpath$ DIM srvdir$, srvvol$, srvpath$ GetDestinationSymbolValue123 = "" srcdir$ = GetSymbolValue(SYM_INSTALL_SOURCE$) IF srcdir$ = "" THEN srcdir$ = GetSymbolValue(SYM_STF_SRCDIR$) srvdir$ = GetIniKeyString(_ MakePath(srcdir$, gINSTALLINI$), _ "Destination Symbols And Values", _ dirsym$) IF srvdir$ = "" THEN EXIT FUNCTION Lot_SplitAnyPath srcdir$, srcvol$, srcpath$ Lot_SplitAnyPath srvdir$, srvvol$, srvpath$ srvdir$ = Lot_TrimEndSlash(srcvol$ & srvpath$) IF flang% and IsServerSecondaryLanguage THEN srvdir$ = srvdir$ & "\" & GetSymbolValue(SYM_LANGUAGE_SUBDIR$) END IF GetDestinationSymbolValue123 = srvdir$ END FUNCTION