home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1998-06-02 | 300.7 KB | 7,819 lines
''/********************************************************************* %REM '' '' Module Name: APR.lss '' '' Module Code: COMINST '' '' Author: '' '' Creation Date: Jan 26, 1994 '' '' Copyright Lotus Development Corporation, (c) 1994 '' '' '' '' Description: '' '' '' Additional authors: '' '' Change History: '' $Log: //magpie/xyzL/approach/cisdk/apr/apr.lss $ '' '' Rev 1.0.1.7 02 Jun 1998 11:47:02 dbray '' Node Install of 98 over node install of 97 SPR#MBEA3UPKVX '' '' Rev 1.0.1.6 13 May 1998 15:03:08 dbray '' update for Node install with Fastsite SPR#PNOT3U7KKB '' '' Rev 1.0.1.5 12 May 1998 22:36:02 dbray '' updated apr.lss to remove SystemServices\3.1 registry entry SPR NMIL3R7NW8 '' '' Rev 1.0.1.4 21 Apr 1998 21:10:40 dbray '' SPR LSOO3TkQHF -- fix for OCX problems with node install '' '' Rev 1.0.1.3 21 Apr 1998 15:42:26 slansing '' SPR LSOO3S2LGZ Uninstall not being run when installing 98 over 97 '' '' Rev 1.0.1.2 21 Apr 1998 13:32:46 dbray '' update for spr MBEA3RKP53 '' '' Rev 1.0.1.1 07 Apr 1998 17:29:22 dbray '' Update for SPR MBEA3RNMXM uninstall not removing registry entries. '' '' Rev 1.0 03 Mar 1998 23:43:50 ihachem '' Initial Revision '' '' Rev 5.121 Jan 20 1998 14:36:36 Build_Machine '' Updates for Suite Installs '' '' Rev 5.120 Jan 05 1998 11:10:30 Build_Machine '' Bug Fixes for Suite install problems '' '' Rev 5.119 Dec 01 1997 15:58:40 Build_Machine '' New Changes for Privatizing Suite 97 Shared components for Approach 97+ as '' part of Suite 98 '' '' Rev 5.118 Nov 24 1997 16:04:16 Build_Machine '' Changes for Approach 97+ for Suite 98 '' '' Rev 5.101 May 30 1997 10:50:14 Build_Machine '' Replaced hard-coded strings like approach.exe with variables - (Terry) '' '' Rev 5.100 Feb 18 1997 10:59:42 Terry_Ridgway '' Modified Form Letter registry entries to use resourced strings for Dear and '' Sincerely Yours, '' '' Rev 5.99 Jan 14 1997 14:02:40 Terry_Ridgway '' Added code to register Approach.ini with uninstaller if it wasn't there '' when we installed. Also some minor changes to the demo directory handling for '' automated install. '' '' Rev 5.98 Jan 08 1997 16:20:50 Terry_Ridgway '' Added a sub to write required dialer options to the Approach.ini file '' if they're not present on the machine being installed to. '' '' Rev 5.97 Jan 07 1997 15:02:04 Terry_Ridgway '' Changes regarding registerin uninstaller and removal of Approach 3.0x '' versions during suite and standalone installs. '' '' Rev 5.96 Dec 23 1996 09:27:06 Terry_Ridgway '' More changes to make things work just a little bit better. '' '' Rev 5.95 Dec 09 1996 13:21:22 Terry_Ridgway '' Fixes for some minor problems with registration and detecting if Approach 96 '' was installed previously '' '' Rev 5.94 Nov 21 1996 15:20:00 Terry_Ridgway '' Passed full path of Approach.tlb to RegisterTypeLib and Lot_RegisterTypeLib. '' '' Rev 5.93 Nov 13 1996 19:32:58 Terry_Ridgway '' Added return value to the function RegisterTypeLib. Dwayne. '' '' Rev 5.92 Nov 11 1996 15:21:42 Terry_Ridgway '' Added missing paren and commented out boof variable. Dwayne '' '' Rev 5.91 Nov 08 1996 12:07:58 Terry_Ridgway '' Added code to complete the typelibrary registration. Apparently CIT is not '' doing everything it should within it's own functions. '' '' Rev 5.90 Nov 08 1996 11:42:32 Terry_Ridgway '' Updates for removal of 16 bit Approach when installing from Suite. '' '' Rev 5.89 Nov 05 1996 10:59:22 Terry_Ridgway '' Minor fix to prevent 16 bit previous version dialog surfacing during Suite '' install '' '' Rev 5.88 Nov 04 1996 14:13:58 Terry_Ridgway '' UPdates to uninstall the GID files created when users open HLP files '' '' Rev 5.87 Oct 17 1996 16:10:58 Terry_Ridgway '' Added Lot_RegisterObject calls to uninstall some GID files. '' '' Rev 5.86 Oct 17 1996 14:28:24 Terry_Ridgway '' Added code to handle timebomb installs. Also made a modification to PreCopy '' Config to make sure that all sections turned on for install of node are '' actually installed on server. Just had to copy code from InitCopyList. '' '' Rev 5.85 Oct 16 1996 16:18:30 Terry_Ridgway '' Updated function for turning on ODBC files to fix problem with node install '' being able to install drivers without the main ODBC files. Also added code '' to fix directory refresh for Demo directory '' '' Rev 5.84 Oct 09 1996 15:43:32 Terry_Ridgway '' Added function to turn on shared ODBC file section when ODBC is selected in '' the customize dialog. '' '' Rev 5.83 Oct 08 1996 09:12:40 Terry_Ridgway '' Modified code for copying script help placeholder files '' '' Rev 5.82 Sep 30 1996 09:16:50 Terry_Ridgway '' Minor updates to clean up the code '' '' Rev 5.81 Sep 26 1996 13:24:12 Terry_Ridgway '' Added code to turn on all the files during a server default install so it '' turns into a server FULL install '' '' Rev 5.80 Sep 26 1996 13:13:22 Terry_Ridgway '' Added more debug messages trying to track down automated install problem '' '' Rev 5.79 Sep 24 1996 14:18:44 Terry_Ridgway '' Added specific Demo directory processing, so Demos can be installed to a Node '' rather than being left on a Read Only CD or Network drive. '' '' Rev 5.78 Sep 23 1996 16:32:40 Terry_Ridgway '' Cleaned up source - positioning and indenting. '' Added back section to remove Approach 96 registry entries on upgrade install '' '' Rev 5.77 Sep 17 1996 16:21:38 Terry_Ridgway '' Add variable declarations for APRDIRPATH, NOTUSED, LSLNHLP and LSENHLP.Dwayne '' '' Rev 5.76 Sep 17 1996 11:33:40 Terry_Ridgway '' Added functions to support installing dummy Lotus Script help files '' '' Rev 5.75 Sep 16 1996 08:33:40 Terry_Ridgway '' Minor updates - possibly by Dwayne Lee '' '' Rev 1.20 12 Sep 1996 09:35:40 ihachem3 '' Approach Version 5.0 build AP960911.000 from \\SMARTS\SYS2. '' '' Rev 1.19 09 Sep 1996 20:54:12 mhishinu '' Modified PreCopyConfig and PostCopyConfig. '' '' Rev 5.74 Sep 10 1996 12:17:28 Terry_Ridgway '' Changes to fix minor problems '' '' Rev 5.73 Aug 26 1996 08:39:58 Terry_Ridgway '' Minor fixes '' '' Rev 5.72 Aug 19 1996 12:27:02 Terry_Ridgway '' Minor Changes '' '' Rev 5.71 Aug 19 1996 11:47:02 Terry_Ridgway '' Added code for SmartMasters directory being in the MoreDirs dialog again. '' Also added code for the Sample files provided by Patty Waddington. '' '' Rev 5.70 Aug 16 1996 17:14:20 Terry_Ridgway '' Fixed Writing to Autoexec '' '' Rev 5.69 Aug 15 1996 11:55:44 Terry_Ridgway '' Added code for registering ODBC drivers if it's a Node install of Approach on '' a node of shared windows. '' '' Rev 5.68 Aug 12 1996 12:11:34 Terry_Ridgway '' Modified all calls to GetWindowsSysDir to call GetSymbolValue. This way '' I will always get the correct directory name when shared windows is involved '' and the files are copied to the users local Windows directory instead. '' '' Rev 5.67 Aug 09 1996 13:51:08 Terry_Ridgway '' Commented out the sections related to Dialog Editor OCX registration and '' Automatic uninstall of Approach 97 if reinstalling to the same directory '' structure. '' '' Rev 5.66 Aug 06 1996 15:21:56 Terry_Ridgway '' Added Approach Type Library Registration to the install. '' '' Rev 5.65 Aug 05 1996 11:49:12 Terry_Ridgway '' Modified global variable initialization and added variable for testing if '' we need to write to the autoexec.bat file '' '' Rev 5.64 Jul 25 1996 10:04:22 Terry_Ridgway '' Changed all the Lotus specific ODBC drivers to have the _SHRCNT suffix '' '' Rev 5.63 Jul 23 1996 09:05:42 Terry_Ridgway '' Changes needed to install QMF file to user selected directory when changing '' the Approach directory name '' '' Rev 5.62 Jul 18 1996 11:33:08 Terry_Ridgway '' Minor Changes '' '' Rev 5.61 Jul 16 1996 15:01:54 Terry_Ridgway '' Modified ODBC registry settings for Data Source names, so we don't overwrite '' the sources created by Approach 96 and Notes Reporter 2.0 and therefore '' prevent these products from accessing their server data if they're left on '' the machine '' '' Rev 5.60 Jul 15 1996 11:17:22 Terry_Ridgway '' Changes to add language directory to the smaster, samples & demo directories '' when values written to registery. Also removed forcing previous work dir '' value when doing language install. '' '' Rev 5.59 Jul 12 1996 14:23:36 Terry_Ridgway '' Reinstated ShareCount processing for ODBC drivers on the recommendation of '' Bernadette Kelly for the CIT 2131 release. '' '' Rev 5.58 Jul 08 1996 11:56:22 Terry_Ridgway '' Updated to CIT 2130_4 '' '' Rev 5.57 Jul 08 1996 11:40:28 Terry_Ridgway '' Added new code to check for Approach running. Problems with FindWindowA call '' not seeing the right caption on the window, so didn't recognize Approach '' was running and therefore didn't show a dialog, so effectively hanging the '' install '' '' Rev 5.56 Jul 02 1996 14:54:30 Terry_Ridgway '' Added OCX registry for new Lotus Script Dialog Editor Controls, Changed SC '' versions for StatusBar, SmartIcons and Infobox '' '' Rev 5.55 Jun 27 1996 11:13:10 Terry_Ridgway '' Added code to support 123 minisuite and added check for Notes path in '' registry for versions later than 4.1. In this case the version key is not '' being used to the path is found under Lotus\Notes, rather than Lotus\Notes\4 '' '' Rev 5.54 Jun 26 1996 16:12:48 Terry_Ridgway '' bug fixes for ODBC registration of SQL6 and removal of call to function '' writing to the LOTUS.INI file. '' '' Rev 5.53 Jun 26 1996 12:35:02 Terry_Ridgway '' Minor changes '' '' Rev 5.52 Jun 12 1996 12:17:00 Terry_Ridgway '' Updated to resource a couple of Message Box strings '' '' Rev 5.51 Jun 12 1996 11:33:00 Terry_Ridgway '' Changes to prevent second display of Remove v3 dialog '' '' Rev 5.50 Jun 06 1996 10:17:48 Terry_Ridgway '' Changes to attempt to get Windows System files copied during a node install '' '' Rev 5.49 Jun 04 1996 11:45:18 Terry_Ridgway '' Chages to Run from ROM code proposed by Shu Chin '' '' Rev 5.48 Jun 03 1996 15:20:04 Terry_Ridgway '' Minor Updates '' '' Rev 5.47 Jun 03 1996 09:45:10 Terry_Ridgway '' Corrected ccSTR version registration and added support for automatic '' uninstall of 97 as well as 96 if the user installs to the location of an '' existing version. '' '' Rev 5.46 May 24 1996 13:36:34 Terry_Ridgway '' Updated with general bug fixes and also added the Run from ROM required code '' to the PostSuccessReg function. '' '' Rev 5.45 May 23 1996 10:46:40 Terry_Ridgway '' Fixes to code for installing Approach to a new location with an existing '' copy already on the machine. Tour and icons weren't being refreshed. Also '' added code to check for the previous QMF DASPWAPI directory and default to it '' Changed the operation of the MoreDirsCB so that the QMF location is greyed '' during a language install. '' '' Rev 5.44 May 22 1996 10:30:40 Terry_Ridgway '' Changes to fix problems with registering adn writing SmartIcons and Tour '' paths after changes to new MLC code. '' '' Rev 5.43 May 21 1996 12:33:06 Terry_Ridgway '' Changes to the MoreDirs callback to update the procedure for CIT 2123_4B '' '' Rev 5.42 May 21 1996 10:34:06 Terry_Ridgway '' Updates to remove old path registry entries in favour of the new ones. '' '' Rev 5.41 May 20 1996 17:26:40 Terry_Ridgway '' Updated for new Intersolv ODBC drivers v2.12 '' '' Rev 5.40 May 17 1996 13:50:16 Terry_Ridgway '' Updated to show different messages based on whether Approach or Notes '' Reporter are running while trying to install Approach 97. '' '' Rev 5.39 May 16 1996 14:33:12 Terry_Ridgway '' More Minor changes to the Paths key in the registry '' '' Rev 5.38 May 16 1996 11:33:04 Terry_Ridgway '' Added Paths key to registry entries to conform to Suite Guidlines. Keeping '' old stuff around for now, so that Approach will still work. '' '' Rev 5.37 May 14 1996 16:39:44 Terry_Ridgway '' Updates to use new ODBC drivers from Intersolv. This required Registry '' changes to add the INFORMIX and SYBASE drivers as well as changes due '' to the use of the same DLLs for both w95 and NT. All these were added to the '' Node Options '' '' Rev 5.36 May 13 1996 16:42:10 Terry_Ridgway '' Added code to give the user an option to change the location for the QMF INI '' file. This will appear in the Default Preferences dialog and will now show '' '' Rev 5.35 May 13 1996 15:11:52 Terry_Ridgway '' Updated for cahnges with CIT 2122.4 -> Added functionality to uninstall a '' prior version rather than using the REMOVE section of the LYT file. '' '' Rev 5.34 May 13 1996 14:12:34 Terry_Ridgway '' Changes to add Node Options for ODBC drivers. '' '' Rev 5.33 May 03 1996 13:45:36 Terry_Ridgway '' Added check in the code for searching & replacing within the APPROACH.REG '' file. If the search & replace strings are equal, nothing is done. '' This prevents Fa's infinite loop when trying to replace d:\src5.0 with '' the same thing. '' '' Rev 5.32 May 02 1996 12:38:46 Terry_Ridgway '' Added UserName & CompanyName values to registry to conform to new Registry '' Guidelines '' '' Rev 5.31 May 02 1996 11:26:18 Terry_Ridgway '' Extra Debug Messages Added. Changes for install of QMF - it supports registry '' now instead of having to write to the environment. '' '' Rev 5.30 Apr 22 1996 15:38:48 Terry_Ridgway '' Changes to fix install to correct Tour Dir during Node install '' '' Rev 5.29 Apr 22 1996 13:22:40 Terry_Ridgway '' No change. '' '' Rev 5.28 Apr 22 1996 13:03:42 Terry_Ridgway '' Updated to correct some install and uninstall problems. Spell should be '' uninstalled now during a node uninstall, as well as the ODBC reg entries '' during any uninstall. Working directory for node should be on the node '' and not the server, as well as the Tour directory reference now pointing '' to the tour on the server. '' '' Rev 5.27 Apr 17 1996 17:33:36 Terry_Ridgway '' '' Rev 5.26 Apr 16 1996 11:00:40 Terry_Ridgway '' Fixes for obsolete file removal and additional debug messages ready for '' the next round of bug fixing. '' '' Rev 5.25 Apr 12 1996 16:31:58 Terry_Ridgway '' Fixed Processing for Backup SmartMasters '' Fixed Processing for Existing Version - GetAPRPathFromREgistry was returning '' a null string instead of a valid path because I rem'd out the call to LEFT '' which removed an unwanted character '' Fixed processing of removing obsolete Approach 96 files if Approach 97 '' is installed into the same directory '' '' Rev 5.24 Apr 11 1996 10:17:40 Terry_Ridgway '' Added Backup SmartMasters Processing by stealing function from LWP.LSS '' '' Rev 5.23 Apr 10 1996 08:57:50 Terry_Ridgway '' Updates to add Backup Directory support. Still needs more work, but getting '' there. '' '' Rev 5.22 Apr 09 1996 13:37:46 Terry_Ridgway '' Corrected all MLC problems so far and setup registration for the QMF Manager '' files that are now being installed '' '' Rev 5.21 Apr 03 1996 14:57:06 Terry_Ridgway '' Updated Regfile because it was trying to use winobj32.reg instead of '' appraoch.reg and not registering the approach OLE objects. Corrected a '' problem with MLC and Lot_RefreshDestination. I was running one of these for '' a symbol which wasn't set during the MLC install. '' '' Rev 5.20 Apr 01 1996 11:31:32 Terry_Ridgway '' Updated per Mike Natsis. Changes to make Server/Node function correctly. '' '' Rev 5.19 Mar 29 1996 14:53:22 Terry_Ridgway '' Added registry entry to maximize Approach on initial launch after install. '' Corrected an variable name ommision for Backup SmartMasters. '' '' Rev 5.18 Mar 29 1996 12:31:18 Terry_Ridgway '' General code clean up. Removed a lot of commented out sections and corrected '' the Backup SmartMasters dialog call. '' '' Rev 5.17 Mar 28 1996 17:34:42 Terry_Ridgway '' Changes to correct the written locations of the Tour and Icons directories '' during a language install. '' '' Rev 5.16 Mar 25 1996 11:41:42 Terry_Ridgway '' Changes to deliver the Readme.WRI file to the work directory as per Theirry '' Meyeur's request. '' '' Rev 5.15 Mar 19 1996 08:32:34 Terry_Ridgway '' Fixes for registering ccStr shared component '' '' Rev 5.14 Mar 18 1996 13:51:30 Terry_Ridgway '' Additional Cleanup and checking for blank values being passed to '' Lot_CleanPath. These were causing Microsoft Setup error messages, so now '' we don't pass blank strings to this function. '' '' Rev 5.13 Mar 14 1996 15:41:42 Terry_Ridgway '' Changed to conform to upgrade spec. When installing v5 to the v4 directory '' we now delete the old v4 registry entries. '' '' Rev 5.12 Mar 12 1996 10:13:10 Terry_Ridgway '' Updates to merge CIT 2113_4 '' '' Rev 5.11 Mar 11 1996 15:59:16 Terry_Ridgway '' General cleanup of functions '' '' Rev 5.10 Mar 04 1996 17:43:32 Terry_Ridgway '' Fixed problems with MoreDirs dialog not appearing and paths not defaulting '' to previous install - samples, work, smasters. Also added initial ability '' to backup old smartmasters. More work on this later. '' '' Rev 5.8 Mar 01 1996 15:09:46 Terry_Ridgway '' Fixes for registration and install problems '' '' Rev 5.7 Feb 26 1996 16:31:58 Terry_Ridgway '' Changes to merge CIT 2111_4 for Suite 97 Build 11 '' '' Rev 5.6 Feb 26 1996 13:20:04 Terry_Ridgway '' Changes for MLC server node install to use new CIT functions '' '' Rev 5.5 Feb 20 1996 10:22:26 Terry_Ridgway '' General bug fixes and updates '' '' Rev 5.4 Feb 07 1996 12:11:12 Terry_Ridgway '' Added checks in the MoreDirsCB to grey out the SmartMaster directory '' selections if no SmartMasters have been selected in the custom dialog '' '' Rev 5.3 Feb 06 1996 09:58:04 Terry_Ridgway '' Changes to merge CIT2108_4 from S97BLD_8 '' '' Rev 5.2 Feb 02 1996 12:27:10 Terry_Ridgway '' Fixed removal of AppEvents from registry and addition of registry entry '' for default show data in design ON. '' '' Rev 5.1 Feb 02 1996 10:14:06 Terry_Ridgway '' Added temporary reg setting to avoid UIMS crash when '' when trying to close a non-existent infobox '' '' Rev 5.0 Jan 26 1996 15:06:12 Terry_Ridgway '' Updated with Merge for CIT 2107_4 '' '' Rev 4.30 Oct 30 1995 23:30:12 Joe_Ghazal '' Fixed notes path and integrated citgc3 '' '' Rev 4.29 Oct 27 1995 18:34:24 Joe_Ghazal '' Switch compnent path and notes path '' '' Rev 4.28 Oct 27 1995 12:08:54 Joe_Ghazal '' fixes '' '' Rev 4.27 Oct 24 1995 15:25:46 Joe_Ghazal '' '' Rev 4.26 Oct 19 1995 17:33:26 Joe_Ghazal '' '' Rev 4.25 Oct 13 1995 10:28:18 Joe_Ghazal '' '' Rev 4.24 Oct 06 1995 11:38:00 Joe_Ghazal '' Upgrade to CIT Build 2033_3 '' '' Rev 4.23 Oct 05 1995 22:36:54 Joe_Ghazal '' '' Rev 4.21 Sep 26 1995 10:52:10 Steve_Smythe '' CIT 2.0 build 2030_3 '' - Fixed obsfiles stuff '' - Check for proper wrigley dirs '' - Added running and 3.xx dialog callbacks '' '' '' '' Rev 4.20 Sep 25 1995 10:32:56 Steve_Smythe '' '' Rev 4.19 Sep 24 1995 18:27:52 Steve_Smythe '' '' Rev 4.17 Sep 23 1995 14:19:34 Steve_Smythe '' '' Rev 4.16 Sep 19 1995 20:53:30 Steve_Smythe '' Setup Automated Install, fixed various Registry bugs. '' '' Rev 4.15 Sep 18 1995 14:13:50 Steve_Smythe '' CIT 2.0 build 2030_3 '' - Added New Chart Registry keys (per Roger?) '' - Changed iHelpInstalled, iSpellCheckInstalled to REG_DWORD. '' '' Rev 4.14 Sep 14 1995 08:48:30 Steve_Smythe '' CIT 2.0 build 2030_3 '' - Merge in changes between 2029_3 and 2030_3. '' '' Rev 4.13 Sep 13 1995 15:32:44 Steve_Smythe '' CIT 2.0 build 2029_3 '' - Updates from Insik (billboards) '' '' Rev 4.11 Sep 11 1995 11:46:26 Steve_Smythe '' CIT 2.0 build 2029_3 '' - Merge from 2028_3. '' '' Rev 1.52 01 Sep 1995 13:11:38 amontalv '' Correction to how icons are named. Had used call to Lot_GetProgFolder, which was '' only needed when registering the link object. '' '' Rev 4.10 Sep 11 1995 11:09:32 Steve_Smythe '' CIT 2028_3 '' - added gNODE fix from Mike Natsis in Suite. '' '' Rev 4.9 Sep 05 1995 13:48:20 Steve_Smythe '' CIT 2.0 build 2028_3 '' '' Rev 4.8 Sep 01 1995 15:49:28 Steve_Smythe '' CIT 2.0 build 2027_4 '' - added addicons code '' - fixed server/node component dir problems. '' - got Chart working under node '' '' Rev 4.7 Aug 31 1995 20:04:58 Steve_Smythe '' CIT 2.0 build 2027_4 '' - remove manual registry AppPath entry. '' '' Rev 4.6 Aug 31 1995 18:14:52 Steve_Smythe '' CIT 2.0 build 2027_4 '' - merge in missing code from 2026_3 (Insik's stuff) '' '' Rev 4.5 Aug 30 1995 18:32:10 Steve_Smythe '' CIT 2.0 build 2027_4 '' - Added Lot_AddAppPath() '' '' Rev 4.4 Aug 30 1995 18:10:14 Steve_Smythe '' CIT 2.0 build 2027_4 '' - Remove debug print statements '' '' Rev 4.3 Aug 29 1995 20:00:16 Steve_Smythe '' CIT 2.0 build 2027_4 (diskset SC950829.005) '' '' Rev 1.45 23 Aug 1995 12:26:54 tveerapp '' Added code to register work, masters and backup directories with the toolkit. '' '' Rev 1.44 22 Aug 1995 18:24:54 tveerapp '' Added the callback etc for work, smasters and backup. '' '' Rev 1.43 22 Aug 1995 15:17:10 jdonohue '' Do not register the uninstaller for language install '' '' Rev 1.42 22 Aug 1995 14:03:20 jdonohue '' Changed GetAPRPathfromLotusIni to check for registry entries '' Function GetAPRPathfromLotusIni returns path w/o filename now '' '' Rev 1.41 21 Aug 1995 15:50:54 amontalv '' Added global for registry entry. '' '' Rev 1.40 21 Aug 1995 10:23:48 jdonohue '' Added calls in Init for marking secondary language content directories '' Moved language directory symbol setting code to InitCopyList '' '' Rev 1.39 17 Aug 1995 09:34:14 amontalv '' Had put wrong number of arguments. '' '' Rev 1.38 16 Aug 1995 20:35:30 amontalv '' Added some error handling for registry. '' '' Rev 1.37 15 Aug 1995 11:53:12 jdonohue '' Removed SYM_INSTALLKIND$ -- in GLOBALS.LSS '' '' Rev 1.36 09 Aug 1995 09:18:16 jdonohue '' Don't add language qualifier to icon for first time install '' '' Rev 1.35 04 Aug 1995 15:53:38 jdonohue '' Added code to create icons with language switch and sublanguage name appended '' '' Rev 1.34 02 Aug 1995 16:54:54 jdonohue '' Changed calling syntax for InitLanguageAPR '' '' Rev 1.33 31 Jul 1995 16:28:10 pdonahue '' changed verison number from 2.1 to 0.0. '' Changed registry entry for installtype from type REG_SZ to REG_DWORD. '' '' Rev 1.32 20 Jul 1995 14:20:58 jdonohue '' Fixed uninstall command line string for language '' '' Rev 1.31 12 Jul 1995 17:07:18 jdonohue '' Added comments about language install subdirectories '' '' Rev 1.30 23 Jun 1995 13:55:56 mzgripce '' remove autoinst.rsp from the uninstaller registration example '' '' Rev 1.29 23 Jun 1995 13:24:56 mzgripce '' added an example for the Program_group class registration '' '' Rev 1.28 22 Jun 1995 18:38:14 mzgripce '' register the components that are going with the apr product:aswan and its '' dependency: LotusScript,Bento and Shared help '' '' Rev 1.27 21 Jun 1995 18:01:26 mzgripce '' add examples for the other object clases registration for uninstall '' '' Rev 1.26 21 Jun 1995 12:48:08 jdonohue '' SYM_INSTALLKIND global symbol, not product specific '' '' Rev 1.25 21 Jun 1995 09:09:42 jdonohue '' Moved AddRegistryLanguage to AddRegistryKeysAPR '' '' Rev 1.24 19 Jun 1995 17:41:56 mzgripce '' change the apr version to 2.1 and enable the uninstaller registration '' '' Rev 1.23 19 Jun 1995 16:53:24 mzgripce '' add examples calls to Lot_RegisterObject() '' '' Rev 1.22 16 Jun 1995 17:08:02 pdonahue '' added registry entries for apr. '' '' Rev 1.21 09 Jun 1995 17:00:58 mzgripce '' added call example in PostCopyConfig to register the uninstaller '' '' Rev 1.20 07 Jun 1995 16:32:08 amontalv '' Changed the Win95 start folder so that it initializes '' earlier in the program. This should make automation '' easier to implement for it. There are still a couple of '' bugs that I need to work out, but I feel that I should '' check what I have now. I also changed the name of some '' of the functions to conform more to current names. '' '' Rev 1.19 01 Jun 1995 14:54:10 amontalv '' Had the check incorrect for creating links. It tried to create links '' when not in Win95 instead of when in Win95. '' '' Rev 1.18 01 Jun 1995 11:11:52 amontalv '' Added API function CreateLink to create shortcuts. Also added functions '' to save and get the link path to support the CreateLink. I also changed '' the startup program folder code to use the default dialog proc and changed '' the default dialog proc to process directory trees. '' '' Rev 1.17 30 May 1995 16:01:00 jdonohue '' Set symbols for product and version for language install '' '' Rev 1.16 21 May 1995 17:30:24 mzgripce '' add an example for share32 support '' '' Rev 1.15 19 May 1995 15:31:28 mzgripce '' use the parent dir in the product default destination '' '' Rev 1.14 19 May 1995 14:42:44 jdonohue '' Remove redundant symbol for language subdirectory '' '' Rev 1.13 19 May 1995 13:23:46 jdonohue '' Added call to Lot_SetLanguageSectionsOn '' '' Rev 1.12 18 May 1995 15:36:52 jdonohue '' Added language install code '' '' Rev 1.11 18 May 1995 10:18:52 jdonohue '' Added language install function InitLanguage '' '' Rev 1.9 02 May 1995 12:54:06 cmoy '' Merged c2 into cf build '' '' Rev 1.9 10 Apr 1995 18:11:28 amontalv '' Changed comments to reflect change of function reference. '' '' Rev 1.8 31 May 1994 13:54:42 mmeth '' '' Added PrevVersionAPR '' '' Rev 1.7 13 May 1994 14:09:20 thangv '' '' Added the else part to the default code in case node. '' '' Rev 1.6 06 May 1994 09:24:52 mmeth '' wrong return for function '' '' Rev 1.5 02 May 1994 19:18:16 mzgripce '' '' add AddIconsAPR '' '' Rev 1.4 28 Mar 1994 17:25:50 thangv '' '' Resourced strings that were not. SID_APR_SERVER_DIRNAME, SID_APR_DIST_DIRNA '' '' Rev 1.3 22 Mar 1994 09:24:46 mmeth '' Modified AddTo Billboard List to use IDD_APRBILLBD1,... '' '' Rev 1.2 17 Feb 1994 17:44:44 thangv '' Fixed the trailing \ and APR_DIR '' '' Rev 1.1 15 Feb 1994 14:36:20 mmeth '' moved the EXIT FUNCTION CALL in '' '' Rev 1.0 11 Feb 1994 10:53:40 jbrodeur '' Initial Revision ''---------------------------------------------------------------------- '' Date Vers. Pgmr SPR# Change ''---------------------------------------------------------------------- '' ! '' 02-07-94 0000 Initial Product Shipment '' ''---------------------------------------------------------------------- '' ''*********************************************************************/ '** This file contains detailed comments. PLEASE READ THEM! They provide '** information that will make writing Install much easier. In some '** cases, you will not find this information in any other sources. ''/*********************************************************************/ '** %ENDREM USE "TOOLKIT" USE "LANGUAGE" OPTION DECLARE DIM APRRemoveProdFiles% DIM APRBackupSmartMasters% DIM gNeedRestart% DIM gProductnum% DIM g96Path$ DIM gRemovePriorVersion% DIM gDebugDIRs% DIM gDebugMsg% DIM minisuite123% DIM gWriteToAutoExec% DIM gTimeBomb% ''/** These Are the Required Functions that Products must provide ''***************************************************************/ DECLARE PUBLIC FUNCTION ProductRegAPR (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION DefaultUserRegAPR (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION InitAPR (prodno%, network$, direction$, basedir$) AS STRING DECLARE PUBLIC FUNCTION PrevVersionsAPR (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION PathChangeAPR (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING DECLARE PUBLIC FUNCTION InitCopyListAPR (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION PreCopyConfigAPR (prodno%, network$, direction$, lic%) AS STRING DECLARE PUBLIC FUNCTION AddTheBillBoardsAPR (prodno%, network$, direction$, nbytes&) AS STRING DECLARE PUBLIC FUNCTION PostCopyConfigAPR (prodno%, network$, direction$, programgroup$) AS STRING DECLARE PUBLIC FUNCTION AddIconsAPR (prodno%, network$, direction$, programgroup$) AS STRING DECLARE PUBLIC FUNCTION UIAPR (prodno%, network$, direction$) AS STRING DECLARE PUBLIC FUNCTION PostSuccessRegAPR (prodno%, network$, direction$) AS STRING DECLARE PUBLIC SUB AddRegistryKeysAPR (prodno%, network$) DECLARE PUBLIC FUNCTION InitLanguageAPR (prodno%, network$, direction$) AS STRING DECLARE FUNCTION DetectPreviousVersion (Productfound$) AS STRING DECLARE SUB APRRemoveObsoleteFiles (hDlg&, CtrlId%, Classes$, LInst&) ''/** Product specific functions ''***************************** ''*** TV: From Notes install script. Used for notes detection. */ PUBLIC CONST W16_NOTES = "_strings.dll" PUBLIC CONST W32_NOTES = "nstrings.dll" PUBLIC CONST GENERIC_EXECUTE = &H20000000 PUBLIC CONST GENERIC_READ = &H80000000 PUBLIC CONST GENERIC_WRITE = &H40000000 PUBLIC CONST LOCALE_SENGCOUNTRY = &H1002 PUBLIC CONST LOCALE_SYSTEM_DEFAULT = 2048 DECLARE FUNCTION FindWindowA LIB "user32" (ByVal lpClassName As Any, ByVal lpCaption As Any) AS LONG DECLARE FUNCTION OpenSCManager Lib "advapi32.dll" Alias "OpenSCManagerA" (ByVal lpMachineName As String, ByVal lpDatabaseName As String, ByVal dwDesiredAccess As Long) As Long DECLARE FUNCTION CloseServiceHandle Lib "advapi32.dll" Alias "CloseServiceHandle" (ByVal hSCObject As Long) As Long DECLARE FUNCTION GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (Byval Locale As Long, Byval LCType As Long, Byval lpLCData As String, Byval cchData As Long) As Long DECLARE FUNCTION LoadTypeLibrary Lib "OLEAUT32" Alias "LoadTypeLib" (Byval t As Unicode String, j As Long ) As Long DECLARE FUNCTION RegisterTypeLibrary Lib "OLEAUT32" Alias "RegisterTypeLib" (Byval a As Long, Byval b As Unicode String, Byval c As Unicode String) As Long DECLARE PUBLIC FUNCTION filedate LIB "filedate.dll" ALIAS "_filetime@8" (ByVal FileName1$, ByVal FileName2$ ) AS INTEGER DECLARE FUNCTION GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As Long DECLARE FUNCTION WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFileName As String) As Long DECLARE FUNCTION GetAPRPathfromLotusIni() AS STRING DECLARE FUNCTION GetAPRPathfromRegistry() AS STRING DECLARE FUNCTION StrGSub(S$, SKey$, SSub$) AS INTEGER DECLARE FUNCTION FileSub(ReadFn$, WriteFn$, SKey$, SSub$) AS INTEGER DECLARE FUNCTION FixCompnentPath(CompnentPath$) AS STRING DECLARE FUNCTION APR_AddRegistryEntries(prodno%, network$) AS INTEGER DECLARE FUNCTION APR_AddODBCiniEntries (prodno%) AS INTEGER DECLARE FUNCTION APR_AddAPPROACHiniEntries (prodno%) AS INTEGER DECLARE FUNCTION APR_AddLOTUSiniEntries (prodno%, network$) AS INTEGER DECLARE FUNCTION APR_AddLTSTOOLSiniEntries (prodno%, network$) AS INTEGER DECLARE FUNCTION APR_AddOLEEntries (prodno%, network$) AS INTEGER DECLARE FUNCTION APR_TurnOnNTSpecialFiles (prodno%, network$) AS INTEGER DECLARE FUNCTION APR_IsInstalled() AS INTEGER DECLARE FUNCTION APR_GetInstalledVersion() AS STRING DECLARE FUNCTION RemNullInString(s as string) AS STRING DECLARE FUNCTION GetNotesFromPath() AS STRING DECLARE FUNCTION GetNotesPathfromRegistry() AS STRING DECLARE SUB APR_RegisterSharedComponent(Key$, FileName$, Version$) DECLARE FUNCTION Lot_WriteOLERegForAPR(network$, prodno%) AS INTEGER DECLARE FUNCTION GetPreviousMastersDir(defaultlang$) AS STRING DECLARE FUNCTION GetPreviousWorkDir(defaultlang$, prodno%) AS STRING DECLARE FUNCTION GetPreviousSamplesDir(defaultlang$) AS STRING DECLARE FUNCTION GetPreviousQMFDir(defaultlang$) AS STRING DECLARE FUNCTION GetPreviousLang() AS STRING DECLARE FUNCTION APRIsAdmin() AS INTEGER DECLARE FUNCTION APRSMInst() AS Integer DECLARE FUNCTION APRGetSystemCountry() As String DECLARE FUNCTION APRRegisterTypeLib( typelibname as string, helpdir as string ) as long DECLARE FUNCTION WriteProfileString Lib "kernel32" Alias "WriteProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any) As Long DECLARE SUB APR_AddIcon(Feature$, Group$, Caption$, File$, CommandArgs$, WorkingDir$, Icon$) DECLARE SUB APRMOREDIRSCB (hDlg&, CtrlId%, Classes$, LInst&) DECLARE SUB APR_RemoveProdFilesCB(hDlg&, CtrlId%, Classes$, LInst&) DECLARE SUB RegAndIncrementCount(s$) DECLARE SUB APRAddNotesToPathNT DECLARE SUB APRAddNotesToPathWin95 DECLARE SUB APRFixupServerDirectory(dirsym$, feature$) DECLARE SUB APRPrintDIRs(FunctionName$) DECLARE SUB DebugMsg(msg$, location$) DECLARE SUB APRAddQMFToEnvironmentNT(prodno%, network$) DECLARE SUB APRDoBackupSmartMasters() DECLARE SUB APRRemoveProdDirs() DECLARE SUB APRWriteToAUTOEXEC() DECLARE SUB APR_TurnOnDummyScriptFiles() DECLARE SUB APR_RenameDummyScriptFiles() DECLARE SUB APRChangeTheDate(fnpath as String) DECLARE SUB APRTurnOnODBCSection(network as String) DECLARE SUB APRHideGalleryFiles() DECLARE SUB WriteDialSettingstoApproachINI() '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 APR -> 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 "APR", LdString(SID_APR) '** Setup Default NON Debug Mode for this file. Set Debug at end of this '** function if necessary. Leave these lines as they are. gDebugDIRs% = FALSE gDebugMsg% = FALSE '** Initialize Global Variables APRRemoveProdFiles% = FALSE 'User selects to remove Win3.1 version APRBackupSmartMasters% = FALSE 'User selects to have old SmartMasters backed up gNeedRestart% = FALSE 'PATH Variable set, need to restart gWriteToAutoExec% = FALSE 'Require writing Notes path to PATH variable ' under Win95 with 16bit Notes '** Setup Approach 96 Install Path variable to let us track '** whether user installs to existing DIR or not. '** Installing 97 to same DIR we will remove old product keys. g96Path$ = "" gRemovePriorVersion% = FALSE '** The following is added to allow easy processing of Approach in the '** Approach/123 minisuite minisuite123% = TRUE '** Is this a TimeBomb/Trial Version? gTimeBomb% = FALSE '** Debug or Non-Debug mode for the LSS file? 'gDebugDIRs% = TRUE 'Enables Directory printouts 'gDebugMsg% = TRUE 'Enables Message Printouts END SUB 'Initialize '************************************************************************* '** FUNCTION ProductRegAPR (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 paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: UNINITIALIZED '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards, i.e start at your last dialog '** first. '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT | gBACK (If you are showing UI and you '** allow the user to step backwards.) '************************************************************************* PUBLIC FUNCTION ProductRegAPR (prodno%, network$, direction$) AS STRING ProductRegAPR = gNEXT DebugMsg "Function Start", "ProductRegAPR" '** FOR a complete set of things to register '** see API doc under Reg_Set... Reg_SetSupportedInstallTypes prodno%, 1, 1, 1 '** Setting disk space usage strings If minisuite123% = TRUE Then If network$ = gNODE$ Then Reg_SetProdSizes prodno%, 0 * 1024, 0 * 1024 Else Reg_SetProdSizes prodno%, 11 * 1048576, 0 * 1048576 End If Else If network$ = gNODE$ Then Reg_SetProdSizes prodno%, 20 * 1024, 20 * 1024 Else Reg_SetProdSizes prodno%, 29 * 1048576, 19 * 1048576 End If End If '** 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 keywords in the '** inf file. This functionality will be available March 4, but you '** can set these fields now! 'Reg_SetNodeOption ProdNo%,Inst%,NodeOptStr$ 'Reg_SetNodeOptionSelected ProdNo%,Inst%,Selection% Reg_SetNodeOption prodno%,1,"APRODBC" Reg_SetNodeOptionSelected prodno%,1,1 Reg_SetNodeOption prodno%,2,"APRORACLE" Reg_SetNodeOptionSelected prodno%,2,1 Reg_SetNodeOption prodno%,3,"APRSQLSERVER4" Reg_SetNodeOptionSelected prodno%,3,1 Reg_SetNodeOption prodno%,4,"APRSQLSERVER6" Reg_SetNodeOptionSelected prodno%,4,1 Reg_SetNodeOption prodno%,5,"APRSYBASE" Reg_SetNodeOptionSelected prodno%,5,1 Reg_SetNodeOption prodno%,6,"APRINFORMIX5" Reg_SetNodeOptionSelected prodno%,6,1 Reg_SetNodeOption prodno%,7,"APRINFORMIX7" Reg_SetNodeOptionSelected prodno%,7,1 %REM '** These are possible additions to the Node Options. Reg_SetNodeOption prodno%,7,"APRTOUR" Reg_SetNodeOptionSelected prodno%,7,1 Reg_SetNodeOption prodno%,8,"APRSMARTMASTERS" Reg_SetNodeOptionSelected prodno%,8,1 Reg_SetNodeOption prodno%,9,"APRSAMPLES" Reg_SetNodeOptionSelected prodno%,9,1 %ENDREM '** 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_APR_LOTUSSMARTSUITE) '** Required if you have a work, smartmasters and backup directories '** register support with the toolkit to surface the dialog 'Reg_SetMoreDirsData prodno%, "APR_MoreDirsCB", DBAPR_MOREDIRS, DBAPR_MOREDIRS Reg_SetMoreDirsData prodno%, "APRMOREDIRSCB", DBAPR_MOREDIRS2, _ DBAPR_MOREDIRS2 DebugMsg "Function End", "ProductRegAPR" END FUNCTION 'ProductRegAPR '************************************************************************* '** FUNCTION DefaultUserRegAPR (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 PostCopyConfigAPR. '** The CIT provides functions that allow you to access .ri '** files: Lot_ReadDefaultsfromRi(ripath$). '** '** If you need to write back to the floppy, do it here. '** Most Lotus products will no longer write back to the floppy. '** Remeber, you can't write back to a CD or network! '** '** In Symbols : SYM_NAME$, SYM_COMPANY$ '** Out Symbols: SYM_NAME$, SYM_COMPANY$, SYM_SERIALNUM$ '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: UNINITIALIZED '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards, i.e start at your last dialog '** first. '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT | gBACK (If you are showing UI and you '** allow the user to step backwards.) '************************************************************************* PUBLIC FUNCTION DefaultUserRegAPR (prodno%, network$, direction$) AS STRING DIM ripath$, defdir$, temp%, rc% DebugMsg "Function Start", "DefaultUserRegAPR" DefaultUserRegAPR = gNEXT IF network$ = gNODE$ THEN ripath$ = GetSymbolValue(SYM_STF_SRCDIR$) + "approach.ri" ELSEIF network$ = gSTANDARD$ THEN '** GetAPR.... is in this file and illustrates how to '** retrieve your prod. from lotus.ini '** The following function tries the INI file, then the registry if the '** first attempt is unsuccessful. defdir$ = GetAPRPathfromLotusIni() IF defdir$ = "" THEN goto rinotfound END IF ripath$ = defdir$ + "approach.ri" 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: DebugMsg "Function End", "DefaultUserRegAPR" END FUNCTION 'DefaultUserRegAPR '************************************************************************* '** FUNCTION InitAPR (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 "APRDIR", 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 paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards, 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 InitAPR (prodno%, network$, direction$, basedir$) AS STRING DIM sym$, symname$, defdir$, position%, proddir$, iniPath$, rv%, APRversion$ DIM previousprod$, ret$, nFind&, nFindClass&, nFindACaption&, nFindNCaption&, personaldir$, buf$ DIM prevmastersdir$, prevworkdir$, prevsamplesdir$, defaultlang$, prevqmfdir$ DIM Productfound$, temp% DebugMsg "Function Start", "InitAPR" InitAPR = direction$ '** In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If DebugMsg "Checking User Rights", "InitAPR" '** Check to see if the user has administrator rights when '** installing standalone under Windows NT. Warn User about problems installing. If WhatPlatform() = PLATFORM_WINNT AND _ GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _ GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ _ Then If network$ = gSTANDARD$ OR network$ = gNODE$ Then If APRIsAdmin() <> TRUE Then direction$ = PopupModalDlg (DBAPR_NOADMIN, DBAPR_NOADMIN) IF direction$ = gBACK THEN InitAPR = direction$ EXIT FUNCTION END IF End If End If End If DebugMsg "Finished Checking User Rights", "InitAPR" '** 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, "APRDIR" SetListItem symname$, 1, "APRDIRNAME" SetListItem sym$, 2, "APRWORKDIR" SetListItem symname$, 2, "APRWORKDIRNAME" ' SetListItem sym$, 3, "APRTOURDIR" ' SetListItem symname$, 3, "APRTOURDIRNAME" SetListItem sym$, 3, "APRSAMPLESDIR" SetListItem symname$, 3, "APRSAMPLESDIRNAME" SetListItem sym$, 4, "APRDEMODIR" SetListItem symname$, 4, "APRDEMODIRNAME" SetListItem sym$, 5, "APRMASTERSDIR" SetListItem symname$, 5, "APRMASTERSDIRNAME" ' IF network$ <> gNODE$ THEN ' SetListItem sym$, 6, "APRMASTERSDIR" ' SetListItem symname$, 6, "APRMASTERSDIRNAME" ' END IF '** NOTE The path in the string table is lower case and ends with a slash SetSymbolValue "APRDIR", basedir$ + LdString(SID_APR_DIR) SetSymbolValue "APRLANGDIR", basedir$ + LdString(SID_APR_DIR) SetSymbolValue "APRWORKDIR", basedir$ + LdString(SID_APR_WORK_DIR) SetSymbolValue "APRMASTERSDIR", basedir$ + LdString(SID_APR_MASTERS_DIR) SetSymbolValue "APRMASTERSLANGDIR", basedir$ + LdString(SID_APR_MASTERS_DIR) SetSymbolValue "APRMASTERSIMGLANGDIR", GetSymbolValue("APRMASTERSDIR") + LdString(SID_APR_MASTERSIMG_DIR) SetSymbolValue "APRSAMPLESDIR", basedir$ + LdString(SID_APR_SAMPLES_DIR) SetSymbolValue "APRSAMPLESLANGDIR", basedir$ + LdString(SID_APR_SAMPLES_DIR) SetSymbolValue "APRBACKUPDIR", basedir$ + LdString(SID_APR_BACKUP_DIR) SetSymbolValue "APRQMFDIR", GetSymbolValue("APRDIR") SetSymbolValue "APRICONSDIR", GetSymbolValue("APRDIR") SetSymbolValue "APRICONLANGDIR", GetSymbolValue("APRDIR") ' SetSymbolValue "APRTOURDIR", GetSymbolValue("APRDIR") SetSymbolValue "APRDEMODIR", GetSymbolValue("APRDIR") + LdString(SID_APR_DEMOS_DIR) SetSymbolValue "APRDEMOLANGDIR", GetSymbolValue("APRDIR") + LdString(SID_APR_DEMOS_DIR) SetSymbolValue "APROBSDIR1", GetSymbolValue("APRDIR") SetSymbolValue "APROBSDIR2", GetSymbolValue("APRDIR") APRPrintDirs "Start InitAPR" '** This will be the name of the directory that shows up in captions in '** toolkit dialogs (Static text) SetSymbolValue "APRDIRNAME", LdString(SID_APR_DIRNAME) SetSymbolValue "APRLANGDIRNAME", LdString(SID_APR_DIRNAME) ' SetSymbolValue "APRTOURDIRNAME", LdString(SID_APR_TOUR_DIRNAME) SetSymbolValue "APRMASTERSDIRNAME", LdString(SID_APR_MASTERS_DIRNAME) SetSymbolValue "APRMASTERSLANGDIRNAME", LdString(SID_APR_MASTERS_DIRNAME) SetSymbolValue "APRSAMPLESDIRNAME", LdString(SID_APR_SAMPLES_DIRNAME) SetSymbolValue "APRSAMPLESLANGDIRNAME", LdString(SID_APR_SAMPLES_DIRNAME) SetSymbolValue "APRDEMODIRNAME", LdString(SID_APR_DEMO_DIRNAME) IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ THEN DebugMsg "About to check for Approach & Notes Reporter Running", "InitAPR" '** Put up dlg box, if a version is currently running '** Only if we're not doing a SmartSuite install '==================================================== DIM szClassName$ DIM szACaptionName$, szNCaptionName$, nFindA1Caption&, szA1CaptionName$ szClassName$ = "ApproachWClass" szACaptionName$ = "Lotus Approach Release 9" szA1CaptionName$ = "Approach" szNCaptionName$ = "Notes Reporter" IF network$ = gSTANDARD$ OR network$ = gNODE$ THEN nFindClass& = FindWindowA(szClassName$,0&) nFindACaption& = FindWindowA(szClassName$, szACaptionName$) nFindA1Caption& = FindWindowA(szClassName$, szA1CaptionName$) nFindNCaption& = FindWindowA(szClassName$, szNCaptionName$) DebugMsg szClassName$ & " Class Found? " & CStr(nFindClass&) & Chr(13) &_ szNCaptionName$ & " Caption Found? " & CStr(nFindNCaption&) & Chr(13) &_ szACaptionName$ & " Caption Found? " & CStr(nFindACaption&) & Chr(13) &_ szA1CaptionName$ & " Caption Found? " & CStr(nFindA1Caption&), "InitAPR" WHILE direction$ = gNEXT$ AND nFindClass& <> FALSE if (nFindACaption& <> FALSE) OR (nFindA1Caption& <> FALSE) then direction$ = PopupModalDlg(DBAPR_APRRUNNING, DBAPR_APRRUNNING) elseif nFindNCaption& <> FALSE then direction$ = PopupModalDlg(DBAPR_NRPRUNNING, DBAPR_NRPRUNNING) else direction$ = PopupModalDlg(DBAPR_PRODRUNNING, DBAPR_PRODRUNNING) end if IF direction$ = gBACK$ THEN InitAPR = direction$ EXIT FUNCTION END IF nFindClass& = FindWindowA(szClassName$,0&) nFindACaption& = FindWindowA(szClassName$, szACaptionName$) nFindNCaption& = FindWindowA(szClassName$, szNCaptionName$) WEND DebugMsg "Check for Approach & Notes Reporter Running is complete", "InitAPR" End If '** Put up dlg box, if a SmartCenter is currently running '==================================================== DebugMsg "Suite Install Type:: " + GetSymbolValue(SYM_SINGLESMARTSUITE$), "InitAPR" IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ THEN '** This is obviously drawers, SmartCenter 96 nFind& = FindWindowA ("Lotus_Drawers", 0&) WHILE direction$ = gNEXT$ AND nFind& <> FALSE direction$ = PopupModalDlg (DBAPR_CNTRRUNNING, DBAPR_CNTRRUNNING) IF direction$ = gBACK$ THEN InitAPR = direction$ EXIT FUNCTION END IF nFind& = FindWindowA ("Lotus_Drawers", 0&) WEND '** This is SmartCenter 1.0, 2.0 and 2.1. nFind& = FindWindowA ("LotusSmartCenter", 0&) WHILE direction$ = gNEXT$ AND nFind& <> FALSE direction$ = PopupModalDlg (DBAPR_CNTRRUNNING, DBAPR_CNTRRUNNING) IF direction$ = gBACK$ THEN InitAPR = direction$ EXIT FUNCTION END IF nFind& = FindWindowA ("LotusSmartCenter", 0&) WEND END IF END IF '** Put up a dlg box, if previous version of product found '========================================================== IF network$ = gSTANDARD$ OR network$ = gNODE$ THEN previousprod$ = APR_GetInstalledVersion() DebugMsg "Previous Version: " + previousprod$, "InitAPR" DebugMsg "APR Path from Registry: " + GetAPRPathfromRegistry(), "InitAPR" DebugMsg "Install Kind: " + GetListItem(SYM_INSTALLKINDS$, prodno%), "InitAPR" '** First Check for an existing Approach 97 install IF previousprod$ = "APPROACH97" AND _ GetAPRPathfromRegistry() <> "" AND _ GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ _ THEN Reg_SetPreviousVersion prodno%, "1" IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _ GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN direction$ = PopupModalDlg (DBAPR_EXISTING, DBAPR_EXISTING) IF direction$ = gBACK THEN InitAPR = direction$ EXIT FUNCTION END IF END IF '** If we cannot find 97, look for 96 and popup messages ElseIf previousprod$ = "APPROACH96" AND _ GetAPRPathfromRegistry() <> "" AND _ GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ _ THEN g96Path$ = GetAPRPathfromRegistry() Reg_SetPreviousVersion prodno%, "1" 'Reg_SetObsFiles prodno%, 1 SetSymbolValue "APROBSDIR2", g96Path$ IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _ GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN direction$ = PopupModalDlg (DBAPR_96EXISTING, DBAPR_96EXISTING) IF direction$ = gBACK THEN InitAPR = direction$ EXIT FUNCTION END IF END IF '** Otherwise, here we ask the user if they want to remove Approach 3.0 ElseIF previousprod$ = "APPROACH" AND network$ = gSTANDARD$ THEN IF GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ Then Reg_SetObsFiles prodno%, 1 SetSymbolValue "APROBSDIR1", GetAPRPathFromLotusINI() IF direction$ <> gBACK AND GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ THEN IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN IF TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRRemovePreviousProdFiles")) <> "0" THEN APRRemoveProdFiles% = TRUE END IF ELSE RegisterCallback "APR", "APR_RemoveProdFilesCB" direction$ = PopupModalDlg(DBAPR_REMOVEPRODFILES, DBAPR_REMOVEPRODFILES) IF direction$ = gBACK THEN direction$ = gNEXT 'handle NO button END IF END IF END IF ELSE Reg_SetObsFiles prodno%, 0 END If END IF END IF '** Special Cases for setting these symbols '** Strings should be resourced, but we didn'** t want to clutter '** the APR string table. SELECT CASE network$ CASE gSERVER$ SetSymbolValue "APRNAME", LdString(SID_APR_SERVER_DIRNAME) CASE gDISTRIBUTION$ SetSymbolValue "APRNAME", LdString(SID_APR_DIST_DIRNAME) CASE gSTANDARD$ '** Check if APPROACH97 node is installed buf$ = "" IF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Lotus Approach", "Personal Directory", REG_SZ, buf$, 256) = 0 THEN proddir$ = LTRIM$(buf$) rv = 0 if proddir$ <> "" then rv% = Lot_CleanPath(proddir$) end if IF rv% = 0 THEN proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_APR_DIR) END IF Goto DONE ELSEIF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Personal", "", REG_SZ, buf$, 256) = 0 THEN proddir$ = LTRIM$(buf$) rv = 0 if proddir$ <> "" then rv% = Lot_CleanPath(proddir$) end if IF rv% = 0 THEN proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_APR_DIR) END IF Goto DONE END IF '** check if there is an existing product defdir$ = GetAPRPathfromRegistry() 'APR_GetInstalledVersion() IF defdir$ <> "" THEN proddir$ = defdir$ '** get default language buf = "" buf$ = GetPreviousLang() defaultlang$ = LTRIM$(buf$) IF defaultlang$ <> "" THEN defaultlang$ = LEFT$(defaultlang$,2) '** Work Files Directory buf$ = "" rv = 0 buf$ = GetPreviousWorkDir(defaultlang$, prodno%) prevworkdir$ = LTRIM$(buf$) DebugMsg "Previous Work Directory: " + buf$, "InitAPR" if prevworkdir$ <> "" then rv% = Lot_CleanPath(prevworkdir$) end if IF rv% <> 0 THEN SetSymbolValue "APRWORKDIR", prevworkdir$ END IF '** SmartMaster Directory buf$ = "" rv = 0 buf$ = GetPreviousMastersDir(defaultlang$) prevmastersdir$ = LTRIM$(buf$) DebugMsg "Previous SMasters Directory: " + buf$, "InitAPR" if prevmastersdir$ <> "" then rv% = Lot_CleanPath(prevmastersdir$) end if IF rv% <> 0 THEN SetSymbolValue "APRMASTERSDIR", prevmastersdir$ SetSymbolValue "APRMASTERSIMGLANGDIR", GetSymbolValue("APRMASTERSDIR") _ + LdString(SID_APR_MASTERSIMG_DIR) END IF '** Sample Files Directory buf$ = "" rv = 0 buf$ = GetPreviousSamplesDir(defaultlang$) prevsamplesdir$ = LTRIM$(buf$) DebugMsg "Previous Samples Directory: " + buf$, "InitAPR" if prevsamplesdir$ <> "" then rv% = Lot_CleanPath(prevsamplesdir$) end if IF rv% <> 0 THEN SetSymbolValue "APRSAMPLESDIR", prevsamplesdir$ END IF '** QMF DASPWAPI Directory buf$ = "" rv = 0 buf$ = GetPreviousQMFDir(defaultlang$) prevqmfdir$ = LTRIM$(buf$) DebugMsg "Previous QMF Directory: " + buf$, "InitAPR" if prevqmfdir$ <> "" then rv% = Lot_CleanPath(prevqmfdir$) end if IF rv% <> 0 THEN SetSymbolValue "APRQMFDIR", prevqmfdir$ END IF END IF ELSE proddir$ = basedir$ + LdString(SID_APR_DIR) END IF DONE: '** Refresh all directory symbols that rely on APRDIR SetSymbolValue "APRDIR", proddir$ SetSymbolValue "APRICONSDIR", GetSymbolValue("APRDIR") SetSymbolValue "APRICONLANGDIR", GetSymbolValue("APRDIR") IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** if this is an automated install, get the directory from the response file SetSymbolValue "APRDEMODIR", TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRDEMODIR")) SetSymbolValue "APRDEMOLANGDIR", TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRDEMODIR")) ELSE SetSymbolValue "APRDEMODIR", GetSymbolValue("APRDIR") + LdString(SID_APR_DEMOS_DIR) SetSymbolValue "APRDEMOLANGDIR", GetSymbolValue("APRDIR") + LdString(SID_APR_DEMOS_DIR) End If SetSymbolValue "APRSAMPLESLANGDIR", GetSymbolValue("APRSAMPLESDIR") '** If there was no previous QMF Directory, update the directory to the '** current user's selection for the Approach direcotry. If prevqmfdir$ <> "" Then SetSymbolValue "APRQMFDIR", GetSymbolValue("APRDIR") Else DebugMsg "Previous QMF Dir Not Found", "InitAPR" End If ' SetSymbolValue "APRTOURDIR", GetSymbolValue("APRDIR") CASE gNODE$ proddir$ = basedir$ + LdString(SID_APR_DIR) buf$ = "" IF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Lotus Approach", "Personal Directory", REG_SZ, buf$, 256) = 0 THEN proddir$ = LTRIM$(buf$) rv% = 0 if proddir$ <> "" then rv% = Lot_CleanPath(proddir$) end if IF rv% = 0 THEN proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_APR_DIR) END IF ELSEIF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Personal", "", REG_SZ, buf$, 256) = 0 THEN proddir$ = LTRIM$(buf$) rv = 0 if proddir$ <> "" then rv% = Lot_CleanPath(proddir$) end if IF rv% = 0 THEN proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_APR_DIR) END IF END IF SetSymbolValue "APRWORKDIR", basedir$ + LdString(SID_APR_WORK_DIR) SetSymbolValue "APRMASTERSDIR", Lot_GetDestDirValueFromInstallIni("APRMASTERSLANGDIR") SetSymbolValue "APRSAMPLESDIR", Lot_GetDestDirValueFromInstallIni("APRSAMPLESLANGDIR") ' SetSymbolValue "APRTOURDIR", Lot_GetDestDirValueFromInstallIni("APRTOURDIR") SetSymbolValue "APRDIR", proddir$ SetSymbolValue "APRICONSDIR", GetSymbolValue("APRDIR") SetSymbolValue "APRICONLANGDIR", GetSymbolValue("APRICONSDIR") SetSymbolValue "APRQMFDIR", Lot_GetDestDirValueFromInstallIni("APRQMFDIR") IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** if this is an automated install, get the directory from the response file SetSymbolValue "APRDEMODIR", TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRDEMODIR")) SetSymbolValue "APRDEMOLANGDIR", TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRDEMODIR")) ELSE SetSymbolValue "APRDEMODIR", GetSymbolValue("APRDIR") + LdString(SID_APR_DEMOS_DIR) SetSymbolValue "APRDEMOLANGDIR", GetSymbolValue("APRDEMODIR") End If END SELECT ' ****** Language Install Code for Node User Install ****** '** 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("APRMASTERSLANGDIR") MarkFixupSourceDirSymbol("APRSAMPLESLANGDIR") MarkLanguageSubdir("APRLANGDIR") MarkLanguageSubdir("APRICONLANGDIR") MarkLanguageSubdir("APRMASTERSLANGDIR") MarkLanguageSubdir("APRMASTERSIMGLANGDIR") MarkLanguageSubdir("APRSAMPLESLANGDIR") MarkLanguageSubdir("APRDEMOLANGDIR") DebugMsg "Function End", "InitAPR" APRPrintDirs "End InitAPR" END FUNCTION 'InitAPR '************************************************************************* '** FUNCTION PrevVersionsAPR (prodno%, network$, direction$) AS STRING '** '** Purpose: This function is called only for SmartSUite. It is called '** immediately after all the other product functions for '** InitAPR are called. It allows SmartSuite to assess whether '** there are older versions of products around. '** '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards, i.e start at your last dialog '** first. '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT | gBACK (If you are showing UI and you '** allow the user to step backwards.) '** '************************************************************************* PUBLIC FUNCTION PrevVersionsAPR (prodno%, network$, direction$) AS STRING DIM nProducts%, prodIndex%, i% DebugMsg "Function Start", "PrevVersionsAPR" nProducts% = Reg_GetNumberOfProducts() FOR prodIndex% = 1 to nProducts% If Reg_GetPreviousVersion(prodIndex%) <> "" Then i% = DoMsgBox(LdString(SID_APR_OLDERVERSIONS),"", MB_OK) GOTO PREVPRODFOUND End If NEXT PREVPRODFOUND: DebugMsg "Function End", "PrevVersionsAPR" END FUNCTION 'PrevVersionsAPR '************************************************************************* '** FUNCTION PathChangeAPR (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING '** '** Purpose: This function is called whenever the user proposes changes '** to a path for your product. By the time this function calls '** you, the paths have already been checked syntactically, and '** the directory has been checked to see that it is writeable. '** Your obligation is to verify that the proposed new path is ok '** with you. If not, put up a Lotus Script :"MESSAGEBOX" '** telling the user and return gBACK. '** '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** destdirsym$: The destdir symbol that has changed. e.g. "APRDIR" '** mainprodsonly%: (TRUE | FALSE) , when TRUE this means that only '** your top level product directory should change, '** probably "APRDIR". 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 PathChangeAPR (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING DIM path$ DebugMsg "Function Start", "PathChangeAPR" PathChangeAPR = gNEXT APRPrintDirs "PathChangeAPR" path$ = GetSymbolValue (destdirsym$) '' The following is a psudocode example ''''''rc$ = DetectVersionPriorToDarwin(path$) ''''''If rc$ = "BEAGLE" then '''''' ShowPathError SID_BEAGLE_FOUND, SID_ERR_EXISTBEAGLE, path$ '''''' PathChangeAPR = gBACK ''''''end if DebugMsg "Function End", "PathChangeAPR" END FUNCTION 'PathChangeAPR '************************************************************************* '** FUNCTION InitCopyListAPR (prodno%, network$, direction$) AS STRING '** '** Purpose: Product must Initialize the copylist '** '** Must Do: You must initialize the copy list. However, '** ======= if you leave the code as is (don't touch it at all), '** it will probably work for you. Copy list must be initialized. '** CAUTION: Make sure that your toplevel section in the '** acronym.SCR has a keyword of "acronymTOP" '** '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT | gBACK (If you are showing UI and you '** allow the user to step backwards.) '** '************************************************************************* PUBLIC FUNCTION InitCopyListAPR (prodno%, network$, direction$) AS STRING DIM i%, sym$, sym1$, sym2$, sym3$, chpt$, nextprod$, notused%, FeatureToFind$ DIM defaultlang$, prevqmfdir$, buf$, rv%, section$, srcDir$, chptname$ ON Error STFQUIT GOTO COPYLISTERROR DebugMsg "Function Start", "InitCopyListAPR" APRPrintDirs "InitCopyList, Before Language Code" '** For non-language install, they will all go into the same directory '** same directory, for example: SetSymbolValue "APRLANGDIR", GetSymbolValue("APRDIR") SetSymbolValue "APRMASTERSLANGDIR", GetSymbolValue("APRMASTERSDIR") SetSymbolValue "APRMASTERSIMGLANGDIR", GetSymbolValue("APRMASTERSLANGDIR") + LdString(SID_APR_MASTERSIMG_DIR) SetSymbolValue "APRSAMPLESLANGDIR", GetSymbolValue("APRSAMPLESDIR") ' SetSymbolValue "APRTOURLANGDIR", GetSymbolValue("APRLANGDIR") ' SetSymbolValue "APRTOURDIR", GetSymbolValue("APRLANGDIR") IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** if this is an automated install, get the directory from the response file SetSymbolValue "APRDEMODIR", TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRDEMODIR")) SetSymbolValue "APRDEMOLANGDIR", TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRDEMODIR")) ELSE SetSymbolValue "APRDEMODIR", GetSymbolValue("APRDIR") + LdString(SID_APR_DEMOS_DIR) SetSymbolValue "APRDEMOLANGDIR", GetSymbolValue("APRDEMODIR") End If SetSymbolValue "APRICONLANGDIR", GetSymbolValue("APRLANGDIR") APRPrintDirs "Start InitCopyList" InitCopyListAPR = 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 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 DebugMsg "Initializing CopyList Start", "InitCopyListAPR" Lot_InitializeCopyList chpt$, i% DebugMsg "Initializing CopyList Complete", "InitCopyListAPR" '** Make sure to turn off all sections not available on the server. If (network$ = gNODE) Then DebugMsg "Removing File Sections not on Server", "InitCopyListAPR" 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 DebugMsg "Not Installed Sections Removed. Add Chart CL files to node", "InitCopyListAPR" '** Add basic.cl and other .cl files to node user dir chpt$ = Lot_GetChapterFromKeyword("APRWIN32SHRCHARTUSER") section$ = Lot_GetChapterValStr(chpt$, F_NOTHING) srcDir$ = Lot_GetDestDirValueFromInstallIni("APRDIR") AddSectionFilesToCopyList section$, srcDir$, GetSymbolValue("APRDIR") '** If Default server install, turn on all product sections to make this a FULL install ELSEIF network$ = gSERVER$ AND i% = F_COMPLETE THEN '** Get the name of the obsolete files section. We do '** not want to turn that one on along with the rest. sym1$ = Reg_GetProductAcronym(prodno%) & "OBSFILES1" sym2$ = Reg_GetProductAcronym(prodno%) & "OBSFILES2" sym3$ = Reg_GetProductAcronym(prodno%) & "DUMMYSCRIPTHELP" '** At this point chpt$ is APRTOP. Here, we will get APRTOP's '** next sibling. nextprod$ = Lot_GetNextSibling(chpt$, F_NOTHING) '** Loop through all of the INF sections, turning on '** all except the obsolete files sections. chpt$ = Lot_GetFirst(chpt$, F_KEYWORD) WHILE chpt$ <> "" AND chpt$ <> nextprod$ '** If the current chapter is not APROBSFILES1, APROBSFILES2, '** or APRDUMMYSCRIPTHELP then turn it on IF Lot_GetChapterValStr(chpt$, F_KEYWORD) <> sym1$ _ AND Lot_GetChapterValStr(chpt$, F_KEYWORD) <> sym2$ _ AND Lot_GetChapterValStr(chpt$, F_KEYWORD) <> sym3$ _ THEN notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 1) END IF '** Move on to the next chapter chpt$ = Lot_GetNext() WEND End If ' ** Turn on server tag file for server install If (network$ = gSERVER) Then chptname$ = Lot_GetChapterFromKeyword("APRSERVERCORE") notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) End If '** Special determination of NT system files that may already exist notused% = APR_TurnOnNTSpecialFiles (prodno%, network$) '' ****** Language Install Code ****** ''** We need to explicitly turn on all language sections for the current ''** language, those whose keyword suffix matches language "LANG??" 'Lot_SetLanguageSectionsOn(prodno%) '** get default language buf = "" buf$ = GetPreviousLang() defaultlang$ = LTRIM$(buf$) '** QMF DASPWAPI Directory '** One last check before we let the user at it. buf$ = "" rv = 0 '** During a Node install use the value written to the Cinstall.ini on the '** server, otherwise, use the Approach directory for this location. '** The user can change this in the customize MOREDIRS dialog if they're doing '** a standard install, otherwise, they have to live with the defaults. if (network$ = gNode) Then SetSymbolValue "APRQMFDIR", Lot_GetDestDirValueFromInstallIni("APRQMFDIR") Else SetSymbolValue "APRQMFDIR", GetSymbolValue("APRDIR") End If buf$ = GetPreviousQMFDir(defaultlang$) prevqmfdir$ = LTRIM$(buf$) if prevqmfdir$ <> "" then rv% = Lot_CleanPath(prevqmfdir$) end if IF rv% <> 0 THEN SetSymbolValue "APRQMFDIR", prevqmfdir$ END IF EXIT FUNCTION DebugMsg "Function End", "InitCopyListAPR" COPYLISTERROR: ErrorMsg 0, "Developers: You need to have licenser section with APRTOP in INF file" ERROR STFQUIT END FUNCTION 'InitCopyListAPR '************************************************************************* '** FUNCTION UIAPR (prodno%, network$, direction$) AS STRING '** '** Purpose: This is your chance to put up any User Interface '** that you want. Remember, try to keep it short. '** In SmartSuite, if every product puts up two extra '** dialogs, then the SmartSuite will consist of 16 dialogs! '** '** Pay attention to the value of direction, if you are putting '** up more than one dialog. '** '** The toolkit will do an accurate space computation later, '** so you can tamper with the copy list. But you shouldn't '** write out anything to the disk until PostCopyCofig! '** '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is oart of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT | gBACK (If you are showing UI and you '** allow the user to step backwards.) '** '************************************************************************* PUBLIC FUNCTION UIAPR (prodno%, network$, direction$) AS STRING DIM notused%, chpt$, buf$ DIM szkey$, ret&, nsize&, gbuf$, defaultlang$ DIM PrevMasters$, previousprod$ DebugMsg "Function Start", "UIAPR" '** If Custom and NOT part of Suite then surface dialog. IF Reg_GetProdSelectedInstallType(prodno%) = gCUSTOM$ AND _ GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _ network$ <> gSERVER$ AND GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ _ THEN '** Don't allow users to change directories in an MLC install '** '** Find the installed languages szkey$ = gREGLOTUS + LdString(SID_APR_PROD_NAME) + "\" + LdString(SID_APR_PROD_VER) + "\Languages" IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szkey$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, "Installed", 0, gbuf$, nsize&) END IF IF NOT (MID(gbuf$,1,2) <> GetSymbolValue(SYM_INSTALL_LANGUAGE$) AND _ GetListItem(SYM_INSTALLKINDS$, prodno%) = gREINSTALL$) _ THEN notused% = RegisterCallback("APR","APRMOREDIRSCB") direction$ = PopupModalDlg (DBAPR_MOREDIRS2, DBAPR_MOREDIRS2) END IF END IF UIAPR = direction$ '** In the backwards case, keep backing up IF direction$ = gBACK THEN EXIT FUNCTION END IF %REM '*** Remove Obsolete Files dlg for APR '** Only needed once. We do this in INITAPR. if Reg_GetObsFiles (prodno%) = 1 AND GetSymbolValue (SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _ network$ = gSTANDARD$ _ then notused% = RegisterCallback("APR", "APRRemoveObsoleteFiles") direction$ = PopupModalDlg (DBAPR_REMOVEPRODFILES, DBAPR_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 %ENDREM '*** Below are two examples of how to surface a dialog to prompt the use wether '*** they want to backup thier SmartMasters. The 2nd example should be used since it '*** checks wether or not the Install is a Language Install. We do NOT want to surface '*** this during a Language Install. There is no an example of how to setup your INF file '*** (LYT/SCR) for this since it would of been alot more work to give a 'real' example. '*** You can use Freeelance or WordPro's INF's as an example if this is necessary '*** 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 ' previousprod$ = APR_GetInstalledVersion() defaultlang$ = LTRIM$(GetPreviousLang()) IF defaultlang$ <> "" THEN defaultlang$ = LEFT$(defaultlang$,2) end if IF previousprod$ = "APPROACH96" AND network$ = gSTANDARD$ AND _ direction$ <> gBACK AND _ GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ _ THEN IF DoesDirExist(GetPreviousMastersDir(defaultlang$)) THEN IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN APRBackupSmartMasters% = Lot_GetKeyValFromResponseFile(_ "APR", "APRBackupSmartMasters") <> "0" ELSE chpt$ = Lot_GetChapterFromKeyword("APRSMARTMASTERS") IF (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) THEN notused% = RegisterCallback("APR", "APRBACKUPMASTERSCB") direction$ = PopupModalDlg(DBAPR_BACKUPMASTERS, _ DBAPR_BACKUPMASTERS) END IF END IF END IF END IF DebugMsg "Function End", "UIAPR" END FUNCTION 'UIAPR '************************************************************************* '** FUNCTION PreCopyConfigAPR (prodno%, network$, direction$, lic%) AS STRING '** '** Purpose: This is the very last function called before the space is '** accurately computed (to the last byte) and files are copied '** by the toolkit. If you have any last minute changes to '** do, this is the time to do them. example: '** Test for monitor resolution, and turn on the chapter '** in the copy list (a memory residident version of the INF file) '** with the appropriate resolution. '** '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** lic%: TRUE | FALSE; TRUE licensing is turned on else it is off '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT | gBACK (If you are showing UI and you '** allow the user to step backwards.) '** '************************************************************************* PUBLIC FUNCTION PreCopyConfigAPR (prodno%, network$, direction$, lic%) AS STRING DIM nSections%, sym$, chpt$, notused%, count% DIM ObsProdDir$, installDir$, value$, ProdKey$, cbBuf& DIM rc%, szProd$, szVer$ DIM aprcore%, aprchpt$, nextprod$, FeatureToFind$ DebugMsg "Function Start", "PreCopyConfigAPR" PreCopyConfigAPR = direction$ ''** In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If '*** REMOVE PRIOR VERSION '*** This section checks for installing Approach 98 over '** Approach 96 or 97. If installed to the same Directory the prior '** version is automatically uninstalled before copy files begins. Value$ = "Path" ObsProdDir$ = "" '*** This is the product name as found in the registry szProd$ = LdString(SID_APR_PROD_NAME) '*** This is the old product version as found in the registry '*** look for 97.0 key first... szVer$ = "97.0" ProdKey$ = "Software\Lotus\" + szProd$ +"\" + szVer$ +"\" '***Get the directory for the version to be removed IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, ProdKey$) THEN DebugMsg "Found Approach 97.0 on Machine", "UIAPR" rc% = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, ProdKey$, _ Value$, REG_DWORD, ObsProdDir$, cbBuf&) '*** if no 97.0, look for 96.0... ELSE szVer$ = "4.0" ProdKey$ = "Software\Lotus\" + szProd$ +"\" + szVer$ +"\" IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, ProdKey$) THEN DebugMsg "Found Approach 96.0 on Machine", "UIAPR" rc% = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, ProdKey$, _ Value$, REG_DWORD, ObsProdDir$, cbBuf&) END IF END IF '** GEMINI IF minisuite123% = FALSE OR _ Reg_GetProdSelectedInstallType(prodno%) <> gLAPTOP$ _ THEN IF (ObsProdDir$ <> "") THEN '***prepare the 2 paths for a string compare installDir$ = NullTrim(GetSymbolValue("APRDIR")) ObsProdDir$ = NullTrim(ObsProdDir$) IF RIGHT$(installDir$,1) <> "\" THEN installDir$ = installDir$ + "\" IF RIGHT$(ObsProdDir$,1) <> "\" THEN ObsProdDir$ = ObsProdDir$ + "\" DebugMsg "Install Direcotry: " + installDir$ + Chr$(13) + _ "Obsolete Directory: " + ObsProdDir$, "UIAPR" notused% = StrCompare(installDir$,ObsProdDir$,1) IF StrCompare(installDir$,ObsProdDir$,1) = 0 AND _ rc% = ERROR_SUCCESS THEN DebugMsg "Removing Prior Version", "UIAPR" notused% = RemovePriorVersion( szProd$ , szVer$) g96Path$ = ObsProdDir$ gRemovePriorVersion% = TRUE DebugMsg "Prior Version Removed", "UIAPR" ELSEIF (network$ = gNODE$) THEN ProdKey$ = "Software\Lotus\"+ szProd$ +"\" + szVer$ +"\Lotus Approach" IF Lot_DoesRegkeyExistEx(HKEY_CURRENT_USER, ProdKey$) THEN DebugMsg "Found Node on Machine prodkey:"+ProdKey$,"PreCopyConfigAPR" rc% = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, ProdKey$,"Personal Directory", REG_SZ,ObsProdDir$, cbBuf&) ELSEIF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Personal", "", REG_SZ, ObsProdDir$, cbBuf&) = 0 THEN DebugMsg "Found node on machine for 96", "PreCopyConfigAPR" END IF '***prepare the 2 paths for a string compare installDir$ = NullTrim(GetSymbolValue("APRDIR")) ObsProdDir$ = NullTrim(ObsProdDir$) IF RIGHT$(installDir$,1) <> "\" THEN installDir$ = installDir$ + "\" IF RIGHT$(ObsProdDir$,1) <> "\" THEN ObsProdDir$ = ObsProdDir$ + "\" IF StrCompare(installDir$,ObsProdDir$,1) = 0 AND _ rc% = ERROR_SUCCESS THEN DebugMsg "Removing Prior Version", "PreCopyConfigAPR" notused% = RemovePriorVersion( szProd$ , szVer$) g96Path$ = ObsProdDir$ gRemovePriorVersion% = TRUE DebugMsg "Prior Version Removed", "PreCopyConfigAPR" END IF END IF END IF END IF '** END GEMINI '*** DONE REMOVING PRIOR VERSION If GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE Then '*** Setup REMOVE Sections in INF file if user selected to have us delete '** a prior Approach 3.0x install. 'In a SmartSuite Install this is already taken care of. nSections% = 2 FOR count% = 1 TO nSections% sym$ = "APROBSFILES" + LTRIM$(STR$(count%)) chpt$ = Lot_GetChapterFromKeyWord(sym$) DebugMsg "Symbol: " + sym$ + " & Chapter: " + chpt$, "UIAPR" IF chpt$ <> "" Then IF (APRRemoveProdFiles% = TRUE) AND count% = 1 THEN notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 1) ELSE notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 0) END IF IF g96Path$ <> "" AND count% = 2 THEN DebugMsg "Symbol: " + sym$ + " & Chapter: " + chpt$, "UIAPR" IF g96Path$ = GetSymbolValue("APRDIR") THEN notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 1) ELSE notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 0) END IF END IF END IF NEXT End If ''** Tell the toolkit how many billboards you will have during file copy. ''** This way the toolkit will be able to calculate how long each billboard ''** should stay up If network$ <> gNODE Then Reg_SetBillboardNumber prodno%, 11 Else Reg_SetBillboardNumber prodno%, 1 End If IF network$ <> gDISTRIBUTION$ THEN Lot_RefreshDestination("APRLANGDIR") IF network$ <> gNODE$ THEN Lot_RefreshDestination("APRMASTERSLANGDIR") Lot_RefreshDestination("APRSAMPLESLANGDIR") Lot_RefreshDestination("APRMASTERSDIR") Lot_RefreshDestination("APRSAMPLESDIR") END IF END IF '** Make sure all the directories are refreshed before writing to account for '** any changes the user has made that we did not catch before now. Lot_RefreshDestination("APRDIR") Lot_RefreshDestination("APRWORKDIR") Lot_RefreshDestination("APRICONSDIR") ' Lot_RefreshDestination("APRTOURDIR") Lot_RefreshDestination("APRDEMODIR") '** These are testing to see whether the Windows and Windows\System SCR sections '** are part of the copylist. There was a bug where these sections were not '** being included during a Node install. chpt$ = Lot_GetChapterFromKeyWord("APRWINDIR") DebugMsg "APRWINDIR: Chapter #" + CStr(chpt$), "PreCopyConfigAPR" If (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) Then DebugMsg "APRWINDIR is in the copy list", "PreCopyConfigAPR" Else DebugMsg "APRWINDIR is NOT in the copy list", "PreCopyConfigAPR" End If chpt$ = Lot_GetChapterFromKeyWord("APRSYSFILES") DebugMsg "APRSYSFILES: Chapter #" + CStr(chpt$), "PreCopyConfigAPR" If (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) Then DebugMsg "APRSYSFILES is in the copy list", "PreCopyConfigAPR" Else DebugMsg "APRSYSFILES is NOT in the copy list", "PreCopyConfigAPR" End If chpt$ = Lot_GetChapterFromKeyWord("APRSYSDIRNT") DebugMsg "APRSYSDIRNT: Chapter #" + CStr(chpt$), "PreCopyConfigAPR" If (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) Then DebugMsg "APRSYSDIRNT is in the copy list", "PreCopyConfigAPR" Else DebugMsg "APRSYSDIRNT is NOT in the copy list", "PreCopyConfigAPR" End If chpt$ = Lot_GetChapterFromKeyWord("APRMSVC20") DebugMsg "APRMSVC20: Chapter #" + CStr(chpt$), "PreCopyConfigAPR" If (Lot_GetChapterValInt(chpt$, F_INOROUT) = 1) Then DebugMsg "APRMSVC20 is in the copy list", "PreCopyConfigAPR" Else DebugMsg "APRMSVC20 is NOT in the copy list", "PreCopyConfigAPR" End If '** Check to see if the user is installing the Scripting in Approach '** help files. If not, install the placeholder files. chpt$ = Lot_GetChapterFromKeyWord("APRSCRIPTHELP") DebugMsg "APRSCRIPTHELP: Chapter #" + CStr(chpt$), "PreCopyConfigAPR" If (Lot_GetChapterValInt(chpt$, F_INOROUT) = 0) Then APR_TurnOnDummyScriptFiles End If '** It's possible that someone can turn on ODBC and miss a required section '** This fucntion makes sure that if ODBC is selected that the required '** shared DLL section is also turned on. APRTurnOnODBCSection network$ '** Make sure to turn off all sections not available on the server. '** There have been situations where node options are hierachichally checked '** when they are not actaully available, so do another check here, just to be sure. sym$ = Reg_GetProductAcronym(prodno%) + gTOP$ chpt$ = Lot_GetChapterFromKeyWord(sym$) 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 DebugMsg "Backup SmartMasters? " + CStr(APRBackupSmartMasters%), "PreCopyConfigAPR" IF APRBackupSmartMasters% = TRUE Then APRDoBackupSmartMasters DebugMsg "Function End", "PreCopyConfigAPR" APRPrintDirs "End PreCopyConfig" END FUNCTION 'PreCopyConfigAPR '************************************************************************* '** FUNCTION AddTheBillBoardsAPR (prodno%, network$, direction$, nbytes&) '** '** Purpose: This is where to add the billboards using the function: '** AddToBillboardList. Use nbytes& as the last parameter to '** the MS-SETUP function AddToBillboardList '** '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** nbytes: Determines the duration of billboard timing. '** NOTE: Make sure to use billboard Ids that are unique to '** your product. e.g. IDD_APRBILLBD1_BMP & '** DB_APRBILLBD1_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 AddTheBillBoardsAPR (prodno%, network$, direction$, nbytes&) AS STRING DebugMsg "Function Start", "AddTheBillBoardsAPR" AddTheBillBoardsAPR = direction$ ''** In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If If network$ = gNODE$ Then SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD1_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD1, "_FNameOrgDlgProc@16", nbytes& else SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD1_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD1, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD2_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD2, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD3_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD3, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD4_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD4, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD5_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD5, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD6_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD6, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD7_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD7, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD8_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD8, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD9_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD9, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD10_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD10, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD11_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD11, "_FNameOrgDlgProc@16", nbytes& SetListItem "NORMALFONT",1,STR$(IDC_TEXT2) SetListItem "IDC_BMP", 1, STR$(IDD_APR_HDR) SetListItem "IDC_BMP", 2, STR$(IDD_APRBILLBD12_BMP) AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_APRBILLBD12, "_FNameOrgDlgProc@16", nbytes& End If DebugMsg "Function End", "AddTheBillBoardsAPR" END FUNCTION 'AddTheBillBoardsAPR '************************************************************************* '** FUNCTION PostCopyConfigAPR (prodno%, network$, direction$, programgroup$) AS STRING '** '** Purpose: This is called just after file copy has completed. '** This is your opportunity to do all the configuaration '** you need. This includes: '** '** 1. Writing to all your ini files '** Don't worry about ini files related to shared components '** 2. Writing to OLE registration database '** Don't worry about OLE registration related to shared '** components '** 3. Writing to any other config files you may support '** 4. Writing out user registration information, '** no matter how your product picks up this info '** 5. Create any working directories '** A working directory is one that does not contain any '** files, thus the toolkit did not create it for you. '** '** NOTE: THERE are many subtleties in here if you are '** dealing with node and CD installs. In particular, '** you must be ***very*** careful to understand where the '** things are that you are pointing to. They could '** be on the node, server, or CD! This, in combination '** with the INF file for Server/Node, is probably the '** trickiest part of writing a quality install. When '** configuring, you must be careful to consider what '** happens if there is a pre-existing product on the '** machine, in the same location or '** another one! This is very very tricky. What happens '** if you had a full installation previously in location C:\FOO '** and now the user is installing a minimum installation in loaction '** D:\FOO. '** '** Each and every thing you do for configuartion needs very '** careful thought. '** '** WE support a function Lot_WhereIsFeature("FeatureID") '** This currrently tells you the location of a feature '** if the feature appears both in the SERVER.INF and the '** NODE.INF referred to by the same Keyword ID. '** We do not support CDs with this command yet, but we will '** at some time. '** '** Also look out for writing to a file when the directory '** doesn't exist. If the user deselected one of your '** options, your install may still be running, but since '** there were no files to copy into the directory '** it wasn't created by the toolkit! '** '** Finally, remember that configuration files generally '** hold the state that the user has customized earlier. '** Sometimes you don't want to overwrite these! '** You will primarily use three MS-SETUP functions '** in here: '** 1. CreateIniKeyValue (writing to ini files) '** 2. SetRegKeyValue (writing to OLE reg DB) '** '** CreateProgmanGroup & ShowProgmanGroup are '** done for you by the time you reach this '** function. '** '** You will not have to do any configuration of LOTUS SHARED '** tools. The toolkit will do this for you. '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** programgroup$: The name of the program group where the user chose to '** install the program manager icons '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT '** '************************************************************************* PUBLIC FUNCTION PostCopyConfigAPR (prodno%, network$, direction$, programgroup$) AS STRING DIM ripath$, notused%, workdir$, chpt$, spelldir$, symdir$ DIM ret%, aprchpt$, notespath$, aprdir$, szKey$ DIM InfFile$ DebugMsg "Function Start", "PostCopyConfigAPR" PostCopyConfigAPR = direction$ ''** In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If aprchpt$ = Lot_GetChapterFromKeyword("APRCORE") If network$ <> gNODE$ Then SetSymbolValue SYM_CDDRIVE$, GetSymbolValue(SYM_INSTALL_SOURCE) End If '** If installing the MiniSuite only write to the Approach RI file if it was installed. If minisuite123% = FALSE Then ''** WRITE TO RI FILE ''******************* ''** but only if the main product is installed - otherwise the ri file isn't there. IF (Lot_GetChapterValInt(APRchpt$, F_INOROUT) = 1) THEN ripath$ = GetSymbolValue("APRDIR") ripath$ = TRIM(ripath$) if (RIGHT(ripath$,1) <> "\") then ripath$ = ripath$ + "\" end if ripath$ = ripath$ + LdString(SID_APR_RI_NAME) If Lot_WriteToRiFile (ripath$) = FALSE Then ErrorMsg SID_APR, LdString(SID_APR_ERR_RI) + ripath$ End If End If Else IF (Lot_GetChapterValInt(APRchpt$, F_INOROUT) = 1) THEN ''** WRITE TO RI FILE ''******************* ''** but only if the main product is installed - otherwise the ri file isn't there. IF (Lot_GetChapterValInt(APRchpt$, F_INOROUT) = 1) THEN ripath$ = GetSymbolValue("APRDIR") ripath$ = TRIM(ripath$) if (RIGHT(ripath$,1) <> "\") then ripath$ = ripath$ + "\" end if ripath$ = ripath$ + LdString(SID_APR_RI_NAME) If Lot_WriteToRiFile (ripath$) = FALSE Then ErrorMsg SID_APR, LdString(SID_APR_ERR_RI) + ripath$ End If End If End If End If If network$ = gSERVER$ OR network$ = gDISTRIBUTION Then GOTO SKIPCONFIG End If If minisuite123% = FALSE Then '** Write product specific registry keys AddRegistryKeysAPR prodno%, network$ notused% = APR_AddRegistryEntries (prodno%, network$) End If '** Log the product into \windows\lotus.ini '** Per Ron Montero 6/12/96 we don't need to write LOTUS.INI entries anymore. --TGR 6/26/96 'APR_AddLOTUSiniEntries prodno%, network$ '** Write the OLE registration '** The following section added for CIT 2111_4 '** Only write this stuff if program files installed IF (Lot_GetChapterValInt(APRchpt$, F_INOROUT) = 1) THEN '** Write the OLE registration database APR_AddOLEEntries prodno%, network$ 'ret% = Lot_WriteOLERegForAPR(network$, prodno%) If minisuite123% = TRUE Then '** Write product specific registry keys AddRegistryKeysAPR prodno%, network$ notused% = APR_AddRegistryEntries (prodno%, network$) End If END IF '** Create work directory for standard and node '** GEMINI IF minisuite123% = FALSE OR _ (minisuite123% = TRUE AND (Lot_GetChapterValInt(Lot_GetChapterFromKeyword("APRCORE"), F_INOROUT) = 1)) _ Then workdir$ = GetSymbolValue("APRWORKDIR") CreateDir workdir$, cmoNone IF DoesDirExist(workdir$) = 0 Then ShowPathError SID_ERR_CREATEDIR, 0, workdir$ ELSE Lot_RegisterObject "APRCORE", UNIN_CLASS_DIRECTORY$, workdir$ END IF END IF '** END GEMINI '** Create spell directory under local compnent for node ' spelldir$ = Lot_GetDestDirValueFromInstallIni("COMPONENTSDIR")+"\spell" IF network$ = gNODE$ THEN DebugMsg "Creating Spell Directory on the Node.", "PostCopyConfigAPR" ' spelldir$ = GetSymbolValue(SYM_COMPONENTSDIR$) spelldir$ = GetSymbolValue("APRDIR") spelldir$ = TRIM$(spelldir$) IF Right$(spelldir$, 1) = "\" THEN spelldir$ = spelldir$ + "spell" ELSE spelldir$ = spelldir$ + "\spell" END IF CreateDir spelldir$, cmoNone IF DoesDirExist(spelldir$)=0 THEN ShowPathError SID_ERR_CREATEDIR, 0, spelldir$ ELSE DebugMsg "Registering Spell Directory on the Node with Uninstall. " + spelldir$, "PostCopyConfigAPR" Lot_RegisterObject "APRCORE", UNIN_CLASS_DIRECTORY$, spelldir$ 'Uninstall the User Dictionary too Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, spelldir$ + "\ltsuser1.udc" END IF ELSE IF network = gSTANDARD$ Then 'Uninstall the User Dictionary Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") + "ltsuser1.udc" END IF END IF If minisuite123% = FALSE Then '** Write the uninstaller - but only for the primary language IF GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ THEN IF network$ = gSTANDARD$ THEN InfFile$ = GetSymbolValue("INSTDIR") + "APR.INF" ELSE IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN InfFile$ = GetSymbolValue("SUITDIR") + "APRNODE.INF" ELSE InfFile$ = GetSymbolValue("APRDIR") + "APRNODE.INF" END IF END IF Lot_RegisterUninstaller LdString(SID_APR_PROD_NAME),_ LdString(SID_APR_PROD_VER),_ LdString(SID_APR_COMMERCIALNAME),_ InfFile$, TRUE, FALSE, _ GetSymbolValue(SYM_INSTALL_LANGUAGE$),"","","" END IF End If IF minisuite123 = TRUE THEN IF (Lot_GetChapterValInt(APRchpt$, F_INOROUT) = 1) THEN '** Write the uninstaller - but only for the primary language IF GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$ THEN IF network$ = gSTANDARD$ THEN InfFile$ = GetSymbolValue("INSTDIR") + "APR.INF" ELSE IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN InfFile$ = GetSymbolValue("SUITDIR") + "APRNODE.INF" ELSE InfFile$ = GetSymbolValue("APRDIR") + "APRNODE.INF" END IF END IF Lot_RegisterUninstaller LdString(SID_APR_PROD_NAME),_ LdString(SID_APR_PROD_VER),_ LdString(SID_APR_COMMERCIALNAME),_ InfFile$, TRUE, FALSE, _ GetSymbolValue(SYM_INSTALL_LANGUAGE$),"","","" END IF END IF END IF IF (Lot_IsTheFeatureInstalled("APRTOP") = 1) THEN IF network$ = gNODE$ THEN notused% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Lotus Approach", "Personal Directory",_ REG_SZ, Lot_TrimEndSlash(GetSymbolValue("APRDIR")),_ (len(Lot_TrimEndSlash(GetSymbolValue("APRDIR"))) + 1)) notused% = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_ "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Personal", "",_ REG_SZ, Lot_TrimEndSlash(GetSymbolValue("APRDIR")),_ (len(Lot_TrimEndSlash(GetSymbolValue("APRDIR"))) + 1)) END IF END IF IF network$ = gSTANDARD$ THEN Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") & "powerkey.dat" Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") & "sn.dat" '** GEMINI IF minisuite123% = FALSE THEN Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") & "cinstall.ini" Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") & "miscobj.ini" END IF END IF Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") & "apprerr.out" '** Register appevents keys with uninstaller Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CURRENT_USER\AppEvents\EventLabels\ApproachDone" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CURRENT_USER\AppEvents\EventLabels\ApproachEnd" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CURRENT_USER\AppEvents\EventLabels\ApproachStart" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Approach" 'During Run-Time LISDB creates a DAT file in the compnent directory, even 'though the component is installed into the Approach dirctory. Let's 'register to remove it during uninstall. Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue(SYM_COMPONENTSDIR$) & "lisdb.dat" '** if the user installed Approach 97 to the same directory as Approach 96 '** then we need to remove the registry keys for Approach 96 DebugMsg "Checking for Upgrade - Removal of Approach 96 Registry Entries.", "PostCopyConfigAPR" If (g96Path$ <> "") Then If StrCompare(Trim$(UCase$(g96Path$)), Trim$(UCase$(GetSymbolValue("APRDIR"))), 0) = 0 _ OR (gRemovePriorVersion% = TRUE) _ Then DebugMsg "Removing Approach 96 Registry Entries.", "PostCopyConfigAPR" szKey$ = "SOFTWARE\Lotus\Approach\4.0" notused% = Lot_RegDelAllSubKeys(HKEY_LOCAL_MACHINE, szKey$) notused% = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, szKey$) notused% = Lot_RegDelAllSubKeys(HKEY_CURRENT_USER, szKey$) notused% = Lot_DeleteRegKeyEx(HKEY_CURRENT_USER, szKey$) szKey$ = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Approach V4.0" notused% = Lot_DeleteRegKeyEx(HKEY_LOCAL_MACHINE, szKey$) Else DebugMsg "Approach 96 Registry Entries NOT Removed.", "PostCopyConfigAPR" DebugMsg "Approach 96 Path: " & g96Path$ & Chr$(10) & _ "Approach 97 Path: " & GetSymbolValue("APRDIR"), "PostCopyConfigAPR" End If End If '** If the dummy script help files were copied, then we need to rename them '** Make the call here after all files have been copied. aprchpt$ = Lot_GetChapterFromKeyword("APRDUMMYSCRIPTHELP") IF (Lot_GetChapterValInt(aprchpt$, F_INOROUT) = 1) THEN APR_RenameDummyScriptFiles End If If gTimeBomb = TRUE AND network$ <> gSERVER$ Then APRHideGalleryFiles End If %REM '** 9/30/96 TGR '** Robert Armes says this isn't necessary anymore as the DBNOTES '** powerkey has been modified to correctly find the Notes Path itself. DebugMsg "Checking if Autoexec Flag Set", "PostCopyConfigAPR" If gWriteToAutoexec% = TRUE Then APRWriteToAUTOEXEC End If %ENDREM 'Need to register certain OCX files from the compnent Directory 'during a Node install. CIT can't register these because they're 'not copied during the Node ' Need to do these here because they need to the last things to be registered... DebugMsg "About to register Node OCX files", "PostCopyConfigAPR" If(network$ = gNODE$) Then DIM netpath$, ocxpath$ DIM nError As Integer netpath$ = GetSymbolValue(SYM_NETCOMPONENT$) DebugMsg "net path is ---------"+netpath$, "PostCopyConfigAPR" ocxpath$ = netpath$ + "ltnin10.dll" If Lot_DoesFileExist( ocxpath$ ) <> 0 Then DebugMsg "About to register Netit OCX ", "PostCopyConfig" ' Lot_RegisterOCX(ocxpath$) nError= Lot_RegisterOCX2 ("APRCORE", ocxpath$) End If netpath$ = NullTrim(GetSymbolValue(SYM_STF_SRCDIR$)) 'check for suite install of approach ocxpath$ = netpath$ + "approach\odyawapr.dll" DebugMsg "About to Register odyawapr.dll OXC"+netpath$,"PostCopyConfigAPR" DebugMsg "About to reg odyawapr.dll ocxpath "+ocxpath$,"PostCopyConfigAPR" If Lot_DoesFileExist ( ocxpath$) <> 0 Then nError = Lot_RegisterOCX2 ("APRCORE", ocxpath$) ELSE DebugMsg "Didnot find odyawapr.dll in the "+ocxpath$ +" Path","PostcopyconfigAPR" 'Not is a suite build, try the standalone directory ocxpath$ = netpath$ + "odyawapr.dll" If Lot_DoesFileExist (ocxpath$) <> 0 Then nError = Lot_RegisterOCX2 ("APRCORE", ocxpath$) ELSE DebugMsg "Did not file odyawapr.dll in path " +ocxpath$,"PostCopyConfigAPR" End If End If ' netpath$ = Lot_GetDestDirValueFromInstallIni("APRDIR") ' ' ocxpath$ = netpath$ + "lcsrtn10.dll" ' If Lot_DoesFileExist( ocxpath$ ) <> 0 Then 'DebugMsg "About to register LC Runtime OCX ", "AddRegistryKeysAPR" ' Lot_RegisterOCX(ocxpath$) ' End If ' ocxpath$ = netpath$ + "ltsctn31.ocx" ' If Lot_DoesFileExist( ocxpath$ ) <> 0 Then 'DebugMsg "About to register LS OCX ", "AddRegistryKeysAPR" ' Lot_RegisterOCX(ocxpath$) ' End If End If SKIPCONFIG: DebugMsg "Function End", "PostCopyConfigAPR" END FUNCTION 'PostCopyConfigAPR '************************************************************************* '** PUBLIC SUB AddRegistryKeysAPR (prodno%, network$) '** '** Purpose: This is called just after file copy has completed. '** 1. Add product specific Registry Keys. '** '** Each and every thing you do for configuartion needs very '** careful thought. '** '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** programgroup$: The name of the program group where the user chose to '** install the program manager icons '** '** Errors: No return code for errors, you must Raise them '** Author: PMD '** '************************************************************************* PUBLIC SUB AddRegistryKeysAPR (prodno%, network$) DIM LocPath$, Filename$, descript$, gbuf$, instvalue&, aprchpt$ DIM szkey$, szkey2$, nsize&, nsize1&,nsize2&,Insttype$,nsize3, notused% DIM RegStatus&, keyvalue$, keyvalue1$,keyvalue2$, keyvalue3$, keyvalue4$ DIM TypeLibCLSID$, TypeLibName$, Flags%, Desc$, FullTypeLibName$ DIM szkey98$ DebugMsg "Function Start", "AddRegistryKeysAPR" szkey$ = gREGLOTUS+"Approach\"+LdString(SID_APR_PROD_VER) szkey98$ = gREGLOTUS+"Approach\98.0" descript$ = LdString(SID_APR_COMMERCIALNAME) keyvalue$ = "Path" keyvalue1$ = "Description" keyvalue2$ = "Name" Insttype$ = "InstallType" Filename = LdString(SID_APR_APREXE) nsize1 = len(Filename) + 1 nsize2 = len(descript$) + 1 If network$ = gNODE$ Then instvalue = 1 ElseIf network$ = gSTANDARD$ Then instvalue = 0 End if nsize3 = 4 If Lot_IsTheFeatureInstalled("APRCORE") <> FALSE Then If network$ = gSTANDARD$ THEN locpath$ = Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE)) ELSEIF network$ = gNODE$ THEN 'locpath$ = Lot_WhereIsFeature(prodno%, "APRSERVERCORE", "server.tag") locpath$ = Lot_GetDestDirValueFromInstallIni("APRDIR") END IF 'locpath = Lot_TrimEndSlash (locpath$) nsize = len(LocPath$) + 1 regStatus& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szkey) IF DoesDirExist(Lot_TrimEndSlash (locpath$)) THEN regStatus = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue$, REG_SZ, LocPath$, nsize) END IF 'regStatus& = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue$, REG_SZ, LocPath$, nsize) regStatus& = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue2$, REG_SZ, Filename, nsize1) regStatus& = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, keyvalue1$, REG_SZ, descript$, nsize2) regStatus& = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey, Insttype$, REG_DWORD, instvalue, nsize3) Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\"+szkey98 regStatus& = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey98, keyvalue2$, REG_SZ, Filename, nsize1) regStatus& = regStatus+Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey98, keyvalue$, REG_SZ, LocPath$, nsize) IF regStatus& <> ERROR_SUCCESS THEN RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+szkey,"","" END IF 'Need to register certain OCX files from the compnent Directory 'during a Node install. CIT can't register these because they're 'not copied during the Node DebugMsg "About to register Node OCX files", "AddRegistryKeysAPR" If(network$ = gNODE$) Then DIM netpath$, ocxpath$ netpath$ = GetSymbolValue(SYM_NETCOMPONENT$) ' ocxpath$ = netpath$ + "ltnin10.dll" ' If Lot_DoesFileExist( ocxpath$ ) <> 0 Then 'DebugMsg "About to register Netit OCX ", "AddRegistryKeysAPR" ' Lot_RegisterOCX(ocxpath$) ' End If netpath$ = Lot_GetDestDirValueFromInstallIni("APRDIR") ocxpath$ = netpath$ + "lcsrtn10.dll" If Lot_DoesFileExist( ocxpath$ ) <> 0 Then DebugMsg "About to register LC Runtime OCX ", "AddRegistryKeysAPR" Lot_RegisterOCX(ocxpath$) End If ocxpath$ = netpath$ + "ltsctn31.ocx" If Lot_DoesFileExist( ocxpath$ ) <> 0 Then DebugMsg "About to register LS OCX ", "AddRegistryKeysAPR" Lot_RegisterOCX(ocxpath$) End If End If '** Register the Approach Type Library TypeLibCLSID$ = "{1AAF5D8F-41E9-11CE-AEA9-00805f684C33}" Flags% = LIBFLAG_FCONTROL Desc$ = LdString(SID_APR_TLBDESC) TypeLibName$ = LdString(SID_APR_TLBNAME) FullTypeLibName = locpath + TypeLibName ' regStatus& = Lot_RegisterTypeLib(TypeLibCLSID$, LdString(SID_APR_PROD_VER), Desc$, _ ' locpath$, FullTypeLibName$, Flags%) DebugMsg "About to register Approach.TLB ", "AddRegistryKeysAPR" regStatus& = APRRegisterTypeLib(FullTypeLibName$, locpath$) notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, _ "HKEY_CLASSES_ROOT\TypeLib\" + TypeLibCLSID$) END IF '** Write the registry value to add the new language AddRegistryLanguage LdString(SID_APR_PROD_NAME), LdString(SID_APR_PROD_VER) '** Write shared DLLS entries and counts '** '//* This is done automatically by CIT as long as the section has _SHRCNT as the '** end of the name. This change was implemented in CIT 2112_4 - This is not the recommended method '** since CIT 2130. Now back to using the RegAndIncrementCount functionality. %REM 'Obsolete. We don't want to do this for Suite 98. '/************* IF Lot_IsTheFeatureInstalled("APRORACLE") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRSQLSERVER4") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRSQLSERVER6") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRSYBASE") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRINFORMIX5") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRINFORMIX7") <> FALSE _ THEN DIM commonFiles(8) as string DIM i as integer commonFiles(1) = "msvcrt10.dll" commonFiles(2) = "odbcinst.hlp" commonFiles(3) = "odbc32.dll" commonFiles(4) = "odbcad32.exe" commonFiles(5) = "odbccp32.dll" commonFiles(6) = "odbccr32.dll" commonFiles(7) = "odbcint.dll" FOR i = 1 to (ubound(commonFiles) - 1) RegAndIncrementCount commonFiles(i) NEXT IF Lot_IsTheFeatureInstalled("APRORACLE") <> FALSE THEN RegAndIncrementCount "corent23.dll" RegAndIncrementCount "orant71.dll" RegAndIncrementCount "ociw32.dll" END IF IF Lot_IsTheFeatureInstalled("APRSQLSERVER4") <> FALSE THEN RegAndIncrementCount "dbnmpntw.dll" RegAndIncrementCount "ntwdblib.dll" END IF END IF '**************/ %ENDREM ''Code added to AddRegistryKeysAPR for Cargill integration '' General String Variables DIM Wininipath As String * 255 DIM appFullPath As String DIM appPath As String DIM szPath As String * 255 DIM szExt As String * 255 '' General Number Variables DIM intPathLen& '' General Initializations Wininipath$ = GetWindowsDir() + "win.ini" intPathLen& = 256 appPath$ = String(intPathLen&, 0) '' Approach String Variables DIM szaprPath As String '' Approach Number Variables DIM intaprPathLen& '' Approach Initializations intaprPathLen& = 256 szaprPath$ = String(intaprPathLen, 0) If Lot_IsTheFeatureInstalled("APRCORE") <> FALSE Then If network$ = gSTANDARD$ THEN appFullPath$ = Lot_WhereIsFeature (prodno%, "APRCORE", "approach.exe") ELSEIF network$ = gNODE$ THEN appFullPath$ = Lot_GetDestDirValueFromInstallIni("APRDIR") END IF IF (appFullPath$ <> "") THEN appFullPath$ = nullTrim (appFullPath$) notused% = Lot_GetShortPathName ( appFullPath$, szaprPath$, intaprPathLen& ) appPath$ = szaprPath$ IF (appPath$ <> "") THEN appPath$ = nullTrim (appPath$) notused% = Lot_CleanPath( appPath$ ) END IF End IF ''appFullPath$ 'DebugMsg "About to Call ProfileString APIs", "AddRegistryKeysAPR" ' ' szExt$ = "apr" ' szPath$ = appPath$ + "approach.exe ^." + szExt$ ' regStatus& = WritePrivateProfileString("Extensions" ,szExt$, szPath$, WininiPath$ ) ' ' szExt$ = "apt" ' szPath$ = appPath$ + "approach.exe ^." + szExt$ ' regStatus& = WritePrivateProfileString( "Extensions", szExt$, szPath$, WininiPath$ ) ' ' szExt$ = "vew" ' szPath$ = appPath$ + "approach.exe ^." + szExt$ ' regStatus& = WritePrivateProfileString( "Extensions", szExt$, szPath$, WininiPath$ ) ' ' szExt$ = "mpr" ' szPath$ = appPath$ + "approach.exe ^." + szExt$ ' regStatus& = WritePrivateProfileString( "Extensions", szExt$, szPath$, WininiPath$ ) ' 'DebugMsg "Finished Calls to ProfileString APIs", "AddRegistryKeysAPR" End if '' APRCORE DebugMsg "Function End", "AddRegistryKeysAPR" END SUB 'AddRegistryKeysAPR '************************************************************************* '** FUNCTION AddIconsAPR (prodno%, network$, direction$, programgroup$) AS STRING '** '** Purpose: This is called just after file copy has completed. '** 1. Add program manager icons of those features '** that were installed. '** NOTE: THERE are many subtleties in here if you are '** dealing with node and CD installs. In particular, '** you must be ***very*** careful to understand where the '** things are that you are pointing to. They could '** be on the node, server, or CD! This, in combination '** with the INF file for Server/Node, is probably the '** trickiest part of writing a quality install. When '** configuring, you must be careful to consider what '** happens if there is a pre-existing product on the '** machine, in the same location or '** another one! This is very very tricky. What happens '** if you had a full installation previously in location C:\FOO '** and now the user is installing a minimum installation in loaction '** D:\FOO. '** '** Each and every thing you do for configuartion needs very '** careful thought. '** '** WE support a function Lot_WhereIsFeature("FeatureID") '** This currrently tells you the location of a feature '** if the feature appears both in the SERVER.INF and the '** NODE.INF referred to by the same Keyword ID. '** We do not support CDs with this command yet, but we will '** at some time. '** '** Also look out for writing to a file when the directory '** doesn't exist. If the user deselected one of your '** options, your install may still be running, but since '** there were no files to copy into the directory '** it wasn't created by the toolkit! '** '** Finally, remember that configuration files generally '** hold the state that the user has customized earlier. '** Sometimes you don't want to overwrite these! '** You will primarily use three MS-SETUP functions '** in here: '** 1. CreateProgmanItem (writing to progman) '** '** CreateProgmanGroup & ShowProgmanGroup are '** done for you by the time you reach this '** function. '** '** You will not have to do any configuration of LOTUS SHARED '** tools. The toolkit will do this for you. '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT | gBACK (If gBACK, and you are showing UI) '** then step backwards '** programgroup$: The name of the program group where the user chose to '** install the program manager icons '** '** Errors: No return code for errors, you must Raise them '** Author: MZ '** Returns: return: gNEXT '** '************************************************************************* PUBLIC FUNCTION AddIconsAPR (prodno%, network$, direction$, programgroup$) AS STRING DIM ripath$, exepath$, exename$, szArgument$, notused%, aprchpt$, aprdir$ DIM LanguageQualifier$, LanguageAcronym$, Link$, Path$, rc%, featureToFind$ DIM notespath$, AddIcon% DebugMsg "Function Start", "AddIconsAPR" AddIconsAPR = direction$ ''** In the backwards case, keep backing up IF direction$ = gBACK THEN EXIT FUNCTION END IF aprchpt$ = Lot_GetChapterFromKeyword("APRCORE") IF network$ = gSTANDARD$ THEN aprdir$ = Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE)) featureToFind$ = "APRCORE" ELSEIF network$ = gNODE$ THEN aprdir$ = Lot_GetDestDirValueFromInstallIni("APRDIR") featureToFind$ = "APRSERVERCORE" END IF '** Check to see if the automated install has icons turned on or off. AddIcon% = TRUE IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** Read the instAPR.rsp file for the appropriate option. AddIcon% = Lot_AutoAddiconOptions() END IF '** During a MiniSuite Install, don't create Icons for Approach. If minisuite123% = TRUE Then AddIcon% = FALSE End If '** Write entries in Program Manager IF network$ = gSTANDARD$ OR network$ = gNODE$ THEN '** Only add icons if necessary - standard install or selected during automation IF AddIcon = TRUE THEN '** Check for new language install and put the appropriate language switch on the command line '** Do this here just in case we have new icons that do not need a language switch. IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ THEN IF (Lot_GetChapterValInt(aprchpt$, F_INOROUT) = 1) THEN APR_AddIcon featureToFind$, programgroup$, LdString(SID_APR_PROD_ICON)+"-"+GetSymbolValue(SYM_INSTALL_LANGUAGE$), LdString(SID_APR_APREXE), "/L="+GetSymbolValue(SYM_INSTALL_LANGUAGE$), "", "" APR_AddIcon featureToFind$, programgroup$ + LdString(SID_APR_PROD_UPDATES), LdString(SID_APR_PROD_UPDATES)+"-"+GetSymbolValue(SYM_INSTALL_LANGUAGE$), LdString(SID_APR_README_NAME), "", "", "" END IF ELSE IF (Lot_GetChapterValInt(aprchpt$, F_INOROUT) = 1) THEN APR_AddIcon featureToFind$, programgroup$, LdString(SID_APR_PROD_ICON), LdString(SID_APR_APREXE), "", "", "" APR_AddIcon featureToFind$, programgroup$ + LdString(SID_APR_PROD_UPDATES), LdString(SID_APR_PROD_UPDATES), LdString(SID_APR_README_NAME), "", "", "" END IF END IF END IF IF Lot_GetChapterValInt(aprchpt$, F_INOROUT) = 1 AND (GetListItem(SYM_INSTALLKINDS$, prodno%) <> gLANGUAGEINSTALL$) THEN '** This function adds the specified path to the App Paths registry entry, or the NT 3.51 '** Environment. Here we add the Approach directory and the Compnent directory (that is what the TRUE is for) Lot_RegAppPath LdString(SID_APR_APREXE), aprdir$, LEFT$(aprdir$,LEN(aprdir$)-1), TRUE, "APRCORE" '** This could be replaced by a call to Lot_RegAppPath() IF WhatPlatform() = PLATFORM_WINNT THEN APRAddNotesToPathNT ELSE APRAddNotesToPathWin95 END IF END IF END IF 'SKIPCONFIG: DebugMsg "Function End", "AddIconsAPR" END FUNCTION 'AddIconsAPR '************************************************************************* '** FUNCTION PostSuccessRegAPR (prodno%, network$, direction$) AS STRING '** '** Purpose: If you need to launch something after install runs '** In Symbols : '** Out Symbols: '** '** Arguments: All paremeters are **read only**. '** prodno%: This is your prodno%. It is assigned to you by the '** toolkit in the order in which you were registered. '** When your product is part of SmartSuite, SmartSuite '** will always be product #1. (prodno% >=1) '** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION '** direction$: gNEXT '** '** Errors: No return code for errors, you must Raise them '** Author: MMeth '** Returns: return: gNEXT '** '************************************************************************* PUBLIC FUNCTION PostSuccessRegAPR (prodno%, network$, direction$) AS STRING DIM ocxpath$, locpath$ DebugMsg "Function Start", "PostSuccessRegAPR" PostSuccessRegAPR = direction$ ''** In the backwards case, keep backing up If direction$ = gBACK Then EXIT FUNCTION End If IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ THEN '** The following code section relates to Run From ROM activation. '** The different LST files are those needed to produce the Run from ROM effect. DIM nodelstpath$, serverlstpath$, serverwinsys$ If network$ = gSERVER$ Then nodelstpath$ = GetSymbolValue(SYM_INSTALL_SOURCE)+"node.lst" If Lot_DoesFileExist( nodelstpath$ ) <> 0 Then CopyFile nodelstpath$, GetSymbolValue("APRDIR")+"install.lst",_ cmoNone, 0 SetFileAttr GetSymbolValue("APRDIR")+"install.lst", 0 End If End If If network$ = gDISTRIBUTION$ Then serverlstpath$ = GetSymbolValue(SYM_INSTALL_SOURCE)+"server.lst" If Lot_DoesFileExist( serverlstpath$ ) <> 0 Then CopyFile serverlstpath$, GetSymbolValue("APRDIR")+"install.lst",_ cmoNone, 0 SetFileAttr GetSymbolValue("APRDIR")+"install.lst", 0 End If End If END IF '** This is another Brute Force attempt to copy the Windows System files to the '** Node machine during a Node install. Only copying these files if they Don't '** already exist on the users machine. If this is a Suite install these files will '** probably have been installed already, so this operation won't be necessary and won't be '** done. If network$ = gNODE$ Then serverwinsys$ = Lot_GetDestDirValueFromInstallIni("APRDIR") + "winsys\msvcrt40.dll" '** File will only be copied if it can be found on the server, but not on the node. If Lot_DoesFileExist( serverwinsys$ ) <> 0 AND _ Lot_DoesFileExist(GetSymbolValue("WINSYSDIR") + "msvcrt40.dll" ) = 0 _ Then CopyFile serverwinsys$, GetSymbolValue("WINSYSDIR")+"msvcrt40.dll", cmoNone, 0 End If serverwinsys$ = Lot_GetDestDirValueFromInstallIni("APRDIR") + "winsys\mfc30.dll" '** File will only be copied if it can be found on the server, but not on the node. If Lot_DoesFileExist( serverwinsys$ ) <> 0 AND _ Lot_DoesFileExist(GetSymbolValue("WINSYSDIR") + "mfc30.dll" ) = 0 _ Then CopyFile serverwinsys$, GetSymbolValue("WINSYSDIR")+"mfc30.dll", cmoNone, 0 End If End If DIM obschptname$ obschptname$ = Lot_GetChapterFromKeyword("APROBSFILES1") If ((Lot_GetChapterValInt(obschptname$, F_INOROUT) = 1)) Then '** If we removed the old 3.0x version, we'll need to remove '** the directories too. APRRemoveProdDirs End If IF gNeedRestart% THEN Dim Restart$, ProgName$ Restart$ = LdString(SID_APR_NEEDRESTART) ProgName$ = LdString(SID_APR_COMMERCIALNAME) DoMsgBox Restart$, ProgName$, MB_OK + MB_ICONINFORMATION END IF DebugMsg "Function End", "PostSuccessRegAPR" END FUNCTION 'PostSuccessRegAPR '******************************** '******************************** '** Product Specific Functions ** '******************************** '******************************** '************************************************************************* '** FUNCTION GetAPRPathfromLotusIni() 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 GetAPRPathfromLotusIni() AS STRING DIM DestDir$, lotusinipath$, defdir$, temp%, ProdDir$, fullpath$, rv% DIM szkey$, keyvalue$, nsize&, gbuf$, ret& DebugMsg "Function Start", "GetAPRPathfromLotusIni" DestDir$ = GetWindowsDir() lotusinipath$ = DestDir$ +"lotus.ini" if DoesFileExist(lotusinipath$,femExists) then defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "Approach") if defdir$ <> "" then temp% = INSTR(1,LCASE$(defdir$),LdString(SID_APR_APREXE)) if temp% <> 0 then ProdDir$ = MID$(defdir$,1,(temp%-1)) if ProdDir$ <> "" then fullpath$ = ProdDir$ + LdString(SID_APR_APREXE) if DoesFileExist(fullpath$, femExists) then if ProdDir$ <> "" then rv% = Lot_CleanPath(ProdDir$) end if GetAPRPathfromLotusIni = ProdDir$ EXIT FUNCTION end if end if end if end if end if '** Now try the registry GetAPRPathfromLotusIni = GetAPRPathfromRegistry() DebugMsg "Function End", "GetAPRPathfromLotusIni" END FUNCTION 'GetAPRPathfromLotusIni '************************************************************************* '** FUNCTION GetAPRPathfromRegistry() AS STRING '** '** Purpose: Gets the product dir path from registry, and searches for '** acronym.exe in the product dir path. '** '** Author: JoeG '** Arguments: None '** Returns: if acronym.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 '************************************************************************* FUNCTION GetAPRPathfromRegistry() AS STRING DIM szkey$, keyvalue$, nsize&, gbuf$, ret& DebugMsg "Function Start", "GetAPRPathfromRegistry" szkey$ = "SOFTWARE\Lotus\" + _ LTRIM$(LdString(SID_APR_PROD_NAME)) + "\" + _ LTRIM(LdString(SID_APR_PROD_VER)) keyvalue$ = "Path" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, 0, gbuf$, nsize&) '** If we can not find the current version, try the previous one "Approach 96(4.0)" IF gbuf$ = "" THEN szkey$ = "SOFTWARE\Lotus\" + _ LTRIM$(LdString(SID_APR_PROD_NAME)) + "\" + "4.0" keyvalue$ = "Path" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, 0, gbuf$, nsize&) END IF IF gbuf$ <> "" THEN gbuf$ = TRIM$(gbuf$) DebugMsg "Registry Bufffer, after TRIM: " + gbuf$ + "test", "GetAPRPathfromRegistry" gbuf$ = LEFT$(gbuf$, LEN(gbuf$)-1) DebugMsg "Registry Bufffer, after LEFT: " + gbuf$ + "test", "GetAPRPathfromRegistry" IF RIGHT$(gbuf$, 1) <> "\" THEN gbuf$ = gbuf$ + "\" END IF IF gbuf$ <> "" AND DoesFileExist(gbuf$ + LdString(SID_APR_APREXE), femExists) THEN GetAPRPathfromRegistry = gbuf$ ELSE GetAPRPathfromRegistry = "" END IF END IF DebugMsg "Function End", "GetAPRPathfromRegistry" END FUNCTION 'GetAPRPathfromRegistry '************************************************************************* '** PUBLIC FUNCTION InitLanguageAPR (prodno%, network$, direction$) '** Purpose: Finds out the installed languages and determines the nature '** of the install. If not running automated, displays a message box for '** a reinstall or language install, for an upgrade, just continues '** '** Author: JMDonohue '** Arguments: (Not used -- to conform to product function spec) '** Returns: Install kind string '** '** Sets the following global symbols for later processing: '** SYM_INSTALLKIND$ '** SYM_REG_PRODUCTNAME$ '** SYM_REG_PRODUCTVER$ '************************************************************************* PUBLIC FUNCTION InitLanguageAPR (prodno%, network$, direction$) AS STRING DIM szProductName$, szProductVersion$, szInstallKind$, szLanguageSubdir$ DebugMsg "Function Start", "InitLanguageAPR" szProductName$ = LdString(SID_APR_PROD_NAME) szProductVersion$ = LdString(SID_APR_PROD_VER) if prodno% = 1 THEN SetSymbolValue SYM_REG_PRODUCTNAME$ , szProductName$ SetSymbolValue SYM_REG_PRODUCTVER$ , szProductVersion$ END IF InitLanguages szProductName$, szProductVersion$, prodno% gProductnum% = prodno% InitLanguageAPR = "" DebugMsg "Function End", "InitLanguageAPR" END FUNCTION 'InitLanguageAPR '************************************************************************* '** APRMOREDIRSCB '** 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 APRMOREDIRSCB (hDlg&, CtrlId%, Classes$, LInst&) DIM dirChanged1%, dirChanged2%, dirChanged3%, i%, notused% DIM drvSel%,Inst%, dirToChange1$, dirToChange2$,dirToChange3$ STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS) DebugMsg "Function Start", "APRMOREDIRSCB" Inst% = CINT(LInst&) SELECT CASE Classes$ CASE "__DLGINIT" '** This is the directory for the SmartMaster Files Lot_GetDriveFreeSpaceList "IDC_COMBO1" SetListItem "IDC_EDIT", 1, GetSymbolValue("APRMASTERSLANGDIR") drvIndex%(1) = ValidateEditBox(hDlg& , 1) AddListItem SYM_UPDATELIST$, "IDC_EDIT1" '** This is the directory for the Work Files Lot_GetDriveFreeSpaceList "IDC_COMBO2" SetListItem "IDC_EDIT", 2, GetSymbolValue("APRWORKDIR") drvIndex%(1) = ValidateEditBox(hDlg& , 2) AddListItem SYM_UPDATELIST$, "IDC_EDIT2" '** This is the directory for the QMF Initialization File Lot_GetDriveFreeSpaceList "IDC_COMBO3" SetListItem "IDC_EDIT", 3, GetSymbolValue("APRQMFDIR") drvIndex%(1) = ValidateEditBox(hDlg& , 3) AddListItem SYM_UPDATELIST$, "IDC_EDIT3" IF GetListItem(SYM_INSTALLKINDS$, gProductnum%) = gLANGUAGEINSTALL$ THEN notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_EDIT1), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_COMBO1), FALSE)) notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR1), SW_HIDE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_EDIT2), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_COMBO2), FALSE)) notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR2), SW_HIDE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_BRWSDIR2), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_EDIT3), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_COMBO3), FALSE)) notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR3), SW_HIDE)) END IF IF APRSMInst() = 0 THEN notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_EDIT1), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_COMBO1), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_BRWSDIR1), FALSE)) END IF '** if the user did not select the QMF Powerkey, then they '** should not get the option to change this directory IF FIsKeywordinCopyList("APRQMF") = 0 THEN notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_EDIT3), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_COMBO3), FALSE)) notused% = CINT(EnableWindow (GetDlgItem(hDlg&, IDC_BRWSDIR3), FALSE)) END IF '** You can also do this with a CASE statement i.e. CASE IDC_COMBO1 w/ SELECT CASE Inst% CASE "IDC_COMBO1" ComboSelChanged 1 , Inst% dirChanged1% = TRUE CASE "IDC_COMBO2" ComboSelChanged 2 , Inst% dirChanged2% = TRUE CASE "IDC_COMBO3" ComboSelChanged 1 , Inst% dirChanged3% = TRUE CASE "IDC_BRWSDIR" drvSel% = ValidateBrowse(hDlg&,Inst%) SELECT CASE Inst% CASE 1 dirChanged1% = TRUE CASE 2 dirChanged2% = TRUE CASE 3 dirChanged3% = TRUE END SELECT CASE "IDC_EDIT" SELECT CASE Inst% CASE 1 dirChanged1% = TRUE CASE 2 dirChanged2% = TRUE CASE 3 dirChanged3% = TRUE END SELECT CASE "IDC_OK" '** Validate Paths always: to check for a file with the same name '** SMasters If APRSMInst() <> 0 Then 'If no SmartMasters selected don't worry about this DIR 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 "APRMASTERSLANGDIR", dirToChange1$ END IF End If '** WorkDir 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" ELSE SetSymbolValue "APRWORKDIR", dirToChange2$ END IF '** QMF 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" ELSE SetSymbolValue "APRQMFDIR", dirToChange3$ END IF '** Refresh destination Lot_RefreshDestination("APRWORKDIR") Lot_RefreshDestination("APRMASTERSLANGDIR") Lot_RefreshDestination("APRQMFDIR") SetSymbolValue "APRMASTERSIMGLANGDIR", GetSymbolValue("APRMASTERSLANGDIR") _ + LdString(SID_APR_MASTERSIMG_DIR) Lot_RefreshDestination("APRMASTERSIMGLANGDIR") '** This is an attempt to fix the customization of the samples '** directory in the customize dialog box. SetSymbolValue "APRSAMPLESLANGDIR", GetSymbolValue("APRSAMPLESDIR") Lot_RefreshDestination("APRSAMPLESLANGDIR") END SELECT 'Classes DebugMsg "Function End", "APRMOREDIRSCB" APRPrintDIRs "APRMOREDIRSCB" END SUB 'APRMOREDIRSCB '**************************************************************************** '** FUNCTION DetectPreviousVersion ( Productfound$ ) AS STRING '** '** Purpose: Check Previous Version is install.. '** '** Author: schen 10/18/95 '** Arguments: Productfound$ '** Returns: YES or NO '**************************************************************************** FUNCTION DetectPreviousVersion ( Productfound$ ) AS STRING DIM destpath$, temp%, dirpath$, adwpath$, pathAPR$, APRversion$ DIM lotusiniPath$,defdir$ DebugMsg "Function Start", "DetectPreviousVersion" lotusiniPath$ = GetWindowsDir() + "lotus.ini" IF DoesFileExist(lotusinipath$,femExists) THEN defdir$ = GetIniKeyString(lotusiniPath$,"Lotus Applications", "Approach") temp% = INSTR(1,LCASE$(defdir$),"release") IF temp% <> 0 THEN APRversion$ = MID$(defdir$,(temp%+8),3) END IF ELSE APRversion$ = "0" END IF destpath$ = GetAPRPathfromLotusIni() If ( destpath$ <> "" ) then DetectPreviousVersion = "YES" IF ( APRversion$ <> "5.0" )Then Productfound = "True" SetSymbolValue "APROBSDIR1", destpath$ ELSE Productfound = "NO" SetSymbolValue "APROBSDIR1",LdString(SID_APR_DIR) END IF Else DetectPreviousVersion = "NO" Productfound = "NO" SetSymbolValue "APROBSDIR1",LdString(SID_APR_DIR) END IF DebugMsg "Function End", "DetectPreviousVersion" END FUNCTION 'DetectPreviousVersion '**************************************************************************** '** SUB APR_RemoveProdFilesCB(hDlg&, CtrlId%, Classes%, Inst&) '** '** Purpose: Callback to handle Remove Files dialog. '** '** Author: BMK 7/18/95 (modified by Joe Ghazal) '** Arguments: hDlg%, CtrlId%, Classes$, Inst% '** Returns: NONE '**************************************************************************** SUB APR_RemoveProdFilesCB(hDlg&, CtrlId%, Classes$, LInst&) DIM count%, chpt$, sym$, notused% DebugMsg "Function Start", "APR_RemoveProdFilesCB" 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" APRRemoveProdFiles% = TRUE CASE "IDC_BACK" APRRemoveProdFiles% = FALSE CASE "IDC_EXIT" APRRemoveProdFiles% = FALSE END SELECT DebugMsg "Function End", "APR_RemoveProdFilesCB" END SUB 'APR_RemoveProdFilesCB '**************************************************************************** '** SUB APRRemoveObsoleteFiles(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 APRRemoveObsoleteFiles(hDlg&, CtrlId%, Classes$, LInst&) DIM nSections%, count%, chpt$, sym$, notused% DebugMsg "Function Start", "APRRemoveObsoleteFiles" nSections% = 1 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$ = "APROBSFILES" + 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 their mind FOR count% = 1 TO nSections% sym$ = "APROBSFILES" + 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 their mind FOR count% = 1 TO nSections% sym$ = "APROBSFILES" + LTRIM$(STR$(count%)) chpt$ = Lot_GetChapterFromKeyWord(sym$) IF chpt$ <> "" THEN notused% = Lot_SetChapterFilesInCopyListInOrOut (chpt$, 0) END IF NEXT END SELECT DebugMsg "Function End", "APRRemoveObsoleteFiles" END SUB 'APRRemoveObsoleteFiles '************************************************************************* '** FUNCTION Lot_WriteOLERegForAPR(network$, prodno%) AS INTEGER '** Purpose: This function writes OLE registration needed '** Author: Chuck Shubert (copying Paul Stefancyk (copying 1-2-3 code by MZ/MMeth)) '** Arguments: '** Returns: SUCCESS '** NOTE: This function is from flw.lss '************************************************************************* FUNCTION Lot_WriteOLERegForAPR(network$, prodno%) AS INTEGER DIM ProgDir$, regFile, APRreg, LotusAppDir$,FoundPos,RegBuffer$ DIM LastCount, CopyDestDir$, ExecError%, OleRegPath$, APRdir$, CommandLine$ dim rc% DebugMsg "Function Start", "Lot_WriteOLERegForAPR" rc% = 0 APRdir$ = Lot_WhereIsFeature(prodno%, "APRTOP", LdString(SID_APR_APREXE)) ProgDir$ = Lot_GetDestDirValueFromInstallIni("APRDIR") + LdString(SID_APR_APREXE) CopyDestDir$ = GetSymbolValue("APRDIR") OleRegPath$ = CopyDestDir$+"approach.reg" IF DoesFileExist(OleRegPath$, femExists) <> TRUE THEN EXIT FUNCTION regFile = FreeFile() OPEN OleRegPath$ FOR INPUT AS regFile APRreg = FreeFile() OPEN CopyDestDir$+"APR5.reg" FOR OUTPUT AS APRreg Lot_RegisterObject "APRTOP", UNIN_CLASS_FILE$, CopyDestDir$ + "APR5.reg" '** Read entire file into a buffer RegBuffer$ = INPUT$(LOF(regFile), regFile) LastCount = 1 SearchLoop: FoundPos = INSTR(LastCount, RegBuffer$, LdString(SID_APR_OLEREGSTRING)) IF FoundPos = 0 THEN PRINT #APRreg, Mid$(RegBuffer$, LastCount) ELSE rc = rc + 1 PRINT #APRreg, Mid$(RegBuffer$, LastCount, FoundPos-LastCount); LastCount = FoundPos + LEN(LdString(SID_APR_OLEREGSTRING)) ' skip token PRINT #APRreg, ProgDir$; GOTO SearchLoop END IF CLOSE #regFile, #APRreg DebugMsg "Occurences Replaced: " + CStr(rc), "Lot_WriteOLERegForAPR" '** This version not needed any more RemoveFile CopyDestDir$ + "approach.reg", cmoNone FileCopy CopyDestDir$ + "APR5.reg", CopyDestDir$ + "approach.reg" RemoveFile CopyDestDir$ + "APR5.reg", cmoNone '** register APR3.REG, need extra quotes for long file names with spaces under Chicago IF WhatPlatform() = PLATFORM_WIN95 THEN CommandLine$ = "regedit /s " + """" + CopyDestDir$ + "approach.reg" + """" ELSE CommandLine$ = "regedit /s " + CopyDestDir$ + "approach.reg" END IF ExecError% = WinExec (CommandLine$, SW_HIDE) Lot_WriteOLERegForAPR = SUCCESS DebugMsg "Function End", "Lot_WriteOLERegForAPR" END FUNCTION 'Lot_WriteOLERegForAPR '************************************************************************* '** PUBLIC SUB APRBACKUPMASTERSCB(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 APRBACKUPMASTERSCB(hDlg&, CtrlId%, Classes$, Inst&) DebugMsg "Function Start", "APRBACKUPMASTERSCB" SELECT CASE Classes$ CASE "IDC_OK" APRBackupSmartMasters% = TRUE CASE "IDC_CONTINUE" APRBackupSmartMasters% = FALSE CASE "IDC_EXIT" APRBackupSmartMasters% = FALSE END SELECT DebugMsg "Function End", "APRBACKUPMASTERSCB" END SUB 'APRBACKUPMASTERSCB '************************************************************************* '************************************************************************* '************************************************************************* '** '** Steve's Functions '** '************************************************************************* '************************************************************************* '************************************************************************* '************************************************************************* '** FUNCTION StrGSub(S$, SKey$, SSub$) AS INTEGER '** '** Purpose: Globally substitute part of a string with another string '** Author: Steve Smythe '** Arguments: ReadFn$ - Input/Read File Name '** WriteFn$ - Output/Write file name '** SKey$ - String to search for and replace '** SSub$ - Replacement string to use '** '** Returns: None '************************************************************************* FUNCTION StrGSub(S$, SKey$, SSub$) AS INTEGER DIM pos%, rc% ' DebugMsg "Function Start", "StrGSub" if StrCompare(SKey$, SSub$) = 0 then ' DebugMsg "Strings are equal" + chr$(13) +_ ' "Looking for: " + SKey$ + chr$(13) +_ ' "Replacing with: " + SSub$, "StrGSub" EXIT Function End if rc = 0 'DebugMsg "Looking for: " + SKey$ + chr$(13) +_ ' "Replacing with: " + SSub$, "StrGSub" pos = InStr(1, S, SKey) 'DebugMsg SKey$ + " found at Position: " + CStr(pos), "StrGSub" DO WHILE(pos >= 1) S = LEFT$(S, pos-1) + SSub + MID$(S, pos + Len(SKEY)) rc = rc + 1 pos = InStr(1, S, SKey) LOOP if rc > 0 then ' DebugMsg "Modified Approach.REG line to: " + S$, "StrGSub" end if StrGSub = 1 ' DebugMsg "Function End", "StrGSub" END FUNCTION ' StrGSub() '************************************************************************* '** FUNCTION FileSub(ReadFn$, WriteFn$, SKey$, SSub$) AS INTEGER '** '** Purpose: Substitute all instances of one string with another '** Author: Steve Smythe '** Arguments: ReadFn$ - Input/Read File Name '** WriteFn$ - Output/Write file name '** SKey$ - String to search for and replace '** SSub$ - Replacement string to use '** '** Returns: None '************************************************************************* FUNCTION FileSub(ReadFn$, WriteFn$, SKey$, SSub$) AS INTEGER DIM rf%, wf%, S$, rc% DebugMsg "Function Start", "FileSub" DebugMsg "Output filename: " + WriteFn, "FileSub" DebugMsg "Input filename: " + ReadFn, "FileSub" IF RIGHT$(ReadFn$, 1) = "." THEN ReadFn$ = LEFT$(ReadFn$, LEN(ReadFn$) - 1) END IF IF RIGHT$(WriteFn$, 1) = "." THEN WriteFn$ = LEFT$(WriteFn$, LEN(WriteFn$) - 1) END IF rf = FreeFile() DebugMsg "About to open file for input: " + ReadFn + chr(13) + "File#: " + Cstr(rf), "FileSub" OPEN ReadFn FOR INPUT AS #rf wf = FreeFile() DebugMsg "About to open file for output: " + WriteFn + chr(13) + "File#: " + CStr(wf), "FileSub" OPEN WriteFn FOR OUTPUT AS #wf DO WHILE NOT Eof(rf) LINE INPUT #rf, S rc = StrGSub(S, SKey, SSub) PRINT #wf, S LOOP CLOSE #rf, #wf FileSub = rc DebugMsg "Function End", "FileSub" END FUNCTION ' FileSub() '************************************************************************* '** FUNCTION FixCompnentPath(CompnentPath$) AS STRING '** '** Purpose: Removes extra \ at end of string '** Author: Steve Smythe '** Arguments: CompnentPath$ - Path to fix '** '** Returns: None '************************************************************************* FUNCTION FixCompnentPath(CompnentPath$) AS STRING DIM tmp$ DebugMsg "Function Start", "FixCompnentPath" tmp$ = CompnentPath$ while(RIGHT$(tmp$, 1) = "\") tmp$ = left$(tmp$, len(tmp$)-1) wend CompnentPath$ = tmp$ + "\" FixCompnentPath = CompnentPath$ DebugMsg "Function End", "FixCompnentPath" END FUNCTION ' FixCompnentPath '************************************************************************* '** FUNCTION APR_AddODBCiniEntries(prodno%, network$) AS INTEGER '** '** Purpose: Add Approach Entries to the ODBC INI file '** Author: Steve Smythe '** Arguments: prodno% - Install Product Number '** '** Returns: None '************************************************************************* FUNCTION APR_AddODBCiniEntries(prodno%) AS INTEGER '** Write entries in odbc.ini DebugMsg "Function Start", "APR_AddODBCiniEntries" DIM odbcini$ odbcini$ = GetSymbolValue("WINDIR") + "ODBC.INI" CreateIniKeyValue odbcini$, "ODBC - Null", "Null", "-0-", cmoOverwrite DebugMsg "Function End", "APR_AddODBCiniEntries" END FUNCTION ' APR_AddODBCiniEntries(prodno%) '************************************************************************* '** FUNCTION APR_AddApproachiniEntries(prodno%, network$) AS INTEGER '** '** Purpose: Add Approach Entries to the Approach INI file '** Author: Steve Smythe '** Arguments: prodno% - Install Product Number '** '** Returns: None '************************************************************************* FUNCTION APR_AddAPPROACHiniEntries(prodno%) AS INTEGER '** Write entries in approach.ini DebugMsg "Function Start", "APR_AddAPPROACHiniEntries" DIM aprini$ aprini$ = GetSymbolValue("WINDIR") + "APPROACH.INI" CreateIniKeyValue aprini$, "SmartIcons-4.0", "IconPath", Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE)), cmoOverwrite CreateIniKeyValue aprini$, "InfoBox", "X Location", "100", cmoOverwrite CreateIniKeyValue aprini$, "InfoBox", "Y Location", "100", cmoOverwrite CreateIniKeyValue aprini$, "SQL", "iReadOnly", "0", cmoOverwrite CreateIniKeyValue aprini$, "SQL", "iIncludeSystemTable", "0", cmoOverwrite CreateIniKeyValue aprini$, "SQL", "iCacheTableNameOn", "0", cmoOverwrite DebugMsg "Function End", "APR_AddAPPROACHiniEntries" END FUNCTION ' APR_AddAPPROACHiniEntries(prodno%) '************************************************************************* '** FUNCTION APR_AddLOTUSiniEntries(prodno%, network$) AS INTEGER '** '** Purpose: Add Approach Entries to the Lotus INI file '** Author: Steve Smythe '** Arguments: prodno% - Install Product Number '** network$ - network install type '** '** Returns: None '************************************************************************* FUNCTION APR_AddLOTUSiniEntries(prodno%, network$) AS INTEGER '** Write entries in lotus.ini DebugMsg "Function Start", "APR_AddLOTUSiniEntries" '** This code isn't needed now that SmartSuite doesn't ship any 16 bit products. --TGR 6/26/96 DIM lotini$ lotini$ = GetWindowsDir() + "LOTUS.INI" IF network$ = gSTANDARD$ THEN IF DoesFileExist(Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE))+LdString(SID_APR_APREXE), femExists) THEN CreateIniKeyValue lotini$, "Lotus Applications", "Approach", Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE)) + "approach.exe Lotus Approach Release 9", cmoOverwrite END IF ELSEIF network$ = gNODE$ THEN IF DoesFileExist(Lot_WhereIsFeature(prodno%, "APRSERVERCORE", LdString(SID_APR_APREXE))+LdString(SID_APR_APREXE), femExists) THEN CreateIniKeyValue lotini$, "Lotus Applications", "Approach", Lot_WhereIsFeature(prodno%, "APRSERVERCORE", LdString(SID_APR_APREXE)) + "approach.exe Lotus Approach Release 9", cmoOverwrite END IF END IF DebugMsg "Function End", "APR_AddLOTUSiniEntries" END FUNCTION ' APR_AddLOTUSiniEntries(prodno%, network$) '************************************************************************* '** FUNCTION APR_AddLTSTOOLSiniEntries(prodno%, network$) AS INTEGER '** '** Purpose: Add Approach Entries to the Lotus Tools INI file '** Author: Steve Smythe '** Arguments: prodno% - Install Product Number '** network$ - network install type '** '** Returns: None '************************************************************************* FUNCTION APR_AddLTSTOOLSiniEntries(prodno%, network$) AS INTEGER '** Write entries in ltstools.ini DIM toolsini$, componentdir$, locationdir$ DIM approachtbl$, chartdll$ DebugMsg "Function Start", "APR_AddLTSTOOLSiniEntries" toolsini$ = GetSymbolValue("WINDIR") + "LTSTOOLS.INI" approachtbl$ = GetSymbolValue("WINDIR")+"APPROACH.TBL" ' if network$ = gNODE$ then ' componentdir$ = GetSymbolValue(SYM_NETCOMPONENT$) ' else ' componentdir$ = GetSymbolValue(SYM_COMPONENTSDIR$) ' end if 'Ching Nam Kee in Lotus Singapore says the EN in this file name is for ENGINE, not English. 'chartdll$ = "ltch" + GetSymbolValue(SYM_INSTALL_LANGUAGE$) + "21.dll" chartdll$ = "ltchen21.dll" locationdir$ = Lot_WhereIsFeature(prodno%, "APRWIN32SHRCHARTPRG", chartdll$) CreateIniKeyValue toolsini$, "Approach Servers", "LotusChart", locationdir$ + chartdll$, cmoOverwrite CreateIniKeyValue toolsini$, "Approach Servers", "LotusChart\DataFormat", ".cht", cmoOverwrite If DoesFileExist(approachtbl$, femExists) <> 0 Then KILL approachtbl$ End If DebugMsg "Function End", "APR_AddLTSTOOLSiniEntries" END FUNCTION ' APR_AddLTSTOOLSiniEntries(prodno%) '************************************************************************* '** FUNCTION APR_AddRegistryEntries(prodno%, network$) AS INTEGER '** '** Purpose: Add Approach Entries to the Registry '** Author: Steve Smythe '** Arguments: prodno% - Install Product Number '** network$ - network install type '** '** Returns: None '************************************************************************* FUNCTION APR_AddRegistryEntries(prodno%, network$) AS INTEGER DIM KEY_LOTUS$, gbuf$, keyval$, Desc$, Descnum&, nsize&, regStatus&, componentdir$, aprdir$ DIM dssdir$, dsspath$, chartdll$ DIM drivetype%, driveletter$, LanguageAcronym$ DebugMsg "Function Start", "APR_AddRegistryEntries" '** Determine the Drive Type for install, so we can do specific CD processing driveletter$ = LEFT( GetSymbolValue(SYM_INSTALL_SOURCE) ,1)+ ":\" drivetype% = GetDriveType(driveletter$) LanguageAcronym$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) '** Create Registry Entries IF (network$ <> gSERVER$ and network$ <> gDISTRIBUTION$) THEN IF network$ = gNODE$ THEN aprdir$ = Lot_GetDestDirValueFromInstallIni("APRDIR") componentdir$ = GetSymbolValue(SYM_NETCOMPONENT$) ELSE aprdir$ = GetSymbolValue("APRDIR") componentdir$ = GetSymbolValue(SYM_COMPONENTSDIR$) END IF WriteDialSettingstoApproachINI %REM 'This section is Obsolete. CIT 2.2 does this automatically '=============== SHARED COMPONENT SECTION ======================= APR_RegisterSharedComponent "WIN32SHRAFIDMANPRG", "AFIDMan", "3.2" APR_RegisterSharedComponent "WIN32SHRQUICKDEMOPRG", "Animations", "1.1" APR_RegisterSharedComponent "WIN32SHRBUBBHELPPRG", "Bubble Help", "1.2" APR_RegisterSharedComponent "WIN32SHRCCSTRPRG", "ccStr", "1.0" APR_RegisterSharedComponent "WIN32SHRCHARTPRG", "Chart", "2.1" APR_RegisterSharedComponent "WIN32SHRCUSTSUPPHELPPRG", "CustomerSupportHelp", "4.0" APR_RegisterSharedComponent "WIN32SHRDIALOGDLLPRG", "Dialog DLL", "3.0" APR_RegisterSharedComponent "WIN32SHRSHAREDHELPPRG", "Help", "3.1" APR_RegisterSharedComponent "WIN32SHRSMARTICONPRG", "Icon Palette", "7.1" APR_RegisterSharedComponent "WIN32SHRUIMSPRG", "InfoBox", "2.1" APR_RegisterSharedComponent "WIN32SHRINTERNETPRG", "Internet", "1.0" APR_RegisterSharedComponent "WIN32SHRLISDBPRG", "LISDB", "1.0" APR_RegisterSharedComponent "WIN32SHRLOTUSSCRIPTPRG", "LotusScript", "3.1" APR_RegisterSharedComponent "WIN32SHRSTDPLAYERPRG", "Player", "1.1" APR_RegisterSharedComponent "WIN32SHRSPELLPRG", "Spell", "4.0" APR_RegisterSharedComponent "WIN32SHRSTATUSBARPRG", "Status Bar", "6.1" APR_RegisterSharedComponent "WIN32TEAMMAILSHRPRG", "TeamMail", "1.1" APR_RegisterSharedComponent "WIN32SHRTITLEBARPRG", "Title Bar", "1.0" APR_RegisterSharedComponent "WIN32SHRUINST", "Uninstall", "1.0" APR_RegisterSharedComponent "WIN32SHRUINSTLANGEN", "Uninstall", "1.0" %ENDREM '=================System Services -- Required for QuickDemo============= 'These entries are not made by CIT when we privatize the System Services component 'So we have to make them manually to ensure Quick Demos run. Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Components\SystemServices\3.1" KEY_LOTUS = "SOFTWARE\Lotus\Components\SystemServices\3.1" keyval$ = "INFO" Desc$ = "LTCHEN21.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Components\SystemServices\3.1" keyval$ = "LSI" Desc$ = "LTSIN31.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Components\SystemServices\3.1" keyval$ = "ADPT" Desc$ = "LTLRN31.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) '================= Spell Checker ============= 'These entries are not made by CIT when we privatize the Spell Checker component 'So we have to make them manually to ensure Spell Checker works correctly Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CURRENT_USER\SOFTWARE\Lotus\Components\Spell\4.0" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Components\Spell\4.0" KEY_LOTUS = "Software\Lotus\Components\Spell\4.0" keyval$ = "Multi User Path" Desc$ = GetSymbolValue("APRDIR") & "Spell\" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "Software\Lotus\Components\Spell\4.0" keyval$ = "UserDictionaryFiles" Desc$ = "ltsuser1.udc" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "Software\Lotus\Components\Spell\4.0" keyval$ = "Data Path" If network$ = gNODE$ Then Desc$ = Lot_GetDestDirValueFromInstallIni("APRDIR") & "Spell\" Else Desc$ = GetSymbolValue("APRDIR") & "Spell\" End If nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) '================ Net-It Setup.Log File Uninstall Registration ==== Lot_RegisterObject "WIN32SHRNETITPRG", UNIN_CLASS_FILE$, GetSymbolValue("COMPONENTSDIR") + "setup.log" '=================Year 2000 Support=================== KEY_LOTUS = "SOFTWARE\Lotus\Y2K" keyval$ = "Range" Descnum = 80 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CURRENT_USER\SOFTWARE\Lotus\Y2K" '=============== MAIN SECTION ======================= KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER) keyval$ = "Description" Desc$ = LdString(SID_APR_TIP) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER) keyval$ = "UserName" Desc$ = GetSymbolValue(SYM_NAME$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER) keyval$ = "CompanyName" Desc$ = GetSymbolValue(SYM_COMPANY$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) %REM '/************* '******** Tour Registry ************* KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Tour" keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) '** if this is a CD install and Tour wasn't selected as a custom option, '** point to the CD for running the tour If (drivetype% = 5) AND (network$ = gStandard$) _ AND (Lot_IsTheFeatureInstalled("APRTOUR") = FALSE) _ Then Desc$ = driveletter$ + LdString(SID_APR_TOUR_CDDIR) Else If network$ = gNODE$ Then Desc$ = Lot_GetDestDirValueFromInstallIni("APRTOURDIR") + LdString(SID_APR_TOUR_DIR) Else Desc$ = GetSymbolValue("APRTOURDIR") + LdString(SID_APR_TOUR_DIR) End If End If nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Player" keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) '** if this is a CD install and Tour wasn't selected as a custom option, '** point to the CD for running the tour player If (drivetype% = 5) AND (network$ = gStandard$) _ AND (Lot_IsTheFeatureInstalled("APRTOUR") = FALSE) _ Then Desc$ = driveletter$ + LdString(SID_APR_COMPNENT_CDDIR) + LdString(SID_APR_PLAYER_DIR) ELSE If network$ = gNODE$ then Desc$ = GetSymbolValue(SYM_NETCOMPONENT$) Else Desc$ = GetSymbolValue(SYM_COMPONENTSDIR$) End if Desc$ = TRIM$(Desc$) IF Right$(Desc$, 1) = "\" THEN Desc$ = Desc$ + LdString(SID_APR_PLAYER_DIR) ELSE Desc$ = Desc$ + "\" + LdString(SID_APR_PLAYER_DIR) END IF END IF nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) '*********/ %ENDREM '************************************ KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Samples" keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) IF network$ = gNODE$ THEN Desc$ = GetSymbolValue("APRSAMPLESDIR") IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then Desc$ = Desc$ + Lot_SetLanguageDirectory(LanguageAcronym$) + "\" END IF ELSE Desc$ = GetSymbolValue("APRSAMPLESLANGDIR") IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then Desc$ = Desc$ + Lot_SetLanguageDirectory(LanguageAcronym$) + "\" END IF END IF nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Demo" keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) IF network$ = gNODE$ THEN Desc$ = GetSymbolValue("APRDEMODIR") IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then Desc$ = Desc$ + Lot_SetLanguageDirectory(LanguageAcronym$) + "\" END IF ELSE Desc$ = GetSymbolValue("APRDEMOLANGDIR") IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then Desc$ = Desc$ + Lot_SetLanguageDirectory(LanguageAcronym$) + "\" END IF END IF nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Work" keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) Desc$ = GetSymbolValue("APRWORKDIR") nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\SMasters" keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) IF network$ = gNODE$ THEN Desc$ = GetSymbolValue("APRMASTERSDIR") IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then Desc$ = Desc$ + Lot_SetLanguageDirectory(LanguageAcronym$) + "\" END IF ELSE Desc$ = GetSymbolValue("APRMASTERSLANGDIR") IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then Desc$ = Desc$ + Lot_SetLanguageDirectory(LanguageAcronym$) + "\" END IF END IF nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Icons" keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) Desc$ = GetSymbolValue("APRICONLANGDIR") + LdString(SID_APR_ICONS_DIR) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) '** Extra Extensions section for Fa. What is the language subdir? KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths\Icons" keyval$ = "Extension" + GetSymbolValue(SYM_INSTALL_LANGUAGE$) IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then Desc$ = Lot_SetLanguageDirectory(LanguageAcronym$) ELSE Desc$ = "" END IF nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Paths" keyval$ = "RegInfoPath" Desc$ = GetSymbolValue("APRDIR") + "approach.ri" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\InfoBox" keyval$ = "X Location" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\InfoBox" keyval$ = "Y Location" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "dBase IV" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "dBase III+" Descnum = 2 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "Lotus Notes - Workspace" Descnum = 3 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "Lotus Notes - Server" Descnum = 4 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "Lotus Notes - Local" Descnum = 5 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "IBM DB2" Descnum = 6 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "FoxPro" Descnum = 7 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "Paradox" Descnum = 8 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "1-2-3 Ranges" Descnum = 9 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "Oracle" Descnum = 10 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "SQL Server" Descnum = 11 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ShowTypes" keyval$ = "ODBC Data Sources" Descnum = 12 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\HideTypes" keyval$ = "File Type to Hide goes here" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_DWORD,Descnum,nsize) '=========== Approach General Section =========================== IF Lot_IsTheFeatureInstalled("APRHELP") <> FALSE OR Lot_IsTheFeatureInstalled("APRHELPLANG"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)) <> FALSE THEN KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iHelpInstalled" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_DWORD, Descnum&, nsize&) ELSEIF Lot_IsTheFeatureInstalled("APRCORE") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iHelpInstalled" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_DWORD, Descnum&, nsize&) END IF IF Lot_IsTheFeatureInstalled("APRWIN32SHRSPELLPRG") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iSpellCheckInstalled" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iSpellerOptions" Descnum = 15 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) ELSEIF Lot_IsTheFeatureInstalled("APRCORE") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iSpellCheckInstalled" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) END IF IF Lot_IsTheFeatureInstalled("APRPARADOX") <> FALSE Then DIM SysCountry$ SysCountry$ = APRGetSystemCountry() KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "ParadoxCaseSensitive" If StrCompare(SysCountry$, "UNITED STATES") Then Descnum = 1 'Non-US Setting Else Descnum = 0 'US Setting End If nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "sParadoxSortOption" If StrCompare(SysCountry$, "UNITED STATES") = 0 Then Desc$ = "ASCII" 'US Setting ElseIf (StrCompare(SysCountry$, "SWEDEN") = 0) OR _ (StrCompare(SysCountry$, "FINLAND") = 0) Then Desc$ = "SWEDFIN" 'Setting for Swedish and Finnish users ElseIf (StrCompare(SysCountry$, "NORWAY") = 0) OR _ (StrCompare(SysCountry$, "DENMARK") = 0) Then Desc$ = "NORDAN" 'Setting for Norwegian and Dannish users Else Desc$ = "INTL" 'Default setting for all other countries End If nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) End If KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "Maximized" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "icon_desc" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "Preferred Font" Desc$ = "MS Sans Serif" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "RegInfoPath" Desc$ = GetSymbolValue("APRDIR") + LdString(SID_APR_RI_NAME) ' "approach.ri" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "sLastReturnAddress" Desc$ = "" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iUseReturnAddress" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "sFirstSalutationStr" Desc$ = LdString(SID_APR_LTR_SALUTATION) ' "Dear" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "sSecondSalutaionStr" Desc$ = LdString(SID_APR_LTR_SECSAL) ' ":" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iUseSalutation" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "sLastClose" Desc$ = LdString(SID_APR_LTR_CLOSE) ' "Sincerely yours," nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iUseClose" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iAddEnvelope" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "DefaultMailingLabelType" Desc$ = LdString(SID_APR_LBL_TYPE) ' "Avery 5160, 5260, 6460, 8160: Address" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "idBaseShareLocalDatabases" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\General" keyval$ = "iShowDataInDesign" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) '============== Help Registry ========================== IF Lot_IsTheFeatureInstalled("APRHELP") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "la1n50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".hlp" Desc$ = aprdir$ nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\la1n50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".hlp" KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "la1n50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".cnt" Desc$ = aprdir$ nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\la1n50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".cnt" 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") + "la1n50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".gid" If Lot_IsTheFeatureInstalled("APRSCRIPTHELP") <> FALSE Then KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "lasn50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".hlp" Desc$ = aprdir$ nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\lasn50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".hlp" KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "lasn50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".cnt" Desc$ = aprdir$ nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\lasn50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".cnt" 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, GetSymbolValue("APRDIR") + "lasn50"+GetSymbolValue(SYM_INSTALL_LANGUAGE$)+".gid" End If IF Lot_IsTheFeatureInstalled("APRORACLE") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRSQLSERVER4") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRSQLSERVER6") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRSYBASE") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRINFORMIX5") <> FALSE _ OR Lot_IsTheFeatureInstalled("APRINFORMIX7") <> FALSE _ THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "ivdrv09.hlp" Desc$ = aprdir$ nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRODBC", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "ivdrv09.cnt" Desc$ = aprdir$ nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRODBC", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRODBC", UNIN_CLASS_FILE$, GetSymbolValue(SYM_WINSYSDIR$)+"ivdrv09.gid" IF Lot_IsTheFeatureInstalled("APRORACLE") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loor709.cnt" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRORACLE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loor709.hlp" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRORACLE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRORACLE", UNIN_CLASS_FILE$, GetSymbolValue(SYM_WINSYSDIR$)+"loor709.gid" END IF IF Lot_IsTheFeatureInstalled("APRSQLSERVER4") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loss09.cnt" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRSQLSERVER4", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loss09.hlp" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRSQLSERVER4", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRSQLSERVER4", UNIN_CLASS_FILE$, GetSymbolValue(SYM_WINSYSDIR$)+"loss09.gid" END IF IF Lot_IsTheFeatureInstalled("APRSQLSERVER6") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loss609.cnt" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRSQLSERVER6", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loss609.hlp" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRSQLSERVER6", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRSQLSERVER6", UNIN_CLASS_FILE$, GetSymbolValue(SYM_WINSYSDIR$)+"loss609.gid" END IF IF Lot_IsTheFeatureInstalled("APRSYBASE") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "losyb09.cnt" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRSYBASE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "losyb09.hlp" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRSYBASE", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRSYBASE", UNIN_CLASS_FILE$, GetSymbolValue(SYM_WINSYSDIR$)+"losyb09.gid" END IF IF Lot_IsTheFeatureInstalled("APRINFORMIX5") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loinf509.cnt" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRINFORMIX5", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loinf509.hlp" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRINFORMIX5", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRINFORMIX5", UNIN_CLASS_FILE$, GetSymbolValue(SYM_WINSYSDIR$)+"loinf509.gid" END IF IF Lot_IsTheFeatureInstalled("APRINFORMIX7") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loinf709.cnt" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRINFORMIX7", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ KEY_LOTUS = "SOFTWARE\Microsoft\Windows\Help" keyval$ = "loinf709.hlp" Desc$ = GetSymbolValue(SYM_WINSYSDIR$) nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) Lot_RegisterObject "APRINFORMIX7", UNIN_CLASS_REGISTRY_VALUE$, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help\"+keyval$ 'Dont forget to uninstall the GID file. Lot_RegisterObject "APRINFORMIX7", UNIN_CLASS_FILE$, GetSymbolValue(SYM_WINSYSDIR$)+"loinf709.gid" END IF END IF END IF '============ Powerkey Registry ===================== IF Lot_IsTheFeatureInstalled("APRNOTES") <> FALSE THEN KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Notes" keyval$ = "TextFieldWidth" Descnum = 100 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+ LdString(SID_APR_PROD_VER) + "\Notes" keyval$ = "OpenCompositeAsPicture" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) END IF IF Lot_IsTheFeatureInstalled("APRQMF") <> FALSE THEN If network$ = gSTANDARD$ THEN dsspath$ = Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE)) ELSEIF network$ = gNODE$ THEN dsspath$ = Lot_GetDestDirValueFromInstallIni("APRDIR") END IF 'dsspath$ = Lot_TrimEndSlash (dsspath$) dsspath$ = GetSymbolValue("APRQMFDIR") dssdir$ = GetSymbolValue("APRWORKDIR") KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\QMF" keyval$ = "DssDir" Desc$ = dssdir$ nsize = len(Desc$) + 1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+ LdString(SID_APR_PROD_VER) + "\QMF" keyval$ = "DssPath" Desc$ = dsspath$ nsize = len(Desc$) + 1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+ LdString(SID_APR_PROD_VER) + "\QMF" keyval$ = "DsqCommTrace" Desc$ = "Off" nsize = len(Desc$) + 1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) END IF '=============== ICON Registry ======================= '** Register extentions and icons with uninstaller. approach.reg writes these to registry on install. Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\approach" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\.apt" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\.apr" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\.vew" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\.mpr" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachView" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachSMaster" '================ Don't need these any more ============== ' Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Extensions\.apt" ' Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Extensions\.apr" ' Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Extensions\.vew" ' Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Extensions\.mpr" '=============== OTHER REGISTRY ENTRIES =================== Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D61-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D62-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D63-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D64-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D65-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D66-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D67-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D68-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D69-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D6A-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D6B-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D6C-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D6D-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D6E-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D6F-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D70-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D71-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D72-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D73-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D74-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D75-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D76-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D77-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D78-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D79-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D7A-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D7B-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D7C-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D7D-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D7E-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D7F-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D80-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D81-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D82-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D83-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D84-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D85-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D86-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D87-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D88-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D89-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D8A-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D8B-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D8C-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D8D-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D8E-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D8F-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5D90-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5DBA-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5DBB-41E9-11CE-AEA9-00805F684C33}" Lot_RegisterObject "APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Interface\{1AAF5DBC-41E9-11CE-AEA9-00805F684C33}" '=============== CHART 2.1 Registry ======================= chartdll$ = "ltchen21.dll" KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Approach Servers" keyval$ = "LotusChart" Desc$ = Lot_WhereIsFeature(prodno%, "APRWIN32SHRCHARTPRG", chartdll$) + chartdll$ nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Approach Servers\LotusChart" keyval$ = "Capabilities" Desc$ = "0x42cdd" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Approach Servers\LotusChart" keyval$ = "DataFormat" Desc$ = ".cht" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Approach Servers\LotusChart" keyval$ = "ContextFormat" Desc$ = ".cht" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\Approach Servers\LotusChart" keyval$ = "MenuText" Desc$ = LdString(SID_APR_CHART_MENU) ' "&Chart..." nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) '=============== ODBC Registry ======================= DIM oraclechpt$, sql4chpt$, sql6chpt$, sybchpt$, inf5chpt$, inf7chpt$ DIM oracle%, sql4%, sql6%, syb%, inf5%, inf7%, symws$, getws$, installsysdir$ 'Setup a Debug Message to help track registry problems with Shared Windows Node Install symws$ = GetSymbolValue(SYM_WINSYSDIR$) getws$ = GetWindowsSysDir() DebugMsg "Windows System Directory Symbol: " & symws$ & chr$(10) & _ "Windows System Directory Function: " & getws$, "APR_AddRegistryEntries" 'Set a variable for the System Directory. I have found in Most cases 'the above calls for xxws$ return the same value. However in cases where 'the values differ, the function call appears to be the correct value. 'However there appears to be a further complication when doing a standalone 'install while running a shared windows node, so I think this should be the 'final correction for this problem. IF network$ = gNODE$ THEN installsysdir$ = getws$ Else installsysdir$ = symws$ End If '** Get All the ODBC Driver Chapter Numbers from the INF File oraclechpt$ = Lot_GetChapterFromKeyword("APRORACLE") sql4chpt$ = Lot_GetChapterFromKeyword("APRSQLSERVER4") sql6chpt$ = Lot_GetChapterFromKeyword("APRSQLSERVER6") sybchpt$ = Lot_GetChapterFromKeyword("APRSYBASE") inf5chpt$ = Lot_GetChapterFromKeyword("APRINFORMIX5") inf7chpt$ = Lot_GetChapterFromKeyword("APRINFORMIX7") '** Find out if any of these sections are in the copy list. The previous '** method used to see if they were installed - which they are on a Node install '** because they're on the server, but not necessarily copied to the user's '** machine, so we only want to register the ODBC drivers, if they're copied '** locally. I think this will work better than "IsTheFeatureInstall" oracle% = Lot_GetChapterValInt(oraclechpt$, F_INOROUT) sql4% = Lot_GetChapterValInt(sql4chpt$, F_INOROUT) sql6% = Lot_GetChapterValInt(sql6chpt$, F_INOROUT) syb% = Lot_GetChapterValInt(sybchpt$, F_INOROUT) inf5% = Lot_GetChapterValInt(inf5chpt$, F_INOROUT) inf7% = Lot_GetChapterValInt(inf7chpt$, F_INOROUT) '** If this is a Node install, it's possible that these drivers were installed '** during the server install to a shared windows server directory. '** So let's check to see if any of the sections not in the copylist are '** actually installed. If network = gNode$ then If oracle% = 0 then If Lot_DoesFileExist(GetWindowsSysDir() + "loor709.dll" ) <> 0 Then oracle% = 1 End If End If If sql4% = 0 then If Lot_DoesFileExist(GetWindowsSysDir() + "loss09.dll" ) <> 0 Then sql4% = 1 End If End If If sql6% = 0 then If Lot_DoesFileExist(GetWindowsSysDir() + "loss609.dll" ) <> 0 Then sql6% = 1 End If End If If syb% = 0 then If Lot_DoesFileExist(GetWindowsSysDir() + "losyb09.dll" ) <> 0 Then syb% = 1 End If End If If inf5% = 0 then If Lot_DoesFileExist(GetWindowsSysDir() + "loinf509.dll" ) <> 0 Then inf5% = 1 End If End If If inf7% = 0 then If Lot_DoesFileExist(GetWindowsSysDir() + "loinf709.dll" ) <> 0 Then inf7% = 1 End If End If End If %REM /************ 'SQL or ORACLE or Sybase or Informix Selected IF (Lot_IsTheFeatureInstalled("APRORACLE") <> FALSE) OR _ (Lot_IsTheFeatureInstalled("APRSQLSERVER4") <> FALSE) OR _ (Lot_IsTheFeatureInstalled("APRSQLSERVER6") <> FALSE) OR _ (Lot_IsTheFeatureInstalled("APRSYBASE") <> FALSE) OR _ (Lot_IsTheFeatureInstalled("APRINFORMIX5") <> FALSE) OR _ (Lot_IsTheFeatureInstalled("APRINFORMIX7") <> FALSE) THEN *************/ %ENDREM '** SQL or ORACLE or Sybase or Informix Selected IF (oracle% = 1) OR (sql4% = 1) OR (sql6% = 1) OR _ (syb% = 1) OR (inf5% = 1) OR (inf7% = 1) THEN '** A KEY_LOTUS="Software\INTERSOLV\WIN.INI\Compatibility" keyval$ = "LPX" Desc$ = "3496" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** L 'KEY_LOTUS="Software\INTERSOLV\WIN.INI\Compatibility" 'keyval$ = "LPX" 'Desc$ = "3496" 'nsize = len(Desc$)+1 'regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ODBC" keyval$ = "ApproachErrorLogFile" Desc$ = "apprerr.out" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ODBC" keyval$ = "TurnTraceOn" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\ODBC" keyval$ = "TraceFile" Desc$ = "tracefile.out" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\SQL" keyval$ = "iReadOnly" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS = "SOFTWARE\Lotus\Approach\"+LdString(SID_APR_PROD_VER)+"\SQL" keyval$ = "iIncludeSystemTable" Descnum = 0 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\OEM to ANSI" keyval$ = "Translator" Desc$ = installsysdir$ + "IVTRN09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "Setup" Desc$ = installsysdir$ + "IVTRN09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Translators" keyval$ = "OEM to ANSI" Desc$ = "Installed" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core" keyval$ = "Usage Count" Descnum = 1 nsize = 4 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_DWORD, Descnum, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "ODBC32.DLL" Desc$ = installsysdir$ + "ODBC32.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "ODBCCR32.DLL" Desc$ = installsysdir$ + "ODBCCR32.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "MSVCRT10.DLL" Desc$ = installsysdir$ + "MSVCRT10.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "MSVCRT20.DLL" Desc$ = installsysdir$ + "MSVCRT20.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "ODBCINT.DLL" Desc$ = installsysdir$ + "ODBCINT.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "ODBCCP32.DLL" Desc$ = installsysdir$ + "ODBCCP32.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "ODBCCP32.CPL" Desc$ = installsysdir$ + "ODBCCP32.CPL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Core\FileList" keyval$ = "ODBCINST.HLP" Desc$ = installsysdir$ + "ODBCINST.HLP" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** ORACLE Selected If oracle% = 1 then 'IF Lot_IsTheFeatureInstalled("APRORACLE") <> FALSE THEN '** B KEY_LOTUS="Software\ODBC\ODBC.INI\ODBC Data Sources" keyval$ = "Oracle7 tables-Approach97" Desc$ = "INTERSOLV OEM 2.12 32-BIT Oracle7" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** G KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" keyval$ = "INTERSOLV OEM 2.12 32-BIT Oracle7" Desc$ = "Installed" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** P KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "Description" Desc$ = "Oracle7 Server" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** Q KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "ServerName" Desc$ = "" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** R KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "Servers" Desc$ = "" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** S KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "LogonID" Desc$ = "" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** T KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "LockTimeOut" Desc$ = "-1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** U KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "ArraySize" Desc$ = "60000" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** V KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "CatalogComments" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** D KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "Driver" Desc$ = installsysdir$ + "LOOR709.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** J KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "Driver" Desc$ = installsysdir$ + "LOOR709.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** K KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "Setup" Desc$ = installsysdir$ + "LOOR709.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** O KEY_LOTUS="Software\ODBC\ODBC.INI\Oracle7 tables-Approach97" keyval$ = "Driver" Desc$ = installsysdir$ + "LOOR709.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "APILevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "ConnectFunctions" Desc$ = "YYY" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "DriverODBCVer" Desc$ = "02.50" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "FileUsage" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Oracle7" keyval$ = "SQLLevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) END IF '** SQL 4 Selected If sql4% = 1 then 'IF Lot_IsTheFeatureInstalled("APRSQLSERVER4") <> FALSE THEN '** F KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" keyval$ = "INTERSOLV OEM 2.12 32-BIT SQLServer" Desc$ = "Installed" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** C KEY_LOTUS="Software\ODBC\ODBC.INI\ODBC Data Sources" keyval$ = "MS Sybase SQL Server-Approach97" Desc$ = "INTERSOLV OEM 2.12 32-BIT SQLServer" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** N KEY_LOTUS="Software\ODBC\ODBC.INI\ODBC Data Sources" keyval$ = "MS Sybase SQL Server-Approach97" Desc$ = "INTERSOLV OEM 2.12 32-BIT SQLServer" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "Cancel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "CursorCacheSize" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "Gateway" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "Netapi" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "TwoPhaseCommit" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "YieldProc" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** E KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "Driver" Desc$ = installsysdir$ + "LOSS09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** W KEY_LOTUS="Software\ODBC\ODBC.INI\MS Sybase SQL Server-Approach97" keyval$ = "Driver" Desc$ = installsysdir$ + "LOSS09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** H KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer" keyval$ = "Driver" Desc$ = installsysdir$ + "LOSS09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** I KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer" keyval$ = "Setup" Desc$ = installsysdir$ + "LOSS09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer" keyval$ = "APILevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer" keyval$ = "ConnectFunctions" Desc$ = "YYY" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer" keyval$ = "DriverODBCVer" Desc$ = "02.50" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer" keyval$ = "FileUsage" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer" keyval$ = "SQLLevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) END IF '** SQL 6 Selected If sql6% = 1 then 'IF Lot_IsTheFeatureInstalled("APRSQLSERVER6") <> FALSE THEN '** F KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" keyval$ = "INTERSOLV OEM 2.12 32-BIT SQLServer6" Desc$ = "Installed" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** C KEY_LOTUS="Software\ODBC\ODBC.INI\ODBC Data Sources" keyval$ = "MS SQL Server6-Approach97" Desc$ = "INTERSOLV OEM 2.12 32-BIT SQLServer6" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** N KEY_LOTUS="Software\ODBC\ODBC.INI\ODBC Data Sources" keyval$ = "MS SQL Server6-Approach97" Desc$ = "INTERSOLV OEM 2.12 32-BIT SQLServer6" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS SQL Server6-Approach97" keyval$ = "Cancel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS SQL Server6-Approach97" keyval$ = "CursorCacheSize" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS SQL Server6-Approach97" keyval$ = "Gateway" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS SQL Server6-Approach97" keyval$ = "Netapi" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS SQL Server6-Approach97" keyval$ = "TwoPhaseCommit" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS SQL Server6-Approach97" keyval$ = "YieldProc" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="Software\ODBC\ODBC.INI\MS SQL Server6-Approach97" keyval$ = "Driver" Desc$ = installsysdir$ + "LOSS609.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** H KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer6" keyval$ = "Driver" Desc$ = installsysdir$ + "LOSS609.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) '** I KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer6" keyval$ = "Setup" Desc$ = installsysdir$ + "LOSS609.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer6" keyval$ = "APILevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer6" keyval$ = "ConnectFunctions" Desc$ = "YYY" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer6" keyval$ = "DriverODBCVer" Desc$ = "02.50" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer6" keyval$ = "FileUsage" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT SQLServer6" keyval$ = "SQLLevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) END IF '** Sybase System 10 & 11 Install '** ODBC.INI entries are not made here because user must have client installed first '** and we can't determine the appropriate settings during install, so the user must '** make the additions manually If syb% = 1 then 'IF Lot_IsTheFeatureInstalled("APRSYBASE") <> FALSE THEN KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" keyval$ = "INTERSOLV OEM 2.12 32-BIT Sybase System 10" Desc$ = "Installed" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Sybase System 10" keyval$ = "Driver" Desc$ = installsysdir$ + "LOSYB09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Sybase System 10" keyval$ = "Setup" Desc$ = installsysdir$ + "LOSYB09.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Sybase System 10" keyval$ = "APILevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Sybase System 10" keyval$ = "ConnectFunctions" Desc$ = "YYY" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Sybase System 10" keyval$ = "DriverODBCVer" Desc$ = "02.50" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Sybase System 10" keyval$ = "FileUsage" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT Sybase System 10" keyval$ = "SQLLevel" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) END IF '** Informix5 Driver Installed '** ODBC.INI entries are not made here because user must have client installed first '** and we can't determine the appropriate settings during install, so the user must '** make the additions manually If inf5% = 1 then 'IF Lot_IsTheFeatureInstalled("APRINFORMIX5") <> FALSE THEN KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" keyval$ = "INTERSOLV OEM 2.12 32-BIT INFORMIX5" Desc$ = "Installed" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX5" keyval$ = "Driver" Desc$ = installsysdir$ + "LOINF509.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX5" keyval$ = "Setup" Desc$ = installsysdir$ + "LOINF509.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX5" keyval$ = "APILevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX5" keyval$ = "ConnectFunctions" Desc$ = "YYY" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX5" keyval$ = "DriverODBCVer" Desc$ = "02.50" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX5" keyval$ = "FileUsage" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX5" keyval$ = "SQLLevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) END IF '** Informix7 Driver Installed '** ODBC.INI entries are not made here because user must have client installed first '** and we can't determine the appropriate settings during install, so the user must '** make the additions manually If inf7% = 1 then 'IF Lot_IsTheFeatureInstalled("APRINFORMIX7") <> FALSE THEN KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" keyval$ = "INTERSOLV OEM 2.12 32-BIT INFORMIX7" Desc$ = "Installed" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX7" keyval$ = "Driver" Desc$ = installsysdir$ + "LOINF709.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX7" keyval$ = "Setup" Desc$ = installsysdir$ + "LOINF709.DLL" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX7" keyval$ = "APILevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX7" keyval$ = "ConnectFunctions" Desc$ = "YYY" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX7" keyval$ = "DriverODBCVer" Desc$ = "02.50" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX7" keyval$ = "FileUsage" Desc$ = "0" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) KEY_LOTUS="SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV OEM 2.12 32-BIT INFORMIX7" keyval$ = "SQLLevel" Desc$ = "1" nsize = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize) END IF END IF END IF DebugMsg "Function End", "APR_AddRegistryEntries" END FUNCTION ' APR_AddRegistryEntries(prodno%) '************************************************************************* '************************************************************************* '************************************************************************* '** '** Joe's Functions '** '************************************************************************* '************************************************************************* '************************************************************************* '************************************************************************* '** FUNCTION GetNotesPathfromRegistry() AS STRING '** '** Purpose: Gets the Notes dir path from registry, and searches for '** notes.exe in the product dir path. '** '** Author: JoeG '** Arguments: None '** Returns: if notes.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 '************************************************************************* FUNCTION GetNotesPathfromRegistry() AS STRING DIM szkey$, keyvalue$, nsize&, gbuf$, ret& DebugMsg "Function Start", "GetNotesPathfromRegistry" keyvalue$ = "Path" '** Look for Notes 5.0 or greater first. szkey$ = "SOFTWARE\Lotus\Notes" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, 0, gbuf$, nsize&) IF gbuf$ <> "" THEN gbuf$ = TRIM$(gbuf$) GetNotesPathfromRegistry = LEFT$(gbuf$, LEN(gbuf$)-1) ELSE '** If Notes couldn't be found, look for v4.1 szkey$ = "SOFTWARE\Lotus\Notes\4.1" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, 0, gbuf$, nsize&) IF gbuf$ <> "" THEN gbuf$ = TRIM$(gbuf$) GetNotesPathfromRegistry = LEFT$(gbuf$, LEN(gbuf$)-1) ELSE '** If Notes 5.0+ or 4.1 couldn't be found, look for v4.0 szkey$ = "SOFTWARE\Lotus\Notes\4.0" ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, szkey$, keyvalue$, 0, gbuf$, nsize&) IF gbuf$ <> "" THEN gbuf$ = TRIM$(gbuf$) GetNotesPathfromRegistry = LEFT$(gbuf$, LEN(gbuf$)-1) ELSE GetNotesPathfromRegistry = "" END IF END IF END IF DebugMsg "Function End", "GetNotesPathfromRegistry" END FUNCTION 'GetNotesPathfromRegistry '************************************************************************* '** FUNCTION APR_AddOLEEntries(prodno%, network$) AS INTEGER '** '** Purpose: Add OLE Registration Entries to the Registry '** Author: Joe Ghazal '** Arguments: prodno% - Install Product Number '** network$ - network install type '** '** Returns: None '************************************************************************* FUNCTION APR_AddOLEEntries(prodno%, network$) AS INTEGER DIM winINIpath$, iniSection$ DIM OleRegPath$, ExecError%, curpath$, newpath$, notused% DebugMsg "Function Start", "APR_AddOLEEntries" '** Write the OLE registration '** register WINOBJ32.REG OleRegPath$ = GetSymbolValue("APRDIR") + "APPROACH.REG" IF DoesFileExist(OleRegPath$, femExists) <> FALSE THEN '** Remove 3.02 WIN.INI entries winINIpath$ = GetWindowsDir() + "WIN.INI" iniSection$ = "embedding" RemoveIniKey winINIpath$, iniSection$, "ApproachApplication", cmoNone% RemoveIniKey winINIpath$, iniSection$, "ApproachForm", cmoNone% RemoveIniKey winINIpath$, iniSection$, "ApproachReport", cmoNone% RemoveIniKey winINIpath$, iniSection$, "ApproachLetter", cmoNone% RemoveIniKey winINIpath$, iniSection$, "ApproachLabels", cmoNone% RemoveIniKey winINIpath$, iniSection$, "ApproachWorksheet", cmoNone% RemoveIniKey winINIpath$, iniSection$, "ApproachCrosstab", cmoNone% RemoveIniKey winINIpath$, iniSection$, "ApproachChart", cmoNone% iniSection$ = "Extensions" ' RemoveIniKey winINIpath$, iniSection$, "apr", cmoNone% ' RemoveIniKey winINIpath$, iniSection$, "apt", cmoNone% ' RemoveIniKey winINIpath$, iniSection$, "vew", cmoNone% IF network$ = gNODE$ THEN ExecError% = FileSub(OleRegPath, GetSymbolValue("APRDIR") + "WINOBJ32.DAT", LdString(SID_APR_OLEREGSTRING), Lot_GetDestDirValueFromInstallIni("APRDIR") + LdString(SID_APR_APREXE)) ELSE ' FileSub(ReadFn$, WriteFn$, SKey$, SSub$) ExecError% = FileSub(OleRegPath, GetSymbolValue("APRDIR") + "WINOBJ32.DAT", LdString(SID_APR_OLEREGSTRING), Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE)) + LdString(SID_APR_APREXE)) END IF curpath$ = CurDir() newpath$ = GetSymbolValue("APRDIR") ExecError% = Lot_regedit(newpath$, "WINOBJ32.DAT") KILL newpath$ + "approach.reg" NAME newpath$ + "winobj32.dat" AS newpath$ + "approach.reg" '** Register approach.reg entries with uninstaller notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Approach.Application.9") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{1AAF5D7A-41E9-11CE-AEA9-00805f684C33}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\Approach.Application") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachApplication") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028701-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachForm") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028702-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachReport") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028703-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachLetter") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028704-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachLabels") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028705-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachWorksheet") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028706-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachCrosstab") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028707-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachChart") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028708-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\ApproachEnvelope") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{00028709-0000-0000-C000-000000000046}") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\DataTransferObject") notused% = Lot_RegisterObject("APRCORE", UNIN_CLASS_REGISTRY_HIVE$, "HKEY_CLASSES_ROOT\CLSID\{000287CC-0000-0000-C000-000000000046}") END IF DebugMsg "Function End", "APR_AddOLEEntries" END FUNCTION ' APR_AddOLEEntries(prodno%) '************************************************************************* '** FUNCTION APR_TurnOnNTSpecialFiles (prodno%, network$) AS INTEGER '** '** Purpose: Add NT Specific files to the copy list if installing to NT '** Author: Joe Ghazal '** Arguments: prodno% - Install Product Number '** network$ - network install type '** '** Returns: None '************************************************************************* FUNCTION APR_TurnOnNTSpecialFiles (prodno%, network$) AS INTEGER DIM sysdirpath$, chptname$, msvcchpt$, winsyschpt$, notused% DebugMsg "Function Start", "APR_TurnOnNTSpecialFiles" sysdirpath$ = GetWindowsSysDir() chptname$ = Lot_GetChapterFromKeyword("APRSYSDIRNT") msvcchpt$ = Lot_GetChapterFromKeyword("APRMSVC20") winsyschpt$ = Lot_GetChapterFromKeyword("APRSYSFILES") If (network$ = gSTANDARD) OR (network$ = gNODE) Then '** This file provides 3D effect to dialogs. Only needed for NT 3.51 '** if using the Program Manager Shell. if (WhatPlatform() = PLATFORM_WINNT) AND (NOT IsNewShell()) AND _ (DoesFileExist(sysdirpath$ + "ctl3d32.dll", femExists) = FALSE) Then DebugMsg "CTL3D32.DLL doesn't exist. Adding to CopyList", "APR_TurnOnNTSpecialFiles" notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) Else DebugMsg "CTL3D32.DLL exists. NOT Added to CopyList", "APR_TurnOnNTSpecialFiles" notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) End if '** This file is needed by Approach, but is supplied with Win95. if (WhatPlatform() = PLATFORM_WINNT) AND _ (DoesFileExist(sysdirpath$ + "msvcrt20.dll", femExists) = FALSE) Then DebugMsg "MSVCRT20.DLL doesn't exist. Adding to CopyList", "APR_TurnOnNTSpecialFiles" notused% = Lot_SetChapterFilesInCopyListInOrOut (msvcchpt$, 1) Else DebugMsg "MSVCRT20.DLL exists. NOT Added to CopyList", "APR_TurnOnNTSpecialFiles" notused% = Lot_SetChapterFilesInCopyListInOrOut (msvcchpt$, 0) End if '** Windows System Files aren't being copied during a node install, so I'm going to '** force them into the copylist. This should deliver MSVCRT40.DLL required by the '** Shared Components and MFC30.DLL required by Approach. If (network$ = gNODE) Then DebugMsg "Node Install, Adding WINSYS Files to CopyList", "APR_TurnOnNTSpecialFiles" notused% = Lot_SetChapterFilesInCopyListInOrOut (winsyschpt$, 1) End If ElseIf (network$ = gSERVER) Then '** These files should always be copied to the server, you don't know what the '** node machines are going to be running. notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) notused% = Lot_SetChapterFilesInCopyListInOrOut (msvcchpt$, 1) notused% = Lot_SetChapterFilesInCopyListInOrOut (winsyschpt$, 1) End If DebugMsg "Function End", "APR_TurnOnNTSpecialFiles" END FUNCTION 'APR_TurnOnNTSpecialFiles '************************************************************************* '** SUB APR_AddIcon(Feature$, Group$, Caption$, File$, CommandArgs$, WorkingDir$, Icon$) '** '** Purpose: Adds Icons to Program Groups or StartMenu Folder '** Author: Based on Freelance Graphic's FLW_AddIcon() '** Arguments: Feature$ - The Feature to create the icon for '** Group$ - Name of the Program Group or Start Menu Folder '** Caption$ - Icon Caption '** File$ - File name linked to Icon (eg. Approach.exe) '** CommandArgs$ - Command Line Arguments for the icon '** WorkingDir$ - Working Directory for the Icon Properties '** Icon$ - Which Icon to use '** '** '** Returns: None '************************************************************************* '************************************************************************* '** Based on Freelance Graphic's FLW_AddIcon() '** ------------------------------------------------------------------------- SUB APR_AddIcon(Feature$, Group$, Caption$, File$, CommandArgs$, WorkingDir$, Icon$) DIM Path$, ProdNo% DebugMsg "Function Start", "APR_AddIcon" ProdNo% = Reg_GetProductNo("APR") Path$=Lot_WhereIsFeature(ProdNo%, Feature$, File$) IF Path$ = "" THEN Path$ = Lot_GetDestDirValueFromInstallIni("APRDIR") END IF IF (WorkingDir$ = "") THEN WorkingDir$ = Path$ END IF '** Do this next line to register icons with uninstall even in node situation. Feature$ = "APRCORE" IF IsNewShell() THEN IF strCompare(Left$(Caption$, Len(LdString(SID_APR_PROD_UPDATES))),LdString(SID_APR_PROD_UPDATES)) = 0 THEN Caption$ = LdString(SID_APR_LOTUS_UA) + Caption$ Path$ = Lot_GetDestDirValueFromInstallIni("APRDIR") END IF Lot_AddLinkToFolder ProdNo%, Path$ + File$, Caption$ + ".lnk", Caption$, CommandArgs$, WorkingDir$ Lot_RegisterObject Feature$, UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(1)+ Caption$ + ".lnk" ELSE IF strCompare(Right$(Group$, Len(LdString(SID_APR_PROD_UPDATES))),LdString(SID_APR_PROD_UPDATES)) = 0 THEN Group$ = Left$(Group$, Len(Group$) - Len(LdString(SID_APR_PROD_UPDATES))) Path$ = Lot_GetDestDirValueFromInstallIni("APRDIR") END IF DebugMsg "About to Add Icon -- " + chr$(13) +_ "Group: " + Group$ + chr(13) +_ "Caption: " + Caption$ + chr$(13) +_ "Path/File: " + Path$ + File$ + chr$(13) +_ "Command Args: " + CommandArgs$, "APR_AddIcon" '** Create a program manager group CreateProgmanGroup CHR$(34) + Group$ + CHR$(34), "", cmoVital CreateProgmanItem Group$, Caption$, Path$ + File$ + " " + CommandArgs$, "", cmoOverwrite Lot_RegisterObject Feature$, UNIN_CLASS_ICON$, Group$ + "\" + Caption$ END IF DebugMsg "Function End", "APR_AddIcon" END SUB 'APR_AddIcon '************************************************************************* '** APR_RegisterSharedComponent(Key$, FileName$, Version$) '** '** Purpose: Registers a shared component dependency for Approach '** Author: Joe Ghazal '** Arguments: Key$ is the CIT Shared Component ID '** FileName$ is the Name of the Shared Component '** Version$ is the version number of the shared component '** Returns: None '************************************************************************* SUB APR_RegisterSharedComponent(Key$, FileName$, Version$) DIM RegKeyName$, rc&, hlp$, hlp2$ DebugMsg "Function Start", "APR_RegisterSharedComponent" IF Lot_IsTheFeatureInstalled(Key$) <> FALSE THEN RegKeyName$ = "SOFTWARE\Lotus\" + LdString(SID_APR_PROD_NAME) + "\" _ + LdString(SID_APR_PROD_VER) + "\Components\" + FileName$ + "\" + Version$ rc& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, RegKeyName$) IF rc& <> ERROR_SUCCESS THEN RegErrorMsg SID_ERR_REG_GENERIC, gHLM$ + "\" + RegKeyName$,"","" END IF END IF 'We need to register appropriate Help GID files for uninstall SELECT CASE Key$ CASE "APRWIN32SHRCUSTSUPPHELPPRG" hlp$ = "cs1n97" & GetSymbolValue(SYM_INSTALL_LANGUAGE$) hlp2$ = "" CASE "APRWIN32SHRCHARTPRG" hlp$ = "lc1n21" & GetSymbolValue(SYM_INSTALL_LANGUAGE$) hlp2$ = "lc2n21" & GetSymbolValue(SYM_INSTALL_LANGUAGE$) CASE "APRWIN32SHRLOTUSSCRIPTPRG" hlp$ = "lsen31" & GetSymbolValue(SYM_INSTALL_LANGUAGE$) hlp2$ = "lsln31" & GetSymbolValue(SYM_INSTALL_LANGUAGE$) CASE "WIN32TEAMMAILSHRPRG" hlp$ = "tm1n11" & GetSymbolValue(SYM_INSTALL_LANGUAGE$) hlp2$ = "" CASE "APRWIN32SHRSTDPLAYERPRG" hlp$ = "mb1c11" & GetSymbolValue(SYM_INSTALL_LANGUAGE$) hlp2$ = "" CASE ELSE hlp$ = "" hlp2$ = "" END SELECT If hlp$ <> "" Then Lot_RegisterObject Key$, UNIN_CLASS_FILE$, GetSymbolValue(SYM_COMPONENTSDIR$) & hlp$ + ".gid" End If If hlp2$ <> "" Then Lot_RegisterObject Key$, UNIN_CLASS_FILE$, GetSymbolValue(SYM_COMPONENTSDIR$) & hlp2$ + ".gid" End If DebugMsg "Function End", "APR_RegisterSharedComponent" END SUB 'APR_RegisterSharedComponent '************************************************************************* '** FUNCTION APR_IsInstalled() '** '** Purpose: Determines if APR is already installed '** Author: Joe Ghazal '** Arguments: None '** Returns: INTEGER indicating APR is found or not. '************************************************************************* FUNCTION APR_IsInstalled() AS INTEGER DIM pos%, LotusIni$, Executable$, spacePos% DebugMsg "Function Start", "APR_IsInstalled" APR_IsInstalled = FALSE LotusIni$ = GetWindowsDir() + "lotus.ini" Executable$ = GetIniKeyString(LotusIni$, "Lotus Applications", "Approach") pos% = INSTR(UCASE$(Executable$), UCASE$(LdString(SID_APR_APREXE))) IF pos% <> 0 THEN spacepos% = INSTR(Executable$, " ") IF spacePos% THEN Executable$ = LEFT$(Executable$, spacePos%) END IF IF DoesFileExist(Executable$, femExists) THEN APR_IsInstalled = TRUE END IF END IF DebugMsg "Function End", "APR_IsInstalled" END FUNCTION 'APR_IsInstalled '************************************************************************* '** FUNCTION APR_GetInstalledVersion() '** '** Purpose: Determines which version, if any, of Approach is installed '** Author: Joe Ghazal '** Arguments: None '** Returns: STRING indicating which version was found '************************************************************************* FUNCTION APR_GetInstalledVersion() AS STRING DIM fname$, Version$,INIpath$ DebugMsg "Function Start", "APR_GetInstalledVersion" INIpath$ = GetAPRPathFromLotusINI() DebugMsg "Previous install found in: " + INIpath$, "APR_GetInstalledVersion" IF INIpath$ <> "" THEN fname$ = INIpath$ + LdString(SID_APR_APREXE) IF DoesFileExist(fname$,femExists) THEN IF Lot_IsDestVerNewerOrEqual(fname$,4,0,0,0) = 0 THEN APR_GetInstalledVersion$ = "APPROACH" ELSEIF Lot_IsDestVerNewerOrEqual(fname$,5,0,0,0) = 0 THEN APR_GetInstalledVersion$ = "APPROACH96" ELSE APR_GetInstalledVersion$ = "APPROACH97" END IF END IF END IF DebugMsg "Function End", "APR_GetInstalledVersion" END FUNCTION 'APR_GetInstalledVersion '**************************************************************************** '** FUNCTION RemNullInString(s as string) AS STRING '** '** Purpose: Removes null chars from string. '** Author: Joe Ghazal '** Arguments: s$ - string to have NULLS removed '** Returns: string without NULLS '**************************************************************************** FUNCTION RemNullInString(s as string) AS STRING DIM ln%, tmpS$, i%, c$ DebugMsg "Function Start", "RemNullInString" s$ = trim$(s$) ln% = LEN(s) FOR i% = 1 to ln% c$ = MID$(s$, i%, 1) IF IsNull(c$) = FALSE THEN 'print c$ tmpS$ = tmpS$ + c$ ELSE EXIT FOR END IF NEXT RemNullInString = TRIM$(tmpS$) 'print "tmpS$= " +tmpS$ DebugMsg "Function End", "RemNullInString" END FUNCTION 'RemNullInString '**************************************************************************** '** FUNCTION GetNotesFromPath() AS STRING '** Purpose: Search for Notes on the users PATH. IF we can't find "NOTES" '** search the "lotus.ini" file for the notes path. if we '** find "NOTES" then we continue the check and see if we '** can locate "notes.ini" if successful Notes is really '** is installed on this system so we set the variables '** listed below. '** '** OUT symbols: '** '** '** '** In Symbols: '** '** '** Author: Michael Clark, Thangv, JoeG '** Arguments: '** '** '** Returns: DRIVE:PATH\FILE '** '************************************************************************* FUNCTION GetNotesFromPath() AS STRING DIM sym$, SymName$, found%, dum%, buffer$, DestDir$, ProductDir$ DIM NotesProg$, NotesIni$, NotesData$ DebugMsg "Function Start", "GetNotesFromPath" GetNotesFromPath = "" NotesIni$ = "notes.ini" DebugMsg "Checking for Notes in Environment", "GetNotesFromPath" NotesProg$ = LCASE$(FindTargetOnEnvVar(W16_NOTES,"PATH")) IF NotesProg$ <> "" Then found% = INSTR(1,LCASE$(NotesProg$),W16_NOTES) DebugMsg "Found 16bit Notes, Already in PATH", "GetNotesFromPath" ' gWriteToAutoExec% = TRUE ELSE NotesProg$ = LCASE$(FindTargetOnEnvVar(W32_NOTES,"PATH")) IF NotesProg$ <> "" Then found% = INSTR(1,LCASE$(NotesProg$),W32_NOTES) DebugMsg "Found 32bit Notes, already in PATH", "GetNotesFromPath" END IF END IF IF found% = 0 Then '** As A last resort check to see if we can find the Notes executable '** directory in "Lotus.ini". ' PRINT "Can not Find notes so looking for notes in Lotus.ini" DebugMsg "Can't Find notes so looking for notes in Lotus.ini", "GetNotesFromPath" DestDir$ = GetWindowsDir() + "lotus.ini" NotesProg$ = LCASE$(GetIniKeyString(DestDir$,"Lotus Applications","NOTES")) found% = INSTR(1,LCASE$(NotesProg$),"notes.exe") END IF IF found% <> 0 Then '** Strip "NOTES.EXE" or W16 or W32 dll from string NotesProg$ = MID$(NotesProg$,1,(found%-1)) IF NotesProg$ <> "" THEN dum% = Lot_CleanPath(NotesProg$) END If DebugMsg "Found Notes in :" + NotesProg$, "GetNotesFromPath" If Lot_DoesFileExist(NotesProg$ + W16_NOTES) <> 0 Then DebugMsg "Found 16bit Notes, Setting Autoexec Flag", "GetNotesFromPath" gWriteToAutoexec% = TRUE End If END IF IF NotesProg$ <> "" Then '** Since we found Notes. Get the data dir from the notes.ini '** if we do not find notes.ini then the user has Notes but it's '** not configured properly. '** For NLM we need to save the path of the client Notes Dir. '** becaues the is the Notes setup program for NLM. ProductDir$ = FindTargetOnEnvVar(NotesIni$,"PATH") DebugMsg "Notes.ini path returned :"+ProductDir$, "GetNotesFromPath" IF ProductDir$ <> "" THEN NotesData$ = LCASE$(GetIniKeyString(ProductDir$,"NOTES","Directory")) IF NotesData$ = "" THEN NotesProg$ = "" END IF 'dum% = Lot_CleanPath(NotesData$) ELSE NotesProg$="" END IF END IF GetNotesFromPath = NotesProg$ DebugMsg "Function End", "GetNotesFromPath" End FUNCTION 'GetNotesFromPath '**************************************************************************** '** SUB RegAndIncrementCount(s$) '** '** Purpose: Increments the shared dll count in registry. '** This function has been superceeded in CIT 2.1 '** After build 2112_4, this is nol longer necessary '** Author: Joe Ghazal '** Arguments: s$ (shared filename) '** Returns: NONE '**************************************************************************** SUB RegAndIncrementCount(s$) DIM regStatus&, subkey$, keyval$, Descnum as variant, nsize&, lpBuf$, value$, Descnum2& DebugMsg "Function Start", "RegAndIncrementCount" subkey$ = "SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs" value$ = GetWindowsSysDir() + s$ nsize& = 4 IF Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, subkey$, value$, REG_DWORD, Descnum, nsize&) = 0 THEN Descnum2& = val(Descnum) + 1 ELSE Descnum2& = 1 END IF regStatus& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, subkey$, value$, REG_DWORD, Descnum2&, nsize&) DebugMsg "Function End", "RegAndIncrementCount" END SUB 'RegAndIncrementCount '**************************************************************************** '** SUB APRAddNotesToPathNT '** Purpose: Add notes to NT environment path '** '** Author: Joe Ghazal '** Arguments: NONE '** Returns: NONE '**************************************************************************** SUB APRAddNotesToPathNT DIM notespath$, buf$, regStatus&, keyval$, KEY_LOTUS$, Desc$, nsize% DebugMsg "Function Start", "APRAddNotesToPathNT" notespath$ = GetNotesPathFromRegistry() '** if Running on NT, Can't use Notes 3.3 or other 16 bit version, so don't look '** in path because all we'll find is the 16 bit version. --TR 4/22/96 ' IF notespath$ = "" THEN ' notespath$ = GetNotesFromPath() ' END IF %REM '** This code should be obsolete now that Robert Armes has modified the DBNOTES '** Powerkey to look at the App Paths registry key. TGGR 9/30/96 IF NOT IsNewShell() Then IF notespath$ <> "" THEN '** Modify User Environment Variables KEY_LOTUS = "ENVIRONMENT" keyval$ = "Path" buf$ = "" IF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, buf$, 256) <> 0 THEN '** Path key doesn't exist Desc$ = notespath$ nsize% = len(Desc$) + 1 ' regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, notespath$, len(notespath$)) regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize%) IF regStatus& = 0 THEN gNeedRestart% = TRUE END IF ELSE buf$ = TRIM$(buf$) IF buf$ <> "" THEN IF LEN(buf$) = 1 THEN buf$ = "" ELSE buf$ = LEFT$(buf$, len(buf$)-1) END IF Desc$ = buf$ + ";" + notespath$ ELSE Desc$ = notespath$ END IF IF InStr(buf$, notespath$) = 0 OR buf$ = "" THEN nsize% = len(Desc$) + 1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize%) IF regStatus& = 0 THEN gNeedRestart% = TRUE END IF END IF END IF '** Modify System Environment Variables KEY_LOTUS = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" keyval$ = "Path" buf$ = "" IF Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, KEY_LOTUS, "Path", REG_SZ, buf$, 256) <> 0 THEN '** Path key doesn't exist Desc$ = notespath$ nsize% = len(Desc$) + 1 ' regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, notespath$, len(notespath$)) regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize%) IF regStatus& = 0 THEN gNeedRestart% = TRUE END IF ELSE buf$ = TRIM$(buf$) IF buf$ <> "" THEN IF LEN(buf$) = 1 THEN buf$ = "" ELSE buf$ = LEFT$(buf$, len(buf$)-1) END IF Desc$ = buf$ + ";" + notespath$ ELSE Desc$ = notespath$ END IF IF InStr(buf$, notespath$) = 0 OR buf$ = "" THEN nsize% = len(Desc$) + 1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, KEY_LOTUS, keyval$, REG_SZ, Desc$, nsize%) IF regStatus& = 0 THEN gNeedRestart% = TRUE END IF END IF END IF END IF End If %ENDREM '** Just in case it's needed by the Notes Powerkey, we'll write the Notes Path '** to the App Paths key, too. This is all we do for NT 4.0 APRAddNotesToPathWin95 DebugMsg "Function End", "APRAddNotesToPathNT" END SUB 'APRAddNotesToPathNT '**************************************************************************** '** SUB APRAddNotesToPathWin95 '** Purpose: Add notes to WIN95 App Aath '** '** Author: Joe Ghazal '** Arguments: NONE '** Returns: NONE '**************************************************************************** SUB APRAddNotesToPathWin95 DIM notespath$, buf$, regStatus&, keyval$, KEY_LOTUS$, Desc$, nsize% DebugMsg "Function Start", "APRAddNotesToPathWin95" notespath$ = GetNotesPathFromRegistry() '** We use this function under NT and Win95. If Notes is not in the '** registry then it can't be a 32 bit version and therefore '** won't work under NT, so don't bother looking for it. IF notespath$ = "" AND WhatPlatform() <> PLATFORM_WINNT Then notespath$ = GetNotesFromPath() END IF IF notespath$ <> "" THEN notespath$ = Lot_TrimEndSlash(notespath$) buf$ = "" IF Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\" + LdString(SID_APR_APREXE), "Path", REG_SZ, buf$, 256) = 0 THEN buf$ = TRIM$(buf$) IF buf$ <> "" THEN buf$ = LEFT$(buf$, len(buf$)-1) KEY_LOTUS = "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\"+LdString(SID_APR_APREXE) keyval$ = "Path" Desc$ = notespath$ + ";" + buf$ nsize% = len(Desc$)+1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize%) END IF END IF END IF DebugMsg "Function End", "APRAddNotesToPathWin95" END SUB 'APRAddNotesToPathWin95 '************************************************************************* '** SUB APRFixupServerDirectory '** '** Purpose: Adjusts the source directory for server top level directories '** since CIT doesn't handle these correctly. '** This function has been superceeded in CIT 2.1 '** '** Author: TLB, modified by JoeG. '** Arguments: The directory symbol and the feature name '************************************************************************* SUB APRFixupServerDirectory(DirSym$, Feature$) DIM Src$, Dest$, chpt$, Sect$ DebugMsg "Function Start", "APRFixupServerDirectory" Src$ = Lot_GetDestDirValueFromInstallIni(DirSym$) + Lot_SetLanguageDirectory(GetSymbolValue(SYM_INSTALL_LANGUAGE$))+"\" Dest$ = GetSymbolValue(DirSym$) '+ Lot_SetLanguageDirectory(GetSymbolValue(SYM_INSTALL_LANGUAGE$))+"\" chpt$ = Lot_GetChapterFromKeyword(Feature$) Sect$ = Lot_GetChapterValStr(chpt$, F_NOTHING) AddSectionFilesToCopyList Sect$, Src$, Dest$ DebugMsg "Function End", "APRFixupServerDirectory" END SUB 'APRFixupServerDirectory '************************************************************************* '************************************************************************* '************************************************************************* '** '** Terry's Functions '** '************************************************************************* '************************************************************************* '************************************************************************* '************************************************************************* '** APRPrintDIRs '** '** Purpose: Prints DIR Symbols During install - Debug routine '** '** Author: Terry Ridgway '** Arguments: Text String Description of Calling Location '** Returns: None '************************************************************************* SUB APRPrintDIRs(FunctionName$) DIM boxType&, Message$, Title$ '** gDebug is a Global variable and is set in the Initialize sub. IF gDebugDIRs% = FALSE THEN EXIT SUB boxType = 0 + 64 'OK Button + Exclamation Pt Title$ = "Approach Install Debug Output: " + FunctionName$ Message$ = _ "APRDIR: " + GetSymbolValue ("APRDIR") + Chr(13) +_ "APRLANGDIR: " + GetSymbolValue ("APRLANGDIR") + Chr(13) + _ Chr(13) + _ "APRWORKDIR: " + GetSymbolValue ("APRWORKDIR") + Chr(13) + _ Chr(13) + _ "APRMASTERSDIR: " + GetSymbolValue ("APRMASTERSDIR") + Chr(13) + _ "APRMASTERSLANGDIR: " + GetSymbolValue ("APRMASTERSLANGDIR") + Chr(13) + _ Chr(13) + _ "APRSAMPLESDIR: " + GetSymbolValue ("APRSAMPLESDIR") + Chr(13) + _ "APRSAMPLESLANGDIR: " + GetSymbolValue ("APRSAMPLESLANGDIR") + Chr(13) + _ Chr(13) + _ "APROBSDIR1: " + GetSymbolValue ("APROBSDIR1") + Chr(13) + _ "APROBSDIR2: " + GetSymbolValue ("APROBSDIR2") + Chr(13) + _ Chr(13) + _ "APRDIRNAME: " + GetSymbolValue ("APRDIRNAME") + Chr(13) + _ "APRLANGDIRNAME: " + GetSymbolValue ("APRLANGDIRNAME") + Chr(13) + _ Chr(13) + _ "APRICONSDIR: " + GetSymbolValue("APRICONSDIR") + Chr(13) + _ "APRICONLANGDIR: " + GetSymbolValue("APRICONLANGDIR") + Chr(13) + _ "APRICONSCRIPTLANGDIR: " + GetSymbolValue("APRICONSCRIPTLANGDIR") + Chr(13) + _ "APRICONMAINBARLANGDIR: " + GetSymbolValue("APRICONMAINBARLANGDIR") + Chr(13) + _ Chr(13) + _ "APRQMFDIR: " + GetSymbolValue("APRQMFDIR") + Chr(13) + _ Chr(13) + _ "WINDIR: " + GetSymbolValue("WINDIR") + Chr(13) + _ "WINSYSDIR: " + GetSymbolValue("WINSYSDIR") + Chr(13) + _ "LOTUSUSERDIR: " + GetSymbolValue("LOTUSUSERDIR") + Chr(13) + _ "COMPONENTSDIR: " + GetSymbolValue("COMPONENTSDIR") MessageBox Message$, boxType&, Title$ END SUB 'APRPrintDIRs '************************************************************************* '** GetPreviousMastersDir() as STRING '** '** Purpose: Returns the previous SmartMasters directory for use with the '** Backup SMasters function. '** '** Author: Terry Ridgway '** Arguments: None '** Returns: String Value for the previously installed Approach SmartMasters '************************************************************************* FUNCTION GetPreviousMastersDir(defaultlang$) AS STRING DIM KEY_LOTUS$, keyval$ DIM gbuf$, nsize&, ret& DebugMsg "Function Start", "GetPreviousMastersDir" IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ OR _ GetSymbolValue(SYM_NETWORK$) = gNODE$ _ THEN ret& = 0 nsize& = 256 KEY_LOTUS = "SOFTWARE\Lotus\Approach\" + LdString(SID_APR_PROD_VER) + "\Paths\SMasters" if defaultlang$ = "" then keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) else keyval$ = defaultlang$ end if '** Check for the Approach 97 Smasters DIR IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** if this is an automated install, get the directory from the respnse file gbuf$ = TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRMASTERSDIR")) ret& = 0 ELSE IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) ELSE '** Can not find Approach 97, look for Approach 96 key KEY_LOTUS = "SOFTWARE\Lotus\Approach\4.0\SMastersDir" IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) END IF END IF END IF DebugMsg "PreviousSMastersDir: " + gbuf$, "GetPreviousMastersDir" if ret& = 0 then GetPreviousMastersDir = gbuf$ else GetPreviousMastersDir = "" end if End if DebugMsg "Function End", "GetPreviousMastersDir" END FUNCTION 'GetPreviousMastersDir '************************************************************************* '** GetPreviousWorkDir '** '** Purpose: Returns the previous Working directory for use with setting '** the DIR for a new install '** '** Author: Terry Ridgway '** Arguments: None '** Returns: String Value for the previously installed Approach Working DIR '************************************************************************* FUNCTION GetPreviousWorkDir(defaultlang$, prodno%) AS STRING DIM KEY_LOTUS$, keyval$ DIM gbuf$, nsize&, ret& DebugMsg "Function Start", "GetPreviousWorkDir" '** Don't default to the previous directory if it's a Language install If GetListItem(SYM_INSTALLKINDS$, prodno%) = gLANGUAGEINSTALL$ Then GetPreviousWorkDir = "" EXIT FUNCTION End If IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ OR _ GetSymbolValue(SYM_NETWORK$) = gNODE$ _ THEN ret& = 0 nsize& = 256 KEY_LOTUS = "SOFTWARE\Lotus\Approach\" + LdString(SID_APR_PROD_VER) + "\Paths\Work" if defaultlang$ = "" then keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) else keyval$ = defaultlang$ end if '** Check for the Approach 97 Working DIR IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** if this is an automated install, get the directory from the respnse file gbuf$ = TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRWORKDIR")) ret& = 0 ELSE IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) ELSE '** Can not find Approach 97, look for Approach 96 key KEY_LOTUS = "SOFTWARE\Lotus\Approach\4.0\WorkingDir" IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) END IF END IF END IF DebugMsg "PreviousWorkDir: " + gbuf$, "GetPreviousWorkDir" if ret& = 0 then GetPreviousWorkDir = gbuf$ else GetPreviousWorkDir = " " end if End If DebugMsg "Function End", "GetPreviousWorkDir" END FUNCTION 'GetPreviousWorkDir '************************************************************************* '** GetPreviousSamplesDir '** '** Purpose: Returns the previous Samples directory for use with setting '** the DIR for a new install '** '** Author: Terry Ridgway '** Arguments: None '** Returns: String Value for the previously installed Approach Samples DIR '************************************************************************* FUNCTION GetPreviousSamplesDir(defaultlang$) AS STRING DIM KEY_LOTUS$, keyval$ DIM gbuf$, nsize&, ret& DebugMsg "Function Start", "GetPreviousSamplesDir" IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ OR _ GetSymbolValue(SYM_NETWORK$) = gNODE$ _ THEN ret& = 0 nsize& = 256 KEY_LOTUS = "SOFTWARE\Lotus\Approach\" + LdString(SID_APR_PROD_VER) + "\Paths\Samples" DebugMsg "Samples Registry Key: " + KEY_LOTUS$, "GetPreviousSamplesDir" if defaultlang$ = "" then keyval$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$) else keyval$ = defaultlang$ end if '** Check for the Approach 97 Samples DIR IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** if this is an automated install, get the directory from the respnse file gbuf$ = TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRSAMPLESDIR")) ret& = 0 ELSE IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) ELSE '** Can not find Approach 97, look for Approach 96 key KEY_LOTUS = "SOFTWARE\Lotus\Approach\4.0\SamplesDir" IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) END IF END IF End If DebugMsg "PreviousSampleDir: " + gbuf$, "GetPreviousSamplesDir" if ret& = 0 then GetPreviousSamplesDir = gbuf$ else GetPreviousSamplesDir = "" end if End If DebugMsg "Function End", "GetPreviousSamplesDir" END FUNCTION 'GetPreviousSamplesDir '************************************************************************* '** GetPreviousLang '** '** Purpose: Returns the previously installed language for use with setting '** the DIRs for a new install '** '** Author: Terry Ridgway '** Arguments: None '** Returns: String Value for the previously installed Approach Language '************************************************************************* FUNCTION GetPreviousLang() AS STRING DIM KEY_LOTUS$, keyval$ DIM gbuf$, nsize&, ret& DebugMsg "Function Start", "GetPreviousLang" IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ OR _ GetSymbolValue(SYM_NETWORK$) = gNODE$ _ THEN ret& = 0 nsize& = 256 KEY_LOTUS = "SOFTWARE\Lotus\Approach\" + LdString(SID_APR_PROD_VER) + "\Languages" keyval$ = "Default" '** Check for the Approach 97 Languages IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) ELSE '** Can not find Approach 97, look for Approach 96 key KEY_LOTUS = "SOFTWARE\Lotus\Approach\4.0\Languages" IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) END IF END IF DebugMsg "PreviousLanguage: " + gbuf$, "GetPreviousLang" if ret& = 0 then GetPreviousLang = gbuf$ else GetPreviousLang = "" end if End If DebugMsg "Function End", "GetPreviousLang" END FUNCTION 'GetPreviousLang '************************************************************************* '** GetPreviousQMFDir '** '** Purpose: Returns the previous QMF directory for use with setting '** the DIR for a new install '** '** Author: Terry Ridgway '** Arguments: None '** Returns: String Value for the previously installed QMF Initialization '** file DIR '************************************************************************* FUNCTION GetPreviousQMFDir(defaultlang$) AS STRING DIM KEY_LOTUS$, keyval$ DIM gbuf$, nsize&, ret& DebugMsg "Function Start", "GetPreviousQMFDir" IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ OR _ GetSymbolValue(SYM_NETWORK$) = gNODE$ _ THEN ret& = 0 nsize& = 256 KEY_LOTUS = "SOFTWARE\Lotus\Approach\" + LdString(SID_APR_PROD_VER) + "\QMF" keyval$ = "DssPath" '** Check for the Approach 97 Samples DIR IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN '** if this is an automated install, get the directory from the respnse file gbuf$ = TRIM$(Lot_GetKeyValFromResponseFile("APR", "APRQMFDIR")) ret& = 0 ELSE IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, KEY_LOTUS$) = 1 THEN ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) ' '** This wasn't part of a 96 install. I'll leave it here so we can test 98/97 later. ' ELSE ' 'Can not find Approach 97, look for Approach 96 key ' KEY_LOTUS = "SOFTWARE\Lotus\Approach\4.0\SamplesDir" ' IF Lot_DoesRegKeyExistEx(HKEY_CURRENT_USER, KEY_LOTUS$) = 1 THEN ' ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, KEY_LOTUS$, keyval$, 0, gbuf$, nsize&) ' END IF END IF End If if ret& = 0 then GetPreviousQMFDir = gbuf$ else GetPreviousQMFDir = "" end if End If DebugMsg "Function End", "GetPreviousQMFDir" END FUNCTION 'GetPreviousQMFDir '**************************************************************************** '** SUB APRAddQMFToEnvironmentNT '** Purpose: Add QMF Variable to NT environment '** '** Author: Terry Ridgway '** Arguments: NONE '** Returns: NONE '**************************************************************************** SUB APRAddQMFToEnvironmentNT(prodno%, network$) DIM dssdir$, dsspath$, buf$, regStatus&, keyval$, KEY_LOTUS$, Desc$, nsize% DebugMsg "Function Start", "APRAddQMFToEnvironmentNT" If network$ = gSTANDARD$ THEN dssdir$ = Lot_WhereIsFeature(prodno%, "APRCORE", LdString(SID_APR_APREXE)) ELSEIF network$ = gNODE$ THEN dssdir$ = Lot_GetDestDirValueFromInstallIni("APRDIR") END IF dssdir$ = Lot_TrimEndSlash (dssdir$) dsspath$ = GetSymbolValue("APRWORKDIR") DebugMsg "DSSDIR: " + dssdir$ + chr(13) + "DSSPATH: " + dsspath$, "APRAddQMFToEnvironmentNT" IF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, "ENVIRONMENT", "DSSDIR", REG_SZ, buf$, 256) <> 0 THEN '** Path key doesn't exist Lot_CreateRegKeyValueEx HKEY_CURRENT_USER, "ENVIRONMENT", "DSSDIR", REG_SZ, dssdir$, len(dssdir$) KEY_LOTUS = "ENVIRONMENT" keyval$ = "DSSDIR" Desc$ = dssdir$ nsize% = len(Desc$) + 1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize%) IF regStatus& = 0 THEN gNeedRestart% = TRUE END IF END IF IF Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, "ENVIRONMENT", "DSSPATH", REG_SZ, buf$, 256) <> 0 THEN '** Path key doesn't exist Lot_CreateRegKeyValueEx HKEY_CURRENT_USER, "ENVIRONMENT", "DSSPATH", REG_SZ, dsspath$, len(dsspath$) KEY_LOTUS = "ENVIRONMENT" keyval$ = "DSSPATH" Desc$ = dsspath$ nsize% = len(Desc$) + 1 regStatus& = Lot_CreateRegKeyValueEx (HKEY_CURRENT_USER,KEY_LOTUS, keyval$, REG_SZ,Desc$,nsize%) IF regStatus& = 0 THEN gNeedRestart% = TRUE END IF END IF DebugMsg "Function End", "APRAddQMFToEnvironmentNT" END SUB 'APRAddQMFToEnvironmentNT '************************************************************************* '** SUB APRDoBackupSmartMasters() '** '** Purpose: Does the work of backing up currently installed masters '** '** Author: Troy Bartlett - Stolen from LWP.LSS '** Arguments: NONE '** Returns: NONE '************************************************************************* SUB APRDoBackupSmartMasters() DIM PrevMasters$, NewMasters$, idx%, Master$, OrigMaster$, BackupMaster$ DIM PrevMasterImg$, NewMasterImg$ DebugMsg "Entering Backup SmartMasters Processing", "APRDoBackupSmartMasters" PrevMasters$ = GetPreviousMastersDir(GetPreviousLang()) PrevMasters$ = TRIM(PrevMasters$) PrevMasters$ = LEFT$(PrevMasters$, LEN(PrevMasters$)-1) NewMasters$ = GetSymbolValue("APRBACKUPDIR") PrevMasterImg$ = PrevMasters$ + "images" NewMasterImg$ = NewMasters$ + "images" DebugMsg "Previous Masters: " + PrevMasters$, "APRDoBackupSmartMasters" DebugMsg "New Masters: " + NewMasters$, "APRDoBackupSmartMasters" IF DoesDirExist(NewMasters$) THEN FOR idx% = 1 TO 99 IF DoesDirExist(NewMasters$ + LTRIM$(STR$(idx%))) = FALSE THEN NewMasters$ = NewMasters$ + LTRIM$(STR$(idx%)) + "\" EXIT FOR END IF NEXT END IF IF DoesDirExist(PrevMasters$) AND _ NOT DoesDirExist(NewMasters$) _ THEN DebugMsg "Creating Directory: " + NewMasters$, "APRDoBackupSmartMasters" CreateDir NewMasters$, cmoNone Master$ = DIR$(PrevMasters$ + "*.*") WHILE Master$ <> "" OrigMaster$ = PrevMasters$ + Master$ BackupMaster$ = NewMasters$ + Master$ DebugMsg "Previous Master file: " + OrigMaster$, "APRDoBackupSmartMasters" DebugMsg "New Master file: " + BackupMaster$, "APRDoBackupSmartMasters" '** Per Paul: Just copy, don't remove original CopyFile OrigMaster$, BackupMaster$, cmoNone, 0 Master$ = DIR$() WEND '** This section will be needed for Suite 98 over Suite 97 'CreateDir NewMasterImg$, cmoNone 'Master$ = DIR$(PrevMasterImg$ + "*.*") 'WHILE Master$ <> "" ' OrigMaster$ = PrevMasterImg$ + Master$ ' BackupMaster$ = NewMasterImg$ + Master$ ' ' DebugMsg "Previous Master file: " + OrigMaster$, "APRDoBackupSmartMasters" ' DebugMsg "New Master file: " + BackupMaster$, "APRDoBackupSmartMasters" ' ' ' Per Paul: Just copy, don't remove original ' CopyFile OrigMaster$, BackupMaster$, cmoNone, 0 ' Master$ = DIR$() 'WEND END IF DebugMsg "Function End", "APRDoBackupSmartMasters" END SUB 'APRDoBackupSmartMasters '************************************************************************* '** DebugMsg(msg$, title$) '** '** Purpose: Prints DIR Symbols During install - Debug routine '** '** Author: Terry Ridgway '** Arguments: msg$ - Message to be displayed '** location$ - Text String Description of Calling Location '** Returns: None '************************************************************************* SUB DebugMsg(msg$, location$) DIM boxType&, Message$, Title$ '** gDebug is a Global variable and is set in the Initialize sub. IF gDebugMsg% = FALSE THEN EXIT SUB boxType = 0 + 64 'OK Button + Exclamation Pt Title$ = "Approach Install Debug Output: " + location$ MessageBox msg$, boxType&, Title$ END SUB 'DebugMsg '************************************************************************* '** APRRemoveProdDirs() '** '** Purpose: Remove the Approach 3.0x directories if the option to remove '** the product was selected by the user. '** '** Author: Terry Ridgway '** Arguments: None '** Returns: None '************************************************************************* SUB APRRemoveProdDirs() DIM Apr3Dir$, DirArray$(1 to 25), ArraySize%, n% DebugMsg "Function Start", "APRRemoveProdDirs" Apr3Dir$ = GetSymbolValue("APROBSDIR1") ArraySize% = 25 '** Initialize the Directory Array with all the directories we need to remove DirArray$(1) = Apr3Dir$ + "tutorial\\icons\\workico" DirArray$(2) = Apr3Dir$ + "tutorial\\icons\\previco" DirArray$(3) = Apr3Dir$ + "tutorial\\icons\\reptico" DirArray$(4) = Apr3Dir$ + "tutorial\\icons\\oldicons" DirArray$(5) = Apr3Dir$ + "tutorial\\icons\\findico" DirArray$(6) = Apr3Dir$ + "tutorial\\icons\\desgnico" DirArray$(7) = Apr3Dir$ + "tutorial\\icons\\crossico" DirArray$(8) = Apr3Dir$ + "tutorial\\icons\\browsico" DirArray$(9) = Apr3Dir$ + "tutorial\\icons" DirArray$(10) = Apr3Dir$ + "tutorial\\files" DirArray$(11) = Apr3Dir$ + "tutorial" DirArray$(12) = Apr3Dir$ + "samples\\prospect" DirArray$(13) = Apr3Dir$ + "samples\\projmgnt" DirArray$(14) = Apr3Dir$ + "samples\\manufact" DirArray$(15) = Apr3Dir$ + "samples" DirArray$(16) = Apr3Dir$ + "icons\\workico" DirArray$(17) = Apr3Dir$ + "icons\\previco" DirArray$(18) = Apr3Dir$ + "icons\\reptico" DirArray$(19) = Apr3Dir$ + "icons\\oldicons" DirArray$(20) = Apr3Dir$ + "icons\\findico" DirArray$(21) = Apr3Dir$ + "icons\\desgnico" DirArray$(22) = Apr3Dir$ + "icons\\crossico" DirArray$(23) = Apr3Dir$ + "icons\\browsico" DirArray$(24) = Apr3Dir$ + "icons" DirArray$(25) = Apr3Dir$ '** Remove the directories For n = 1 to ArraySize% RemoveDir DirArray$(n), cmoNone Next n DebugMsg "Function End", "APRRemoveProdDirs" END SUB 'APRRemoveProdDirs '********************************************************************** '** SUB APRWriteToAUTOEXEC '** '** This function writes the Notes 3.x path to the Autoexec.BAT file '** used during Win95 installs because the App Paths section of the '** registry is not currently being used by dbnotes.dll and it needs '** this in order to find it's DLLs. '** '** '*********************************************************************** SUB APRWriteToAUTOEXEC DIM fauto%, ftemp%, text$, dspc%, inpath%, notespath$, pathadded% DIM ChangeMsg$, MsgTitle$, PathWrite$, Created%, added% DebugMsg "Function Start", "APRWriteToAUTOEXEC" if WhatPlatform() = PLATFORM_WINNT Then '** We should only be calling this function from Win95 installs '** which have 16 bit Lotus Notes installed. EXIT SUB End If notespath$ = GetNotesFromPath() PathWrite$ = "Set Path=" + notespath$ + ";%PATH%" ChangeMsg$ = LdString(SID_APR_AUTOEXEC_CHANGE) MsgTitle$ = LdString(SID_APR_PROD_NAME) + " Install" inpath% = FALSE added% = FALSE Created% = FALSE '** If there is no Autoexec file we need to create one. If Lot_DoesFileExist("c:\autoexec.bat") = 0 Then fauto% = Freefile() Open "c:\autoexec.bat" For Output As fauto% Print #fauto%, PathWrite$ Created% = TRUE Close #fauto% gNeedRestart% = True End If '** Otherwise we need to add the Notes Path to the PATH Variable of the existing file. If Created% = FALSE Then '** Backup the Autoexec.bat file 'Filecopy "c:\autoexec.bat", "c:\autoexec.xxx" '** Everything seems to be working here now, so we don't need this first backup. '** Open the autoexec.bat file fauto% = Freefile() Open "c:\autoexec.bat" For Input As fauto% '** Open a temp file for copying the adjusted contents of autoexec ftemp% = Freefile() Open "c:\temp0000.bat" For Output As ftemp% While (Not Eof(fauto%)) Line Input #fauto%, text$ text$ = Ucase$(text$) '** Check for PATH line in autoexec If Instr(text$, "PATH") >0 Then '** First Check to see if we need to do the addition. If(Instr(text$, notespath$)) > 0 Then '** Make sure the line isn't REM'd out. If(Instr(text$, "REM")) = 0 Then inpath% = True End If End If End If '** Write the lines out to the temp file. Print #ftemp%, text$ Wend '** If users didn't have Notes in any PATH lines add to the end of the file. If inpath% <> True Then Print #ftemp%, PathWrite$ added% = TRUE End If '** Close our open files Close #ftemp% Close #fauto% End If '** if we had to make a path change, backup the current file and rename our temp '** otherwise delete the temp. '** Tell the user if we made a change If added% = TRUE Then Filecopy "c:\autoexec.bat", "c:\autoexec.lts" Filecopy "c:\temp0000.bat", "c:\autoexec.bat" Kill "c:\temp0000.bat" Messagebox ChangeMsg$, 0 + 48, MsgTitle$ gNeedRestart% = True Else If Lot_DoesFileExist("c:\temp0000.bat") <> 0 Then Kill "c:\temp0000.bat" End If End If DebugMsg "Function End", "APRWriteToAUTOEXEC" END SUB 'APRWriteToAUTOEXEC '************************************************************************* '** Function APRIsAdmin() '** '** Purpose: To Determine if a user has administrator rights on NT '** '** '** Author: Terry Ridgway - Adapted from Logo Requirements Handbook '** Arguments: None '** Returns: True if User has Admin Rights, False if not. '************************************************************************* FUNCTION APRIsAdmin() AS INTEGER DIM hSC& DebugMsg "Starting User Rights Check", "APRIsAdmin" '** Try an Admin Privilege API. If it works return TRUE '** else return FALSE hSC = OpenSCManager("", "ServicesActive", GENERIC_READ + GENERIC_WRITE + GENERIC_EXECUTE) If hSC <> 0 Then CloseServiceHandle(hSC) APRIsAdmin = TRUE DebugMsg "User Has Admin Rights", "APRIsAdmin" Else APRIsAdmin = FALSE DebugMsg "User Does NOT Have Admin Rights", "APRIsAdmin" End If DebugMsg "Finished User Rights Check", "APRIsAdmin" END FUNCTION 'APRIsAdmin '************************************************************************* '** Function APRSMInst() '** '** Purpose: To Determine if a user has selected to install any SmartMasters '** '** '** Author: Terry Ridgway '** Arguments: None '** Returns: True if User is installing SmartMasters, False if not. '************************************************************************* FUNCTION APRSMInst() AS Integer Dim SMInst% DebugMsg "Function Start", "APRSMInst" SMInst% = 0 '** if the user did not select any SmartMasters, then they '** should not get the option to change this directory SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER1LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER2LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER3LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER5LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER6LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER7LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER8LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER9LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER10LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER11LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER12LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER13LANGEN")) SMInst% = SMInst% OR CINT(FIsKeywordinCopyList("APRSMARTMASTER14LANGEN")) APRSMInst = SMInst% DebugMsg "Function End", "APRSMInst" END FUNCTION 'APRSMInst() '************************************************************************* '** SUB APR_TurnOnDummyScriptFiles() '** '** Purpose: Add Dummy Script help files to the copy list if not '** installing the real ones. '** Author: Terry Ridgway '** Arguments: none '** '** Returns: None '************************************************************************* SUB APR_TurnOnDummyScriptFiles() DIM aprdirpath$, chptname$, notused%, aprchpt$ DebugMsg "Function Start", "APR_TurnOnDummyScriptFiles" aprdirpath$ = GetSymbolValue("APRDIR") chptname$ = Lot_GetChapterFromKeyword("APRDUMMYSCRIPTHELP") aprchpt$ = Lot_GetChapterFromKeyword("APRCORE") If (Lot_GetChapterValInt(aprchpt$, F_INOROUT) = 1) Then If (DoesFileExist(aprdirpath$ + "lasn50" + GetSymbolValue(SYM_INSTALL_LANGUAGE$) + ".hlp", femExists) = FALSE) Then DebugMsg "Approach Scripting Help File doesn't exist. Adding to CopyList", "APR_TurnOnDummyScriptFiles" notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) Else DebugMsg "Approach Scripting Help File exists. NOT Added to CopyList", "APR_TurnOnDummyScriptFiles" notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 0) End if End If DebugMsg "Function End", "APR_TurnOnDummyScriptFiles" END SUB 'APR_TurnOnDummyScriptFiles '************************************************************************* '** SUB APR_RenameDummyScriptFiles() '** '** Purpose: Rename Dummy script help files after copying them '** Author: Terry Ridgway '** Arguments: None '** '** Returns: None '************************************************************************* SUB APR_RenameDummyScriptFiles() DIM aprdirpath$, compnentdirpath$, aprschlp$, lslnhlp$, lsenhlp$ DebugMsg "Function Start", "APR_RenameDummyScriptFiles" aprdirpath$ = GetSymbolValue("APRDIR") compnentdirpath$ = GetSymbolValue(SYM_COMPONENTSDIR$) aprschlp$ = aprdirpath$ + "lasn50" + GetSymbolValue(SYM_INSTALL_LANGUAGE$) lslnhlp$ = aprdirpath$ + "lsln31" + GetSymbolValue(SYM_INSTALL_LANGUAGE$) lsenhlp$ = aprdirpath$ + "lsen31" + GetSymbolValue(SYM_INSTALL_LANGUAGE$) If (DoesFileExist(aprschlp$ + ".hlp", femExists) = FALSE) Then FileCopy aprdirpath$ + "nolas.hlp", aprschlp$ + ".hlp" FileCopy aprdirpath$ + "nolas.cnt", aprschlp$ + ".cnt" Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, aprschlp$ + ".hlp" Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, aprschlp$ + ".cnt" Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, aprschlp$ + ".gid" End if If GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _ minisuite123% <> TRUE _ Then If (DoesFileExist(lslnhlp$ + ".hlp", femExists) = FALSE) Then FileCopy aprdirpath$ + "nolas.hlp", lslnhlp$ + ".hlp" 'APRChangeTheDate lslnhlp$ + ".hlp" Lot_RegisterObject "APRWIN32SHRLOTUSSCRIPTPRG", UNIN_CLASS_FILE$, lslnhlp$ + ".hlp" Lot_RegisterObject "APRWIN32SHRLOTUSSCRIPTPRG", UNIN_CLASS_FILE$, lslnhlp$ + ".gid" End if If (DoesFileExist(lsenhlp$ + ".hlp", femExists) = FALSE) Then FileCopy aprdirpath$ + "nolas.hlp", lsenhlp$ + ".hlp" 'APRChangeTheDate lsenhlp$ + ".hlp" Lot_RegisterObject "APRWIN32SHRLOTUSSCRIPTPRG", UNIN_CLASS_FILE$, lsenhlp$ + ".hlp" Lot_RegisterObject "APRWIN32SHRLOTUSSCRIPTPRG", UNIN_CLASS_FILE$, lsenhlp$ + ".gid" End if End if RemoveFile aprdirpath$ + "nolas.hlp", cmoForce RemoveFile aprdirpath$ + "nolas.cnt", cmoForce DebugMsg "Function End", "APR_RenameDummyScriptFiles" END SUB 'APR_RenameDummyScriptFiles '************************************************************************* '** FUNCTION APRGetSystemCountry() '** '** Purpose: Retrieve the Country setting from Windows. '** Author: Terry Ridgway '** Arguments: None '** '** Returns: UPPER CASE String Value of Country Name. '************************************************************************* FUNCTION APRGetSystemCountry() As String Dim ret As Long Dim buf As String * 255 Dim sSysCountry As String Dim llen As Long DebugMsg "Function Start", "APRGetSystemCountry" llen = 255 ret = GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGCOUNTRY, buf$, llen) 'if the function fails it returns zero, otherwise ret contains the number 'of characters copied to the buffer. If ret = 0 then sSysCountry$ = "Unknown" Else sSysCountry$ = Trim$(buf$) sSysCountry$ = Left$(sSysCountry$, ret - 1) End If APRGetSystemCountry = UCase$(sSysCountry$) DebugMsg "System Country Setting:" & UCase$(sSysCountry$), "APRGetSystemCountry" DebugMsg "Function End", "APRGetSystemCountry" END FUNCTION 'APRGetSystemCountry '************************************************************************* '** SUB APRChangeTheDate(fn as String) '** '** Purpose: Change the date stamp on the specified file. '** The idea is to retro date our dummy scripting help files '** so that another product will overwrite them with real ones '** which may have older dates than our dummies. '** '** Author: Terry Ridgway '** Arguments: fully qualified path and filename to be changed. '** '** Returns: None '************************************************************************* SUB APRChangeTheDate(fnpath as String) DIM windir$, res%, Platform% DIM progmanexe$ windir$ = GetWindowsDir() '** Does the specified file exist? If DoesFileExist (fnpath$, femExists) = 1 Then Platform% = WhatPlatform() '** Determine the operating system and location of progman.exe If Platform% = PLATFORM_WINNT Then progmanexe$ = windir$ + "SYSTEM32\" + "progman.exe" Else progmanexe$ = windir$ + "progman.exe" End If '** Change the date/time stamp on the specified file to match progman.exe ' res% = filedate ( progmanexe$, fnpath$ ) End If END SUB '************************************************************************* '** SUB APRTurnOnODBCSection() '** '** Purpose: Add ODBC_SHRCNT to the copy list when installing ODBC. '** as it's possible to turn on ODBC without this required section '** Author: Terry Ridgway '** Arguments: none '** '** Returns: None '************************************************************************* SUB APRTurnOnODBCSection(network as String) DIM chptname$, shrchptname$, notused%, orcchptname$, orschptname$ DIM ssschptname$, sscchptname$, ss6chptname$, sybchptname$, in5chptname$, in7chptname$ DebugMsg "Function Start", "APRTurnOnODBCSection" chptname$ = Lot_GetChapterFromKeyword("APRODBC") shrchptname$ = Lot_GetChapterFromKeyword("APRODBC") orcchptname$ = Lot_GetChapterFromKeyword("APRORACLECOMMON") orschptname$ = Lot_GetChapterFromKeyword("APRORACLE") ssschptname$ = Lot_GetChapterFromKeyword("APRSQLSERVER4") sscchptname$ = Lot_GetChapterFromKeyword("APRSQLSERVER4COMMON") ss6chptname$ = Lot_GetChapterFromKeyword("APRSQLSERVER6") sybchptname$ = Lot_GetChapterFromKeyword("APRSYBASE") in5chptname$ = Lot_GetChapterFromKeyword("APRINFORMIX5") in7chptname$ = Lot_GetChapterFromKeyword("APRINFORMIX7") If (Lot_GetChapterValInt(chptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(orcchptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(orschptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(ssschptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(sscchptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(ss6chptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(sybchptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(in5chptname$, F_INOROUT) = 1) OR _ (Lot_GetChapterValInt(in7chptname$, F_INOROUT) = 1) _ Then DebugMsg "Approach Shared ODBC Files Added to CopyList", "APRTurnOnODBCSection" notused% = Lot_SetChapterFilesInCopyListInOrOut (shrchptname$, 1) 'During a Node install it is possible that individual drivers can be selected 'from the Node Features dialog without the ODBC drives. This line is added 'to take care of that problem. If network$ = gNODE$ Then notused% = Lot_SetChapterFilesInCopyListInOrOut (chptname$, 1) End If Else DebugMsg "Approach Shared ODBC Files NOT Added to CopyList", "APRTurnOnODBCSection" '** don't turn them off, there's really no reason they'd be on when not wanted. 'notused% = Lot_SetChapterFilesInCopyListInOrOut (shrchptname$, 0) End if DebugMsg "Function End", "APRTurnOnODBCSection" END SUB 'APRTurnOnODBCSection '************************************************************************* '** SUB APRHideGalleryFiles() '** '** Purpose: Rename files so that they are hidden from the user. '** This gives us the trial period for the Evaluation CD '** Author: Terry Ridgway - stolen from SUIT.LSS '** Arguments: none '** '** Returns: None '************************************************************************* SUB APRHideGalleryFiles() 'TimeBomb specific renaming and file dateing calls DIM windir$, progmanpath$, updateprogman% DIM progvermajor, progverminor DIM versionstring$, newerver DIM progmantime$, progyear, progyearstr$ DIM progmonth, progmonthstr$ DIM progday, progdaystr$ DIM proghour, proghourstr$ DIM progminute, progminutestr$ DIM progsecond, progsecondstr$ DIM fstampdate$, fstamptime$, res%, Platform% DIM numb%, progmanexe$ updateprogman% = 1 windir$ = GetWindowsDir() progmanpath$ = windir$ + "Progman.dll" 'the Approach TimeBomb has never been installed If DoesFileExist (progmanpath$, femExists) = 1 Then versionstring$ = GetVersionOfFile(progmanpath$) progvermajor = GetVersionNthField(versionstring$,3) progvermajor = int(progvermajor) progverminor = GetVersionNthField(versionstring$,4) progverminor = int(progverminor) 'update the Progman.dll only if it is an earlier version If progvermajor > 5 Then updateprogman% = 0 ElseIf progvermajor = 5 AND progverminor >= 0 Then updateprogman% = 0 End If End If ' do the actual updating and time stamping If updateprogman% = 1 Then FileCopy windir$ + "ltsmkt03.dll", progmanpath$ Platform% = WhatPlatform() If Platform% = PLATFORM_WINNT Then progmanexe$ = windir$ + "SYSTEM32\" + "progman.exe" Else progmanexe$ = windir$ + "progman.exe" End If res% = filedate ( progmanexe$, progmanpath$ ) end if RemoveFile windir$ + "ltsmkt03.dll", cmoForce END SUB 'APRHideGalleryFiles '************************************************************************* '** FUNCTION RegisterTypeLib( typelibname as string, helpdir as string ) as long '** '** Purpose: Completes the TypeLib registration that is missed by CIT '** '** Author: '** Arguments: TypeLibrary Name and Help Directory location '** '** Returns: Return from the WINAPI registration functions '************************************************************************* FUNCTION APRRegisterTypeLib( typelibname as string, helpdir as string ) as long Dim typlib As Long Dim hresult As Long typlib = 0 hresult = LoadTypeLibrary( typelibname, typlib) If hresult = 0 Then hresult = RegisterTypeLibrary( typlib, typelibname, helpdir) End If APRRegisterTypeLib = hresult End FUNCTION '************************************************************************* '** Sub WriteDialSettingstoApproachINI() '** '** Purpose: Writes the missing Dialer settings to the Approach.ini file '** If the entry already exists it is not written. '** '** Author: Terry Ridgway '** Arguments: None '** '** Returns: None '************************************************************************* SUB WriteDialSettingstoApproachINI() DIM sSection As String DIM ret As Integer DIM sIniFile As String DIM notused As Integer DIM windir$, res%, Platform% sIniFile$ = "Approach.ini" sSection$ = "Autodialer" windir$ = GetWindowsDir() '** Does the specified file exist? If DoesFileExist (windir$ & sIniFile$, femExists) = 0 Then Lot_RegisterObject "APRCORE", UNIN_CLASS_FILE$, windir$ & sIniFile$ End If 'Only write the options if they're not already in the INI file. ret = GetPrivateProfileInt(sSection$, "LongDist", 999, sIniFile$) If ret = 999 Then notused = WritePrivateProfileString(sSection$, "LongDist", "1", sIniFile$) End If ret = GetPrivateProfileInt(sSection$, "LdThresh", 999, sIniFile$) If ret = 999 Then notused = WritePrivateProfileString(sSection$, "LdThresh", "8", sIniFile$) End If End SUB