home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-11-13 | 250.6 KB | 7,157 lines
''********************************************************************** '' '' Module Name: cominst\toolkit\toolkit.lss '' '' Module Code: COMINST '' '' Author: Dave Dupre '' '' Change History: '' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/toolkit@.lss $ '' '' Rev 1.268 13 Nov 1996 16:29:08 jdonohue '' Changed Lot_RegisterTypeLib to New_RegisterTypeLib (Scott Matsumoto version) '' Changed Old_RegisterTypeLib to Lot_RegisterTypeLib (original version) '' '' Rev 1.267 13 Nov 1996 12:21:08 jdonohue '' Adopted Scott Matsumoto's function for registering type libraries into '' Lot_RegisterTypeLib; renamed former toolkit function Old_RegisterTypeLib '' '' Rev 1.266 12 Nov 1996 15:22:28 jdonohue '' Ref. SPR: KAO3B8MB9 '' Added Scott Matsimoto function RegisterTypeLib to Lot_RegisterTypeLib to '' complete type library registration '' '' Rev 1.265 25 Oct 1996 13:39:06 jdonohue '' Put miscellaneous objects in 'miscobj.ini' to circumvent 64K limit on 'cinstall.ini' '' '' Rev 1.264 19 Jul 1996 14:42:04 jdonohue '' Moved IncrementSharedDLLCount from main.lss to toolkit.lss '' '' Rev 1.263 11 Jul 1996 19:11:22 glutz '' Added SUB Lot_TurnOffNodeOptSections for cases where Suite does '' not surface the nodenodeoptions callback. '' '' Rev 1.262 05 Jul 1996 10:33:38 dfristro '' Changed IsDirWritable to IsPathWritable in Lot_GetNetHardDrive and '' Lot_GetLocalHardDrive. This means we no longer insist that the dir exists, '' only that it can be created. '' '' Rev 1.261 14 Jun 1996 17:51:30 dfristro '' Simplified error message for excessive path length (SID_ERR_PATHLEN) to '' fix SPR RWIS36HHHN. '' '' Rev 1.260 14 Jun 1996 11:20:42 glutz '' SPR AFOG366LGN, Lot_AreAnyNodeOptionsAvail() was looking for reigistered '' options for each product instead of checking cinstall.ini. '' '' Rev 1.259 13 Jun 1996 08:31:54 glutz '' Took drive mapping out of IsPathWritable, changed order of checks in '' ValidateEditBox. '' '' Rev 1.258 10 Jun 1996 15:02:40 mhishinu '' Replaced two LEFT calls with LEFTBP to fix DBCS bug. '' '' Rev 1.257 10 Jun 1996 11:04:04 jdonohue '' Moved Lot_TrimEndSlash to setupapi.lss '' '' Rev 1.256 07 Jun 1996 14:56:10 jdonohue '' Ref SPR: HAS2XQP8D '' Save number of installed objects, rather than counting cinstall.ini every time '' Use nulltrim on arguments in Lot_RegisterObject '' '' Rev 1.255 06 Jun 1996 11:36:42 jdonohue '' Ref SPR: CDWT359P53 '' Don't write miscellaneous object in cinstall.ini for registry uninstall key -- '' this is automatically taken care of by uninstall '' '' Rev 1.254 05 Jun 1996 09:30:40 jdonohue '' Changed uninstall entry to delete entire uninstall entry, not just uninstallstring '' '' Rev 1.253 23 May 1996 12:21:34 jdonohue '' Replaced LEFTBP calls with LEFT '' '' Rev 1.252 16 May 1996 14:17:12 glutz '' RemovePriorVersion() buffers calls until told to execute. '' '' Rev 1.251 15 May 1996 13:21:32 jdonohue '' Ref SPR: MSUN35PJBG '' Changed Winhelp call argument from "Overview" to "Install" '' '' Rev 1.250 02 May 1996 10:04:08 jdonohue '' Ref SPR: RDOEHL4E94 '' PNOT2XUJRK '' Changed handling of writing uninstall string so that quotes are placed around '' arguments if the Windows new shell in use (Windows 95 and NT V. 4.0); quotes '' are NOT used for Windows NT 3.51 because of a bug in the MS Setup toolkit that '' truncates the command line with quotes. So embedded spaces and other special '' characters (such as -) are NOT supported under Windows NT 3.51 '' '' Rev 1.249 02 May 1996 09:22:04 glutz '' Added function RemovePriorVersion() for sspawning Uninstall. '' '' Rev 1.248 26 Apr 1996 08:51:38 jdonohue '' Ref SPR: CDWT34ULDZ '' Added missing function DL_SetOraclePath (probably obsolete) '' '' Rev 1.247 11 Apr 1996 09:04:26 glutz '' Lot_FixupSourceDirectories check for sections in copy list. '' '' Rev 1.246 10 Apr 1996 16:26:20 jdonohue '' Added error checking to Lot_FixupSourceDirectories and OneUp '' '' Rev 1.245 10 Apr 1996 12:45:40 jdonohue '' Removed comments in Lot_FixupSourceDirectories -- enable stripping of path components '' '' Rev 1.244 05 Apr 1996 14:28:50 jdonohue '' Use new function FGetSectionFileList to get font filenames even if they '' have been renamed in the .INF file '' '' Rev 1.243 04 Apr 1996 21:41:46 glutz '' Added function Lot_AreAnyNodeOptionsAvail(). '' '' Rev 1.242 04 Apr 1996 13:34:06 jdonohue '' Backed out fix for embedded spaces in pathnames (adding quotes) so that NT '' 3.51 uninstall icon will work for Suite 97 Beta '' '' Rev 1.241 01 Apr 1996 15:10:14 jdonohue '' For Smartsuite, remove two levels of directory in MarkFixupSourceDirectory '' '' Rev 1.240 29 Mar 1996 16:25:26 jdonohue '' Added function OneUp which is called in Lot_FixupSourceDirectories to remove '' the last path element from the Smartmasters type destination symbol '' '' Rev 1.239 04 Mar 1996 08:32:08 jdonohue '' Remove 16 bit shared component support -- pass 1 : eliminate LOTUSAPP '' '' Rev 1.238 27 Feb 1996 15:32:24 jdonohue '' Added Lot_RegisterTypeLib that creates registry entries for Type Libraries '' '' Rev 1.237 15 Feb 1996 19:12:24 jdonohue '' Do not initialize LOTUSFONTSDIR '' '' Rev 1.236 31 Jan 1996 15:26:12 jdonohue '' Added code to delete the Product entries under Smartsuite for a single product '' install so that uninstall will work '' '' Rev 1.235 30 Jan 1996 15:04:50 jdonohue '' Added registry key value "InfFileName" for products in suite uninstall '' '' Rev 1.234 25 Jan 1996 16:28:22 jdonohue '' Added registry key under Products for prod/ver that are part of suite '' Added preliminary code for enabling single uninstall icon for suite '' Register uninstall registry objects under first product rather than UINST '' '' Rev 1.233 23 Jan 1996 16:27:00 cmoy '' HISHI: Merged FE changes '' '' Rev 1.232 19 Jan 1996 17:08:26 jdonohue '' Initialize SYM_LOTUSFONTSDIR$ in InitializeWinWinSysDir '' Add uninstall object for uninstall string '' '' Rev 1.231 18 Jan 1996 13:35:56 jdonohue '' Added function Lot_RegisterFonts to provide automatic font registration '' Removed functions Lot_AddFontByID and Lot_AddFontByName, not needed anymore '' '' Rev 1.230 17 Jan 1996 14:19:30 glutz '' Added SUB ComboSelChanged and FUNCTION GetPathFromComboEdit. '' '' Rev 1.229 04 Jan 1996 15:52:58 jdonohue '' Ref SPR: TBAT2WAT6P '' Don't test InOrOut flag if file in copy list in Lot_WhereIsFeature -- this '' allows previously installed files to be found '' '' Rev 1.228 02 Jan 1996 16:15:28 jdonohue '' Use SYM_LOTUSFONTSDIR$ for location of fonts directory in Lot_AddFontByName '' '' Rev 1.227 22 Dec 1995 15:02:44 jdonohue '' Removed all references to SYM_PARENTDIR$ -- is now SYM_BASEDIR$ for all '' Added Function Lot_RegIni for future use '' '' '' Rev 1.226 21 Dec 1995 14:09:16 jdonohue '' Added subs Lot_AddFontByID and Lot_AddFontByName. These functions register a '' font with Windows and add to registry. It is assumed all fonts are installed '' to the Windows system directory '' '' Rev 1.225 14 Dec 1995 15:42:18 jdonohue '' Save original install directory location in Lot_GetInstallDir instead of '' Lot_GetDestDirValueFromInstallini '' '' Rev 1.224 13 Dec 1995 16:29:54 jdonohue '' Ref SPR: PNOT2XUJRK '' Added quotes around pathname strings in command line to uninstall in '' Lot_RegisterUninstaller '' '' Rev 1.223 12 Dec 1995 11:29:48 jdonohue '' SPR Ref: TBAT2XLLZN '' Modified Lot_GetDestDirValueFromInstallini per Brian O'Donovan's suggestion t '' preserve the location of the cinstall.ini file in a static variable; this '' should point to the correct cinstall.ini for MLC installs as well '' '' Rev 1.222 11 Dec 1995 17:38:38 jdonohue '' Added PopulateCOBJECTLIST function to construct a list of objects in .INI '' file; check list before creating miscellaneous object '' '' Rev 1.221 11 Dec 1995 14:06:32 jdonohue '' Lot_FixupSourceDirectories: added check for null source or destination '' '' Rev 1.220 11 Dec 1995 13:59:14 jdonohue '' Added subs Lot_FixupSourceDirectories and MarkFixupSourceDirSymbol for settin '' correct source location for node installs '' '' Rev 1.219 08 Nov 1995 16:58:30 tveerapp '' Fixes fot SPR#RMOO2xQQDY '' '' Rev 1.218 27 Oct 1995 17:07:26 glutz '' Lot_CheckPath does a NullTrim before proceeding. '' '' Rev 1.217 Oct 24 1995 16:55:18 cmoy '' removed eof char '' '' Rev 1.216 Oct 24 1995 16:25:58 mzgripce '' added Lot_CallWinhelp32 subroutine '' '' Rev 1.215 13 Oct 1995 15:41:14 amontalv '' For some reason the routine FGetListLength() was losing the symbol passed to it '' if it was called a second time. We put a check in to make sure it doesn't. '' '' Rev 1.214 27 Sep 1995 11:18:44 jdonohue '' Don't change the destination directory symbols for non-server language instal '' '' Rev 1.213 22 Sep 1995 15:46:06 tveerapp '' Fixed spr#TBAT2W9U2Q. Lot_whereisfetaure was extended to look in the net '' components directory. '' '' Rev 1.212 22 Sep 1995 15:07:24 jdonohue '' Remove SYM_LOTUSUSERDIR$ processing '' '' Rev 1.211 15 Sep 1995 19:59:20 amontalv '' Added Lot_GetVol() and Lot_SplitAnyPath(). '' '' Rev 1.210 14 Sep 1995 15:35:04 amontalv '' Don't register system path! '' '' Rev 1.209 14 Sep 1995 14:58:22 amontalv '' Added comments '' '' Rev 1.208 13 Sep 1995 17:03:06 amontalv '' Moved Lot_RegAppPath from setupapi.lss to toolkit.lss and also added a parameter. '' Lot_RegAppPath now register the registry entry . '' '' Rev 1.207 13 Sep 1995 14:20:22 glutz '' Added function GetLastPathComponent. '' '' Rev 1.206 12 Sep 1995 18:56:24 glutz '' Cleaned up some error reporting in ValidatePath, ValidateEditBox and '' ValidateBrowse. '' '' Rev 1.205 12 Sep 1995 11:55:54 tveerapp '' Added Lot_SaveFeaturesInInstNodeIni(), PopulateCINSTNODELIST . '' '' Rev 1.204 12 Sep 1995 11:18:18 glutz '' In ValidatePath set SYM_LAST_ERROR_SID to readonly before calling '' IsPathWritable. '' '' Rev 1.203 08 Sep 1995 14:41:44 glutz '' In ValidatePath the call to Lot_cleanPath is indepenent of volume type. '' '' Rev 1.202 08 Sep 1995 12:38:42 glutz '' For SPR CCOL2UKQD7 ValidatePath calls Lot_CleanPath first thing for UNC paths '' '' Rev 1.201 07 Sep 1995 15:22:08 amontalv '' Chop off the end of icon names longer than 40 characters if in NT. '' '' Rev 1.200 07 Sep 1995 10:42:26 tveerapp '' Added fix for node install network mapping in Lot_GetDestDirFromInstallIni. '' '' Rev 1.199 31 Aug 1995 14:00:48 tveerapp '' Fixed GetSymbolValue arg when building cinstnod.ini path '' '' Rev 1.198 31 Aug 1995 12:58:10 tveerapp '' NodeInstIni file path was not built correctly.Fix for spr# DCRP2UWNLS '' '' Rev 1.197 28 Aug 1995 16:53:00 jdonohue '' Changed USERDIR to LOTUSUSERDIR, lotususr to lotuser '' '' Rev 1.196 28 Aug 1995 13:32:14 amontalv '' Changed the uninstall entry to always be under \HLM\SOFTWARE\Microsoft\Windows\... '' and not \HLM\SOFTWARE\Microsoft\Windows NT\... when in NT. Microsoft does this '' and it avoids security issues. '' '' Rev 1.195 24 Aug 1995 07:55:58 jdonohue '' Added SYM_USERDIR and set it '' '' Rev 1.194 23 Aug 1995 15:35:32 cmoy '' Added CONST MAX_NO_DRIVE_COMBOS '' '' Rev 1.193 21 Aug 1995 15:41:40 amontalv '' Put name of registry keys into globals.lss '' '' Rev 1.192 16 Aug 1995 20:33:28 amontalv '' Added code to do error messages for registry. '' '' Rev 1.191 16 Aug 1995 12:27:46 mmeth '' fix for SPR# DCRP2UWNS9 '' The node install was trying to write the path to the install directory '' into the registry. Instead, we needed to write the path to the '' target directory. '' '' Rev 1.190 15 Aug 1995 12:32:34 glutz '' Had to set the text for "Path not writable" just before displaying message. '' '' Rev 1.189 14 Aug 1995 17:00:22 amontalv '' During creation of Uninstall program group icon, I needed to point to the file again '' in the fourth parameter. I though that that was starting directory, but seems to '' deal with icon. '' '' Rev 1.188 14 Aug 1995 11:12:28 jdonohue '' Allow filenames with more than 12 characters in MakePath '' '' Rev 1.187 09 Aug 1995 12:01:46 cmoy '' Commented out ProdAcronym variable. This is not used '' '' Rev 1.186 Aug 09 1995 11:49:16 cmoy '' remove declaration on LOT_WRITECRITICALDIRECTORIES '' '' Rev 1.185 08 Aug 1995 12:55:14 tveerapp '' Added Lot_WriteCriticalDirectories. It is called in Lot_SaveFeaturesInInstal '' Ini. '' '' Rev 1.184 07 Aug 1995 11:49:32 tveerapp '' Added a new function Lot_GetDestDirSymFrom InstallIni(). '' '' Rev 1.183 07 Aug 1995 09:14:02 mmeth '' Fixed a typo I put in wrt a comment character. '' '' Rev 1.182 07 Aug 1995 08:24:52 mmeth '' Part 2 of fix for SPR# JHOH2M4HZL: '' No longer check length of strings being written in Lot_WriteToRiFile. '' Because this C function now truncates the length to 80 bytes + terminator '' itsself. ALso changed the length of buffers to 82 in Lot_ReadDefaultsfromRi '' to handle the 80 bytes of characters plus terminating character. '' '' Rev 1.181 05 Aug 1995 13:27:10 jdonohue '' Backed out code to eliminate non-network drives for server install '' '' Rev 1.180 04 Aug 1995 17:27:08 amontalv '' Fixed command for uninstall icon. '' '' Rev 1.179 04 Aug 1995 16:38:36 glutz '' More subtle changes to ValidatePath. '' '' Rev 1.178 04 Aug 1995 12:24:04 glutz '' Cleaned up a problem displaying errors from ValidatePath. '' '' Rev 1.177 04 Aug 1995 08:42:58 glutz '' Changed the way ValidatePath handle some error messages. '' '' Rev 1.176 03 Aug 1995 15:41:22 amontalv '' Added one to length of registry entry for Uninstall. '' '' Rev 1.175 03 Aug 1995 15:32:42 glutz '' Changing method for error mesaages in ValidatePath. '' '' Rev 1.174 02 Aug 1995 16:20:10 amontalv '' Changed uninstall flags. /L -> /O and /P -> /L '' '' Rev 1.173 02 Aug 1995 10:03:44 glutz '' Added unc volumes to server list in Lot_GetDriveFreeSpaceList. '' '' Rev 1.172 01 Aug 1995 16:14:52 amontalv '' Added uninstall information for ininstall icon '' '' Rev 1.171 01 Aug 1995 11:04:04 glutz '' Changed the order of some of the checks in ValidatePath so that UNC roots '' would be checked before invalid path names. '' '' Rev 1.170 31 Jul 1995 15:00:26 jdonohue '' Moved Reg_??? functions to Register.lss '' Added code to select only network drives for server install '' '' Rev 1.169 31 Jul 1995 10:54:28 amontalv '' No change '' '' Rev 1.168 28 Jul 1995 11:59:26 glutz '' IsPathWritable now passes the UNC path to Lot_CheckPath. '' '' Rev 1.167 27 Jul 1995 16:18:42 pdonahue '' added code to surface new error message '' '' Rev 1.166 27 Jul 1995 14:01:34 amontalv '' Added call to create icons for uninstall in WinNt. '' '' Rev 1.165 27 Jul 1995 11:04:28 amontalv '' Added call Lot_AddLinkIconToFolder so that icon information can be sent '' when creating a shortcut. '' '' Rev 1.164 24 Jul 1995 11:39:38 glutz '' Read sn.dat from temp directory. '' '' Rev 1.163 20 Jul 1995 12:58:52 jdonohue '' Changed CopyFile to FCopyFile, which calls Win32 CopyFile instead of MS-Setup '' FCopyOneFile '' '' Rev 1.162 20 Jul 1995 10:53:54 glutz '' GetFreeSpace now returns K bytes so I made changes accordingly. '' '' Rev 1.161 20 Jul 1995 08:02:48 jdonohue '' Added check for null string in ValidatePath '' '' Rev 1.160 19 Jul 1995 16:37:24 glutz '' lcbNeed is now K bytes based so I took the \ 1024 out of CheskForSpace. '' '' Rev 1.159 18 Jul 1995 09:17:26 glutz '' ValidateBrowse was not updating edit box for UNC paths. '' '' Rev 1.158 17 Jul 1995 16:38:06 glutz '' Added function ValidateBrowse to set the combo and edit boxes after a browse. '' '' Rev 1.157 17 Jul 1995 15:52:12 glutz '' ValidatePath was checking path length before it was cleaning the path '' This would allow installation to \flw\..\ '' '' Rev 1.156 17 Jul 1995 15:32:36 amontalv '' Changed the prodno in Lot_AddLinkToFolder to always be 1. '' '' Rev 1.155 17 Jul 1995 13:51:50 amontalv '' Added "Overview" to Windows Help, so that we would have the new help look. '' '' Rev 1.154 17 Jul 1995 13:33:08 glutz '' All error messages concerning paths are suppressed if a UNC volume '' cannot be mapped to a drive letter. '' '' Rev 1.153 13 Jul 1995 11:25:34 tveerapp '' Modified the comments for Reg_GetObsFiles. '' '' Rev 1.152 13 Jul 1995 11:22:26 tveerapp '' Added Reg_SetObsFiles, RegGetObsFilesto support Obsolete files flag. '' '' Rev 1.151 12 Jul 1995 16:53:26 glutz '' Had to limit the length of the unc volume int the insufficient disk '' space dialog. '' '' Rev 1.150 11 Jul 1995 12:09:24 tveerapp '' Changed Lot_RegiterUinstallhandler, Lot_RegisterObjects to not '' register during a server, distrbution install. '' '' Rev 1.149 07 Jul 1995 15:58:32 glutz '' Added UNC volumes to CheckForSpace routine. '' '' Rev 1.148 06 Jul 1995 12:23:04 mzgripce '' change the destination of the uninstaller fron the components directory '' to the windows directory '' '' Rev 1.147 28 Jun 1995 15:54:36 tveerapp '' Fixed EXECUTE requiring Sub Initialize. '' '' Rev 1.146 27 Jun 1995 15:54:32 mzgripce '' put the execute string between sub initialize and end sub to enable '' on error / error # handeling for share processing '' '' Rev 1.145 23 Jun 1995 17:09:24 mzgripce '' fixed jmoy2t4pny pert 2 by compensating if the user starts a path with no \ '' '' Rev 1.144 23 Jun 1995 12:47:42 mzgripce '' add program_group class '' '' Rev 1.143 23 Jun 1995 12:22:12 jdonohue '' Added FindResourceinDLL function, add global string for name of our generic '' dialog proc and use in AddToBillboardList (original argument not used) '' '' Rev 1.142 22 Jun 1995 17:27:08 mzgripce '' add hive class to register object '' '' Rev 1.141 22 Jun 1995 12:43:56 jdonohue '' Revised AddToBillboardList to look for resource in list of DLLs '' '' Rev 1.140 22 Jun 1995 10:59:00 mzgripce '' change the cinstnode.ini filename to cinstnod.ini '' '' Rev 1.139 21 Jun 1995 14:27:28 glutz '' Added function ValidateEditBox to check edit box '' strings for valid letter drives or UNC volumes '' '' Rev 1.138 19 Jun 1995 18:45:18 mzgripce '' change lot_callShare to call the sharetools if share or share32 are supported '' '' Rev 1.137 19 Jun 1995 17:40:12 mzgripce '' change the key Display Name to DisplayName (for uninstaller) '' '' Rev 1.136 19 Jun 1995 16:39:44 mzgripce '' add Lot_RegisterObject '' '' Rev 1.135 19 Jun 1995 10:27:20 amontalv '' Put in code to add function to New Folder button and Remove Folder button. Also '' fixed some of the selection problems in the tree list. '' '' Rev 1.134 15 Jun 1995 19:41:30 amontalv '' Checked for and changed integers passed to C functions. Changed to longs. '' '' Rev 1.133 15 Jun 1995 17:52:20 amontalv '' The problem with the program groups and errors with installed features was that '' the C code FFindFirst() expected a integer that contained the flag for which to look. '' In LotusScript when we called this function we passed an integer, but an integer '' in Script is different than an integer in C. The fix is to convert the Script '' integer to a long using Clng() at the call for the C function. '' '' Rev 1.132 13 Jun 1995 17:27:08 mzgripce '' import FWriteDestinationSymAndVal, write Lot_WriteDestinationSymAndVal '' subroutine and call it in Lot_SaveFeature to register the dir symbols '' and their values for uninstall '' '' Rev 1.131 12 Jun 1995 15:10:30 tveerapp '' Added a check in the function Lot_TrimEndSlash. Checks if the '' string is of length > 0. Script's MID$ chokes on an empty path string. '' '' Rev 1.130 09 Jun 1995 17:05:42 mzgripce '' added Lot_Register_Uninstaller '' '' Rev 1.129 09 Jun 1995 15:08:54 amontalv '' Added code to set global variable in START.LSS to error condition value. '' '' Rev 1.128 09 Jun 1995 14:25:58 glutz '' Fixed unc mapping bug '' '' Rev 1.127 09 Jun 1995 11:28:38 jdonohue '' Send quit message to WinHelp '' '' Rev 1.126 08 Jun 1995 16:48:54 jdonohue '' Added cancel option for tight disk space message box '' '' Rev 1.123 07 Jun 1995 17:50:12 amontalv '' Set the Selected folder to the root only the first time that '' Reg_SetProgManagerGroup is called. '' '' Rev 1.122 07 Jun 1995 16:30:44 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. '' '' Rev 1.121 07 Jun 1995 11:23:24 glutz '' ValidatePath and IsPathwritable now work with UNC volumes '' '' Rev 1.120 06 Jun 1995 15:59:28 amontalv '' We are experiencing problems with LotusScript when we fill buffers with '' nulls and then pass them to C routines. For the time being, it is suggested '' that we fill our buffers with spaces. To this end (and to make it '' easier to change back later) I have created a small LotusScript routine '' named CreateBuffer. You use it any time you ordinarily would use '' STRING$(num, 0). CreateBuffer() just needs the num, it decides what to '' fill the buffer with (sorry about the grammer). Right now it fill the '' buffer with spaces. Later we will change it back to nulls. Also look '' at the routine NullTrim(). It will get rid of final nulls and spaces. '' You can use this when getting a buffer that has been changed or filled '' in a external C routine. '' '' Rev 1.119 06 Jun 1995 15:34:44 mzgripce '' added 3 fields ti the prods struct to support moreDirectories prompt and '' 4 CIT functions (one set and three gets) to register this data with CIT '' '' Rev 1.118 05 Jun 1995 18:15:22 tveerapp '' Removed SetTheComponentsDir. This is taken care of in InitShare32 '' in share32.lss. '' '' Rev 1.117 05 Jun 1995 16:37:20 amontalv '' Made changes for migrating to LotusScript version 3.0.37. '' '' Rev 1.116 02 Jun 1995 14:49:06 tveerapp '' Changed IDC_HELP to IDC_CITHELP. '' '' Rev 1.115 02 Jun 1995 08:54:26 glutz '' Lot_checkPath calls Lot_SplitUNCPath '' '' Rev 1.114 01 Jun 1995 17:02:04 glutz '' Lot_GheckPath works with UNC paths '' '' Rev 1.113 01 Jun 1995 11:11:44 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.112 31 May 1995 09:52:20 callanan '' Accessing help from the lotustmp dir not the current directory as the '' current directory changes when you change drive. '' '' Rev 1.111 30 May 1995 15:43:34 amontalv '' Made a new function PopupWithFunction. PopupModalDlg now calls this. Needed to '' do this to call dialog with my own dialog function. '' '' Rev 1.110 30 May 1995 13:09:32 jdonohue '' Pass DLL list in argument to FDoDialog '' '' Rev 1.109 30 May 1995 10:00:00 amontalv '' Added routine PopupFolderDlg to put up the Win95 Program folder dialog. '' '' Rev 1.108 25 May 1995 20:43:40 amontalv '' Checked in for Greg Lutz. He commented out code that validated path in order '' to get long file names. '' '' Rev 1.107 19 May 1995 19:06:00 glutz '' Added some comments to UNC functions '' '' Rev 1.106 18 May 1995 12:21:20 tveerapp '' Added SetTheComponentsDir stub.MZ to fill in contents. '' '' Rev 1.105 18 May 1995 10:37:46 jdonohue '' Fixed logic for AddToBillboardList with multiple resource DLLs '' '' Rev 1.104 17 May 1995 17:53:50 mzgripce '' Change Reg_SetLicenserSupport() and Reg_SetLicenseSelected() to eliminate '' Licenser support '' '' Rev 1.103 16 May 1995 17:13:06 amontalv '' Had to change the name of the dialog proc to _FNameOrgDlgProc@16. '' '' Rev 1.102 16 May 1995 17:07:56 glutz '' Split all automation functions out to automate.lss '' '' Rev 1.101 16 May 1995 09:19:52 glutz '' Added wrappers for '' FAddToDriveFreeSpaceList '' FIsUnvalidatedUNCPath '' FisValidUNCPath '' Added SUB Lot_SplitUNCPath '' Added functions' '' Lot_IsUnvalidatedUNCPath '' Lot_IsValidUNCPath '' Modified '' IsPathWritable '' ValidatePath '' SelectDriveCombo '' '' Rev 1.100 15 May 1995 11:19:18 jdonohue '' Call SetUpApi in initialize function '' '' Rev 1.99 11 May 1995 16:55:58 tveerapp '' Added a global variable gLogFile$ . Commented out the calls '' to WriteToLogFile - this is no longer a function. '' '' Rev 1.98 03 May 1995 18:17:40 mzgripce '' fix the syntax errors '' '' Rev 1.97 03 May 1995 11:45:56 tveerapp '' Fixed the cfbuild-c2build merge. '' '' Rev 1.96 02 May 1995 17:51:08 mzgripce '' fixed some syntax errors in new features '' '' Rev 1.95 02 May 1995 12:53:34 cmoy '' Merged c2 into cf build '' '' Rev 1.88 27 Apr 1995 16:48:10 mheerman '' Removed debug print from help case. '' Rev 1.92F 26 Apr 1995 17:33:42 mzgripce '' replace TwoMainDirFlag with ExtraProdDirsNum and change the '' subroutine and function name that process it. '' '' Rev 1.91F 25 Apr 1995 17:10:46 mzgripce '' add a new field: TwoMainDirFlag to ProdInfo Structure '' add SUBROUTINE Reg_SetTwoMainDirFlag and FUNCTION Reg_GetProdSupportForTwo- '' MainDir() '' change Reg_RegisterProductNames to set TwoMainDirFlag to 0 '' '' Rev 1.87 14 Apr 1995 16:03:16 amontalv '' Deleted code that took care of final null in nul terminated strings. '' Rev 1.90F 25 Apr 1995 11:45:20 tveerapp '' Added Lot_AutoCustomizeShare(). '' '' Rev 1.86 10 Apr 1995 17:58:42 amontalv '' Made changes to functions and to some callback routines. '' Rev 1.89F 24 Apr 1995 14:02:08 tveerapp '' Fixed Lot_AutoInstallCustomize. '' '' Rev 1.88 19 Apr 1995 14:38:24 jdonohue '' Changed SYM_CUIDLL$ from DLL name to list of DLLs in PopupMod..Dialog and '' AddToBillboardList '' '' Rev 1.87F 13 Apr 1995 10:46:36 mzgripce '' Add Share32 field to ProdInfo struct '' Change Reg_RegiserProductNames to set the default of Share32 to 0 '' added: Lot_AreShare32ToolsSupported(); Lot_GetShare32ToolsSize() '' Reg_GetProdSupportForShare32(); Reg_SetShare32Flag() '' '' Rev 1.86F 13 Apr 1995 19:00:20 tveerapp '' Added Lot_AutoInstallCustomize. '' '' Rev 1.85 05 Apr 1995 19:53:52 amontalv '' Porting to 32 bit. '' '' Rev 1.84 31 Mar 1995 18:47:52 amontalv '' Had to add aliases to function names for LotusScript to find them in DLLs '' '' Rev 1.83 20 Jan 1995 16:42:48 tveerapp '' '' Fixed spr# ccol2nsl4. In autogetsetlicenser,moved the if licselected% to the right place. '' '' Rev 1.82 17 Jan 1995 16:45:12 tveerapp '' '' Replaced existing error message for AutoCheckForspace. '' Fixes spr# TVEN2NBNEP. '' '' Rev 1.81 14 Jan 1995 15:58:54 jplump '' '' Removed else case in Lot_AutoSuiteAppSelect. Before this routine '' is called in main, there is a check to see if the product is a '' SUITE; if it is not, this routine is not called. Therefore, the '' else case (if not Suite) in this routine won't happen. If the logic '' in main changes not to check for Suite, then the else case should '' not post an error for the user, but return to main without looking '' for Suite Applications. '' '' Rev 1.80 13 Jan 1995 11:28:18 jplump '' '' In Lot_AutoGetInstallType, added option 4 (node). This option really doesn't '' do anything if the user has already done a server install and is doing a '' legitimate node install. However, if the user has not done a server install '' and puts 4 as the install type, an error will be displayed. This error tells '' the user that he must to a server install first. '' '' '' '' Rev 1.79 11 Jan 1995 10:28:24 tveerapp '' '' Fixed the logic in the AutoNodeoptions processing. Changed the OR to AND. '' The error should be signaled only if it is neither a 1 nor a 0. '' '' Rev 1.78 10 Jan 1995 19:04:38 jplump '' '' When processing values from RSP file in automation, '' added check for missing value before casting string '' to integer. This is a workaround for a bug in '' LotusScript. An empty string should be a 0 when '' cast to an integer (CINT), but it is not. '' SPR JMOY2N7QVK '' '' Rev 1.77 09 Jan 1995 16:50:32 tveerapp '' '' Removed redundant code from Lot_CheckRSPPath as a result of the preious change(1). '' '' Rev 1.76 09 Jan 1995 16:48:04 tveerapp '' '' Two changes: '' 1. Fixed the default for Lot_CheckRSPPath's return value to be "". '' 2. Fixed spr# JHOH2N7PHF '' '' Rev 1.75 07 Jan 1995 18:26:02 jplump '' '' Made changes to keyword and section processing in Lot_Auto??? '' functions to reflect changes in auto.rsp due to DOC review. '' '' '' Rev 1.74 07 Jan 1995 15:56:20 jplump '' '' In Lot_AutoCheckRSPPath fixed problem with function '' returning and invalid path. Calling functions should '' expect an empty string as a return value if the path '' is invalid. '' '' Rev 1.73 30 Dec 1994 14:12:28 jplump '' '' Removed section name from error case in Select Applications processing '' '' Rev 1.72 30 Dec 1994 14:00:40 jplump '' '' Added Lot_Auto_CheckRSPPath to validate paths in the response file. '' If the user does not supply a path in the rsp file, he\she will get '' this message: "Automated Install Error. Response File: One or more '' product directory paths are invalid in section: " If the user '' supplies a path that is invalid, the invalid path message will be '' displayed first, and then Automated Install Error. '' '' '' Rev 1.71 23 Dec 1994 18:34:30 jplump '' '' Changed automation errors to be resourced errors. '' '' Rev 1.70 23 Dec 1994 14:07:44 jplump '' '' Added Lot_AutoGetSetLicenserInfo '' Removed print statements '' Enhanced AutoDebug function '' '' '' Rev 1.69 22 Dec 1994 15:09:08 tveerapp '' '' Added Error Msg to AutoCheckForSpace '' '' Rev 1.68 22 Dec 1994 14:27:16 tveerapp '' '' Fixed a type mismatch '' '' Rev 1.67 22 Dec 1994 14:22:42 tveerapp '' '' Modified Lot_AutoGetProductDestDir.. for suite. '' '' Rev 1.66 22 Dec 1994 13:28:26 tveerapp '' '' Fixed Lot_AutoSuiteAppSelect function. '' '' Rev 1.65 22 Dec 1994 11:38:52 tveerapp '' '' Changed Lot_Check path to ValidatePath in Lot_AutoGetProductDestDir. '' '' Rev 1.64 21 Dec 1994 17:18:34 tveerapp '' '' Fixed a type mismatch '' '' Rev 1.63 21 Dec 1994 17:08:22 tveerapp '' '' Added Lot_AutoProcessNodeOptions. '' '' Rev 1.62 21 Dec 1994 14:58:44 tveerapp '' '' Removed an erroneous end case '' '' Rev 1.61 21 Dec 1994 14:56:12 tveerapp '' '' Fixed a typo '' '' Rev 1.60 21 Dec 1994 13:10:00 tveerapp '' '' Added a missing end if and Next '' '' Rev 1.59 21 Dec 1994 13:03:12 tveerapp '' '' Added Lot_AutoSuiteAppSel function. Added Error messages that need to be resourced!! '' Modified Lot-AutoGetSIzeofInstall. '' '' Rev 1.58 21 Dec 1994 11:54:48 tveerapp '' '' Modified Lot_AutoGetBase function. It returns the base directory instead of setting it. '' '' Rev 1.57 12 Dec 1994 11:36:34 tveerapp '' '' Incorporated jill's changes to Lot_AutoGetProductDestinationDir and '' Lot_AutoWriteOutDebugFile. Remmed out the existing functions. These '' can be removed after verfication with jill. '' '' Rev 1.56 12 Dec 1994 11:05:08 mzgripce '' '' Added 4 funcs:Lot_AutoChangeLotusAppDir(), Lot_AutoConsolidateLotusAppDir() '' Lot_AutoConsolidateMoveCopy(), Lot_AutoIsThisNetLotusApp() '' '' Rev 1.55 08 Dec 1994 20:10:34 jplump '' Added Lot_AutoWriteOutDebugFile '' Fixed Lot_AutoGetProductDestDirSymbol to use prodno% '' '' Rev 1.54 06 Dec 1994 17:21:00 tveerapp '' '' Modified Lot_GetKeyValFromResponseFile to set gAutoFile$ to thw '' value of the symbol processed by shell in the command line. '' '' Rev 1.53 06 Dec 1994 10:23:54 tveerapp '' '' Added Lot_AutoCinfigureAutoExec function and AutoInstallReboot. '' '' Rev 1.52 05 Dec 1994 15:09:52 jplump '' Added Lot_AutoGetUserInfo '' '' Rev 1.51 02 Dec 1994 15:56:56 cmoy '' '' Merged automation files '' '' Rev 1.50 02 Dec 1994 15:10:42 cmoy '' '' Rev 1.11 01 Dec 1994 17:30:54 tveerapp '' '' Added The AutoCheckSpace function. '' '' Rev 1.10 01 Dec 1994 10:22:16 jplump '' Added character checking to Lot_AutoGetProgramGroup '' '' '' '' Rev 1.9 30 Nov 1994 10:19:56 tveerapp '' Modified RegisterCallback function to register a callback only when not '' in the automation mode. '' '' Rev 1.8 29 Nov 1994 14:27:22 tveerapp '' Added a check to Lot_GetKeyValFromResponseFile. '' '' Rev 1.7 29 Nov 1994 12:53:34 tveerapp '' '' Added i%, nProds to the declartions.D '' '' Rev 1.6 29 Nov 1994 12:45:54 tveerapp '' Modified Lot_AutoGetSizeOFinstall function. It returns an integer. '' '' Rev 1.5 29 Nov 1994 11:42:18 jplump '' '' Added functions: Lot_AutoGetSizeOfInstall & '' Lot_AutoGetProgramGroup. '' '' Rev 1.4 23 Nov 1994 16:27:40 tveerapp '' '' Added Lot_AutoGetInstallType function used in main. '' '' Rev 1.3 23 Nov 1994 15:22:02 tveerapp '' '' Modified PopupModal for Automation. '' '' Rev 1.2 23 Nov 1994 14:02:02 jplump '' Added Lot_AutoGetBaseDirSymbol '' '' Rev 1.1 22 Nov 1994 16:34:40 jplump '' '' Added INIT symbol processor '' '' Rev 1.0 22 Nov 1994 16:26:10 jplump '' Initial Revision ''========== '' '' Rev 1.47 02 Nov 1994 18:33:34 jplump '' Resourced error message in ModifyAutoexec() '' SID_ERR_AUTOEXEC_NOT_COPIED '' '' Jill Salter Plump '' '' '' Rev 1.46 03 Oct 1994 11:12:12 tveerapp '' Fixed spr# 1023351. Makepath checks for 13 chars. and a \. '' If valid accepts it else returns an empty string. '' '' Rev 1.45 27 Sep 1994 13:05:56 cmoy '' Added constants needed for rebooting and restarting '' '' Rev 1.44 22 Sep 1994 09:35:42 mzgripce '' Add CDOptDefaultSelected in PRODINFO structure '' Write: SUB Reg_ReSetCDOptionSelected '' SUB Reg_ReSetCDOptionSelectedToDefault '' SUB Reg_ReSetAllOptSelToDefaults '' all functions for cd settings checking and change the funcs that populates '' '' Rev 1.43 02 Aug 1994 11:17:58 mzgripce '' To fix Node Options bug I commented out the call to the sub '' Reg_ReSetAllNodeOptsToDefaults in the function '' Lot_AreAnyNodeOptAvailToSrv() '' '' Rev 1.42 21 Jul 1994 18:09:34 thangv '' Modified return value of IsNotesinpath to be 1 if it is not in '' lotus.ini. (this will reduce the ocuurences of autoexec change dialog '' showing up). '' '' Rev 1.41 13 Jun 1994 17:20:12 cmoy '' '' ADDED GETBOOTDRIVE FUNCTIONALITY '' '' Rev 1.40 08 Jun 1994 17:05:12 mmeth '' Fixed PopulateCINSTALLLIST. The bug in here was that we weren't writing ov '' previous versions of cinstall.ini correctly. gNCINSTALL set to -1 instead o '' '' Rev 1.39 05 Jun 1994 20:21:36 ptilton '' Added Global Subroutines for Setting OracleHomeDir & NotesDataDir '' Symbols. Moved functions for determining values for symbols from '' SHARE.LSS '' '' Rev 1.38 02 Jun 1994 12:35:32 thangv '' '' Added TrimNetlotusapp function. '' '' Rev 1.37 31 May 1994 14:04:54 thangv '' '' Added Showwaitcursor and restorecursor foe fine check in CheckforSpace. '' '' Rev 1.36 31 May 1994 13:40:04 mmeth '' Added Function Calls for Suite to handle previous versions '' '' Rev 1.35 26 May 1994 07:25:00 mmeth '' In CheckForSpace the variable notused1$ was refernced, but not declared. '' '' Rev 1.34 25 May 1994 17:10:12 cmoy '' '' put up a please wait dialog in CheckForSpace '' '' Rev 1.33 24 May 1994 16:54:16 thangv '' Set the tab to 50 from 75 in CheckForSpace. '' '' Rev 1.32 24 May 1994 15:47:18 mmeth '' Fixed Performance problem having to do with reading and writing CINSTALL.IN '' '' Rev 1.31 23 May 1994 14:50:02 mzgripce '' fix a bug in IsThe Featureinstalled '' '' Rev 1.30 20 May 1994 17:24:44 mmeth '' Modified Lot_IsTheFeatureInstalled. It uses a list (CINSTALL) and '' works faster. '' '' Rev 1.29 12 May 1994 11:20:24 mmeth '' Adding Icons for Lic and Install and using DoMsgBox instead of MessageBox '' '' Rev 1.28 29 Apr 1994 16:36:36 mzgripce '' '' fixed spr # 28650 '' '' Rev 1.27 28 Apr 1994 13:29:38 mzgripce '' '' added Lot_IsDestVerNewerOrEqual() '' '' Rev 1.26 21 Apr 1994 15:32:40 mzgripce '' '' implement the correct err message for too long path(SID_ERR_PATHLEN_...) '' '' Rev 1.25 20 Apr 1994 16:45:38 thangv '' Modified Lot_AreAnyNodeOptionsAvailToSrv function to check '' for any node options not being in the copylist. '' '' Rev 1.24 20 Apr 1994 16:23:20 mzgripce '' '' Reject paths that are too long. '' '' Rev 1.23 19 Apr 1994 10:28:32 thangv '' Added FremoveSymbol(IDC_TEXT) in Popupmodal function '' when exit button is selected. '' '' Rev 1.22 13 Apr 1994 09:55:28 cmoy '' '' Added SHAREEXE and Notes as fields in Registration Database '' Added SUBS: '' Reg_SetSHAREEXESupport '' Reg_SetNotesSupport '' Added FUNCTIONS: '' Reg_GetSHAREEXESupport '' Reg_GetNotesSupport '' GetNotesPathfromLotusIni '' IsNotesInPath '' IsShareInAUTOEXEC '' ModifyAutoexec '' GetBootDrive '' Added Constants '' MANotes '' MAShare '' '' Rev 1.21 07 Apr 1994 16:41:12 mmeth '' changed return code for EXECUTE statement to a public variable '' '' Rev 1.20 07 Apr 1994 12:38:20 mmeth '' Modified DOEXEC to EXECUTE. '' '' Rev 1.19 06 Apr 1994 16:28:06 mmeth '' Added a list gEXTRA. This list gets initialized with an etra 200000 '' bytes for the Windows drive. This can be modified by the product groups if '' necessary. '' '' Rev 1.18 04 Apr 1994 18:02:18 mmeth '' Took out share.lss depednancies for those products that don't need it. '' '' Rev 1.17 23 Mar 1994 10:11:08 mmeth '' WhereIsFeature... fixed for SmartSuiteNode case & '' SaveFeatureInstalled... was fixedso it would write without adding extra "\" '' '' Rev 1.16 23 Mar 1994 09:17:52 mzgripce '' add LOOKONNETLOTUSAPP to whereIsFeature '' '' Rev 1.15 18 Mar 1994 18:30:50 mzgripce '' change Lot_WhereIsFeature and save Destination Directories for suit server '' '' Rev 1.14 11 Mar 1994 16:58:56 thangv '' Added the Dist field in the Registration database '' Added The Reg_Set.. and Reg_GetProd.. functions for dist. '' '' Rev 1.13 10 Mar 1994 17:24:54 mzgripce '' add Lot_InitializeWinWinsysSym subroutine '' '' Rev 1.12 01 Mar 1994 17:08:30 mzgripce '' CALL FIsKeywordInCopyList into Lot_SaveNodeOptionsInInstallIni '' '' Rev 1.11 01 Mar 1994 12:13:14 mzgripce '' added NodeOptDefaultSelected to PRODINFO type def '' change: Reg_RegisterProductNames and Reg_SetNodeOptionSelected '' added: Reg_IsNodeOptionDefaultSelected '' Reg_ReSetNodeOptionSelectedToDefault '' Reg_ReSetNodeOptionSelected and '' Reg_ReSetAllNodeOptsSelToDefaults '' '' Rev 1.10 24 Feb 1994 12:56:12 tingmann '' add lot_lcbsettabs '' '' Rev 1.9 23 Feb 1994 18:14:30 mzgripce '' fix Lot_SaveTheNodeOptionsInInstallIni() (replace"1" with STR(1)) '' '' Rev 1.8 22 Feb 1994 17:04:24 mzgripce '' add Lot_AreAnyNodeOptAvailToSrv() '' '' Rev 1.7 17 Feb 1994 10:24:46 mmeth '' Added Reg_SetAllowUserToChoseInSMartSUite '' '' Rev 1.6 16 Feb 1994 14:40:06 tingmann '' add reg_getproductname,reg_getuiinorout, lot_lcbsetsel '' '' Rev 1.5 16 Feb 1994 12:13:46 tingmann '' fix END statement problem when running from DOEXEC (in QUIT sub) '' '' Rev 1.4 15 Feb 1994 15:01:38 mmeth '' added pvcs line for toolkit.lss & '' '' Creation Date: Wednesday January 5, 1994 '' '' Copyright Lotus Development Corporation, (c) 1994 '' '' '' Description: '' '' '' Additional authors: MZ '' '' Change History: ''---------------------------------------------------------------------- '' Date Vers. Pgmr SPR# Change ''---------------------------------------------------------------------- '' 02-16-94 0032 MZ Added Lot_AreAnyNodeOptAvailToSrv() ''! '' 02-16-94 0031 TQI Fix exit problem when calling QUIT during DOEXEC '' 02-14-94 0030 MZ Added Lot_IsAnyNodeOptAvailToNode() and '' Lot_AreNodeOptAvailToNodeForProd() '' Lot_GetNumOfNodeOptAvailToNodeForProd() '' 02-11-94 0029 MZ Added Lot_SaveTheNodeOptionsInInstallIni(), '' Lot_GetLastNodeOptNumber() and '' Lot_IsTheNodeOptionsAvailToNode() functions '' 02-07-94 0028 MZ move Lot_SaveFeaturesInstaledInInstallIni() '' and Lot_GetLastFeatureNumber() from share.lss '' 02-06-94 0027 MMETH fixed Lot_Toggle... and MsgBox-> MessageB '' 02-04-94 0026 MMETH Added defaults for Reg DB. '' 02-03-94 0025 MMETH added Lot_WhereIsFeature also moved '' Lot_IstheFeatureInstall from toolkit.lss '' 02-01-94 0024 MZ ADDED Lot_GetGroupName and set '' Prods(gCurrNumOfProds%).ProgManagerGroup="Lotus Applications" '' 02-01-94 0024 MMETH INSTALL_SOURCE still coming up empty. '' 01-31-94 0023 MMETH Cleaned up CallProductFunctions and Back '' 01-30-94 0022 MMETH Removed CreateCOuntDir from remmed out code '' 01-28-94 0021 MZ Add:Reg_SetLicenseSelected '' Reg_IsLicenseSelected '' Reg_SetCountDirectory '' Reg_GetCountDirectory '' Reg_SetBillboardNumber '' Reg_GetBillboardNumber '' Change Reg_RegisterProductNames to set the '' BillboardNumber to 0 '' 01-28-94 0022 MMETH Fixed CallProducts for "BACK" '' 01-28-94 0021 DND Added Reg_GetSystemFileSize and '' Reg_SetSystemFileSize. '' 01-27-94 0020 DND Lot_GetChapterValStr returns empty '' string if chapter is not found. '' 01-25-94 0019 DND Move SetRestartDir, RestartListEmpty, '' and ExitExecRestart from setupapi. '' 01-25-94 0018 MMETH Added Lot_TrimEndSlash '' 01-24-94 0017 MMETH Fix GetTheRealProdDir '' 01-24-94 0016 TQI Capture function returns (lsi36) '' 01-24-94 0015 MMETH Move GetTheRealProd from share.lss '' added prodno% parm, and modified implememntaion '' 01-21-94 0014 MMETH Added Parms to Lot_CallProducts '' 01-20-94 0013 DND CheckForSpace no longer pops modeless '' 01-20-94 0012 MZ Modify Reg_SetSelectedInstallType() to set to '' complete if custom and/or laptop is not a '' valid choice for the product. '' 01-19-94 0011 DND Modified the GetFirstDrive functions so '' they now return with the default dir. '' Made the AllDrive function more effecient. '' 01-19-94 0010 MMETH Changed CallProd family to use Reg_GetProductAcronym '' 01-19-94 0009 MZ Change TRUE/FALSE to 1/0 in Reg_* SUB/FUNCs '' 01-19-94 0009 MMeth Use SYM_UPDATELIST$. '' Added Reg_GetNumberOfProducts. '' 01-19-94 0008 DND Lot_Get/SetCurrentProduct saves and returns '' an integer. This makes life much easier '' for toolkit. Changed '' Reg_SetSelectedInstallTypes to '' Reg_SetSelectedInstallType. Fixed '' SelectDriveCombo to accept a path. '' Lot_ExtractDriveLetter returns lower case. '' 01-19-94 0008 TQI Use doexec instead of execute '' 01-18-94 0007 MZ move Lot_CleanPath() to setupapi.lss '' 01-18-94 0006 MZ Put in the Product registration database '' 01-18-94 0005 DND Added Lot_CleanPath '' 01-12-94 0004 MMETH Changed Return code of CallProd to string '' 01-12-94 0003 mmeth Lot_CallProductFunctions (func_name$, always%, parms$) '' 01-12-94 0002 tqi option declare '' 01-10-94 0001 MZ Make all symbols Constants and put them '' in GLOBALS.LSS '' 01-05-94 0000 DND Initial checkin ''---------------------------------------------------------------------- '' ''********************************************************************** 'USE "SETUPAPI" USE "START" USE "REGISTER" OPTION DECLARE '************ User messages PUBLIC CONST WM_COMMAND = 273 PUBLIC CONST WM_USER = 1024 PUBLIC CONST UM_PAINTMODELESS = (WM_USER+1000) PUBLIC CONST UM_REBOOTFLAG = (WM_USER+503) PUBLIC CONST UM_RESTARTWINDOWS = (WM_USER+504) '** Return codes for drive type PUBLIC CONST DRIVE_REMOVABLE = 2 PUBLIC CONST DRIVE_FIXED = 3 PUBLIC CONST DRIVE_REMOTE = 4 '** Function return codes PUBLIC CONST SUCCESS = 1 PUBLIC CONST FAILURE = 0 PUBLIC CONST MANotes = 1 '** used in ModifyAutoexec PUBLIC CONST MAShare = 2 '** used in ModifyAutoexec '** These numbers must match those in lcomstf\sections.h of lcomstf.dll!! PUBLIC CONST F_NOTHING = 0 PUBLIC CONST F_CHAPTER = 1 PUBLIC CONST F_NAME = 2 PUBLIC CONST F_INOROUT = 4 PUBLIC CONST F_DISPLAY = 8 PUBLIC CONST F_COMPLETE = 16 PUBLIC CONST F_LAPTOP = 32 PUBLIC CONST F_CUSTOM = 64 PUBLIC CONST F_TIPS = 128 PUBLIC CONST F_HELP = 256 PUBLIC CONST F_DESTDIR = 512 PUBLIC CONST F_BITMAP = 1024 PUBLIC CONST F_EXCEPTION = 2048 PUBLIC CONST F_SHARE = 4096 PUBLIC CONST F_KEYWORD = 8192 PUBLIC CONST F_DESTDIRSYM = 16384 PUBLIC CONST RT_BITMAP = 2 'This should be a MAKEINTRESOURCE(2) really PUBLIC CONST RT_DIALOG = 5 'This should be a MAKEINTRESOURCE(5) really PUBLIC CONST RT_STRING = 6 'This should be a MAKEINTRESOURCE(6) really 'The decorated name for the generic dialog procedure in dlgproc.c JMD PUBLIC CONST FNAMEORGDLGPROC$="_FNameOrgDlgProc@16" 'needed in callbacks PUBLIC CONST MAX_NO_DRIVECOMBOS = 4 '***** 'NEEDED FOR THE ARRAY CINSTALL DECLARE SUB PopulateCINSTALLLIST DIM CINSTALL LIST AS STRING DIM gNCINSTALL% 'NEEDED FOR THE ARRAY CINSTNODE DECLARE SUB PopulateCINSTNODELIST DIM CINSTNODE LIST AS STRING DIM gNCINSTNODE% 'NEEDED FOR THE ARRAY COBJECT DECLARE SUB PopulateCOBJECTLIST(iniPath$) DIM COBJECT LIST AS INTEGER DIM gNCOBJECT% %rem Moved to register.lss '******************** Product Registration struc, array and count ********* TYPE PRODINFO Acronym AS STRING Name AS STRING Complete AS INTEGER Custom AS INTEGER Laptop AS INTEGER SelectedType AS STRING UIInOrOut AS INTEGER AllowUserToPickInSuite AS INTEGER FullSize AS LONG MinSize AS LONG Share AS INTEGER Share32 AS INTEGER DataLens AS INTEGER SQL AS INTEGER Paradox AS INTEGER CDOpt AS STRING CDOptSelected AS STRING CDOptDefaultSelected AS STRING NodeOpt AS STRING NodeOptSelected AS STRING NodeOptDefaultSelected AS STRING Srv AS INTEGER Dist AS INTEGER ExtraProdDirsNum AS INTEGER License AS INTEGER LicenseSelected AS INTEGER CountDirectory AS STRING ATM AS INTEGER DirSymList AS STRING 'Should be populated in Init ProgManagerGroup AS STRING ProgFolder AS STRING SystemFileSize AS LONG BillboardNumber AS INTEGER SHAREEXE AS INTEGER Notes AS INTEGER PreviousVersion AS STRING 'This is a string for future purposes MoreDirsCBName AS STRING MoreDirsDlgID AS INTEGER MoreDirsHlpID AS LONG ObsoleteFiles AS INTEGER 'This is can be a string for future enhancements END TYPE DIM Prods(gMaxNumOfProds) AS PRODINFO DIM gCurrNumOfProds% '** Number of products DIM gCurrentProduct% '** The current product %endrem '******************** Lotus DLL interface ************************** DECLARE PUBLIC FUNCTION FIsKeywordInCopyList LIB "lcomstf.dll" ALIAS "_FIsKeywordInCopyList@4" (ByVal szKeyword$) AS LONG DECLARE PUBLIC FUNCTION FGetChapterFromKeyword LIB "lcomstf.dll" ALIAS "_FGetChapterFromKeyword@12" (ByVal szKeyword$, ByVal szChptname$, ByVal cbChptsize&) AS LONG DECLARE PUBLIC FUNCTION FRemoveDir LIB "lcomstf.dll" ALIAS "_FRemoveDir@4" (ByVal szDir$) AS LONG DECLARE PUBLIC FUNCTION FOpenInf LIB "lcomstf.dll" ALIAS "_FOpenInf@12" (ByVal szFile$,ByVal fCheck&,ByVal fCheckSyms&) AS LONG DECLARE PUBLIC FUNCTION LcbGetChapterCost LIB "lcomstf.dll" ALIAS "_LcbGetChapterCost@16" (ByVal szchapter$,ByVal szextra$,ByVal szcost$, ByVal szneed$) AS LONG DECLARE PUBLIC FUNCTION CbGetInfSectionKeyField LIB "lcomstf.dll" ALIAS "_CbGetInfSectionKeyField@20" (ByVal szSect$, ByVal szKey$, ByVal iField&, ByVal szBuf$, ByVal cbBuf&) AS LONG DECLARE PUBLIC FUNCTION FMakeListInfSectionField LIB "lcomstf.dll" ALIAS "_FMakeListInfSectionField@12" (ByVal szSym$, ByVal szSect$, ByVal iField&) AS LONG DECLARE PUBLIC FUNCTION FSetSymbolToListOfInfKeys LIB "lcomstf.dll" ALIAS "_FSetSymbolToListOfInfKeys@12" (ByVal szSym$, ByVal szSect$, ByVal fNulls&) AS LONG DECLARE PUBLIC FUNCTION FAddSectionFilesToCopyList LIB "lcomstf.dll" ALIAS "_FAddSectionFilesToCopyList@12" (ByVal szSect$, ByVal szSrc$, ByVal szDest$) AS LONG DECLARE PUBLIC FUNCTION FAddSectionKeyFileToCopyList LIB "lcomstf.dll" ALIAS "_FAddSectionKeyFileToCopyList@16" (ByVal szSect$, ByVal szKey$, ByVal szSrc$, ByVal szDest$) AS LONG DECLARE PUBLIC FUNCTION FDumpCopyListToFile LIB "lcomstf.dll" ALIAS "_FDumpCopyListToFile@4" (ByVal szFile$) AS LONG DECLARE PUBLIC SUB ResetCopyList LIB "lcomstf.dll" ALIAS "_ResetCopyList@0" () DECLARE PUBLIC SUB ResetFileCosts LIB "lcomstf.dll" ALIAS "_ResetFileCosts@0" () DECLARE PUBLIC FUNCTION FRemoveSectionFilesFromCopyList LIB "lcomstf.dll" ALIAS "_FRemoveSectionFilesFromCopyList@4" (ByVal szSect$) AS LONG DECLARE PUBLIC FUNCTION FRemoveSectionKeyFileFromCopyList LIB "lcomstf.dll" ALIAS "_FRemoveSectionKeyFileFromCopyList@8" (ByVal szSect$, ByVal szKey$) AS LONG DECLARE PUBLIC FUNCTION FSetBeepingMode LIB "lcomstf.dll" ALIAS "_FSetBeepingMode@4" (ByVal mode&) AS LONG DECLARE PUBLIC SUB ProSetPos LIB "lcomstf.dll" ALIAS "_ProSetPos@8" (ByVal x&, ByVal y&) DECLARE PUBLIC FUNCTION GrcCopyFilesInCopyList LIB "lcomstf.dll" ALIAS "_GrcCopyFilesInCopyList@4" (ByVal hInstance&) AS LONG DECLARE PUBLIC FUNCTION LcbGetCopyListCost LIB "lcomstf.dll" ALIAS "_LcbGetCopyListCost@12" (ByVal szExtraList$, ByVal szCostList$, ByVal szNeedList$) AS LONG DECLARE PUBLIC FUNCTION FAddToBillboardList LIB "lcomstf.dll" ALIAS "_FAddToBillboardList@16" (ByVal szDll$, ByVal idDlg&, ByVal szProc$, ByVal lTicks&) AS LONG DECLARE PUBLIC FUNCTION FClearBillboardList LIB "lcomstf.dll" ALIAS "_FClearBillboardList@0" () AS LONG DECLARE PUBLIC FUNCTION SetCopyMode LIB "lcomstf.dll" ALIAS "_SetCopyMode@4" (ByVal fMode&) AS LONG DECLARE PUBLIC FUNCTION GetCopyMode LIB "lcomstf.dll" ALIAS "_GetCopyMode@0" () AS LONG DECLARE PUBLIC FUNCTION SetSizeCheckMode LIB "lcomstf.dll" ALIAS "_SetSizeCheckMode@4" (ByVal scmMode&) AS LONG DECLARE PUBLIC FUNCTION LcbGetInfSectionSize LIB "lcomstf.dll" ALIAS "_LcbGetInfSectionSize@4" (ByVal szSect$) AS LONG DECLARE PUBLIC FUNCTION FSetSilent LIB "lcomstf.dll" ALIAS "_FSetSilent@4" (ByVal mode&) AS LONG DECLARE PUBLIC FUNCTION ReadSerialNumber LIB "lcomstf.dll" ALIAS "_ReadSerialNumber@8" (ByVal szSrc$,ByVal szSerial$) AS LONG DECLARE PUBLIC FUNCTION WriteUserRegistration LIB "lcomstf.dll" ALIAS "_WriteUserRegistration@16" (ByVal szRi$,ByVal szUser$,ByVal szCompany$,ByVal szSerial$) AS LONG DECLARE PUBLIC FUNCTION ReadUserRegistration LIB "lcomstf.dll" ALIAS "_ReadUserRegistration@16" (ByVal szRi$,ByVal szUser$,ByVal szCompany$,ByVal szSerial$) AS LONG DECLARE PUBLIC FUNCTION FPopulateLCB LIB "lcomstf.dll" ALIAS "_FPopulateLCB@8" (ByVal hDlg&,ByVal Chapter$) AS LONG DECLARE PUBLIC FUNCTION FSetDateOfFile LIB "lcomstf.dll" ALIAS "_FSetDateOfFile@8" (ByVal szFile$,ByVal szDate$) AS LONG DECLARE PUBLIC FUNCTION FGetFirstChild LIB "lcomstf.dll" ALIAS "_FGetFirstChild@12" (ByVal szChapter$,ByVal szFirsthapter$, ByVal nField&) AS LONG DECLARE PUBLIC FUNCTION FGetFirst LIB "lcomstf.dll" ALIAS "_FGetFirst@12" (ByVal szChapter$,ByVal szFirsthapter$, ByVal nField&) AS LONG DECLARE PUBLIC FUNCTION FGetChapterValStr LIB "lcomstf.dll" ALIAS "_FGetChapterValStr@16" (ByVal szChapter$,ByVal nField&, ByVal szBuf$,ByVal cbBuf&) AS LONG DECLARE PUBLIC FUNCTION FGetChapterValInt LIB "lcomstf.dll" ALIAS "_FGetChapterValInt@12" (ByVal szChapter$,ByVal nField&, lpVal&) AS LONG DECLARE PUBLIC FUNCTION FGetNextSibling LIB "lcomstf.dll" ALIAS "_FGetNextSibling@12" (ByVal szChapter$,ByVal szNextChapter$,ByVal nField&) AS LONG DECLARE PUBLIC FUNCTION FGetNextChild LIB "lcomstf.dll" ALIAS "_FGetNextChild@4" (ByVal szNextChildChapter$) AS LONG DECLARE PUBLIC FUNCTION FGetNext LIB "lcomstf.dll" ALIAS "_FGetNext@4" (ByVal szNextChapter$) AS LONG DECLARE PUBLIC FUNCTION FToggleChapterFilesInCopyList LIB "lcomstf.dll" ALIAS "_FToggleChapterFilesInCopyList@4" (ByVal szChapter$) AS LONG DECLARE PUBLIC FUNCTION LcbGetInfChapterSize LIB "lcomstf.dll" ALIAS "_LcbGetInfChapterSize@4" (ByVal szChapter$) AS LONG DECLARE PUBLIC FUNCTION FInitializeCopyList LIB "lcomstf.dll" ALIAS "_FInitializeCopyList@12" (ByVal szChpt$, ByVal szSourcedir$, ByVal nField&) AS LONG DECLARE PUBLIC FUNCTION FRefreshDestination LIB "lcomstf.dll" ALIAS "_FRefreshDestination@4" (ByVal lpszSym$) AS LONG DECLARE PUBLIC FUNCTION FWriteDestinationSymAndVal LIB "lcomstf.dll" ALIAS "_FWriteDestinationSymAndVal@8" (ByVal lpszIniFile$,ByVal lpszIniSec$) AS LONG DECLARE PUBLIC FUNCTION FSetRestartDir LIB "lcomstf.dll" ALIAS "_FSetRestartDir@4" (ByVal szDir$) AS LONG DECLARE PUBLIC FUNCTION FRestartListEmpty LIB "lcomstf.dll" ALIAS "_FRestartListEmpty@0" () AS LONG DECLARE PUBLIC FUNCTION FExitExecRestart LIB "lcomstf.dll" ALIAS "_FExitExecRestart@0" () AS LONG DECLARE PUBLIC FUNCTION Lot_CreateConsoleProcess LIB "lcomstf.dll" ALIAS "_Lot_CreateConsoleProcess@8" (ByVal lpExeName$, ByVal lpCommandLine$) AS INTEGER DECLARE PUBLIC FUNCTION FGetSectionFileList LIB "lcomstf.dll" ALIAS "_FGetSectionFileList@12" (ByVal lpszSym$, ByVal lpszSection$, ByVal RenameFlag%) AS INTEGER '**************** Tabs UI Declarations ********************************* DECLARE PUBLIC FUNCTION DriveType LIB "mscuistf.dll" ALIAS "_DriveType@4" (ByVal drivetype&) AS LONG DECLARE PUBLIC FUNCTION RegisterFunction LIB "mscuistf.dll" ALIAS "_RegisterFunction@12" (ByVal sess&, ByVal modname$, ByVal fname$) AS INTEGER DECLARE PUBLIC FUNCTION NotebookAddDlgPage LIB "mscuistf.dll" ALIAS "_NotebookAddDlgPage@24" (ByVal hDlg&,_ ByVal idNotebook&, ByVal idDlg&, ByVal lpszDllName$, ByVal lpszDlgProc$,_ ByVal lpszTab$) AS LONG DECLARE PUBLIC FUNCTION FNotebookPageView LIB "mscuistf.dll" ALIAS "_FNotebookPageView@16" (ByVal hDlg&,_ ByVal idNotebook&, ByVal idDlg&, ByVal fShowPage&) AS LONG DECLARE PUBLIC FUNCTION FNotebookTurnToPage LIB "mscuistf.dll" ALIAS "_FNotebookTurnToPage@12" (ByVal hDlg&,ByVal idNotebook&,ByVal id&) AS LONG DECLARE PUBLIC FUNCTION NotebookGetPageHwnd LIB "mscuistf.dll" ALIAS "_NotebookGetPageHwnd@12" (ByVal hDlg&,ByVal idNotebook&,ByVal idPage&) AS LONG DECLARE PUBLIC SUB LCBResetContent LIB "mscuistf.dll" ALIAS "_LCBResetContent@4" (ByVal hDlg&) DECLARE PUBLIC SUB LCBSetRedraw LIB "mscuistf.dll" ALIAS "_LCBSetRedraw@8" (ByVal hDlg&, ByVal fRedraw&) DECLARE PUBLIC FUNCTION LCBGetCount LIB "mscuistf.dll" ALIAS "_LCBGetCount@4" (ByVal hDlg&) AS LONG DECLARE PUBLIC FUNCTION LCBAddItem LIB "mscuistf.dll" ALIAS "_LCBAddItem@8" (ByVal hDlg&, ByVal item$) AS LONG DECLARE PUBLIC FUNCTION LCBReplaceItem LIB "mscuistf.dll" ALIAS "_LCBReplaceItem@16" (ByVal hDlg&, ByVal index&, ByVal itemnum&, ByVal item$) AS LONG DECLARE PUBLIC FUNCTION LCBGetItem LIB "mscuistf.dll" ALIAS "_LCBGetItem@20" (ByVal hDlg&, ByVal index&, ByVal itemnum&, ByVal item$, ByVal itemmax&) AS LONG DECLARE PUBLIC FUNCTION LCBToggleItem LIB "mscuistf.dll" ALIAS "_LCBToggleItem@8" (ByVal hDlg&, ByVal index&) AS LONG DECLARE PUBLIC SUB LCBSetSel LIB "mscuistf.dll" ALIAS "_LCBSetSel@8" (ByVal hDlg&, ByVal index&) DECLARE PUBLIC SUB LCBSetTabs LIB "mscuistf.dll" ALIAS "_LCBSetTabs@20" (ByVal hDlg&, ByVal t1&,ByVal t2&,ByVal t3&,ByVal t4&) DECLARE PUBLIC FUNCTION FGetDriveFreeSpaceList LIB "mscuistf.dll" ALIAS "_FGetDriveFreeSpaceList@4" (ByVal szSymbol$) AS LONG '** UNC stuff DECLARE PUBLIC FUNCTION FAddToDriveFreeSpaceList LIB "mscuistf.dll" ALIAS "_FAddToDriveFreeSpaceList@8" (ByVal szSymbol$,ByVal szNewItem$) AS LONG DECLARE PUBLIC FUNCTION FIsUnvalidatedUNCPath LIB "mscuistf.dll" ALIAS "_FIsUnvalidatedUNCPath@4" (ByVal szPath$) AS LONG DECLARE PUBLIC FUNCTION FIsValidUNCPath LIB "mscuistf.dll" ALIAS "_FIsValidUNCPath@4" (ByVal szPath$) AS LONG DECLARE PUBLIC FUNCTION FGetGroupName LIB "mscuistf.dll" ALIAS "_FGetGroupName@12" (ByVal szGroupFileName$, ByVal szBuf$,ByVal cbBuf&) AS LONG DECLARE PUBLIC FUNCTION RemovePriorVersion(ProdRegKeyName$,ProdVer$) AS INTEGER '*************** Wrappers for MS functions that Lotus re-wrote ************** DECLARE PUBLIC SUB ReadInfFile (szFile$) DECLARE PUBLIC SUB MakeListFromSectionKeys (szSymbol$, szSect$) DECLARE PUBLIC SUB MakeListFromSectionDate (szSym$, szSect$) DECLARE PUBLIC SUB MakeListFromSectionFilename (szSym$, szSect$) DECLARE PUBLIC SUB MakeListFromSectionSize (szSym$, szSect$) DECLARE PUBLIC SUB MakeListFromSectionVersion (szSym$, szSect$) DECLARE PUBLIC FUNCTION SetSilentMode (mode%) AS INTEGER DECLARE PUBLIC FUNCTION SetBeepingMode (mode%) AS INTEGER DECLARE PUBLIC FUNCTION GetSectionKeyDate (szSect$, szKey$) AS STRING DECLARE PUBLIC FUNCTION GetSectionKeyFilename (szSect$, szKey$) AS STRING DECLARE PUBLIC FUNCTION GetSectionKeySize (szSect$, szKey$) AS LONG DECLARE PUBLIC FUNCTION GetSectionKeyVersion (szSect$, szKey$) AS STRING DECLARE PUBLIC SUB RemoveDir (szDir$, cmo%) DECLARE PUBLIC SUB DumpCopyList (szFile$) DECLARE PUBLIC SUB ClearCopyList DECLARE PUBLIC FUNCTION GetCopyListCost (szExtraList$, szCostList$, szNeedList$) AS LONG DECLARE PUBLIC SUB CopyFilesInCopyList DECLARE PUBLIC SUB AddSectionFilesToCopyList (szSect$, szSrc$, szDest$) DECLARE PUBLIC SUB AddSectionKeyFileToCopyList (szSect$, szKey$, szSrc$, szDest$) DECLARE PUBLIC SUB AddToBillboardList (szDll$, idDlg&, szProc$, lTicks&) DECLARE PUBLIC SUB AddBlankToBillboardList (lTicks&) DECLARE PUBLIC SUB ClearBillboardList DECLARE PUBLIC SUB SetCopyGaugePosition (x%, y%) DECLARE PUBLIC SUB SetRestartDir(szDir$) DECLARE PUBLIC FUNCTION RestartListEmpty AS INTEGER DECLARE PUBLIC FUNCTION ExitExecRestart AS INTEGER '** Utility functions DECLARE PUBLIC FUNCTION GetAbsPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING DECLARE PUBLIC FUNCTION MakePath (szDir$, szFile$) AS STRING DECLARE PUBLIC SUB ShowPathError (nmsg%, nDescription%, szPath$) DECLARE PUBLIC SUB ShowPathErrorNoDlgExit (nmsg%, nDescription%, szPath$) DECLARE PUBLIC FUNCTION IsPathWritable (szPath$) AS INTEGER DECLARE PUBLIC FUNCTION ValidatePath (szPath$) AS INTEGER DECLARE PUBLIC FUNCTION RegisterCallback (ReturnStr$, FuncName$) AS INTEGER DECLARE PUBLIC FUNCTION PopupModalDlg (Dlg%, HelpID&) AS STRING DECLARE PUBLIC FUNCTION PopupModelessDlg (Dlg%, HelpID&) AS STRING DECLARE PUBLIC FUNCTION SelectDriveCombo (ComboID$, path$) AS INTEGER DECLARE PUBLIC FUNCTION CheckForSpace (DlgId%) AS INTEGER DECLARE PUBLIC SUB QUIT DECLARE PUBLIC SUB Lot_WriteDestinationSymAndVal(IniFileName$,IniSection$) DECLARE PUBLIC SUB Lot_WriteCriticalDirectories (InstallIniFile$) DECLARE PUBLIC FUNCTION Lot_WriteToRiFile (ripath$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_ReadDefaultsfromRi (default_ripath$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_AreShareToolsSupported () AS INTEGER DECLARE PUBLIC FUNCTION Lot_AreShare32ToolsSupported () AS INTEGER DECLARE PUBLIC FUNCTION Lot_CallSharedTool (func$) AS INTEGER DECLARE PUBLIC FUNCTION GetNotesPathfromLotusIni() AS STRING DECLARE PUBLIC FUNCTION IsNotesInPath() AS INTEGER DECLARE PUBLIC FUNCTION IsShareInAUTOEXEC() AS INTEGER DECLARE PUBLIC FUNCTION ModifyAutoexec(modflag%,directmod%,backup$) AS STRING DECLARE PUBLIC FUNCTION GetBootDrive() AS STRING DECLARE PUBLIC FUNCTION Lot_GetLotusNotesDataPath() AS STRING DECLARE PUBLIC FUNCTION Lot_GetORACLEHomePath() AS STRING DECLARE PUBLIC FUNCTION Lot_GetLotusNotesPrgPath() AS STRING 'DECLARE PUBLIC FUNCTION GetLotusNotesDataPath(szFile$, szSect$, szKey$) AS STRING DECLARE PUBLIC SUB DL_SetOraclePath DECLARE PUBLIC SUB DL_SetNotesDataPath DECLARE PUBLIC FUNCTION TrimNetlotusapp (ByVal path$) AS STRING DECLARE PUBLIC FUNCTION GetLastPathComponent( ByVal szPath$) AS STRING DECLARE PUBLIC SUB ComboSelChanged(BoxNo&, Inst%) DECLARE PUBLIC FUNCTION GetPathFromComboEdit(hDlg&,BoxNo%) AS STRING DECLARE PUBLIC FUNCTION OneUp(s$) AS STRING '** Lotus functions DECLARE PUBLIC FUNCTION Lot_GetLocalHardDrive (ProdSize&,DefaultDir$) AS STRING DECLARE PUBLIC FUNCTION Lot_GetNetHardDrive (ProdSize&,DefaultDir$) AS STRING DECLARE PUBLIC FUNCTION Lot_GetAllHardDrive(ProdSize&,DefaultDir$) AS STRING DECLARE PUBLIC FUNCTION Lot_Dir (szDir$) AS STRING DECLARE PUBLIC FUNCTION Lot_GetChapterFromKeyword (szKeyword$) AS STRING DECLARE PUBLIC FUNCTION Lot_CallProductFunctions (func_name$, BYVAL direction$, always%, back$, parms$) AS STRING DECLARE PUBLIC FUNCTION Lot_CallOneProductFunction (prodno%, func_name$, BYVAL direction$, always%, parms$) AS STRING DECLARE PUBLIC FUNCTION Lot_CheckPath (path$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_GetInfSectionSize (szSect$) AS LONG DECLARE PUBLIC SUB Lot_RemoveSectionFilesFromCopyList (szSect$) DECLARE PUBLIC SUB Lot_RemoveSectionKeyFileFromCopyList (szSect$, szKey$) DECLARE PUBLIC FUNCTION Lot_SetDateOfFile (szFile$, szDate$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_GetFirst (szChapt$, nFlag%) AS STRING DECLARE PUBLIC FUNCTION Lot_GetNext () AS STRING DECLARE PUBLIC FUNCTION Lot_AddPagetoNotebook (hDlg&, Notebookid&, DlgId%,Tabstring$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_NotebookPageView (hDlg&, Notebookid&, DlgId%, fShowPage%) AS INTEGER DECLARE PUBLIC SUB Lot_TurnToPage (hDlg&,Notebookid&, pageid%) DECLARE PUBLIC FUNCTION Lot_GetPagehandle (hDlg&,Notebookid&,Pageid%) AS LONG DECLARE PUBLIC SUB Lot_LCBResetContent (hDlg&) DECLARE PUBLIC SUB Lot_LCBSetRedraw (hDlg&, fRedraw%) DECLARE PUBLIC FUNCTION Lot_LCBGetCount (hDlg&) AS INTEGER DECLARE PUBLIC FUNCTION Lot_LCBAddItem (hDlg&, item$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_LCBReplaceItem (hDlg&, index%, itemnum%, item$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_LCBGetItem (hDlg&, index%, itemnum%) AS STRING DECLARE PUBLIC FUNCTION Lot_LCBToggleItem (hDlg&, index%) AS INTEGER DECLARE PUBLIC SUB Lot_LCBSetSel (hDlg&, index%) DECLARE PUBLIC SUB Lot_LCBSetTabs (hDlg&, t1%,t2%,t3%,t4%) DECLARE PUBLIC FUNCTION Lot_GetFirstChild (szChapt$, nFlag%) AS STRING DECLARE PUBLIC FUNCTION Lot_GetChapterValStr (szChapter$, nField%) AS STRING DECLARE PUBLIC FUNCTION Lot_GetChapterValInt (szChapter$,nField%) AS INTEGER DECLARE PUBLIC FUNCTION Lot_GetNextSibling (szChapter$,nField%) AS STRING DECLARE PUBLIC FUNCTION Lot_GetNextChild () AS STRING DECLARE PUBLIC FUNCTION Lot_GetInfChapterSize (szChapter$) AS LONG DECLARE PUBLIC SUB Lot_ToggleChapterFilesInCopyList (szChapter$) DECLARE PUBLIC FUNCTION Lot_SetChapterFilesInCopyListInOrOut (szChapter$, InOrOut%) AS INTEGER DECLARE PUBLIC SUB Lot_InitializeCopyList (chpt$, nField%) DECLARE PUBLIC SUB Lot_RefreshDestination (symbol$) DECLARE PUBLIC SUB Lot_GetDriveFreeSpaceList (szSymbol$) DECLARE PUBLIC FUNCTION Lot_GetSharedToolsSize() AS INTEGER DECLARE PUBLIC FUNCTION Lot_GetShared32ToolsSize() AS INTEGER DECLARE PUBLIC FUNCTION Lot_MakeSizeString (size AS LONG) AS STRING DECLARE PUBLIC FUNCTION Lot_ExtractDriveLetter (destdir$) AS STRING DECLARE PUBLIC FUNCTION Lot_ExtractDirectory (destdir$) AS STRING DECLARE PUBLIC FUNCTION Lot_GetGroupName ( szGroupFileName$) AS STRING DECLARE PUBLIC FUNCTION Lot_IsTheFeatureInstalled(s$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING DECLARE PUBLIC FUNCTION Lot_GetDestDirValueFromInstallini(DestDirSym$) AS STRING DECLARE PUBLIC SUB Lot_InitializeWinWinsysSym () DECLARE PUBLIC SUB Lot_InitializeEXTRA () DECLARE PUBLIC FUNCTION Lot_IsDestVerNewerOrEqual(DestinationPath$,SourceVer1&,SourceVer2&,SourceVer3&,SourceVer4&) AS INTEGER DECLARE PUBLIC SUB Lot_CallWinhelp32 (prodno%, network$, SectionName$, DestDirSym$, FileName$) DECLARE PUBLIC SUB Lot_FixupSourceDirectories DECLARE PUBLIC SUB MarkFixupSourceDirSymbol(szSubdirSymbol$) DECLARE PUBLIC FUNCTION Lot_RegIni(RegFileName$) AS INTEGER DECLARE PUBLIC SUB Lot_RegisterFonts() DECLARE PUBLIC FUNCTION Lot_RegisterTypeLib(ID$, Version$, Description$, helppath$, filename$, flags%) AS INTEGER DECLARE PUBLIC FUNCTION New_RegisterTypeLib(typelibname as string, helpdir as string) as long DECLARE PUBLIC SUB IncrementSharedDLLCount(s$) '** UNC stuff DECLARE PUBLIC SUB Lot_SplitUNCPath (szFullPath$, szVol$, szDirPath$) DECLARE PUBLIC FUNCTION Lot_AddToDriveFreeSpaceList (szSymbol$, szNewItem$) AS LONG DECLARE PUBLIC FUNCTION Lot_IsUnvalidatedUNCPath (szPath$) AS LONG DECLARE PUBLIC FUNCTION Lot_IsValidUNCPath (szPath$) AS LONG DECLARE PUBLIC FUNCTION FMapUNCVolume LIB "mscuistf.dll" ALIAS "_FMapUNCVolume@8" (ByVal szUNCRoot$, ByVal szDrive$) AS LONG DECLARE PUBLIC FUNCTION FUnmapUNCVolume LIB "mscuistf.dll" ALIAS "_FUnmapUNCVolume@4" (ByVal szDrive$) AS LONG DECLARE PUBLIC FUNCTION ValidateEditBox (hDlg&, Ctrl%) AS INTEGER DECLARE PUBLIC FUNCTION ValidateBrowse (hDlg&, Ctrl%) AS INTEGER '** end UNC stuff 'Registration functions moved to REGISTER.LSS DECLARE PUBLIC FUNCTION Lot_GetCurrentProduct() AS INTEGER DECLARE PUBLIC SUB Lot_SetCurrentProduct(ProdNo%) DECLARE PUBLIC FUNCTION Lot_GetInstallDir() AS STRING DECLARE PUBLIC FUNCTION Lot_GetTheRealProdDir(prodno%) AS STRING DECLARE PUBLIC FUNCTION Lot_Readserialnumber () AS INTEGER DECLARE PUBLIC FUNCTION Lot_SaveFeaturesInstaledInInstallIni() AS INTEGER DECLARE PUBLIC FUNCTION Lot_SaveFeaturesInstaledInInstNodeIni() AS INTEGER DECLARE PUBLIC FUNCTION Lot_SaveTheNodeOptionsInInstallIni() AS INTEGER DECLARE PUBLIC FUNCTION Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_AreAnyNodeOptionsAvail() AS INTEGER DECLARE PUBLIC FUNCTION Lot_IsAnyNodeOptAvailToNode()AS INTEGER DECLARE PUBLIC FUNCTION Lot_AreNodeOptAvailToNodeForProd(prodNum%) AS INTEGER DECLARE PUBLIC FUNCTION Lot_GetNumOfNodeOptAvailToNodeForProd(prodNum%) AS INTEGER DECLARE PUBLIC FUNCTION Lot_AreAnyNodeOptAvailToSrv() AS INTEGER DECLARE PUBLIC SUB Lot_TurnOffAllNodeOptSections() DECLARE PUBLIC FUNCTION Lot_SaveTheCDOptionsInInstallIni() AS INTEGER DECLARE PUBLIC FUNCTION Lot_IsTheCDOptionsAvailToNode(prodNum%,OptName$) AS INTEGER DECLARE PUBLIC FUNCTION Lot_IsAnyCDOptAvailToNode()AS INTEGER DECLARE PUBLIC FUNCTION Lot_AreCDOptAvailToNodeForProd(prodNum%) AS INTEGER DECLARE PUBLIC FUNCTION Lot_GetNumOfCDOptAvailToNodeForProd(prodNum%) AS INTEGER DECLARE PUBLIC FUNCTION Lot_AreAnyCDOptAvailToSrv() AS INTEGER '** Win95 uninstaller functions DECLARE PUBLIC FUNCTION Lot_RegisterUninstaller(ProdRegKeyName$,ProdVer$,_ ProdDisplayedName$,ProdInfPath$,_ LogFlag%,AutoFlag%,_ LangID$,LogFile$,RspFile$,_ UserName$ ) AS INTEGER DECLARE PUBLIC FUNCTION Lot_RegisterObject(FeatureKeyWord$,ClassOfObject$,_ ObjectPath$) '** Resource splitting functions DECLARE PUBLIC FUNCTION FindResourceinDLL (idDlg&, ResType%) AS STRING '** Local functions DECLARE PUBLIC SUB DisplayWhenSpaceIsTight(szCost$,szNeed$) DECLARE FUNCTION Lot_GetLastFeatureNumber() AS INTEGER DECLARE FUNCTION Lot_GetLastNodeOptNumber(s$) AS INTEGER DECLARE FUNCTION Lot_GetLastCDOptNumber(s$) AS INTEGER 'Don't make this generally available DECLARE FUNCTION AddFontResource LIB "gdi32" alias "AddFontResourceA" (ByVal szFFile$) AS INTEGER '** Local globals PUBLIC gEndStatementEncountered% ' TRUE when END statement encountered '************************************************************************** SUB INITIALIZE '** Purpose: Sets the begining of the Product registration array '** Arguments: '************************************************************************* gCurrNumOfProds% = 0 gCurrentProduct% = 1 ' Moved from main because of symbol initialization in early LdString calls ON Error STFQUIT GOTO MAINERROR ON Error STFERR GOTO STFERR_ ON Error STFTOGGLE GOTO STFTOGGLEERR ToolKitInitalizeError& = 0 SetUpAPI EXIT SUB MAINERROR: ToolKitInitalizeError& = STFQUIT EXIT SUB STFERR_: ToolKitInitalizeError& = STFERR EXIT SUB STFTOGGLEERR: ToolKitInitalizeError& = STFTOGGLE END SUB PUBLIC FUNCTION Lot_GetSharedToolsSize() AS INTEGER '** Purpose: '** Gets the size of the shared tools in Kb '** Arguments: '** Returns: '** the size or 0 '************************************************************************* DIM CurrChpt$, SharedID$, ShareSize& CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) WHILE (CurrChpt$ <> "") SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE) IF SharedID$="IVCPROGRAM" OR _ SharedID$="CONTAINERFILEPROGRAM" OR _ SharedID$="DATALENSPROGRAM" OR _ SharedID$="DATALENSDATA" OR _ SharedID$="DIALOGEDITORPROGRAM" OR _ SharedID$="DESKTOP" OR _ SharedID$="DOCUMENTFILEFILTERSPROGRAM" OR _ SharedID$="DOCUMENTFILEFILTERSFILTER" OR _ SharedID$="GRAMMARCHECKERPROGRAM" OR _ SharedID$="GRAMMARCHECKERDATA" OR _ SharedID$="GRAPHICFILEFILTERSPROGRAM" OR _ SharedID$="HYPHENATIONPROGRAM" OR _ SharedID$="HYPHENATIONDATA" OR _ SharedID$="ICONPALETTEPROGRAM" OR _ SharedID$="INFOBOXPROGRAM" OR _ SharedID$="SCRIPTPROGRAM" OR _ SharedID$="MULTIMEDIAPROGRAM" OR _ SharedID$="MULTIMEDIADATA" OR _ SharedID$="SPELLCHECKERPROGRAM" OR _ SharedID$="SPELLCHECKERDATA" OR _ SharedID$="SPELLCHECKERUSER" OR _ SharedID$="STATUSBARPROGRAM" OR _ SharedID$="THESAURUSPROGRAM" OR _ SharedID$="THESAURUSDATA" OR _ SharedID$="TOOLSPROGRAM" OR _ SharedID$="TOOLSDATA" OR _ SharedID$="USERNAMESERVICESPROGRAM" OR _ SharedID$="FILTERS" OR _ SharedID$="EXCELFLT" THEN ShareSize& = ShareSize&+Lot_GetInfChapterSize(CurrChpt$) END IF CurrChpt$ = Lot_GetNext() WEND Lot_GetSharedToolsSize = INT(ShareSize&/1024) 'testint% = INT(ShareSize& / 1024) 'Lot_GetSharedToolsSize = testint% 'DoMsgBox("testint%", STR$(testint%), MB_OK) END FUNCTION PUBLIC FUNCTION Lot_GetShared32ToolsSize() AS INTEGER '** Purpose: '** Gets the size of the shared tools for Win32 in Kb '** Arguments: '** Returns: '** the size or 0 '************************************************************************* DIM CurrChpt$, SharedID$, ShareSize& CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) WHILE (CurrChpt$ <> "") SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE) IF SharedID$="WIN32IVCPROGRAM" OR _ SharedID$="WIN32CONTAINERFILEPROGRAM" OR _ SharedID$="WIN32DATALENSPROGRAM" OR _ SharedID$="WIN32DATALENSDATA" OR _ SharedID$="WIN32DIALOGEDITORPROGRAM" OR _ SharedID$="WIN32DESKTOP" OR _ SharedID$="WIN32DOCUMENTFILEFILTERSPROGRAM" OR _ SharedID$="WIN32DOCUMENTFILEFILTERSFILTER" OR _ SharedID$="WIN32GRAMMARCHECKERPROGRAM" OR _ SharedID$="WIN32GRAMMARCHECKERDATA" OR _ SharedID$="WIN32GRAPHICFILEFILTERSPROGRAM" OR _ SharedID$="WIN32HYPHENATIONPROGRAM" OR _ SharedID$="WIN32HYPHENATIONDATA" OR _ SharedID$="WIN32ICONPALETTEPROGRAM" OR _ SharedID$="WIN32INFOBOXPROGRAM" OR _ SharedID$="WIN32SCRIPTPROGRAM" OR _ SharedID$="WIN32MULTIMEDIAPROGRAM" OR _ SharedID$="WIN32MULTIMEDIADATA" OR _ SharedID$="WIN32SPELLCHECKERPROGRAM" OR _ SharedID$="WIN32SPELLCHECKERDATA" OR _ SharedID$="WIN32SPELLCHECKERUSER" OR _ SharedID$="WIN32STATUSBARPROGRAM" OR _ SharedID$="WIN32THESAURUSPROGRAM" OR _ SharedID$="WIN32THESAURUSDATA" OR _ SharedID$="WIN32TOOLSPROGRAM" OR _ SharedID$="WIN32TOOLSDATA" OR _ SharedID$="WIN32USERNAMESERVICESPROGRAM" OR _ SharedID$="WIN32FILTERS" OR _ SharedID$="WIN32EXCELFLT" THEN ShareSize& = ShareSize&+Lot_GetInfChapterSize(CurrChpt$) END IF CurrChpt$ = Lot_GetNext() WEND Lot_GetShared32ToolsSize = INT(ShareSize&/1024) 'testint% = INT(ShareSize& / 1024) 'Lot_GetSharedToolsSize = testint% 'DoMsgBox("testint%", STR$(testint%), MB_OK) END FUNCTION '********************************************************* PUBLIC FUNCTION GetAbsPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING '** Purpose: This function is called whenever we need to retrieve a string '** from .ini file. Function returns a clean path (path returned from '** FCleanFatPath. '** Author: JKK '** Arguments: Name of the .ini file, section name in the .ini file, key we '** are searching for and two integer flags, nullflag% & invalidpath%. '** Function puts up two error messages based on the value of nullflag%, and '** invalidpath. '** Returns: Function either returns null or the value of the string. '** '************************************************************************* DIM rstring$, rv%, errText$ GetAbsPathFromIni = "" rstring$ = GetIniKeyString(szFile$, szSect$, szKey$) If rstring$ <> "" Then rv% = Lot_CleanPath(rstring$) 'tqi - I believe this trim should no longer be necessary, but no harm to leave it errText$ = NullTrim(szFile$) if rv% <> 0 Then GetAbsPathFromIni = rstring$ elseif invalidpathflag% <> FALSE then ErrorMsg SID_ERR_GETINIKEYSTRING, errText$ ERROR STFQUIT end if elseif nullflag% <> FALSE then ErrorMsg SID_ERR_GETINIKEYSTRING, errText$ ERROR STFQUIT else GetAbsPathFromIni = "" end if END FUNCTION PUBLIC FUNCTION MakePath (szDir$, szFile$) AS STRING '** Purpose: '** Appends a file name to the end of a directory path, '** inserting a backslash character as needed. '** Arguments: '** szDir$ - full directory path (with optional ending "\") '** szFile$ - filename to append to directory '** Returns: '** Resulting fully qualified path name. (Lower Case) '************************************************************************* DIM sz$ IF szDir$ = "" THEN sz$ = szFile$ ELSEIF szFile$ = "" THEN sz$ = szDir$ ELSEIF LENBP(szFile$) > 12 THEN IF LENBP(szFile$) = 13 AND RIGHT$(szFile$,1) = "\" THEN sz$ = szDir$ + szFile$ ELSE ' sz$ = "" sz$ = szDir$ + "\" + szFile$ END IF ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN sz$ = szDir$ + szFile$ ELSE sz$ = szDir$ + "\" + szFile$ END IF IF sz$ <> "" THEN MakePath = LCASE$(sz$) ELSE MakePath = sz$ END IF END FUNCTION PUBLIC FUNCTION Lot_MakeSizeString(size&) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* Lot_MakeSizeString = STR$(size&) + gStrK$ END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_ExtractDriveLetter(destdir$) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* Lot_ExtractDriveLetter = LCASE$(MID$(destdir$, 1, 1)) END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_ExtractDirectory(destdir$) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* Lot_ExtractDirectory = LCASE$(MID$(destdir$, 3)) END FUNCTION '************************************************************************* PUBLIC SUB Lot_CallWinhelp32 (prodno%, network$, SectionName$, DestDirSym$, FileName$) '** Purpose:Calls winhelp32 to build GIDs at reinstall. '** Author:MZ '** Arguments:prodno%, ' network$, ' SectionName$, ' DestDirSym$, ' FileName$ '************************************************************************* DIM ExecError%,CopyDestDir$ IF GetListItem(SYM_INSTALLKINDS$, prodno%) = gREINSTALL$ THEN IF network$ = gSTANDARD$ OR network$ = gNODE$ THEN IF (Lot_IsTheFeatureInstalled(SectionName$) = 1) THEN 'CopyDestDir$ = GetSymbolValue(DestDirSym$) CopyDestDir$ = Lot_WhereIsFeature(prodno%, SectionName$, FileName$) ' ExecError% = WinExec ("winhlp32 -g "+CopyDestDir$+FileName$, SW_HIDE) ExecError% = WinExec ("winhlp32 -g "+CopyDestDir$+FileName$, SW_SHOW) END IF END IF END IF END SUB '** UNC stuff PUBLIC SUB Lot_SplitUNCPath (szFullPath$, szVol$, szDirPath$) '** Purpose:Splits a string into a UNC volume and a directory path '** Author:GJL '** Arguments:A path string, a string for the UNC vol '** a string for the resulting dir path '** Returns:If UNC vol is invalid szVol will be empty '** '************************************************************************* DIM StrOff&, tmp& StrOff& = INSTR( szFullPath$, "\\" ) IF StrOff = 1 THEN StrOff& = INSTR( MID$(szFullPath$, 3), "\" ) IF StrOff > 0 THEN tmp& = StrOff + 3 StrOff& = StrOff + 3 StrOff& = INSTR( MID$(szFullPath$, tmp&), "\" ) - 1 IF StrOff& > 0 THEN StrOff& = StrOff& + tmp& szVol$ = LEFT$(szFullPath$, StrOff& - 1) szDirPath$ = MID$(szFullPath$, StrOff) ELSE szVol$ = szFullPath$ szDirPath = "" END IF ELSE szVol$ = "" szDirPath = "" END IF ELSE szVol$ = "" szDirPath$ = szFullPath$ END IF END SUB '** end UNC stuff PUBLIC SUB Lot_SplitAnyPath (szFullPath$, szVol$, szDirPath$) '** Purpose:Splits a string into a volume and a directory path '** Author: '** Arguments:A path string, a string for the vol '** a string for the resulting dir path '** Returns: Volume and directory '** '************************************************************************* If Lot_IsUnvalidatedUNCPath(szFullPath$) Then Lot_SplitUNCPath szFullPath$, szVol$, szDirPath$ Else szVol$ = LEFT$(szFullPath$, 2) szDirPath$ = MID$(szFullPath$,3) End If END SUB '*********************************************************************** PUBLIC FUNCTION Lot_GetVol (szFullPath$) '** Description: '** Return the volume whether it is UNC or local. '** '** Explicit Parameters: '** szFullPath$ The path from which to extract the path. '** '** Implicit Parameters: '** Returns: The volume. '*********************************************************************** DIM szVol$, szDirPath$ Lot_SplitAnyPath szFullPath$, szVol$, szDirPath$ Lot_GetVol = szVol$ END FUNCTION '*********************************************************************** '** '** Name: ShowPathError '** Description: '** Display a path error '** '** Explicit Parameters: '** nmsg& The error message number to display. Use 0 if none '** nDescription% The description of the message '** szPath$ The path with the problem '** '** Out symbols: '** '** Implicit Parameters: '** '*********************************************************************** PUBLIC SUB ShowPathError (nmsg%, nDescription%, szPath$) DIM sz$ sz$ = CHR$(10) + CHR$(10) + " " + szPath$ sz$ = NullTrim$(sz$) IF nDescription% <> 0 THEN sz$ = sz$ + CHR$(10) + CHR$(10) + LdString(nDescription%) END IF ErrorMsg nmsg%, sz$ END SUB '*********************************************************************** '** '** Name: ShowPathErrorNoDlgExit '** Description: '** Display a path error and tell the dialog not to exit '** '** Explicit Parameters: '** nmsg& The error message number to display. Use 0 if none '** nDescription& The description of the message '** szPath$ The path with the problem '** '** Out symbols: '** __LASTSTATUS Set to "Q" to tell script not to quit '** '** Implicit Parameters: '** '*********************************************************************** PUBLIC SUB ShowPathErrorNoDlgExit (nmsg%, nDescription%, szPath$) ShowPathError nmsg%, nDescription%, szPath$ SetListItem "__LASTSTATUS", 1, "Q" END SUB '*********************************************************************** '** '** Name: IsPathWritable '** Description: '** Determine if we can write to a path. '** '** Explicit Parameters: '** szPath$ Pathname with no filename. '** '** Out symbols: '** '** Implicit Parameters: '** '** Returns: 1 if path is writable '** '*********************************************************************** PUBLIC FUNCTION IsPathWritable (szPath$) AS INTEGER DIM sz$, cb%, i%, j% '** We can't check if the path is writable if the syntax is bad IsPathWritable = 0 sz$=szPath$ IF Lot_CheckPath(szPath$) <> FALSE THEN '** Strip any trailing backslash IF cb% > 3 AND RIGHT$(sz$,1) = "\" THEN cb% = LEN(sz$) sz$ = MID$(sz$,1,(cb%-1)) END IF '** Back through the directories until we find a directory that exists DO '** If the directory exists then return if the directory is writable IF LEN(sz$) <= 3 OR DoesDirExist(sz$) = 1 THEN IsPathWritable = IsDirWritable(sz$) IF IsPathWritable = FALSE THEN SetSymbolValue SYM_LAST_ERROR_SID$ , CStr(SID_DIR_READONLY) END IF EXIT DO END IF '** If dir does not exists then strip off the last dir and try again i% = INSTR(sz$,"\") IF i% = 0 THEN EXIT DO DO j% = INSTR((i%+1),sz$,"\") IF j% = 0 THEN IF i% = 3 THEN sz$ = MID$(sz$,1,3) '** Handle root special ELSE sz$ = MID$(sz$,1,(i%-1)) '** Strip last directory END IF EXIT DO END IF i% = j% LOOP LOOP END IF END FUNCTION '*********************************************************************** '** '** Name: ValidatePath '** Description: '** Determine if path is valid and display errors '** '** THIS FUNCTION SHOULD ONLY BE USED FOR DESTINATION PATHS!!! '** '** Explicit Parameters: '** szPath$ Pathname with no filename '** '** Out symbols: '** '** Implicit Parameters: '** '** Returns: 1 if path is valid '** '*********************************************************************** PUBLIC FUNCTION ValidatePath (szPath$) AS INTEGER DIM cch%, difflen% , notused& DIM volPath$, dirPath$, writable%, dirPathType$ ValidatePath = FALSE if szPath$ = "" then Exit Function End if cch% = LENBP(szPath$) difflen% = cch% + CINT(GetSymbolValue(SYM_DOSMAXPATHDIFF$)) SetSymbolValue SYM_LAST_ERROR_SID$ , CStr(SID_ERR_DIRSYNTAXDESCRLONG) '*** UNC stuff '** If it's a UNC path do some checks IF Lot_CleanPath(szPath$) = FALSE THEN ShowPathError SID_ERR_DIRSYNTAX,_ CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), szPath$ szPath$ = NullTrim$(szPath$) EXIT FUNCTION END IF IF Lot_IsUnvalidatedUNCPath(szPath$) = TRUE THEN Lot_SplitUNCPath szPath$, volPath$, dirPath$ IF Lot_IsvalidUNCPath(volPath$) = FALSE THEN ShowPathError CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), 0, volPath$ ELSEIF dirPath$ = "" OR Len(dirPath$) = 1 THEN ShowPathError SID_ERR_DIRSYNTAX, SID_ERR_DIRROOTDESCR, szPath$ ' ELSEIF Lot_CleanPath(szPath$) = FALSE THEN ' ShowPathError SID_ERR_DIRSYNTAX,_ ' CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), szPath$ '** Make sure the path is not too long ELSEIF difflen% > MAX_DIR_PATH THEN '** This is only about the path length and might need a new message ErrorMsg SID_ERR_PATHLEN, "" ELSE SetSymbolValue SYM_LAST_ERROR_SID$ , CStr(SID_DIR_READONLY) writable% = IsPathWritable(szPath$) IF writable% = FALSE THEN ShowPathError CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), 0, szPath$ ValidatePAth = FALSE ELSE ValidatePath = TRUE END IF END IF '*** end UNC stuff ELSE '*** Check letter drives '** Make sure the drive is valid IF (MID$(szPath$,2,1) = ":" AND IsDriveValid(szPath$) = FALSE) THEN ShowPathError SID_DRV_NOTEXIST, 0, MID$(szPath$,1,2) '** Make sure the syntax of the path name is correct ' ELSEIF Lot_CleanPath(szPath$) = FALSE THEN ' ShowPathError SID_ERR_DIRSYNTAX,_ ' CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), szPath$ '** Make sure not installing to the root ELSEIF (LEN(szPath$) = 2) OR (LEN(szPath$) = 3 _ AND MID$(szPath$,3,1) = "\") THEN ShowPathError SID_ERR_DIRSYNTAX, SID_ERR_DIRROOTDESCR, szPath$ '** Make sure the path is not too long ELSEIF difflen% > MAX_DIR_PATH THEN '** This is only about the path length and might need a new message ErrorMsg SID_ERR_PATHLEN, "" ELSE '** Make sure the path is writable writable% = IsPathWritable(szPath$) IF writable% = FALSE THEN SetSymbolValue SYM_LAST_ERROR_SID$ , CStr(SID_DIR_READONLY) ShowPathError CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), 0, szPath$ ValidatePAth = FALSE ELSE ValidatePath = TRUE END IF END IF END IF szPath$ = NullTrim$(szPath$) END FUNCTION 'PUBLIC FUNCTION ValidateEditBox (hDlg&, Ctrl%) AS INTEGER '** Purpose:check editbox text for valid volumes '** Author: '** Arguments: '** Returns: '** '************************************************************************* PUBLIC FUNCTION ValidateEditBox (hDlg&, Ctrl%) AS INTEGER DIM eb$, vol$, path$, editbox$, combobox$, comboId% comboBox = "IDC_COMBO"+Right$(Str$(Ctrl%),1) editBox = "IDC_EDIT"+Right$(Str$(Ctrl%),1) comboId% = Ctrl% + 400 '**CB_GETCURSEL = 0x147 = 327 ValidateEditBox = 1 + SendMessage(GetDlgItem(hDlg&,comboId%), 327, 0, 0) eb$=GetListItem("IDC_EDIT",Ctrl%) Lot_SplitUNCPath eb$, vol$, path$ IF NOT vol$ = "" THEN '** There is a UNC path in the edit box ValidateEditBox = SelectDriveCombo(combobox, vol$) IF ValidateEditBox = 0 THEN ShowPathError CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), 0, vol$ EXIT FUNCTION END IF IF ValidatePath(eb$) = FALSE THEN ValidateEditBox = 0 EXIT FUNCTION END IF ELSE IF MID$(eb$,2,1) = ":" THEN '** There is a drive letter in the edit box ValidateEditBox = SelectDriveCombo (comboBox, eb$) IF ValidateEditBox = 0 THEN ShowPathError SID_DRV_NOTEXIST, 0, Left$(eb$,2) ELSE SetListItem "IDC_EDIT", Ctrl%, Lot_ExtractDirectory(eb$) AddListItem SYM_UPDATELIST$, editBox END IF ELSE IF MID$(eb$,1,1) <> "\" THEN SetListItem "IDC_EDIT", Ctrl%, "\"+eb$ AddListItem SYM_UPDATELIST$, editBox END IF END IF END IF END FUNCTION 'PUBLIC FUNCTION ValidateBrowse (hDlg&, Ctrl%) AS INTEGER '** Purpose:check browse results text for valid volumes '** Author: '** Arguments: '** Returns: '** '************************************************************************* PUBLIC FUNCTION ValidateBrowse (hDlg&, Ctrl%) AS INTEGER DIM eb$, vol$, path$, editbox$, combobox$, comboId% comboBox = "IDC_COMBO"+Right$(Str$(Ctrl%),1) editBox = "IDC_EDIT"+Right$(Str$(Ctrl%),1) comboId% = Ctrl% + 400 '**CB_GETCURSEL = 0x147 = 327 ValidateBrowse = 1 + SendMessage(GetDlgItem(hDlg&,comboId%), 327, 0, 0) eb$=GetSymbolValue("SYM_BROWSE_RESULT") Lot_SplitUNCPath eb$, vol$, path$ IF NOT vol$ = "" THEN IF ValidatePath(eb$) = FALSE THEN ValidateBrowse = FALSE EXIT FUNCTION END IF ValidateBrowse = SelectDriveCombo(combobox, vol$) IF ValidateBrowse = 0 THEN ShowPathError CInt(GetSymbolValue(SYM_LAST_ERROR_SID$)), 0, vol$ ELSE SetListItem "IDC_EDIT", Ctrl%, eb$ AddListItem SYM_UPDATELIST$, editBox END IF EXIT FUNCTION ELSE IF MID$(eb$,2,1) = ":" THEN ValidateBrowse = SelectDriveCombo (comboBox, eb$) IF ValidateBrowse = 0 THEN ShowPathError SID_DRV_NOTEXIST, 0, Left$(eb$,2) ELSE SetListItem "IDC_EDIT", Ctrl%, Lot_ExtractDirectory(eb$) AddListItem SYM_UPDATELIST$, editBox END IF ELSE IF MID$(eb$,1,1) <> "\" THEN SetListItem "IDC_EDIT", Ctrl%, "\"+eb$ AddListItem SYM_UPDATELIST$, editBox END IF END IF END IF END FUNCTION PUBLIC FUNCTION Lot_Dir (szDir$) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM DirRet$ DirRet$ = Dir$(szDir$) Lot_Dir = DirRet$ END FUNCTION PUBLIC FUNCTION Lot_GetLocalHardDrive(ProdSize&,DefaultDir$) AS STRING '** Purpose: '** Gets the first writable local hard disk with enough space e.g. D: '** Arguments: '** ProdSize& the minimum size requirements for installing a product '** DefaultDir$ the default directory to install to '** Returns: '** D:\ + DefaultDir$ or an empty string '************************************************************************* DIM Length%, count%, lDrive$, SpaceAvail& Lot_GetLocalHardDrive = "" Length% = GetListLength(SYM_LOCALHARDDRIVES$) IF Length% = 0 THEN GetLocalHardDrivesList SYM_LOCALHARDDRIVES$ Length% = GetListLength(SYM_LOCALHARDDRIVES$) END IF FOR count% = 1 TO Length% lDrive$ = GetListItem(SYM_LOCALHARDDRIVES$, count%) SpaceAvail& = GetFreeSpaceForDrive(lDrive$) lDrive$ = lDrive$ + ":\" + DefaultDir$ IF SpaceAvail& > (ProdSize& \ 1024) AND IsPathWritable(lDrive$) THEN Lot_GetLocalHardDrive = LCASE$(lDrive$) EXIT FUNCTION END IF NEXT END FUNCTION PUBLIC FUNCTION Lot_GetNetHardDrive(ProdSize&,DefaultDir$) AS STRING '** Purpose: '** Gets the first writable network hard disk with enough space e.g. D: '** Arguments: '** ProdSize& the minimum size requirements for installing a product '** DefaultDir$ the default directory to install to '** Returns: '** D:\ + DefaultDir$ or an empty string '************************************************************************* DIM Length%, count%, lDrive$, SpaceAvail& Lot_GetNetHardDrive = "" GetNetworkDrivesList SYM_NETHARDDRIVES$ Length% = GetListLength(SYM_NETHARDDRIVES$) FOR count% = 1 TO Length% lDrive$ = GetListItem(SYM_NETHARDDRIVES$, count%) SpaceAvail& = GetFreeSpaceForDrive(lDrive$) lDrive$ = lDrive$ + ":\" + DefaultDir$ IF SpaceAvail& > (ProdSize& \ 1024) AND IsPathWritable(lDrive$) THEN Lot_GetNetHardDrive = LCASE$(lDrive$) EXIT FUNCTION END IF NEXT END FUNCTION PUBLIC FUNCTION Lot_GetAllHardDrive(ProdSize&,DefaultDir$) AS STRING '** Purpose: '** Gets the first writable local or network hard disk with enough '** space e.g. D: '** Arguments: '** ProdSize& the minimum size requirements for installing a product '** DefaultDir$ the default directory to install to '** Returns: '** D:\ + DefaultDir$ or an empty string '************************************************************************* DIM drv$ drv$ = Lot_GetLocalHardDrive(ProdSize&, DefaultDir$) IF drv$ <> "" THEN Lot_GetAllHardDrive = drv$ ELSE Lot_GetAllHardDrive = Lot_GetNetHardDrive(ProdSize&, DefaultDir$) END IF END FUNCTION PUBLIC FUNCTION Lot_GetChapterFromKeyword (szKeyword$) AS STRING '** Purpose: Get the chapter # given the Chapter name '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM g_strbuf$ g_strbuf$ = CreateBuffer(256) If FGetChapterFromKeyword(szKeyword$, g_strbuf$, 256) = 0 Then Lot_GetChapterFromKeyword = "" Else Lot_GetChapterFromKeyword = NullTrim(g_strbuf$) End If END FUNCTION PUBLIC Lot_CallExec_RC$ PUBLIC FUNCTION Lot_CallProductFunctions (func_name$, BYVAL direction$, always%, back$, parms$) AS STRING '** Purpose: '** Author: '** Arguments: '** func_name$: Name of function + prod Acronym will be called. '** always%: IF TRUE then alwasy calls function, otherwise only if product is turned on. '** direction$: determines the direction: gBACK means start at the last callback. '** Returns: '** '************************************************************************* DIM n%, i%, lname$, prodcall$, notused%, incr% Lot_CallProductFunctions = "" n% = Reg_GetNumberOfProducts() If direction$ = gBACK Then i% = n% incr% = 1 Else i% = 1 incr% = -1 End If WHILE (i% >= 1 AND i% <= n%) lname$ = Reg_GetProductAcronym(i%) If lname$ <> "" AND (always% <> FALSE OR Prods(i%).UIInOrOut <> FALSE) Then ' ' construct a lotus script statement for EXECUTE. It will look ' something like this: ' INIT123(i%, "server$", parms$) ' If parms$ <> "" Then prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & i% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & "," & parms$ & ")" Else prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & i% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & ")" End If ' DOEXEC removed and replaced by EXECUTE! ' call DOEXEC, which acts like the script EXECUTE statement. ' The difference is that DOEXEC operates in the default module, ' while EXECUTE creates a temporary module that disappears once the ' call is made. The first parameter to DOEXEC is a module name, ' which is made into a "USE modname" statement, if that module ' name has not yet been USE'd via DOEXEC. The second arg is the ' statement to be run. Note - the args must be call by value, ' not reference (can be done by enclosing args in parens) gEndStatementEncountered% = FALSE '** TV : old execute : on error doesn't work 'EXECUTE(|USE "| & lname$ & |" : | & prodcall$) '** TV : new EXECUTE(|USE "| & lname$ & |" : SUB INITIALIZE : | & prodcall$ & |:END SUB|) ' this gEndStatementEncountered flag is necessary because the Lotus ' END statement, which normally exists the entire program, only ' exits the top-level routine running in DOEXEC. So, ' check this flag here, to see if we hit an END during DOEXEC. IF gEndStatementEncountered% = TRUE THEN END ' exit the program END IF direction$ = Lot_CallExec_RC$ If direction$ = gBACK Then incr% = -1 Else incr% = 1 End If End If If direction$ = gBACK AND back$ = gALLPRODUCTS then Lot_CallProductFunctions = direction$ Exit Function End If i% = i% + incr% WEND Lot_CallProductFunctions = direction$ END FUNCTION PUBLIC FUNCTION Lot_CallOneProductFunction (prodno%, func_name$, BYVAL direction$, always%, parms$) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM lname$, prodcall$, notused% Lot_CallOneProductFunction = "" lname$ = Reg_GetProductAcronym(prodno%) If lname$ <> "" Then ' ' construct a lotus script statement for EXECUTE. It will look ' something like this: ' USE "123":INIT123(prodno%, "server$", parms$) ' If parms$ <> "" Then prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & prodno% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & "," & parms$ & ")" Else prodcall$ = "Lot_CallExec_RC$ = " & func_name$ & lname$ & "(" & prodno% & "," & |"| & GetSymbolValue(SYM_NETWORK) & |"| & "," & |"| & direction$ & |"| & ")" End If ' DOEXEC removed and replaced by EXECUTE! ' call DOEXEC, which acts like the script EXECUTE statement. ' The difference is that DOEXEC operates in the default module, ' while EXECUTE creates a temporary module that disappears once the ' call is made. The first parameter to DOEXEC is a module name, ' which is made into a "USE modname" statement, if that module ' name has not yet been USE'd via DOEXEC. The second arg is the ' statement to be run. Note - the args must be call by value, ' not reference (can be done by enclosing args in parens) gEndStatementEncountered% = FALSE ' see Lot_CallProductFunctions '** TV : old execute : on error doesn't work 'EXECUTE(|USE "| & lname$ & |" : | & prodcall$) '** TV : new EXECUTE(|USE "| & lname$ & |" : SUB INITIALIZE : | & prodcall$ & |:END SUB|) IF gEndStatementEncountered% = TRUE THEN END ' exit the program END IF Lot_CallOneProductFunction = Lot_CallExec_RC$ End If END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_CheckPath (path$) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM ldrive$, vol$, unused$ Lot_CheckPath = FALSE path$ = NullTrim( path$ ) IF path$ <> "" THEN Lot_SplitUNCPath path$, vol$, unused$ IF vol$ = "" THEN ldrive$ = Lot_ExtractDriveLetter(path$) IF IsDriveValid(ldrive$) <> FALSE AND Lot_CleanPath(path$) <> FALSE THEN Lot_CheckPath = TRUE END IF ELSE IF Lot_CleanPath(path$) <> FALSE THEN Lot_CheckPath = TRUE END IF END IF END IF END FUNCTION PUBLIC FUNCTION Lot_GetFirst (szChapt$, nFlag%) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM g_strbuf$, Length% g_strbuf$ = CreateBuffer(256) if FGetFirst(szChapt$,g_strbuf$,CLng(nFlag%)) = 0 then Lot_GetFirst = "" else Lot_GetFirst = NullTrim(g_strbuf) end if END FUNCTION '************************************************************* PUBLIC FUNCTION Lot_GetNext () AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM g_strbuf$ g_strbuf$ = CreateBuffer(256) if FGetNext(g_strbuf$) = 0 then Lot_GetNext = "" else Lot_GetNext = NullTrim(g_strbuf$) end if END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_SetDateOfFile (szFile$, szDate$) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* if FSetDateOfFile(szFile$,szDate$) = 0 then Lot_SetDateOfFile = 0 else Lot_SetDateOfFile = 1 end if END FUNCTION '************************************************************* PUBLIC SUB Lot_RemoveSectionFilesFromCopyList (szSect$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 else n% = 0 end if if n% > 0 then BadArgErr n%, "Lot_RemoveSectionFilesFromCopyList", szSect$ end if %endrem ''DEBUG IF FRemoveSectionFilesFromCopyList (szSect$) = 0 THEN ErrorMsg SID_ERR_LOT_RSFFCL, "" ERROR STFQUIT END IF END SUB '************************************************************************* PUBLIC SUB Lot_RemoveSectionKeyFileFromCopyList (szSect$, szKey$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 elseif szKey$ = "" then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "Lot_RemoveSectionKeyFileFromCopyList", szSect$+", "+szKey$ end if %endrem ''DEBUG IF FRemoveSectionKeyFileFromCopyList (szSect$, szKey$) = 0 THEN ErrorMsg SID_ERR_LOT_RSKFFCL, "" ERROR STFQUIT END IF END SUB '************************************************************************* PUBLIC FUNCTION Lot_GetInfSectionSize (szSect$) AS LONG '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 else n% = 0 end if if n% > 0 then ERROR STFQUIT end if %endrem Lot_GetInfSectionSize = LcbGetInfSectionSize(szSect$) END FUNCTION '** DND: These functions need an ASSERT!!!!!!! PUBLIC FUNCTION Lot_AddPagetoNotebook (hDlg&, Notebookid&,DlgId%, Tabstring$) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM Dll$ Dll$ = FindResourceinDLL (CLng(DlgId%), RT_DIALOG) If Dll$ = "" then Dll$ = "mscuistf.dll" End if Lot_AddPagetoNotebook = NotebookAddDlgPage(hDlg&, Notebookid&,CLng(DlgId%), Dll$,FNAMEORGDLGPROC$,Tabstring$) IF Lot_AddPagetoNotebook = 0 THEN ErrorMsg 0, "Error creating notebook page" ERROR STFQUIT END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_NotebookPageView (hDlg&, Notebookid&, DlgId%, fShowPage%) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* Lot_NotebookPageView = FNotebookPageView (hDlg&, Notebookid&, CLng(DlgId%), CLng(fShowPage%)) IF Lot_NotebookPageView = 0 THEN ErrorMsg 0, "Error viewing notebook page" ERROR STFQUIT END IF END FUNCTION '************************************************************************* PUBLIC SUB Lot_TurnToPage (hDlg&,Notebookid&, pageid%) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* IF FNotebookTurnToPage(hDlg&,Notebookid&, CLng(pageid%)) <> 1 THEN ErrorMsg 0, "Error turning notebook page" ERROR STFQUIT END IF END SUB '************************************************************************* PUBLIC FUNCTION Lot_GetPagehandle (hDlg&,Notebookid&,Pageid%) AS LONG '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* Lot_GetPagehandle = NotebookGetPageHwnd(hDlg&,Notebookid&,CLng(Pageid%)) IF Lot_GetPagehandle = 0 THEN ErrorMsg 0, "Error getting the notebook page handle" ERROR STFQUIT END IF END FUNCTION '************************************************************************* PUBLIC SUB Lot_LCBResetContent(hDlg&) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* LCBResetContent hDlg& END SUB '************************************************************************* PUBLIC SUB Lot_LCBSetRedraw (hDlg&, fRedraw%) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* LCBSetRedraw hDlg&, CLng(fRedraw%) END SUB '************************************************************************* PUBLIC FUNCTION Lot_LCBGetCount (hDlg&) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* Lot_LCBGetCount = LCBGetCount(hDlg&) END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_LCBAddItem (hDlg&, item$) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM rc% rc% = LCBAddItem (hDlg&, item$) If (rc% = 0) Then ErrorMsg 0, "Could not Add Item: "+item$+" to LCB on DLG: "+STR$(hDlg&) ERROR STFQUIT End If Lot_LCBAddItem= rc% END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_LCBReplaceItem (hDlg&, index%, itemnum%, item$) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM rc% rc% = LCBReplaceItem (hDlg&, CLng(index%), CLng(itemnum%), item$) Lot_LCBReplaceItem = rc% END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_LCBGetItem (hDlg&, index%, itemnum%) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '**??? '************************************************************************* DIM rc% DIM szValue As String : szValue = CreateBuffer(cbSymValMax) rc% = LCBGetItem (hDlg&, CLng(index%), CLng(itemnum%), szValue$, cbSymValMax) Lot_LCBGetItem = NullTrim(szValue$) END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_LCBToggleItem (hDlg&, index%) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM rc% rc% = LCBToggleItem (hDlg&, CLng(index%)) Lot_LCBToggleItem = rc% END FUNCTION '************************************************************************* PUBLIC SUB Lot_LCBSetSel (hDlg&, index%) ' wrapper '************************************************************************* LCBSetSel hDlg&, CLng(index%) END SUB '************************************************************************* PUBLIC SUB Lot_LCBSetTabs (hDlg&, t1%, t2%, t3%, t4%) ' wrapper '************************************************************************* LCBSetTabs hDlg&, CLng(t1%), CLng(t2%), CLng(t3%), CLng(t4%) END SUB '************************************************************************* PUBLIC FUNCTION Lot_GetFirstChild (szChapt$, nFlag%) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM szValue As String : szValue = CreateBuffer(cbSymValMax) if FGetFirstChild(szChapt$, szValue$, CLng(nFlag%)) = 0 then Lot_GetFirstChild = "" else Lot_GetFirstChild = NullTrim(szValue$ ) end if END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetGroupName ( szGroupFileName$) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM szValue As String : szValue = CreateBuffer(cbSymValMax) IF FGetGroupName(szGroupFileName$, szValue$, cbSymValMax) = 0 THEN Lot_GetGroupName = "" ELSE Lot_GetGroupName = NullTrim(szValue$) END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetChapterValStr (szChapter$, nField%) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM szValue As String : szValue = CreateBuffer(cbSymValMax) IF FGetChapterValStr(szChapter$, CLng(nField%), szValue$, cbSymValMax) = 0 THEN Lot_GetChapterValStr = "" ELSE Lot_GetChapterValStr = NullTrim(szValue$) END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetChapterValInt (szChapter$,nField%) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM lpVal& if FGetChapterValInt(szChapter$, CLng(nField%),lpVal&) = 0 then Lot_GetChapterValInt = -1 else Lot_GetChapterValInt = CInt(lpVal&) end if END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetNextSibling (szChapter$,nField%) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM szValue As String : szValue = CreateBuffer(cbSymValMax) if FGetNextSibling(szChapter$, szValue$,CLng(nField%)) = 0 then Lot_GetNextSibling = "" else Lot_GetNextSibling = NullTrim(szValue$) end if END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetNextChild () AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM g_strbuf$, Length% g_strbuf$ = CreateBuffer(256) if FGetNextChild(g_strbuf$) = 0 then Lot_GetNextChild = "" else Lot_GetNextChild = NullTrim(g_strbuf$) end if END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetInfChapterSize (szChapter$) AS LONG '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM size& size&= LcbGetInfChapterSize(szChapter$) if size& = -1 then Lot_GetInfChapterSize = -1 else Lot_GetInfChapterSize = size& end if END FUNCTION '************************************************************************* PUBLIC SUB Lot_ToggleChapterFilesInCopyList (szChapter$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* If FToggleChapterFilesInCopylist(szChapter$) = 0 Then ERROR STFTOGGLE End If END SUB '************************************************************************* PUBLIC FUNCTION Lot_SetChapterFilesInCopyListInOrOut (szChapter$, InOrOut%) AS INTEGER '** Purpose: Given a chapter, This function turns the feature on or off. '** It is written to be especially careful that features are not '** turned on if they are not allowed to be. Examples are: '** NODE: If the feaure doesn't exist on the Server '** ANY TYPE: If the feature is not in the INF file '** Author: Marcel Meth '** Arguments: szChapter$: The chapter number, e.g. "1.2.1" '** InOrOut: 1 for in, 0 for Out '** Returns: Wheter the feature is actually In (1) or Out (0) '** regardless of what the request was. '** '************************************************************************* DIM curinorout%, FeatureToFind$ If szChapter$ = "" Then Lot_SetChapterFilesInCopyListInOrOut = 0 Exit FUNCTION End If curinorout% = Lot_GetChapterValInt(szChapter$, F_INOROUT) '** If the current setting already equals the requested setting If InOrOut% = curinorout% Then Lot_SetChapterFilesInCopyListInOrOut = InOrOut% Exit FUNCTION End If '** If the requested setting is IN If InOrOut% = 1 THEN Lot_SetChapterFilesInCopyListInOrOut = 1 '** For a node install, make sure the server has the feature If GetSymbolValue("NETWORK") = gNODE Then FeatureToFind$ = Lot_GetChapterValStr(szChapter$, F_KEYWORD) If Lot_IsTheFeatureInstalled(FeatureToFind$) = FALSE Then Lot_SetChapterFilesInCopyListInOrOut = 0 Exit Function End If End If If FToggleChapterFilesInCopylist(szChapter$) = 0 Then Lot_SetChapterFilesInCopyListInOrOut = 0 End If '** If the requested setting is OUT Else Lot_SetChapterFilesInCopyListInOrOut = 0 If FToggleChapterFilesInCopylist(szChapter$) = 0 Then Lot_SetChapterFilesInCopyListInOrOut = 1 End If End If END FUNCTION '************************************************************************* PUBLIC SUB Lot_InitializeCopyList (szChpt$, nField%) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* if FInitializeCopyList(szChpt$, GetSymbolValue(SYM_STF_SRCDIR$), CLng(nField%)) = 0 then ErrorMsg 0, "Error initializing the copylist: " + szChpt$ ERROR STFQUIT end if END SUB '*********************************************************************** PUBLIC SUB Lot_TurnOffAllNodeOptSections '** '**Turns off all node options sections in copy list '**Normally these get turned off and on by the callback '**But Suit needs to be able to turn them all off without '**surfacing the dialog '** '**No registration functions performed, just killing '**the sections in the copylist '** DIM AllProdNum%, prodNum%, AllOptNum%, chpt$, j%, OptKeyWord$ DIM notused% 'Loop through the products and find the avail node options AllProdNum% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN 'Loop through the products FOR prodNum%=1 TO AllProdNum% AllOptNum% = 0 AllOptNum% = Reg_GetNumofNodeOptions(prodNum%) chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(prodNum%)_ + gTOP$) IF AllOptNum% <> 0 THEN ' Loop through the options FOR j% = 1 TO AllOptNum% OptKeyWord$ = Reg_GetNodeOptionStr(prodNum%,j%) chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$) notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 0) NEXT END IF NEXT END IF END SUB '************************************************************************* PUBLIC SUB Lot_InitializeWinWinsysSym () '** Purpose: Sets win and winsys symbols '** Author: MZ '************************************************************************* DIM systemDir$ 'Set Windows directory symbol systemDir$ = GetWindowsDir() SetSymbolValue SYM_WINDIR$, systemdir$ 'Get Windows System directory systemDir$ = GetWindowsSysDir() 'Check if I can write to the window system dir. and set winsysdir symbol IF(IsDirWritable(systemDir$)) = 1 THEN SetSymbolValue SYM_WINSYSDIR$, systemDir$ ELSE SetSymbolValue SYM_WINSYSDIR$, GetWindowsDir() END IF END SUB ''* INitialize the gEXTRA LIST to 200000 bytes for the windows drive. PUBLIC SUB Lot_InitializeEXTRA DIM drv$, drvno%, i% '' Add extra "FUDGE" space on Windows drive to allow for activities '' in windows directory. If GetListLength(gEXTRA) = 0 Then drv$ = Lot_ExtractDriveLetter(GetWindowsDir()) drvno% = ASC(drv$) - ASC("a") + 1 FOR i% = 1 to 26 If i% = drvno% Then AddlistItem gEXTRA, "200000" Else AddlistItem gEXTRA, "" End If NEXT End If END SUB PUBLIC SUB Lot_RefreshDestination (symbol$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* if FRefreshDestination(symbol$) = FALSE THEN ErrorMsg 0, "Lot_RefreshDestination error: " + symbol$ ERROR STFQUIT end if END SUB '************************************************************************* PUBLIC SUB Lot_WriteDestinationSymAndVal (IniFileName$,IniSection$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* if FWriteDestinationSymAndVal(IniFileName$,IniSection$) = FALSE THEN ErrorMsg 0, "Lot_WriteDestinationSymAndVal error." ERROR STFQUIT end if END SUB '************************************************************************* PUBLIC SUB Lot_GetDriveFreeSpaceList (szSymbol$) '** Purpose: Creates a list of available drives, with space available '** Author: '** Arguments: sySymbol$ Name of list '** '************************************************************************* DIM i%, nd%, rc$ if FGetDriveFreeSpaceList(szSymbol$) = FALSE THEN ErrorMsg SID_ERR_LOT_GDFSL, "" ERROR STFQUIT end if END SUB PUBLIC FUNCTION Lot_AddToDriveFreeSpaceList (szSymbol$, szNewItem$) AS LONG '** Purpose:Add a drive to a drive free space combo control '** Author:GJL '** Arguments:szSymbol$ symbol for combo control '** szNewItem$ drive or UNC volume to add '** Returns:TRUE if successful '** '************************************************************************* DIM ret& ret& = FAddToDriveFreeSpaceList(szSymbol$, szNewItem$) IF ret& = 0 THEN Lot_AddToDriveFreeSpaceList = FALSE ELSE Lot_AddToDriveFreeSpaceList = TRUE END IF END FUNCTION '************************************************************************* '**UNC stuff PUBLIC FUNCTION Lot_IsUnvalidatedUNCPath(szPath$) AS LONG '** Purpose:Checks for 2 leading backslashes on a path '** Author:GJL '** Arguments:szPath$ a path '** Returns: '** '************************************************************************* IF FIsUnvalidatedUNCPath(szPath$) = 1 THEN Lot_IsUnvalidatedUNCPath = TRUE ELSE Lot_IsUnvalidatedUNCPath = FALSE END IF END FUNCTION PUBLIC FUNCTION Lot_IsValidUNCPath(szPath$) AS LONG '** Purpose:determine whether a UNC volume is valid '** Author:GJL '** Arguments:A UNC volume with no trailing backslash '** Returns: '** '************************************************************************* IF FIsValidUNCPath(szPath$) = 1 THEN Lot_IsValidUNCPath = TRUE ELSE Lot_IsValidUNCPath = FALSE END IF END FUNCTION '**end UNC stuff PUBLIC FUNCTION PopupModelessDlg (Dlg%, HelpID&) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '************************************************************************* DIM cuidll$, szWnd$, notused$, notused1% '- cuidll$ = GetSymbolValue(SYM_CUIDLL$) ' JMD ' SYM_CUIDLL is now a list of DLLs ' First one contains code (dialog procs) and common resources ' Others contain product specific resources 'NOTE: common DLL MUST be listed FIRST in the INI file '------------------------------ cuidll$ = GetSymbolValue(SYM_CUIDLL$) 'UIStartDlg(cuidll$, Dlg&, "FNameOrgDlgProc", APPHELP, "FHelpDlgProc") notused$ = UIStartDlg(cuidll$, Dlg%, FNAMEORGDLGPROC$, 0, "") ''Make sure the dialog gets fully painted szWnd$ = GetSymbolValue(SYM_WNDHANDLE$) notused1% = SendMessage(VAL(szWnd$),UM_PAINTMODELESS,0,0) END FUNCTION PUBLIC FUNCTION PopupWithFunction (Dlg%, HelpID&, Func$) AS STRING '** Purpose: Surface modal dialog box '** Author: '** Arguments: Dlg% ID of dialog template '** HelpID& ID of help topic '** Func$ Dialog procedure name '** Returns: Exit string '************************************************************************* DIM cuidll$, sz$, cdir$, notused% ' JMD ' SYM_CUIDLL is now a list of DLLs ' First one contains code (dialog procs) and common resources ' Others contain product specific resources 'NOTE: common DLL MUST be listed FIRST in the INI file '------------------------------ If GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ Then EXIT FUNCTION cuidll$ = GetSymbolValue(SYM_CUIDLL$) DO sz$ = UIStartDlg(cuidll$, Dlg%, Func$, 0, "") SELECT CASE sz$ case "IDC_EXIT" notused% = FRemoveSymbol("IDC_TEXT") QUIT SetListItem "__DLG_ID", 1, STR(Dlg%) case "IDC_CANCEL" EXIT DO case "IDC_CONTINUE" EXIT DO case "IDC_OK" EXIT DO case "IDC_MENU" EXIT DO case "IDC_BACK" EXIT DO case "IDC_CITHELP" cdir$ = GetSymbolValue(SYM_STF_CWDDIR$) + gINSTALLHLP$ notused% = WinHelp(HwndFrame(), cdir$+">Install", HELP_CONTEXT, HelpID&) SetListItem "RETFROMHELP", 1, "T" case "HELPKEY" cdir$ = GetSymbolValue(SYM_STF_CWDDIR$) + gINSTALLHLP$ notused% = WinHelp(HwndFrame(), cdir$+">Install", HELP_CONTEXT, HelpID&) SetListItem "RETFROMHELP", 1, "T" END SELECT LOOP PopupWithFunction = MID$(sz$,5,LEN(sz$)-4) UIPop 1 notused% = WinHelp(HwndFrame(), cdir$+">Install", HELP_QUIT, HelpID&) END FUNCTION PUBLIC FUNCTION PopupModalDlg (Dlg%, HelpID&) AS STRING '** Purpose: '** Author: '** Arguments: '** Returns: '************************************************************************* PopupModalDlg=PopupWithFunction(Dlg%, HelpID&, FNAMEORGDLGPROC$) END FUNCTION PUBLIC FUNCTION RegisterCallback (ModName$, FuncName$) AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '************************************************************************* DIM rc%, automation$ automation$ = GetSymbolValue(SYM_AUTOMATIONINST$) If automation$ <> gTRUE$ Then RemoveSymbol(SYM_CALLBACK$) AddListItem SYM_CALLBACK$, FuncName$ rc% = RegisterFunction(LSI_INFO(4),ModName$,FuncName$) If rc% = -4 Then ErrorMsg 0, "Maximum Number of Callbacks exceeded" End If End If END FUNCTION '************************************************************************* '** FUNCTION SelectDriveCombo (ComboID$, path$) '** Purpose: Sets the ComboID dropdown to drive$ '** '** IN SYMBOLS Expects SYM_UPDATELIST$ to have an "ALL" entry '** otherwise dropdown combo code asserts '** OUT SYMBOLS Adds 2 entries to the UPDATELIST '** '** Author: Marcel Meth '** Arguments: ComboId$ - Id of the combo being set e.g. "IDC_COMBO1" '** path$ - Path that includes a drive letter or UNC vol. '** '** If drive is not in combo box it will be added '** '** Returns: Index of the drive letter in the combo '** '************************************************************************* PUBLIC FUNCTION SelectDriveCombo (ComboID$, path$) AS INTEGER DIM n%, i%, drv$, dirpath$, position&, addRet& DIM FirstDriveLetter$ n% = GetListLength(ComboID$) SelectDriveCombo = 1 drv$ = Lot_ExtractDriveLetter(path$) '** '** UNC path '** IF drv$ = "\" THEN Lot_SplitUNCPath path$, drv$, dirpath$ IF Lot_IsvalidUNCPath(drv$) = FALSE THEN SelectDriveCombo = FALSE Exit FUNCTION END IF For i% = 1 to n% position& = InStr(LCASE$(GetListItem(ComboID$, i%)), LCASE$(drv$)) If 0 < position Then AddListItem SYM_UPDATELIST$, ComboID$ AddListItem SYM_UPDATELIST$, ComboID$ & "," & i% SelectDriveCombo = i% EXIT FUNCTION End If NEXT addRet& = Lot_AddToDriveFreeSpaceList(ComboID$, drv$) IF addRet& = TRUE THEN i% = GetListLength(ComboID$) AddListItem SYM_UPDATELIST$, ComboID$ AddListItem SYM_UPDATELIST$, ComboID$ & "," & i% SelectDriveCombo = i% ELSE SelectDriveCombo = FALSE END IF '** '** Drive letter given '** ELSE For i% = 1 to n% If drv$ = LCASE$(MID(GetListItem(ComboID$, i%), 1, 1)) Then AddListItem SYM_UPDATELIST$, ComboID$ AddListItem SYM_UPDATELIST$, ComboID$ & "," & i% SelectDriveCombo = i% EXIT FUNCTION End If Next '** '** Drive not found in list '** IF Lot_AddToDriveFreeSpaceList(ComboID$, drv$) = FALSE THEN SelectDriveCombo = FALSE ELSE i% = GetListLength(ComboID$) AddListItem SYM_UPDATELIST$, ComboID$ AddListItem SYM_UPDATELIST$, ComboID$ & "," & i% SelectDriveCombo = i% END IF END IF END FUNCTION PUBLIC FUNCTION CheckForSpace(DlgId%) AS INTEGER '** Purpose: Checks to see if there is enough space on dest directories '** First does a cheap check, followed, if need be by a high '** granularity check. '** Author: Marcel Meth '** Arguments: '** '** '** Returns: SUCCESS/FAILURE '** '************************************************************************* DIM lTicks&, lcb&, lNew&, i%, j%, lcbNeed&, dr$, s$, helpId&, rc$ DIM notused1$, curcursor&, UNCSym$ '** Try a quick check CheckForSpace = SUCCESS lTicks& = GetTickCount() lcb& = LcbGetChapterCost("", "", SYM_COST$, SYM_NEEDED$) IF lcb& = CLNG(0) THEN DO '** Keep the modeless up at least 2 seconds lNew& = GetTickCount() LOOP UNTIL (lNew& - lTicks&) > 2000 DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$ GOTO ENDCHECK END IF '** Try A High Granularity Check curcursor& = ShowWaitCursor() SetListItem "IDC_BMP", 1, STR$(IDD_MAXSCAN_BMP) '** put up the bitmap notused1$ = PopupModelessDlg(DB_CHECKSPACE, DB_CHECKSPACE) lcb& = GetCopyListCost (gEXTRA, SYM_COST$, SYM_NEEDED$) UIPOP 1 '** Bring down DB_CHECKSPACE RestoreCursor curcursor& IF lcb& = CLNG(0) THEN DisplayWhenSpaceIsTight SYM_COST$, SYM_NEEDED$ GOTO ENDCHECK END IF '** If you get here then there was not enough space (Tab is CHR$(9)) CheckForSpace = FAILURE RemoveSymbol "IDC_LIST1" FOR i% = 1 TO 26 lcbNeed& = CLNG(GetListItem(SYM_NEEDED$, i%)) IF lcbNeed& > 0 THEN dr$ = CHR$(ASC("A")+i%-1) + ":" + CHR$(9) s$ = dr$ & (lcbNeed& + 4) AddlistItem "IDC_LIST1", s$ + gStrK$ END IF NEXT j%=GetListLength("UNCVOLLIST") FOR i% = 1 to j% UNCSym$ = GetListItem("UNCVOLLIST",i%) lcbNeed& = CLNG(GetListItem(UNCSym$, 3)) IF lcbNeed& > 0 THEN IF IsDBCSFirstAtOffset(UNCSym$, 18) = 0 THEN s$ = Leftbp(UNCSym$, 18) ELSE s$ = Leftbp(UNCSym$, 17) END IF s$ = s$ & CHR$(9) & (lcbNeed& + 4) AddlistItem "IDC_LIST1", s$ + gStrK$ END IF NEXT SetListItem "SETTABS1",1,"50" SetListItem "NORMALFONT", 1, STR$(IDC_TEXT1) SetListItem "NORMALFONT", 2, STR$(IDC_TEXT2) SetListItem "NORMALFONT", 3, STR$(IDC_TEXT3) helpId& = DlgId% rc$ = PopupModalDlg (DlgId%, helpId&) ENDCHECK: RemoveSymbol(SYM_COST$) RemoveSymbol(SYM_NEEDED$) END FUNCTION '************************************************************************* '** SUB DisplayWhenSpaceIsTight(szCost$,szNeed$) '** '** Purpose: Display a warning message when disk space is tight '** You should only call this sub if you think there is '** enough disk space. This means that we will assume that '** szNeed$ contains only negative numbers. '** '** The message will be displayed if 110% of cost will not '** fit on any one disk. '** '** Arguments: szCost$ and szNeed$ - Symbols for cost and need '** Both symbol lists are expected to contain 26 numbers '** '** Author: DND '** '************************************************************************* PUBLIC SUB DisplayWhenSpaceIsTight(szCost$,szNeed$) DIM i%, lcbCost&, lcbNeed&, sz$, retcode% FOR i% = 1 TO 26 lcbCost& = (CLNG(GetListItem(szCost$, i%)) \ 1024) \ 10 lcbNeed& = -CLNG(GetListItem(szNeed$, i%)) IF lcbCost& > lcbNeed& THEN sz$ = LdString(SID_WARN_DISKSPACE1) + _ LdString(SID_WARN_DISKSPACE2) + _ LdString(SID_WARN_DISKSPACE3) 'MessageBox sz$, MB_OK+MB_ICONINFORMATION, LdString(SID_TKT_STD_TITLE) retcode% = DoMsgBox(sz$,LdString(SID_TKT_STD_TITLE),MB_OKCANCEL _ +MB_ICONINFORMATION) if retcode% = IDCANCEL then QUIT end if EXIT FOR END IF NEXT END SUB '******** Microsoft Functions that Lotus re-wrote ************************** PUBLIC SUB ReadInfFile (szFile$) '** Purpose: '** Author: '** Arguments: szFile$ '************************************************************************* %rem ' if FValidFATPath(szFile$) = 0 then ' BadArgErr 1, "ReadInfFile", szFile$ ' end if ' IF FOpenInf(szFile$, 1, 1) = 0 THEN ' StfApiErr saeFail, "ReadInfFile", szFile$ %endrem IF FOpenInf(szFile$, 1, 0) = 0 THEN ErrorMsg SID_ERR_READINFFILE, "" ERROR STFQUIT END IF END SUB PUBLIC SUB MakeListFromSectionKeys(szSymbol$, szSect$) '** Purpose: '** Author: '** Arguments: szSymbol$, szSect$ '************************************************************************* %rem if szSymbol$ = "" then n% = 1 elseif FValidInfSect(szSect$) = 0 then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "MakeListFromSectionKeys", szSymbol$+", "+szSect$ end if %endrem ''DEBUG IF FSetSymbolToListOfInfKeys(szSymbol$, szSect$, 1) = 0 THEN ErrorMsg SID_ERR_MAKELISTFROMSECTIONKEYS, "" ERROR STFQUIT END IF END SUB PUBLIC SUB MakeListFromSectionDate (szSym$, szSect$) '** Purpose: '** Author: '** Arguments: szSym$, szSect$ '** Returns: '** '************************************************************************* %rem if szSym$ = "" then n% = 1 elseif FValidInfSect(szSect$) = 0 then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "MakeListFromSectionDate", szSym$+", "+szSect$ end if %endrem ''DEBUG IF FMakeListInfSectionField(szSym$, szSect$, 5) = 0 THEN ErrorMsg SID_ERR_MAKELISTFROMSECTIONDATE, "" ERROR STFQUIT END IF END SUB PUBLIC SUB MakeListFromSectionFilename (szSym$, szSect$) '** Purpose: '** Author: '** Arguments: szSym$, szSect$ '** Returns: '** '************************************************************************* %rem if szSym$ = "" then n% = 1 elseif FValidInfSect(szSect$) = 0 then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "MakeListFromSectionFilename", szSym$+", "+szSect$ end if %endrem ''DEBUG IF FMakeListInfSectionField(szSym$, szSect$, 1) = 0 THEN ErrorMsg SID_ERR_MAKELISTFROMSECTIONFILENAME, "" ERROR STFQUIT END IF END SUB PUBLIC SUB MakeListFromSectionSize (szSym$, szSect$) '** Purpose: '** Author: '** Arguments: szSym$, szSect$ '** Returns: '** '************************************************************************* %rem if szSym$ = "" then n% = 1 elseif FValidInfSect(szSect$) = 0 then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "MakeListFromSectionSize", szSym$+", "+szSect$ end if %endrem ''DEBUG IF FMakeListInfSectionField(szSym$, szSect$, 15) = 0 THEN ErrorMsg SID_ERR_MAKELISTFROMSECTIONSIZE, "" ERROR STFQUIT END IF END SUB PUBLIC SUB MakeListFromSectionVersion (szSym$, szSect$) '** Purpose: '** Author: '** Arguments: szSym$, szSect$ '** Returns: '** '************************************************************************* %rem if szSym$ = "" then n% = 1 elseif FValidInfSect(szSect$) = 0 then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "MakeListFromSectionVersion", szSym$+", "+szSect$ end if %endrem ''DEBUG IF FMakeListInfSectionField(szSym$, szSect$, 19) = 0 THEN ErrorMsg SID_ERR_MAKELISTFROMSECTIONVERSION, "" ERROR STFQUIT END IF END SUB PUBLIC FUNCTION SetSilentMode (mode%) AS INTEGER '** Purpose: '** Author: '** Arguments: mode% '** Returns: '** '************************************************************************* DIM temp& temp& = CLNG ( mode% ) SetSilentMode = FSetSilent( temp& ) END FUNCTION PUBLIC FUNCTION SetBeepingMode (mode%) AS INTEGER '** Purpose: '** Author: '** Arguments: mode% '** Returns: '** '************************************************************************* DIM temp& temp& = CLNG ( mode% ) SetBeepingMode = FSetBeepingMode( temp& ) END FUNCTION PUBLIC FUNCTION GetSectionKeyDate (szSect$, szKey$) AS STRING '** Purpose: '** Author: '** Arguments: szSect$, szKey$ '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 elseif szKey$ = "" then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "GetSectionKeyDate", szSect$+", "+szKey$ end if %endrem ''DEBUG DIM szBuf$, Length& szBuf$ = string$(128, 32) Length& = CbGetInfSectionKeyField(szSect$, szKey$, 5, szBuf$, 128) IF Length& >= 128 THEN ErrorMsg SID_ERR_GETSECTIONKEYDATE, "" ERROR STFQUIT END IF IF Length& = -1 THEN ErrorMsg SID_ERR_GETSECTIONKEYDATE2, "" ERROR STFQUIT END IF GetSectionKeyDate = LEFT$ (szBuf$, CInt(Length&)) szBuf$ = "" END FUNCTION PUBLIC FUNCTION GetSectionKeyFilename (szSect$, szKey$) AS STRING '** Purpose: '** Author: '** Arguments: szSect$, szKey$ '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 elseif szKey$ = "" then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "GetSectionKeyFilename", szSect$+", "+szKey$ end if %endrem ''DEBUG DIM szBuf$, Length& szBuf$ = string$(128, 32) Length& = CbGetInfSectionKeyField(szSect$, szKey$, 1, szBuf$, 128) IF Length& >= 128 THEN ErrorMsg SID_ERR_GETSECTIONKEYFILENAME, "" ERROR STFQUIT END IF IF Length& = -1 THEN ErrorMsg SID_ERR_GETSECTIONKEYFILENAME2, "" ERROR STFQUIT END IF GetSectionKeyFilename = LEFT$ (szBuf$, CInt(Length&) ) szBuf$ = "" END FUNCTION PUBLIC FUNCTION GetSectionKeySize (szSect$, szKey$) AS LONG '** Purpose: '** Author: '** Arguments: szSect$, szKey$ '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 elseif szKey$ = "" then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "GetSectionKeySize", szSect$+", "+szKey$ end if %endrem ''DEBUG DIM szBuf$, Length& szBuf$ = string$(128, 32) Length& = CbGetInfSectionKeyField(szSect$, szKey$, 15, szBuf$, 128) IF Length& >= 128 THEN ErrorMsg SID_ERR_GETSECTIONKEYSIZE, "" ERROR STFQUIT END IF IF Length& = -1 THEN ErrorMsg SID_ERR_GETSECTIONKEYSIZE2, "" ERROR STFQUIT END IF GetSectionKeySize = VAL (LEFT$ (szBuf$, CInt(Length&)) ) szBuf$ = "" END FUNCTION PUBLIC FUNCTION GetSectionKeyVersion (szSect$, szKey$) AS STRING '** Purpose: '** Author: '** Arguments: szSect$, szKey$ '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 elseif szKey$ = "" then n% = 2 else n% = 0 end if if n% > 0 then BadArgErr n%, "GetSectionKeyVersion", szSect$+", "+szKey$ end if %endrem ''DEBUG DIM szBuf$, Length& szBuf$ = string$(128, 32) Length& = CbGetInfSectionKeyField(szSect$, szKey$, 19, szBuf$, 128) IF Length& >= 128 THEN ErrorMsg SID_ERR_GETSECTIONKEYVERSION, "" ERROR STFQUIT END IF IF Length& = -1 THEN ErrorMsg SID_ERR_GETSECTIONKEYVERSION2, "" ERROR STFQUIT END IF GetSectionKeyVersion = LEFT$ (szBuf$, CInt(Length&)) szBuf$ = "" END FUNCTION PUBLIC SUB RemoveDir (szDir$, cmo%) '** Purpose: '** Author: '** Arguments: szDir$, cmo% '************************************************************************* %rem if FValidFATDir(szDir$) = 0 then BadArgErr 1, "RemoveDir", szDir$+", "+STR$(cmo%) end if %endrem ''DEBUG IF FRemoveDir(szDir$) = 0 THEN ErrorMsg SID_ERR_REMOVEDIR, "" ERROR STFERR END IF END SUB PUBLIC SUB DumpCopyList (szFile$) '** Purpose: '** Author: '** Arguments: szFile$ '************************************************************************* %rem if szFile$ = "" then BadArgErr 1, "DumpCopyList", szFile$ end if %endrem ''DEBUG IF FDumpCopyListToFile (szFile$) = 0 THEN ErrorMsg SID_ERR_DUMPCOPYLIST, "" ERROR STFERR END IF END SUB PUBLIC SUB ClearCopyList '** Purpose: '** Author: '** Arguments: None '************************************************************************* ResetCopyList END SUB PUBLIC FUNCTION GetCopyListCost (szExtraList$, szCostList$, szNeedList$) AS LONG '** Purpose: '** Author: '** Arguments: szExtraList$, szCostList$, szNeedList$ '** Returns: '** '************************************************************************* DIM lNeed& lNeed& = LcbGetCopyListCost (szExtraList$, szCostList$, szNeedList$) IF lNeed& < 0 THEN ErrorMsg SID_ERR_GETCOPYLISTCOST, "" ERROR STFQUIT END IF GetCopyListCost = lNeed& END FUNCTION PUBLIC SUB CopyFilesInCopyList '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM grc&, notused% notused% = RemovePriorVersion("begin","execution") grc& = GrcCopyFilesInCopyList (HinstFrame()) IF grc& = grcUserQuit THEN ErrorMsg SID_ERR_NOT_COMPLETE, "" ERROR STFQUIT ELSEIF grc& > 0 THEN ErrorMsg SID_ERR_NOT_COMPLETE, "" ERROR STFQUIT END IF END SUB PUBLIC SUB AddSectionFilesToCopyList (szSect$, szSrc$, szDest$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 elseif FValidFATDir(szSrc$) = 0 then n% = 2 elseif FValidFATDir(szDest$) = 0 then n% = 3 else n% = 0 end if if n% > 0 then BadArgErr n%, "AddSectionFilesToCopyList", szSect$+", "+szSrc$+", "+szDest$ end if %endrem ''DEBUG IF FAddSectionFilesToCopyList (szSect$, szSrc$, szDest$) = 0 THEN ErrorMsg SID_ERR_ADDSECTIONFILESTOCOPYLIST, "" ERROR STFQUIT END IF END SUB '************************************************************************* PUBLIC SUB AddSectionKeyFileToCopyList (szSect$, szKey$, szSrc$, szDest$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* %rem if FValidInfSect(szSect$) = 0 then n% = 1 elseif szKey$ = "" then n% = 2 elseif FValidFATDir(szSrc$) = 0 then n% = 3 elseif FValidFATDir(szDest$) = 0 then n% = 4 else n% = 0 end if if n% > 0 then BadArgErr n%, "AddSectionKeyFileToCopyList", szSect$+", "+szKey$+", "+szSrc$+", "+szDest$ end if %endrem ''DEBUG IF FAddSectionKeyFileToCopyList (szSect$, szKey$, szSrc$, szDest$) = 0 THEN ErrorMsg SID_ERR_ADDSECTIONKEYFILETOCOPYLIST, "" ERROR STFQUIT END IF END SUB PUBLIC SUB AddToBillboardList (szDll$, idDlg&, szProc$, lTicks&) '** Purpose: '** Author: '** Arguments: '** Returns: '** '** NOTE: Argument szProc$ not used -- retained for backward compatibility '************************************************************************* DIM rc&,i%, Dll$ %rem if szDll$ = "" then n% = 1 elseif idDlg& = 0 then n% = 2 elseif szProc$ = "" then n% = 3 elseif lTicks& <= 0 then n% = 4 else n% = 0 end if if n% > 0 then BadArgErr n%, "AddToBillboardList", szDll$+", "+STR$(idDlg&)+", "+szProc$+", "+STR$(lTicks&) end if %endrem ''DEBUG Dll$ = FindResourceinDLL (idDlg&, RT_DIALOG) if Dll$ <> "" then IF FAddToBillboardList(Dll$, idDlg&, FNAMEORGDLGPROC$, lTicks&) <> 0 THEN Exit Sub END IF End if label1: ErrorMsg SID_ERR_ADDTOBILLBOARDLIST, "" ERROR STFQUIT END SUB PUBLIC FUNCTION FindResourceinDLL (idDlg&, ResType%) AS STRING '** Purpose: Traverses the list of DLLs in SYM_CUIDLL$ until it finds the '** one that contains the resource '** Author: JMDonohue '** Arguments: id% Resource id number '** Returns: String containing the DLL name or null string if not found '************************************************************************* DIM rc&,i%, Dll$, szDlls$ i% = 1 szDlls$ = GetSymbolValue(SYM_CUIDLL$) WHILE (TRUE) Dll$ = Lot_GetNthFieldFromIniString (szDlls$, i%, "") if Dll$ <> "" then rc& = GetModuleHandle(Dll$) If rc& <> 0 Then rc& = FindResource(rc&, idDlg&, ResType%) End If If rc& <> 0 Then FindResourceinDLL = Dll$ Exit Function End If else FindResourceinDLL = "" Exit Function end if i% = i% + 1 WEND END FUNCTION PUBLIC SUB AddBlankToBillboardList (lTicks&) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* %rem if lTicks& <= 0 then BadArgErr 1, "AddBlankToBillboardList", STR$(lTicks&) end if %endrem ''DEBUG IF FAddToBillboardList("", 0, "", lTicks&) = 0 THEN 'YYYYYYIF FAddToBillboardList(NULL, 0, NULL, lTicks&) = 0 THEN ErrorMsg SID_ERR_ADDBLANKTOBILLBOARDLIST, "" ERROR STFQUIT END IF END SUB PUBLIC SUB ClearBillboardList '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* IF FClearBillboardList() = 0 THEN ErrorMsg SID_ERR_CLEARBILLBOARDLIST, "" ERROR STFQUIT END IF END SUB PUBLIC SUB SetCopyGaugePosition (x%, y%) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* DIM xt&, yt& xt& = CLNG ( x% ) yt& = CLNG ( y% ) ProSetPos xt&, yt& END SUB PUBLIC SUB QUIT '** Purpose: '** Author: '** Arguments: '************************************************************************* DIM sz$ sz$ = PopupModalDlg (DB_EXITHISTORY, DB_EXITHISTORY) If sz$ = "OK" Then UIPopAll gEndStatementEncountered% = TRUE END End If END SUB '************************************************************************* '** FUNCTION Lot_WriteToRiFile(ripath$) AS INTEGER '** '** Purpose: Writes user, company and serial number in 123w.ri file. '** Author: JYOTI KEDIA '** Arguments: None '** Returns: SUCCESS or Failure '************************************************************************* PUBLIC FUNCTION Lot_WriteToRiFile (ripath$) AS INTEGER DIM uname$, cname$, snum$ Lot_WriteToRiFile = TRUE '** Removed all checks on length of names mmeth-8/7/95 '** C Code now truncates strings if they are too long uname$ = GetSymbolValue("NAME") 'print uname$,"uname$" cname$ = GetSymbolValue(SYM_COMPANY$) 'print cname$,"cname$" snum$ = GetSymbolValue(SYM_SERIALNUM$) IF WriteUserRegistration(ripath$,uname$,cname$,snum$) <> 0 Then Lot_WriteToRiFile = FALSE End If END FUNCTION '************************************************************************* '** FUNCTION Lot_ReadDefaultsfromRi(default_ripath$) AS INTEGER '** '** Purpose: For standard,Server and node install reads the default user, '** company name and serial number from 123w.ri file. For '** '** Author: JYOTI KEDIA '** Arguments: Sets: SYM_NAME$, SYM_COMPANY$, SYM_SERIALNUM$ '** Returns: TURE (SUCCESS) FALSE (FAILURE) '************************************************************************* PUBLIC FUNCTION Lot_ReadDefaultsfromRi (default_ripath$) AS INTEGER DIM rc%, lrc&, n% DIM buf1 AS STRING : buf1 = CreateBuffer(82) '* These strings can be upto 80 DIM buf2 AS STRING : buf2 = CreateBuffer(82) '* bytes not including terminator. DIM buf3 AS STRING : buf3 = CreateBuffer(18) '* See lcomstf\userreg.cpp & '* callback.lss:WELCOMECB Lot_ReadDefaultsfromRi = FALSE lrc& = DoesFileExist(default_ripath$,femExists) if lrc& = 0 goto rinotfound lrc& = ReadUserRegistration(default_ripath$,buf1,buf2,buf3) If lrc& <> 0 goto rinotfound n% = LEN(buf1) SetSymbolValue SYM_NAME$, LEFT$(buf1, n%) n% = LEN(buf2) SetSymbolValue SYM_COMPANY$, LEFT$(buf2, n%) n% = LEN(buf3) SetSymbolValue SYM_SERIALNUM$, LEFT$(buf3, n%) Lot_ReadDefaultsfromRi = TRUE EXIT FUNCTION rinotfound: END FUNCTION PUBLIC FUNCTION Lot_GetCurrentProduct() AS INTEGER '** Purpose: This function will return the current product number '** Parameters: '** Return: Product number '************************************************************************* Lot_GetCurrentProduct = gCurrentProduct% END FUNCTION PUBLIC SUB Lot_SetCurrentProduct(ProdNo%) '** Purpose: Set the current product number '** Parameters: ProdNo% the product number '************************************************************************* IF ProdNo% > gMaxNumOfProds% THEN ' ERROR STFSETERROR ERROR STFQUIT END IF gCurrentProduct% = ProdNo% END SUB PUBLIC FUNCTION Lot_GetInstallDir() AS STRING '** Purpose: Return the directory where Install will be installed. '** Parameters: '** Return: Install dir '************************************************************************* DIM s$, network$ STATIC iniDir$ 'Save initial value since it may change over course of install IF iniDir$ = "" THEN s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) network$ = GetSymbolValue(SYM_NETWORK$) IF network$ <> gNODE THEN IF s$ = gSMARTSUITE$ THEN iniDir$ = GetSymbolValue(SYM_BASEDIR$) ELSE s$ = Reg_GetDirSymbolList(1) '** First product dir list s$ = GetListItem(s$,1) '** First directory symbol iniDir$ = GetSymbolValue(s$) END IF ELSE iniDir$ = GetSymbolValue(SYM_STF_SRCDIR$) END IF END IF Lot_GetInstallDir = iniDir$ END FUNCTION '** FUNCTION Lot_GetTheRealProdDir(prodno%) AS STRING '** '** Purpose: Retrieve the read 123 directory '** Author: JYOTI KEDIA '** Arguments: None '** Returns: The 123 directory (with trailing backslash) '************************************************************************* PUBLIC FUNCTION Lot_GetTheRealProdDir(prodno%) AS STRING DIM sym$, prodsym$, progdir$, basedir$, l%, m%, disks$, dlen% If GetSymbolValue(SYM_NETWORK$) <> gNODE$ Then sym$ = Reg_GetDirSymbolList(prodno%) prodsym$ = GetListItem(sym$, 1) progdir$ = GetListItem(prodsym$,1) Else If GetSymbolValue (SYM_SINGLESMARTSUITE) = gSINGLE$ Then disks$ = GetSymbolValue(SYM_INSTALL_SOURCE$) dlen% = LEN(disks$) If dlen% <=0 Then disks$ = GetSymbolValue(SYM_STF_SRCDIR$) dlen% = LEN(disks$) End If If MID$(disks$,dlen%,1) <> "\" Then disks$ = disks$ + "\" End If progdir$ = disks$ Else '** USE THE product dir symbol, to extrapolate what '** the directory is on the server. ''**** MMETH ??? STILL NEEDS WORK! ''**** MMETH ??? I don't think SYMBASEDIR is always correct! sym$ = Reg_GetDirSymbolList(prodno%) prodsym$ = GetListItem(sym$, 1) progdir$ = GetListItem(prodsym$,1) basedir$ = GetSymbolValue (SYM_BASEDIR$) l% = INSTR(progdir$, basedir$) l% = INSTR(l%, progdir$, "\") m% = INSTR(l%, progdir$, "\") progdir$ = GetSymbolValue (SYM_INSTALL_SOURCE) +_ RIGHT$( LEFT$ (progdir$, m%), l%) End If End If Lot_GetTheRealProdDir = progdir$ END FUNCTION '************************************************************************* '** FUNCTION Lot_ReadSerialNumber () AS INTEGER '** '** Purpose: Reads serial number from SN.DAT and sets the symbol SERIALNUM. '** Author: JYOTI KEDIA '** Arguments: None '** Returns: SUCCESS or FAILURE '************************************************************************* PUBLIC FUNCTION Lot_ReadSerialNumber () AS INTEGER DIM buf1 AS STRING : buf1 = CreateBuffer(18) DIM snpath$, rc& snpath$ = GetSymbolValue(SYM_STF_CWDDIR$) rc& = ReadSerialNumber(snpath$,buf1$) If rc& = 0 Then SetSymbolValue SYM_SERIALNUM$, NullTrim(buf1$) Lot_ReadSerialNumber = SUCCESS Else ErrorMsg SID_ERR_READSERIAL, "" Lot_ReadSerialNumber = FAILURE end if END FUNCTION PUBLIC FUNCTION Lot_AreShareToolsSupported () AS INTEGER '** Purpose: Finds if any of the registered products supports share '** Author: MZ '** Arguments: None '** Returns: 1 if there is at least one product that supports share '** 0 if none of the registered prods supports share or if '** no products are registered '************************************************************************* DIM NumberOfProducts%,count%,ShareSupport% DIM network$, prod$ network$ = GetSymbolValue(SYM_NETWORK$) ShareSupport%=0 ' Find how many products are registered NumberOfProducts%=Reg_GetNumberOfProducts() IF(NumberOfProducts%<>0) THEN ' Loop through the products FOR count%=1 TO NumberOfProducts% IF Reg_GetProdSupportForShare(count%)=1 THEN prod$ = Reg_GetProductAcronym(count%) IF network$ = gNODE$ THEN If prod$ <> "SUIT" THEN prod$ = prod$ + gTOP$ If Lot_IsTheFeatureInstalled (prod$) = 1 Then ShareSupport%=1 EXIT FOR End If End If ELSE ShareSupport%=1 EXIT FOR END IF END IF NEXT END IF Lot_AreShareToolsSupported=ShareSupport% END FUNCTION PUBLIC FUNCTION Lot_AreShare32ToolsSupported () AS INTEGER '** Purpose: Finds if any of the registered products supports share32 '** Author: MZ '** Arguments: None '** Returns: 1 if there is at least one product that supports share32 '** 0 if none of the registered prods supports share32 or if '** no products are registered '************************************************************************* DIM NumberOfProducts%,count%,Share32Support% Share32Support%=0 ' Find how many products are registered NumberOfProducts%=Reg_GetNumberOfProducts() IF(NumberOfProducts%<>0) THEN ' Loop through the products FOR count%=1 TO NumberOfProducts% IF Reg_GetProdSupportForShare32(count%)=1 THEN Share32Support%=1 EXIT FOR END IF NEXT END IF Lot_AreShare32ToolsSupported=Share32Support% END FUNCTION PUBLIC Lot_CallShareExec_RC% PUBLIC FUNCTION Lot_CallSharedTool (func$) AS INTEGER '** Purpose: Simply calls a shared function through EXECUTE '** if share is loaded. Using EXECUTE allows us to '** not load SHARE.LSS '** Author: MMETH '** Arguments: func$ the function to call. '** Returns: Whatever the function returns. '** '************************************************************************* DIM notused% Lot_CallSharedTool = 0 IF Lot_AreShareToolsSupported () = 1 OR _ Lot_AreShare32ToolsSupported () = 1 THEN 'notused% = DOEXEC (("SHARE"), (prodcall$)) gEndStatementEncountered% = FALSE EXECUTE(|USE "SHARE": sub initialize: Lot_CallShareExec_RC% =| & func$ & |:end sub|) 'EXECUTE(|USE "SHARE" : Lot_CallShareExec_RC% = | & func$) ' this gEndStatementEncountered flag is necessary because the Lotus ' END statement, which normally exists the entire program, only ' exits the top-level routine running in DOEXEC. So, ' check this flag here, to see if we hit an END during DOEXEC. IF gEndStatementEncountered% = TRUE THEN END ' exit the program END IF Lot_CallSharedTool = Lot_CallShareExec_RC% END IF END FUNCTION PUBLIC SUB SetRestartDir (szDir$) '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* ' This part doesn't really work any way. IF FSetRestartDir(szDir$) = FALSE THEN ErrorMsg SID_ERR_SETRESTARTDIR, "" ERROR STFQUIT END IF END SUB PUBLIC FUNCTION RestartListEmpty AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* IF CInt(FRestartListEmpty()) = FALSE THEN RestartListEmpty = FALSE ELSE RestartListEmpty = TRUE END IF END FUNCTION PUBLIC FUNCTION ExitExecRestart AS INTEGER '** Purpose: '** Author: '** Arguments: '** Returns: '** '************************************************************************* ExitExecRestart = CInt(FExitExecRestart()) END FUNCTION '** FUNCTION Lot_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING '** '** Purpose: THis function will return the location of the destdir '** for the section, if the feature is installed. '** This function should **NOT** be used before PostCopyConfig. '** In a node situation it can be used during PreCopyConfig for '** shared components ** only! ** '** This function can be used for standard, node, and server. Later '** will provide directory suuport on CDs also. Clients should use this function '** heavily! Make sure to check for empty string return "". '** '** This function assumes: '** 1. The feature you are looking for exists in the INF file '** if it doesn't, then we will always report back "" since '** we depend upon the inf to find the destination directory '** 2. The location of the feature relative to the top level '** product directory is identical for server and node! '** '** 3. all files that can be found on the server using this '** functions must reside somewher under the main product directory '** '** If clients use this function heavily, the transition to CD's '** and Toolkit supported node options will be smooth. '** '** Author: MARCEL METH '** '** Arguments: prodno%: The product that we are looking for. '** FeatureId$: which is the name of the keyword ID as it appears '** in the INF FILE. '** filetolookfor$: a file in this section that we can use to '** confirm that we found the feature. '** Returns: returns the directory where the feature can be found or "" '** If it can't be found. '************************************************************************* PUBLIC FUNCTION Lot_WhereIsFeature(prodno%, featureId$, filetolookfor$) AS STRING DIM network$, dirsym$, chpt$, destdir$,s$,subdir$,installIniFile$ network$ = GetSymbolValue(SYM_NETWORK$) s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) '***Processing Suit '****************** IF s$ = gSMARTSUITE$ THEN '***Processing Suit Standard IF network$ = gSTANDARD$ THEN IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESUITCD '***Get the chapter chpt$ = Lot_GetChapterFromKeyWord(featureId$) IF chpt$ = "" GOTO NOFEATURE '***Get if the feature was installed ' We want to find it even if it's been previously copied (i.e., not now in copy ' list ' InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT) ' IF InorOut%=0 GOTO MAYBESUITCD '***Get the destination symbol dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM) IF dirsym$ = "" GOTO NOFEATURE '***Get the destination directory destdir$ = GetSymbolValue(dirsym$) IF destdir$ = "" GOTO NOFEATURE IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESUITCD '***Get the destination of the feature Lot_WhereIsFeature = destdir$ EXIT FUNCTION '***Processing Suit Node ELSEIF network$ = gNODE$ THEN IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESUITCD '***Get the chapter chpt$ = Lot_GetChapterFromKeyWord(featureId$) '***Look on the node IF chpt$ <> "" THEN '***Get if the feature was installed ' We want to find it even if it's been previously copied (i.e., not now in copy ' list ' InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT) ' IF InorOut%=0 GOTO LOOKONSUITSRV '***Get the destination directory dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM) destdir$ = GetSymbolValue(dirsym$) IF DoesFileExist(destdir$+filetolookfor$,femExists) <> 0 THEN '***Returns the destination of the feature Lot_WhereIsFeature = destdir$ EXIT FUNCTION ELSE GOTO LOOKONSUITSRV END IF ELSE GOTO LOOKONSUITSRV END IF '***Processing Suit Server ELSEIF network$ = gSERVER$ THEN IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESUITCD '***Get the chapter chpt$ = Lot_GetChapterFromKeyWord(featureId$) IF chpt$ = "" GOTO MAYBESUITCD '***Get if the feature was installed ' We want to find it even if it's been previously copied (i.e., not now in copy ' list ' InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT) ' IF InorOut%=0 GOTO MAYBESUITCD '***Get the destination symbol dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM) IF dirsym$ = "" GOTO MAYBESUITCD '***Get the destination directory destdir$ = GetSymbolValue(dirsym$) IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESUITCD '***Get the destination of the feature Lot_WhereIsFeature = destdir$ EXIT FUNCTION '***Processing Suit Distribution ELSE GOTO NOFEATURE END IF '***Processing Single product '**************************** ELSEIF s$ = gSINGLE$ THEN '***Processing Single Product Standard IF network$ = gSTANDARD$ THEN IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESINGLECD '***Get the chapter chpt$ = Lot_GetChapterFromKeyWord(featureId$) IF chpt$ = "" GOTO NOFEATURE '***Get if the feature was installed ' We want to find it even if it's been previously copied (i.e., not now in copy ' list ' InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT) ' IF InorOut%=0 GOTO MAYBESINGLECD '***Get the destination symbol dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM) IF dirsym$ = "" GOTO NOFEATURE '***Get the destination directory destdir$ = GetSymbolValue(dirsym$) IF destdir$ = "" GOTO NOFEATURE IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESINGLECD '***Get the destination of the feature Lot_WhereIsFeature = destdir$ EXIT FUNCTION '***Processing Single Product Node ELSEIF network$ = gNODE$ THEN IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESINGLECD '***Get the chapter chpt$ = Lot_GetChapterFromKeyWord(featureId$) '***Look on the node IF chpt$ <> "" THEN '***Get if the feature was installed ' We want to find it even if it's been previously copied (i.e., not now in copy ' list ' InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT) ' IF InorOut%=0 GOTO LOOKONSINGLESRV '***Get the destination directory dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM) destdir$ = GetSymbolValue(dirsym$) IF DoesFileExist(destdir$+filetolookfor$,femExists) <> 0 THEN '***Returns the destination of the feature Lot_WhereIsFeature = destdir$ EXIT FUNCTION ELSE GOTO LOOKONSINGLESRV END IF ELSE GOTO LOOKONSINGLESRV END IF '***Processing Single Product Server ELSEIF network$ = gSERVER$ THEN IF Lot_IsTheFeatureInstalled(featureId$) = 0 GOTO MAYBESINGLECD '***Get the chapter chpt$ = Lot_GetChapterFromKeyWord(featureId$) IF chpt$ = "" GOTO MAYBESINGLECD '***Get if the feature was installed ' We want to find it even if it's been previously copied (i.e., not now in copy ' list ' InorOut% = Lot_GetChapterValInt(chpt$, F_INOROUT) ' IF InorOut%=0 GOTO MAYBESINGLECD '***Get the destination symbol dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM) IF dirsym$ = "" GOTO MAYBESINGLECD '***Get the destination directory destdir$ = GetSymbolValue(dirsym$) IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO MAYBESINGLECD '***Get the destination of the feature Lot_WhereIsFeature = destdir$ EXIT FUNCTION '***Processing Single Product Distribution ELSE GOTO NOFEATURE END IF END IF Exit Function LOOKONSINGLESRV: destdir$ = GetSymbolValue(SYM_INSTALL_SOURCE$) IF destdir$ = "" THEN destdir$ = GetSymbolValue(SYM_STF_SRCDIR$) IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO LOOKONNETCOMPONENT Lot_WhereIsFeature = destdir$ EXIT FUNCTION LOOKONSUITSRV: destdir$ = GetSymbolValue(SYM_INSTALL_SOURCE$) IF destdir$ = "" THEN destdir$ = GetSymbolValue(SYM_STF_SRCDIR$) installIniFile$ = MakePath(destdir$,gINSTALLINI$) subdir$ = GetIniKeyString(installIniFile$,"Destination Directories", Reg_GetProductAcronym(prodno%)) IF DoesFileExist(destdir$+subdir$+filetolookfor$,femExists) = 0 GOTO LOOKONNETCOMPONENT Lot_WhereIsFeature = destdir$+subdir$ EXIT FUNCTION LOOKONNETCOMPONENT: destdir$ = GetSymbolValue(SYM_NETCOMPONENT$) IF DoesFileExist(destdir$+filetolookfor$,femExists) = 0 GOTO NOFEATURE Lot_WhereIsFeature = destdir$ EXIT FUNCTION MAYBESINGLECD: ''** MMETH WORK TO DO FOR CD; have a CDROOT symbol MAYBESUITCD: ''** MMETH WORK TO DO FOR CD; have a CDROOT symbol NOFEATURE: Lot_WhereIsFeature = "" END FUNCTION PUBLIC FUNCTION Lot_IsTheFeatureInstalled(FeatureToFind$) AS INTEGER '** Purpose: Reads the chapters installed by the network administrator '** during server install into install.ini in the section '** [Server Feature Installed] and if the feature '** was installed returns 1 if not returns 0 '** Author: MZ '** Arguments: featureToFind$ '** Returns: 1 YES '** 0 NO '************************************************************************* DIM NetworkIns$ 'Identify if I am in node or server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) PopulateCINSTALLLIST IF NetworkIns$ <> gDISTRIBUTION THEN If ISELEMENT(CINSTALL(FeatureToFind$)) <> FALSE Then Lot_IsTheFeatureInstalled = 1 Else Lot_IsTheFeatureInstalled = 0 End If Else Lot_IsTheFeatureInstalled = 0 End If END FUNCTION PUBLIC FUNCTION Lot_SaveFeaturesInstaledInInstallIni() AS INTEGER '** Purpose: Saves the Features installed by the network administrator '** during server install into install.ini in the section '** [Server Feature Installed]; This is needed at Node '** install time '** MMETH added: Also save during standard so that '** we have a record for standard install '** MZ Added: save [Destination Directories] needed by Node '** suit install '** Author: MZ '** Arguments: None '** Returns: SUCCESS '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, CurrChpt$, FeatureName$ DIM FeatureNum%,s$,AllProdNum%,prodNum%,ProdAcronym$,BaseDir$,symList$ DIM prodsym$,progdir$ DIM installkind$ 'Identify if I am in server or standard install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ OR NetworkIns$=gSTANDARD THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) PopulateCINSTALLLIST 'Loop through the chapters and log the features CurrChpt$ = Lot_GetFirst("", F_INOROUT) WHILE (CurrChpt$ <> "") 'Log all installed chapters FeatureName$ = Lot_GetChapterValStr(CurrChpt$, F_KEYWORD) If ISELEMENT(CINSTALL(FeatureName$)) = FALSE Then FeatureNum% = gNCINSTALL% 'Lot_GetLastFeatureNumber() CreateIniKeyValue gInstallIniFile$, "Server Feature Installed", "Feature"+LTRIM$(STR$(FeatureNum%+1)),FeatureName$, cmoOverwrite CINSTALL (FeatureName$) = "1" gNCINSTALL% = gNCINSTALL%+1 END IF CurrChpt$ = Lot_GetNext() WEND END IF s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) 'Identify if I am in server and suit install IF NetworkIns$=gSERVER$ AND s$ = gSMARTSUITE$ THEN 'Loop through the products and log the directories AllProdNum% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN BaseDir$= GetSymbolValue(SYM_BASEDIR$) FOR prodNum%=1 TO AllProdNum% ProdAcronym$ = Reg_GetProductAcronym(prodNum%) 'Get the directory symbol symList$ = Reg_GetDirSymbolList(prodNum%) prodsym$ = GetListItem(symList$, 1) progdir$ = GetListItem(prodsym$,1) IF LEN(BaseDir$) < LEN(progdir$) THEN CreateIniKeyValue gInstallIniFile$, "Destination Directories", ProdAcronym$,MID(progdir$,LEN(BaseDir$)+1), cmoOverwrite END IF NEXT END IF END IF installkind$ = GetSymbolValue(SYM_INSTALLKIND$) 'If we're a server, always write directories 'Otherwise, write only if NOT a language install so that uninstall can work 'correctly on the primary language IF NetworkIns$ = gSERVER$ OR installkind$ <> gLANGUAGEINSTALL$ THEN 'write all destination symbols and their values Lot_WriteDestinationSymAndVal gInstallIniFile$, "Destination Symbols And Values" Lot_WriteCriticalDirectories gInstallIniFile$ IF GetSymbolValue(SYM_BASEDIR$) <>"" THEN CreateIniKeyValue gInstallIniFile$, _ "Destination Symbols And Values", _ "ParentDir",GetSymbolValue(SYM_BASEDIR$),_ cmoOverwrite ELSE CreateIniKeyValue gInstallIniFile$, _ "Destination Symbols And Values", _ "ParentDir","", cmoOverwrite END IF END IF Lot_SaveFeaturesInstaledInInstallIni = SUCCESS END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_SaveFeaturesInstaledInInstNodeIni() AS INTEGER '** Purpose: Saves the Features installed by the network administrator '** during server install into install.ini in the section '** [Server Feature Installed]; This is needed at Node '** install time '** MMETH added: Also save during standard so that '** we have a record for standard install '** MZ Added: save [Destination Directories] needed by Node '** suit install '** Author: TV '** Arguments: None '** Returns: SUCCESS '************************************************************************* DIM NetworkIns$, prodDir$, gInstNodeIniFile$, CurrChpt$, FeatureName$ DIM FeatureNum%,s$,AllProdNum%,prodNum%,ProdAcronym$,BaseDir$,symList$ DIM prodsym$,progdir$, dirSym$, inidir$ 'Identify if I am in server or standard install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE THEN 'Built the path to cinstnod.ini dirSym$ = Reg_GetDirSymbolList(1) '** First product dir list IF GetListLength(dirSym$) >= 1 THEN dirSym$ = GetListItem(dirSym$, 1) '** First directory symbol inidir$ = GetSymbolValue(dirSym$) gInstNodeIniFile$ = MakePath(inidir$,"cinstnod.ini") END IF PopulateCINSTNODELIST 'Loop through the chapters and log the features CurrChpt$ = Lot_GetFirst("", F_INOROUT) WHILE (CurrChpt$ <> "") 'Log all installed chapters FeatureName$ = Lot_GetChapterValStr(CurrChpt$, F_KEYWORD) If ISELEMENT(CINSTNODE(FeatureName$)) = FALSE Then FeatureNum% = gNCINSTNODE% 'Lot_GetLastFeatureNumber() CreateIniKeyValue gInstNodeIniFile$, "Server Feature Installed", "Feature"+LTRIM$(STR$(FeatureNum%+1)),FeatureName$, cmoOverwrite CINSTNODE (FeatureName$) = "1" gNCINSTNODE% = gNCINSTNODE%+1 END IF CurrChpt$ = Lot_GetNext() WEND END IF 's$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) 'write all destination symbols and their values Lot_WriteDestinationSymAndVal gInstNodeIniFile$, "Destination Symbols And Values" Lot_WriteCriticalDirectories gInstNodeIniFile$ IF GetSymbolValue(SYM_BASEDIR$) <>"" THEN CreateIniKeyValue gInstNodeIniFile$, _ "Destination Symbols And Values", _ "ParentDir",GetSymbolValue(SYM_BASEDIR$),_ cmoOverwrite ELSE CreateIniKeyValue gInstNodeIniFile$, _ "Destination Symbols And Values", _ "ParentDir","", cmoOverwrite END IF Lot_SaveFeaturesInstaledInInstNodeIni = SUCCESS END FUNCTION '************************************************************************* FUNCTION Lot_GetLastFeatureNumber() AS INTEGER '** Purpose: Reads the features installed by the network administrator '** so far in the section [Server Feature Installed] and returns '** the last number '** Author: MZ '** Returns: last number '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, FeaturePref$ DIM FeatureTag$, FeatureID$, rc%, lrc& STATIC FeatureNumber% 'Identify if I am in node or server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ OR NetworkIns$=gSTANDARD$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) FeaturePref$ = "Feature" FeatureNumber%=1 FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%)) FeatureID$ = GetIniKeyString(gInstallIniFile$,"Server Feature Installed", FeatureTag$) 'print gInstallIniFile$,"Server Feature Installed", FeatureTag$, FeatureID$, "XXX" lrc& = DoesFileExist(gInstallIniFile$,femExists) IF lrc& = 1 THEN IF FeatureID$ = "" THEN Lot_GetLastFeatureNumber = 0 EXIT FUNCTION ELSE WHILE (FeatureID$ <> "") FeatureNumber% = FeatureNumber% + 1 FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%)) FeatureID$ = GetIniKeyString(gInstallIniFile$,"Server Feature Installed", FeatureTag$) 'print "in while","Server Feature Installed", FeatureTag$, FeatureID$, "XXX1" WEND Lot_GetLastFeatureNumber = FeatureNumber%-1 'print"FeatureNum% in the loop for getLastFeatureNum",STR$(FeatureNumber%) EXIT FUNCTION END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_SaveTheNodeOptionsInInstallIni() AS INTEGER '** Purpose: Saves the node options installed by the network administrator '** during server install into install.ini in the section '** [<Product acronym> Node Options]; This is needed at Node '** install time '** Author: MZ '** Arguments: None '** Returns: SUCCESS '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$ DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum% 'Identify if I am in server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) 'Loop through the products and log the node options AllProdNum% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN FOR prodNum%=1 TO AllProdNum% AllOptNum% = 0 AllOptNum% = Reg_GetNumofNodeOptions(prodNum%) IF AllOptNum% <> 0 THEN ProdAcronym$ = Reg_GetProductAcronym(prodNum%) 'Loop though options FOR OptNum%=1 TO AllOptNum% IF Reg_IsNodeOptionSelected(prodNum%,OptNum%)=STR(1) THEN OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%) IF OptName$ <> "" AND FIsKeywordinCopyList (OptName$) <> FALSE THEN OptCount% = Lot_GetLastNodeOptNumber(ProdAcronym$) CreateIniKeyValue gInstallIniFile$, ProdAcronym$+" Node Options", "Option"+LTRIM$(STR$(OptCount%+1)),OptName$, cmoOverwrite END IF END IF NEXT END IF NEXT END IF END IF Lot_SaveTheNodeOptionsInInstallIni = SUCCESS END FUNCTION '************************************************************************* FUNCTION Lot_GetLastNodeOptNumber(ProdAcronym$) AS INTEGER '** Purpose: Reads the node options installed by the network administrator '** so far in the section [<ProdAcronym$>+" Node Options"] and returns '** the last number '** Author: MZ '** Returns: last number '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$ DIM OptTag$, OptID$, OptPref$, lrc& STATIC OptNumber% 'Identify if I am in node or server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) lrc& = DoesFileExist(gInstallIniFile$,femExists) IF lrc& = 1 THEN IF OptID$ = "" THEN Lot_GetLastNodeOptNumber = 0 EXIT FUNCTION ELSE WHILE (OptID$ <> "") OptNumber% = OptNumber% + 1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) WEND Lot_GetLastNodeOptNumber = OptNumber%-1 EXIT FUNCTION END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) AS INTEGER '** Purpose: Checks if the node options is available to node users '** by reading into install.ini in the section '** [<Product acronym> Node Options]; '** Author: MZ '** Arguments: None '** Returns: 1 or 0 if it is or not available '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$ DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%, lrc& 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) ProdAcronym$ = Reg_GetProductAcronym(prodNum%) Lot_IsTheNodeOptionsAvailToNode = 0 OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) lrc& = DoesFileExist(gInstallIniFile$,femExists) IF lrc& = 1 THEN IF OptID$ = OptName$ THEN Lot_IsTheNodeOptionsAvailToNode = 1 EXIT FUNCTION ELSE WHILE (OptID$ <> "") IF OptID$ = OptName$ THEN Lot_IsTheNodeOptionsAvailToNode = 1 EXIT FUNCTION END IF OptNumber% = OptNumber% + 1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) WEND Lot_IsTheNodeOptionsAvailToNode = 0 EXIT FUNCTION END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_IsAnyNodeOptAvailToNode() AS INTEGER '** Purpose: Checks if any node options are available to node users '** by reading into install.ini in the section '** [<Product acronym> Node Options]; '** Author: MZ '** Arguments: None '** Returns: 1 or 0 if it is or not available '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds% DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%, lrc&, prodNum% 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) 'Get all the products registered NumOfProds% = Reg_GetNumberOfProducts() IF NumOfProds% = 0 THEN Lot_IsAnyNodeOptAvailToNode = 0 EXIT FUNCTION END IF lrc& = DoesFileExist(gInstallIniFile$,femExists) IF lrc& = 1 THEN 'Loop through the products FOR prodNum% = 1 TO NumOfProds% ProdAcronym$ = Reg_GetProductAcronym(prodNum%) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) IF OptID$ <> "" THEN Lot_IsAnyNodeOptAvailToNode = 1 EXIT FUNCTION END IF NEXT ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_AreNodeOptAvailToNodeForProd(prodNum%) AS INTEGER '** Purpose: Checks if any node options are available to node users '** for the prodNum%, by reading into install.ini in the section '** [<Product acronym> Node Options]; '** Author: MZ '** Arguments: None '** Returns: 1 or 0 if it is or not available '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds% DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%, lrc& 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) lrc& = DoesFileExist(gInstallIniFile$,femExists) IF lrc& = 1 THEN ProdAcronym$ = Reg_GetProductAcronym(prodNum%) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) IF OptID$ <> "" THEN Lot_AreNodeOptAvailToNodeForProd = 1 EXIT FUNCTION ELSE Lot_AreNodeOptAvailToNodeForProd = 0 EXIT FUNCTION END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetNumOfNodeOptAvailToNodeForProd(prodNum%) AS INTEGER '** Purpose: Counts the node options available to node users '** for the prodNum%, by reading into install.ini in the section '** [<Product acronym> Node Options]; '** Author: MZ '** Arguments: None '** Returns: 0 or num of options '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfOptions% DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%, lrc& 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) lrc& = DoesFileExist(gInstallIniFile$,femExists) IF lrc& = 1 THEN ProdAcronym$ = Reg_GetProductAcronym(prodNum%) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) IF OptID$ <> "" THEN WHILE (OptID$ <> "") NumOfOptions% = OptNumber% OptNumber% = OptNumber% + 1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" Node Options", OptTag$) WEND ELSE Lot_GetNumOfNodeOptAvailToNodeForProd = 0 EXIT FUNCTION END IF Lot_GetNumOfNodeOptAvailToNodeForProd = NumOfOptions EXIT FUNCTION ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_AreAnyNodeOptAvailToSrv() AS INTEGER '** Purpose: Checks the registration database to find the registred '** node options '** Author: MZ '** Arguments: None '** Returns: 1 if there is at least 1 option or 0 if there is none '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$, j%, nodeopt_flag% DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum% DIM OptKeyword$, chpt$ 'Identify if I am in server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) 'Loop through the products and check for node options AllProdNum% = 0 nodeopt_flag% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN FOR prodNum%=1 TO AllProdNum% AllOptNum% = 0 AllOptNum% = Reg_GetNumofNodeOptions(prodNum%) ' Reg_ReSetAllNodeOptsSelToDefaults prodNum% OptNum%=Reg_GetNumofNodeOptions(prodNum%) IF OptNum% <> 0 THEN chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(prodNum%) + gTOP$) ' Loop through the options FOR j% = 1 TO OptNum% OptKeyWord$ = Reg_GetNodeOptionStr(prodNum%,j%) chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$) IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN nodeopt_flag% = 1 END IF NEXT END IF IF AllOptNum% <> 0 AND nodeopt_flag% <> 0 THEN Lot_AreAnyNodeOptAvailToSrv=1 EXIT FUNCTION END IF NEXT ELSE Lot_AreAnyNodeOptAvailToSrv=0 EXIT FUNCTION END IF ELSE Lot_AreAnyNodeOptAvailToSrv=0 EXIT FUNCTION END IF Lot_AreAnyNodeOptAvailToSrv=0 END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_SaveTheCDOptionsInInstallIni() AS INTEGER '** Purpose: Saves the CD options installed by the network administrator '** during server install into install.ini in the section '** [<Product acronym> CD Options]; This is needed at CD '** install time '** Author: MZ '** Arguments: None '** Returns: SUCCESS '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$ DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum% 'Identify if I am in server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) 'Loop through the products and log the CD options AllProdNum% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN FOR prodNum%=1 TO AllProdNum% AllOptNum% = 0 AllOptNum% = Reg_GetNumofCDOptions(prodNum%) IF AllOptNum% <> 0 THEN ProdAcronym$ = Reg_GetProductAcronym(prodNum%) 'Loop though options FOR OptNum%=1 TO AllOptNum% IF Reg_IsCDOptionSelected(prodNum%,OptNum%)=STR(1) THEN OptName$ = Reg_GetCDOptionStr(prodNum%,OptNum%) IF OptName$ <> "" AND FIsKeywordinCopyList (OptName$) <> FALSE THEN OptCount% = Lot_GetLastCDOptNumber(ProdAcronym$) CreateIniKeyValue gInstallIniFile$, ProdAcronym$+" CD Options", "Option"+LTRIM$(STR$(OptCount%+1)),OptName$, cmoOverwrite END IF END IF NEXT END IF NEXT END IF END IF Lot_SaveTheCDOptionsInInstallIni = SUCCESS END FUNCTION '************************************************************************* FUNCTION Lot_GetLastCDOptNumber(ProdAcronym$) AS INTEGER '** Purpose: Reads the CD options installed by the network administrator '** so far in the section [<ProdAcronym$>+" CD Options"] and returns '** the last number '** Author: MZ '** Returns: last number '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$ DIM OptTag$, OptID$, OptPref$, rc% STATIC OptNumber% 'Identify if I am in CD or server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) IF DoesFileExist(gInstallIniFile$,femExists) = 1 THEN IF OptID$ = "" THEN Lot_GetLastCDOptNumber = 0 EXIT FUNCTION ELSE WHILE (OptID$ <> "") OptNumber% = OptNumber% + 1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) WEND Lot_GetLastCDOptNumber = OptNumber%-1 EXIT FUNCTION END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_IsTheCDOptionsAvailToNode(prodNum%,OptName$) AS INTEGER '** Purpose: Checks if the CD options is available to node users '** by reading into install.ini in the section '** [<Product acronym> CD Options]; '** Author: MZ '** Arguments: None '** Returns: 1 or 0 if it is or not available '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$ DIM OptTag$, OptID$, OptPref$, OptNumber%, rc% 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) ProdAcronym$ = Reg_GetProductAcronym(prodNum%) Lot_IsTheCDOptionsAvailToNode = 0 OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) IF DoesFileExist(gInstallIniFile$,femExists) = 1 THEN IF OptID$ = OptName$ THEN Lot_IsTheCDOptionsAvailToNode = 1 EXIT FUNCTION ELSE WHILE (OptID$ <> "") IF OptID$ = OptName$ THEN Lot_IsTheCDOptionsAvailToNode = 1 EXIT FUNCTION END IF OptNumber% = OptNumber% + 1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) WEND Lot_IsTheCDOptionsAvailToNode = 0 EXIT FUNCTION END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_IsAnyCDOptAvailToNode() AS INTEGER '** Purpose: Checks if any CD options are available to node users '** by reading into install.ini in the section '** [<Product acronym> CD Options]; '** Author: MZ '** Arguments: None '** Returns: 1 or 0 if it is or not available '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds% DIM OptTag$, OptID$, OptPref$, OptNumber%, rc%,prodNum% 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) 'Get all the products registered NumOfProds% = Reg_GetNumberOfProducts() IF NumOfProds% = 0 THEN Lot_IsAnyCDOptAvailToNode = 0 EXIT FUNCTION END IF IF DoesFileExist(gInstallIniFile$,femExists) = 1 THEN 'Loop through the products FOR prodNum% = 1 TO NumOfProds% ProdAcronym$ = Reg_GetProductAcronym(prodNum%) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) IF OptID$ <> "" THEN Lot_IsAnyCDOptAvailToNode = 1 EXIT FUNCTION END IF NEXT ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_AreCDOptAvailToNodeForProd(prodNum%) AS INTEGER '** Purpose: Checks if any CD options are available to node users '** for the prodNum%, by reading into install.ini in the section '** [<Product acronym> CD Options]; '** Author: MZ '** Arguments: None '** Returns: 1 or 0 if it is or not available '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfProds% DIM OptTag$, OptID$, OptPref$, OptNumber%, rc% 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) IF DoesFileExist(gInstallIniFile$,femExists) = 1 THEN ProdAcronym$ = Reg_GetProductAcronym(prodNum%) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) IF OptID$ <> "" THEN Lot_AreCDOptAvailToNodeForProd = 1 EXIT FUNCTION ELSE Lot_AreCDOptAvailToNodeForProd = 0 EXIT FUNCTION END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetNumOfCDOptAvailToNodeForProd(prodNum%) AS INTEGER '** Purpose: Counts the CD options available to node users '** for the prodNum%, by reading into install.ini in the section '** [<Product acronym> CD Options]; '** Author: MZ '** Arguments: None '** Returns: 0 or num of options '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, ProdAcronym$,NumOfOptions% DIM OptTag$, OptID$, OptPref$, OptNumber%, rc% 'Identify if I am in node install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gNODE$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) IF DoesFileExist(gInstallIniFile$,femExists) = 1 THEN ProdAcronym$ = Reg_GetProductAcronym(prodNum%) OptPref$ = "Option" OptNumber%=1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) IF OptID$ <> "" THEN WHILE (OptID$ <> "") NumOfOptions% = OptNumber% OptNumber% = OptNumber% + 1 OptTag$=OptPref$+LTRIM$(STR$(OptNumber%)) OptID$ = GetIniKeyString(gInstallIniFile$,ProdAcronym$+" CD Options", OptTag$) WEND ELSE Lot_GetNumOfCDOptAvailToNodeForProd = 0 EXIT FUNCTION END IF Lot_GetNumOfCDOptAvailToNodeForProd = NumOfOptions EXIT FUNCTION ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT 'DoMsgBox("INSTALL.INI is missing!!!! ",gInstallIniFile$ ,MB_OK) END IF END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_AreAnyCDOptAvailToSrv() AS INTEGER '** Purpose: Checks the registration database to find the registred '** CD options '** Author: MZ '** Arguments: None '** Returns: 1 if there is at least 1 option or 0 if there is none '************************************************************************* DIM NetworkIns$, prodDir$, gInstallIniFile$, OptName$, j%, CDopt_flag% DIM OptCount%, prodNum%, AllProdNum%, ProdAcronym$, AllOptNum%, OptNum% DIM OptKeyword$, chpt$ 'Identify if I am in server install NetworkIns$ = GetSymbolValue(SYM_NETWORK$) IF NetworkIns$=gSERVER$ THEN 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) 'Loop through the products and check for CD options AllProdNum% = 0 CDopt_flag% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN FOR prodNum%=1 TO AllProdNum% AllOptNum% = 0 AllOptNum% = Reg_GetNumofCDOptions(prodNum%) ' Reg_ReSetAllCDOptsSelToDefaults prodNum% OptNum%=Reg_GetNumofCDOptions(prodNum%) IF OptNum% <> 0 THEN chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(prodNum%) + gTOP$) ' Loop through the options FOR j% = 1 TO OptNum% OptKeyWord$ = Reg_GetCDOptionStr(prodNum%,j%) chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$) IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN CDopt_flag% = 1 END IF NEXT END IF IF AllOptNum% <> 0 AND CDopt_flag% <> 0 THEN Lot_AreAnyCDOptAvailToSrv=1 EXIT FUNCTION END IF NEXT ELSE Lot_AreAnyCDOptAvailToSrv=0 EXIT FUNCTION END IF ELSE Lot_AreAnyCDOptAvailToSrv=0 EXIT FUNCTION END IF Lot_AreAnyCDOptAvailToSrv=0 END FUNCTION '************************************************************************* '************************************************************************* '** FUNCTION GetNotesPathfromLotusIni() AS STRING '** '** Purpose: Gets the notes dir path from Lotus.ini file, and searches for '** notes.exe in the product dir path. '** '** Author: INSIK RHEE '** Arguments: None '** Returns: if notes.exe does not exist in dir specified in lotus.ini, it '** returns "", otherwise returns the full path without filename. '************************************************************************* PUBLIC FUNCTION GetNotesPathfromLotusIni() AS STRING DIM DestDir$, lotusinipath$, defdir$, temp%, ProdDir$, fullpath$, rv% DestDir$ = GetWindowsDir() lotusinipath$ = DestDir$ +"lotus.ini" if DoesFileExist(lotusinipath$,femExists) then defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "Notes") if defdir$ <> "" then temp% = INSTR(1,LCASE$(defdir$),"notes.exe") if temp% <> 0 then ProdDir$ = MID$(defdir$,1,(temp%-1)) if ProdDir$ <> "" then fullpath$ = ProdDir$ + "notes.exe" if DoesFileExist(fullpath$, femExists) then GetNotesPathfromLotusIni = MID$(defdir$,1,(temp%-2)) EXIT FUNCTION end if end if end if end if end if GetNotesPathfromLotusIni = "" END FUNCTION '************************************************************************* '** FUNCTION IsNotesInPath AS INTEGER '** '** Purpose: Detects the presence of notes path in the autoexec.bat file '** '** Author: INSIK RHEE '** Arguments: None '** Returns: 1 if true, 0 if false. '************************************************************************* PUBLIC FUNCTION IsNotesInPath() AS INTEGER DIM notesdir$,autoexec$,Buffer$ DIM autofile%, FoundPath% notesdir$ = GetNotesPathfromLotusIni() IsNotesInPath = 0 ' default = FALSE if notesdir$ = "" then IsNotesInPath = 1 EXIT FUNCTION end if autoexec$ = GetBootDrive() IF autoexec$ <> "" THEN autoexec$ = autoexec$ + "autoexec.bat" ELSE autoexec$ = "c:\" + "autoexec.bat" END IF autofile% = 111 OPEN autoexec$ FOR INPUT AS autofile% Do Until EOF(autofile%) LINE INPUT #autofile%, Buffer$ FoundPath% = INSTR(1,LCASE$(Buffer$), "path") if FoundPath% <> 0 Then ' path statement found. FoundPath% = INSTR(FoundPath%, LCASE$(Buffer$), LCASE$(notesdir$)) if FoundPath% <> 0 Then IsNotesInPath = 1 CLOSE #autofile% EXIT FUNCTION end if end if Loop CLOSE #autofile% END FUNCTION '************************************************************************* '** FUNCTION IsShareInAUTOEXEC AS INTEGER '** '** Purpose: Detects the presence of SHARE.EXE in the autoexec.bat file '** '** Author: INSIK RHEE '** Arguments: None '** Returns: 1 if true, 0 if false. '************************************************************************* PUBLIC FUNCTION IsShareInAUTOEXEC() AS INTEGER DIM autoexec$,Buffer$ DIM autofile%, FoundShare% IsShareInAUTOEXEC = 0 ' default = FALSE autoexec$ = GetBootDrive() IF autoexec$ <> "" THEN autoexec$ = autoexec$ + "autoexec.bat" ELSE autoexec$ = "c:\" + "autoexec.bat" END IF autofile% = 111 OPEN autoexec$ FOR INPUT AS autofile% Do Until EOF(autofile%) LINE INPUT #autofile%, Buffer$ FoundShare% = INSTR(1,LCASE$(Buffer$), "share") if FoundShare% <> 0 Then ' share statement found. IsShareInAUTOEXEC = 1 CLOSE #autofile% EXIT FUNCTION end if Loop CLOSE #autofile% END FUNCTION '************************************************************************* '** FUNCTION ModifyAutoexec AS STRING '** '** Purpose: Modifies autoexec.bat to include share and/or modify path to '** include notes '** '** Author: INSIK RHEE '** Arguments: modflag% = bitwise flag on what to modify. '** directmod% = 1 to modify autoexec.bat (backing up old one) '** 0 to modify to a backup file '** backup$ = backup filename '** Returns: NULL string if success. string describing error otherwise '** NOTE: This function assumes that the caller has already used the '** IsNotesInPath and IsShareEnabled calls and will NOT check to see if '** the modifications are redundant. '************************************************************************* PUBLIC FUNCTION ModifyAutoexec(modflag%,directmod%,backup$) AS STRING DIM notesdir$,src$,dest$,Buffer$ DIM srcfile%,destfile%, FoundPath%, PathNext% srcfile% = 112 destfile% = 113 ModifyAutoexec="" ' default if (modflag% AND MANotes) then ' notes mod notesdir$ = GetNotesPathfromLotusIni() end if src$ = GetBootDrive() IF src$ <> "" THEN dest$ = src$ + backup$ src$ = src$ + "autoexec.bat" ELSE dest$ = "c:\" + backup$ src$ = "c:\" + "autoexec.bat" END IF IF Win32CopyFile(src$, dest$, TRUE) = FALSE THEN ModifyAutoexec = LdString( SID_ERR_AUTOEXEC_NOT_COPIED ) EXIT FUNCTION End If Win32CopyFile src$, dest$, TRUE if directmod% <> 0 then src$ = dest$ dest$ = GetBootDrive() IF dest$ <> "" THEN dest$ = dest$ + "autoexec.bat" ELSE dest$ = "c:\" + "autoexec.bat" END IF End If OPEN src$ FOR INPUT AS srcfile% OPEN dest$ FOR OUTPUT AS destfile% PathNext% = 0 ' set to 1 when path found, 2 after mod is done. Do Until EOF(srcfile%) LINE INPUT #srcfile%, Buffer$ FoundPath% = INSTR(1,LCASE$(Buffer$), "path") if ((FoundPath% <> 0) AND (PathNext <> 2)) Then ' path statement found. PathNext% = 1 end if PRINT #destfile%, Buffer$ if PathNext% = 1 Then if (modflag% AND MANotes) then PRINT #destfile%, "PATH=%PATH%;"+notesdir$ End If If (modflag% AND MAShare) then PRINT #destfile%, "SHARE" End If PathNext% = 2 End If Loop if PathNext% <> 2 Then ' path statement not found? if (modflag% AND MANotes) then PRINT #destfile%, "PATH=%PATH%;"+notesdir$ End If If (modflag% AND MAShare) then PRINT #destfile%, "SHARE" End If End If CLOSE #srcfile%, #destfile% END FUNCTION '************************************************************************* '** FUNCTION GetBootDrive() AS STRING '** '** Purpose: Gets the boot drive letter and trailing slash (e.g. "C:\") '** '** Author: INSIK RHEE '** Arguments: None '** Returns: Searches the fixed drive list for AUTOEXEC.BAT '** returns null string if none found. (or READ_ONLY drive) '************************************************************************* PUBLIC FUNCTION GetBootDrive() AS STRING DIM lDrive$, Length%, count% GetLocalHardDrivesList SYM_LOCALHARDDRIVES$ Length% = GetListLength(SYM_LOCALHARDDRIVES$) FOR count% = 1 TO Length% lDrive$ = GetListItem(SYM_LOCALHARDDRIVES$, count%) + ":\" IF IsDirWritable(lDrive$) AND (DoesFileExist(lDrive$+"autoexec.bat",femExists)=1) THEN GetBootDrive$ = lDrive$ EXIT FUNCTION END IF NEXT GetBootDrive$="" END FUNCTION PUBLIC SUB DL_SetOraclePath '** Purpose: This subroutine Sets the Oracle Data Path symbol '** '** Author: JMD '** Arguments: NONE '************************************************************************* DIM TmpDDir$ ' Should use this if NODE or STANDARD - TmpDDir$ = Lot_GetORACLEHomePath() IF TmpDDir$ <> "" THEN SetSymbolValue SYM_ORACLEHOMEDIR$, TmpDDir$ Lot_RefreshDestination(SYM_ORACLEHOMEDIR$) End If END SUB PUBLIC SUB DL_SetNotesDataPath '** Purpose: This subroutine Sets the DataLens specific symbols for the '** Notes Data Path. This facilitates copying NSF files to the '** proper DOC location '** Author: PJT '** Arguments: NONE '************************************************************************* DIM TmpDDir$ ' Should use this if NODE or STANDARD - TmpDDir$ = Lot_GetLotusNotesDataPath() 'print "Got Lotus Notes Data Directory of " & TmpDDir$ IF TmpDDir$ <> "" THEN SetSymbolValue SYM_LOTUSNOTESDATADIR$, TmpDDir$ Lot_RefreshDestination(SYM_LOTUSNOTESDATADIR$) End If END SUB PUBLIC FUNCTION Lot_GetLotusNotesDataPath() AS STRING '** Purpose: Returns the location for the Notes Data Directory '** Author: PTilton '** Arguments: None. '** Returns: NULL String if Notes Data Directory not found. '** Otherwise, returns directory of Notes Data Directory. '************************************************************************* DIM szDir$, szSearch$, szTmp$, rc%, lrc& Lot_GetLotusNotesDataPath = "" szTmp$ = GetIniKeyString( "Notes.ini", "Notes", "Directory") If szTmp$ <> "" Then lrc& = FDirExists ( szTmp$ ) ' print "Does Directory -" & szTmp$ & "- Exist: " & str( rc% ) If (lrc& = 1) Then Lot_GetLotusNotesDataPath = szTmp$ End If Else szTmp$ = GetIniKeyString( "Lotus.ini", "Lotus Applications", "Notes") szSearch$ = ucase$( szTmp$ ) rc% = instr( szSearch$, "NOTES.EXE") If rc% > 2 Then szDir$ = left$(szTmp$, rc% - 2 ) ' print "Notes LOTUS.INI Data Directory: " & szDir$ lrc& = FDirExists ( szDir$ ) ' print "Does LOTUS.INI Directory Exist: " & str( lrc& ) If (lrc& = 1) Then szTmp$ = GetIniKeyString( szDir$ & "\" & "Notes.ini", "Notes", "Directory") ' print "Notes Data Directory: " & szTmp$ If szTmp$ <> "" Then lrc& = FDirExists ( szTmp$ ) ' print "Does Directory -" & szTmp$ & "- Exist: " & str( lrc& ) If (lrc& = 1) Then Lot_GetLotusNotesDataPath = szTmp$ End If Else Lot_GetLotusNotesDataPath = szDir$ End If End If End If End If END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetLotusNotesPrgPath() AS STRING '** Purpose: Returns the location for the Notes Data Directory '** Author: PTilton '** Arguments: None. '** Returns: NULL String if Notes Data Directory not found. '** Otherwise, returns directory of Notes Data Directory. '************************************************************************* DIM szDir$, szSearch$, szTmp$, rc%, lrc& DIM szPath$, szFile$, szSect$, szKey$, szExe$ szPath$ = GetSymbolValue( SYM_WINDIR$ ) & LdString( SID_DATALENS_NOTES_INI ) szSect$ = LdString( SID_DATALENS_NOTES_SECT ) szKey$ = LdString( SID_DATALENS_NOTES_KEY ) szExe$ = LdString( SID_DATALENS_NOTES_EXE ) Lot_GetLotusNotesPrgPath = "" szTmp$ = GetIniKeyString( szPath$, szSect$, szKey$ ) szSearch$ = ucase$( szTmp$ ) rc% = instr( szSearch$, szExe$) If rc% > 2 Then szDir$ = left$(szTmp$, rc% - 2 ) 'print "Notes LOTUS.INI Program Directory: " & szDir$ lrc& = FDirExists ( szDir$ ) 'print "Does LOTUS.INI Program Directory Exist: " & str( rc% ) If (lrc& = 1) Then Lot_GetLotusNotesPrgPath = szDir$ End If End If END FUNCTION '************************************************************************* 'FUNCTION GetLotusNotesDataPath(szFile$, szSect$, szKey$) AS STRING '** Purpose: Returns the location for the Notes Data Directory '** Author: PTilton '** Arguments: None. '** Returns: NULL String if Notes Data Directory not found. '** Otherwise, returns directory of Notes Data Directory. '************************************************************************* ' DIM szDir$, rc% ' GetLotusNotesDataPath = "" ' rc% = DoesIniSectionExist (szFile$, szSect$) ' print "Does Section [" & szSect$ & "] Exist in File("& szFile$ &": " & str( rc% ) ' If (rc% = 1) Then ' rc% = DoesIniKeyExist (szFile$, szSect$, szKey$) ' print "Does Key -" & szKey$ & "- Exist: " & str( rc% ) ' If (rc% = 1) Then ' szDir$ = GetIniKeyString (szFile$, szSect$, szKey$) ' print "Keyword -" & szKey$ & "- Value: " & szDir$ ' GetLotusNotesDataPath =szDir$ ' End If ' End If 'END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetORACLEHomePath() AS STRING '** Purpose: Returns the location for the ORACLE Home Directory '** Author: PTilton '** Arguments: None. '** Returns: NULL String if ORACLE Home Directory not found. '** Otherwise, returns directory of ORACLE Home Directory. '************************************************************************* DIM szPath$, szTmp$, rc%, lrc&, szFile$, szSect$, szKey$ szPath$ = GetSymbolValue( SYM_WINDIR$ ) & LdString( SID_DATALENS_ORACLE_INI ) szSect$ = LdString( SID_DATALENS_ORACLE_SECT ) szKey$ = LdString( SID_DATALENS_ORACLE_KEY ) Lot_GetORACLEHomePath = "" szTmp$ = GetIniKeyString ( szPath$, szSect$, szKey$ ) 'print "Oracle Home Directory: " & szTmp$ If szTmp$ <> "" Then lrc& = FDirExists ( szTmp$ ) 'print "Does Directory -" & szTmp$ & "- Exist: " & str( lrc& ) If (lrc& = 1) Then Lot_GetORACLEHomePath = szTmp$ End If End If END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_IsDestVerNewerOrEqual(DestinationPath$,sourcever1&,sourcever2&,sourcever3&,sourcever4&) AS INTEGER '** Purpose: This function validates the version of the file '** Author: MZ '** Arguments: DestinationPath$, '** SourceVer1&, '** SourceVer2&, '** SourceVer3&, '** SourceVer4& '** Returns: 1 if newer or equal '** 0 if older or the file is not found or it does not have version '************************************************************************* DIM DestFileVersion$ DIM DestVer1&,DestVer2&,DestVer3&,DestVer4&, notused% 'Find If the file exists IF DoesFileExist(DestinationPath$,femExists)=1 THEN 'Find the version DestFileVersion$=GetVersionOfFile(DestinationPath$) 'If no version found IF DestFileVersion$="" THEN Lot_IsDestVerNewerOrEqual = 0 EXIT FUNCTION 'If version found ELSE 'Find the version components DestVer1&=GetVersionNthField(DestFileVersion$,1) DestVer2&=GetVersionNthField(DestFileVersion$,2) DestVer3&=GetVersionNthField(DestFileVersion$,3) DestVer4&=GetVersionNthField(DestFileVersion$,4) 'Compare the version IF SourceVer1& > DestVer1& THEN Lot_IsDestVerNewerOrEqual = 0 EXIT FUNCTION ELSEIF SourceVer1& = DestVer1& AND _ SourceVer2& > DestVer2& THEN Lot_IsDestVerNewerOrEqual = 0 EXIT FUNCTION ELSEIF SourceVer1& = DestVer1& AND _ SourceVer2& = DestVer2& AND _ SourceVer3& > DestVer3& THEN Lot_IsDestVerNewerOrEqual = 0 EXIT FUNCTION ELSEIF SourceVer1& = DestVer1& AND _ SourceVer2& = DestVer2& AND _ SourceVer3& = DestVer3& AND _ SourceVer4& > DestVer4& THEN Lot_IsDestVerNewerOrEqual = 0 EXIT FUNCTION ELSEIF SourceVer1& = DestVer1& AND _ SourceVer2& = DestVer2& AND _ SourceVer3& = DestVer3& AND _ SourceVer4& = DestVer4& THEN 'Version is equal. Delete the source Lot_IsDestVerNewerOrEqual = 1 EXIT FUNCTION ELSE 'Dest is newer. Lot_IsDestVerNewerOrEqual = 1 EXIT FUNCTION END IF END IF 'file not found in the destination ELSE Lot_IsDestVerNewerOrEqual = 0 EXIT FUNCTION END IF END FUNCTION CONST ObjectPrefix$="Object" CONST gMISCINSTALLEDOBJECTS="Miscellaneous Installed Objects" SUB PopulateCOBJECTLIST(iniPath$) '************************************************************************* '** Purpose: Compiles a list of objects already in the cinstall or '** cinstnod.ini file; populates list COBJECT '** Author: JMD '** Arguments: Full pathname of .INI file '** Returns: NULL String if Notes Data Directory not found. '** Otherwise, returns directory of Notes Data Directory. '************************************************************************* DIM Number% DIM Tag$, ID$, rc% STATIC gCOBJECTinited% ''ASSUME gCOBJECTinited% starts as zero If gCOBJECTinited% <> 1 THEN gNCOBJECT% = 0 gCOBJECTinited% = 1 IF DoesFileExist(iniPath$,femExists) = 1 THEN Erase COBJECT Number%=1 Tag$=ObjectPrefix$+LTRIM$(STR$(Number%)) ID$ = GetIniKeyString(iniPath$, gMISCINSTALLEDOBJECTS, Tag$) WHILE ID$ <> "" gNCOBJECT% = Number% COBJECT (ID$) = gNCOBJECT% Number% = Number% + 1 Tag$=ObjectPrefix$+LTRIM$(STR$(Number%)) ID$ = GetIniKeyString(iniPath$, gMISCINSTALLEDOBJECTS, Tag$) WEND END IF END IF END SUB SUB PopulateCINSTALLLIST DIM prodDir$, installIniFile$, FeaturePref$, Featurenumber% DIM FeatureTag$, FeatureID$, rc% STATIC gCINSTALLinited% ''ASSUME gCINSTALLinited% starts as zero If gCINSTALLinited% <> 1 Then gNCINSTALL% = 0 gCINSTALLinited% = 1 'Built the path to install.ini prodDir$ = Lot_GetInstallDir() installIniFile$ = MakePath(prodDir$,gINSTALLINI$) FeaturePref$ = "Feature" FeatureNumber%=1 FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%)) FeatureID$ = GetIniKeyString(installIniFile$,"Server Feature Installed", FeatureTag$) IF DoesFileExist(installIniFile$,femExists) = 1 THEN IF FeatureID$ <> "" THEN DO CINSTALL (FeatureID$) = "1" gNCINSTALL% = gNCINSTALL%+1 FeatureNumber% = FeatureNumber% + 1 FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%)) FeatureID$ = GetIniKeyString(installIniFile$,"Server Feature Installed", FeatureTag$) LOOP UNTIL FeatureID$ = "" END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT END IF END IF END SUB '************************************************************************* SUB PopulateCINSTNODELIST DIM prodDir$, installIniFile$, FeaturePref$, Featurenumber% DIM FeatureTag$, FeatureID$, rc%, dirSym$, inidir$ STATIC gCINSTNODEinited% ''ASSUME gCINSTALLinited% starts as zero If gCINSTNODEinited% <> 1 Then gNCINSTNODE% = 0 gCINSTNODEinited% = 1 'Built the path to cinstnod.ini dirSym$ = Reg_GetDirSymbolList(1) '** First product dir list IF GetListLength(dirSym$) >= 1 THEN dirSym$ = GetListItem(dirSym$, 1) '** First directory symbol inidir$ = GetSymbolValue(dirSym$) installIniFile$ = MakePath(inidir$,"cinstnod.ini") END IF FeaturePref$ = "Feature" FeatureNumber%=1 FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%)) FeatureID$ = GetIniKeyString(installIniFile$,"Server Feature Installed", FeatureTag$) IF DoesFileExist(installIniFile$,femExists) = 1 THEN IF FeatureID$ <> "" THEN DO CINSTNODE (FeatureID$) = "1" gNCINSTNODE% = gNCINSTNODE%+1 FeatureNumber% = FeatureNumber% + 1 FeatureTag$=FeaturePref$+LTRIM$(STR$(FeatureNumber%)) FeatureID$ = GetIniKeyString(installIniFile$,"Server Feature Installed", FeatureTag$) LOOP UNTIL FeatureID$ = "" END IF ELSE '** DND: Look into using ShowPathError here. We should tell the '** user where we looked for install.ini FatalErrorMsg SID_ERR_INSTALLINI_MISSING, "", STFQUIT END IF END IF END SUB '************************************************************************* '** PUBLIC FUNCTION TrimNetlotusapp (path$) AS STRING '** '** Purpose: trims the net lotusapp directory to detect mapping. '** Author: Thangv '** Arguments: path$ '** Returns: the modified path '************************************************************************* PUBLIC FUNCTION TrimNetlotusapp (ByVal path$) AS STRING DIM firstslash%, newpath$, drive$ TrimNetlotusapp = "" path$ = Lot_TrimEndSlash (path$) drive$ = LEFT(path$, 2) firstslash% = INSTR(1,path$,"\") WHILE firstslash% <> 0 path$ = MID$(path$,firstslash%+1) newpath$ = drive$ + "\" + path$ IF DoesDirExist(newpath$) = 1 THEN TrimNetlotusapp = newpath$ + "\" EXIT FUNCTION ELSE firstslash% = INSTR(1,path$,"\") END IF WEND END FUNCTION PUBLIC FUNCTION Lot_RegisterUninstaller(ProdRegKeyName$,ProdVer$,_ ProdDisplayedName$,ProdInfPath$,_ LogFlag%,AutoFlag%,_ LangID$,LogFile$,RspFile$,_ UserName$ ) AS INTEGER '** Purpose: Registers the uninstaller for a product and builds the uninstall '** command line. This function should be called in PostCopyConfig() '** Author: MZ '** Arguments: ProdRegKeyName$ The name of the product key in the registry '** ProdVer$ The version of the product installed '** ProdDisplayedName$ The description of the product put into the registry '** ProdInfPath$ The path of the standalone/server INF file '** LogFlag% TRUE/FALSE if you want uninstall to produce or not a log '** AutoFlag% TRUE/FALSE if you want uninstall to run or not silantelly '** LangID$ The default language for uninstall '** LogFile$ (optional) The log file path to overwrite the default provided by uninstall '** RspFile$ (optional) The response file path to overwrite the default provided by uninstall '** UserName$(optional) The User Name '** Returns: True if worked False otherwise '************************************************************************* DIM gInstallIniFile$,cwd$,prodDir$,Network$,ProdNameAndVer$,CommandLine$ DIM Platform%, PlatformStr$, LReturn&, grouptitle$, Caption$, dirSym$, RegKey$ DIM s$, szkey$, IsRootProduct% 'Validate the arguments IF ProdRegKeyName$ = "" OR _ ProdVer$ = "" OR _ ProdDisplayedName$ = "" OR _ ProdInfPath$ = "" OR _ LangID$ = "" THEN Lot_RegisterUninstaller = FALSE END IF IF LogFlag% <> FALSE AND LogFlag% <> TRUE THEN Lot_RegisterUninstaller = FALSE END IF IF AutoFlag% <> FALSE AND AutoFlag% <> TRUE THEN Lot_RegisterUninstaller = FALSE END IF Network$ = GetSymbolValue(SYM_NETWORK$) 'TV: For server, distribution installs don't register uninstall IF Network$ = gSERVER$ OR Network$ = gDISTRIBUTION$ THEN EXIT FUNCTION ' The first product, either suite or this product for standalone ProdNameAndVer$ = MakePath(GetSymbolValue(SYM_REG_PRODUCTNAME$) , GetSymbolValue(SYM_REG_PRODUCTVER$)) s$ = MakePath(ProdRegKeyName$, ProdVer$) IsRootProduct% = (ProdNameAndVer$ = s$) 'Only register suite uninstaller, or single product IF IsRootProduct% THEN 'Built the path to cinstall.ini IF Network$ = gNODE$ THEN 'Get the target directory for the product dirSym$ = Reg_GetDirSymbolList(Lot_GetCurrentProduct()) If GetListLength(dirSym$) >= 1 Then dirSym$ = GetListItem(dirSym$, 1) gInstallIniFile$ = GetSymbolValue(dirSym$)+"Cinstnod.ini" End If ELSEIF Network$=gSERVER$ OR Network$=gSTANDARD THEN 'Get the install directory prodDir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$) END IF 'print gInstallIniFile$,"gInstallIniFile$" PlatformStr$ = gREGWINNAME 'Write the uninstall key and registry values RegKey$=PlatformStr$+"\Uninstall\"+ProdRegKeyName$+" V"+ProdVer$ LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, RegKey$) 'print " after calling Lot_RegCreateKeyEx in share32",LReturn& IF LReturn& <> ERROR_SUCCESS THEN Lot_RegisterUninstaller = FALSE RegErrorMsg SID_ERR_REG_CREATE, gHLM$+"\"+RegKey$,"","" END IF 'Write the display name key and value 'print " before calling Lot_CreateRegKeyValueEx in share32" LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, RegKey$,_ "DisplayName",_ REG_SZ,_ ProdDisplayedName$, _ LENBP(ProdDisplayedName$)+1) 'print " after calling Lot_CreateRegKeyValueEx in share32",LReturn& IF LReturn& <> ERROR_SUCCESS THEN Lot_RegisterUninstaller = FALSE RegErrorMsg SID_ERR_REG_UNINST, gHLM$+RegKey$,"DisplayName",ProdDisplayedName$ END IF 'Build the command line CommandLine$ = | /T | & ProdRegKeyName & | /V | & ProdVer$ IF IsNewShell() THEN CommandLine$ = CommandLine$ & | /I "| & ProdInfPath$ & |"| CommandLine$ = CommandLine$ & | /C "| & gInstallIniFile$ & |"| ELSE 'JMD: ' NT 3.51 has a bug that truncates the command line in the program icon if ' there are embedded quotes; therefore embedded quotes are NOT supported for ' NT 3.51 (old Win 3.1 shell) only CommandLine$ = CommandLine$ & " /I " & ProdInfPath$ CommandLine$ = CommandLine$ & " /C " & gInstallIniFile$ END IF IF LogFlag% <> FALSE THEN CommandLine$ = CommandLine$+" /O " END IF IF LogFile$ <> "" THEN CommandLine$ = CommandLine$+LogFile$ END IF IF AutoFlag% <> FALSE THEN CommandLine$ = CommandLine$+" /A " END IF IF RspFile$ <> "" THEN CommandLine$ = CommandLine$+RspFile$ END IF CommandLine$ = CommandLine$+" /L "+LangID$ IF UserName$ <> "" THEN CommandLine$ = CommandLine$+" /U "+UserName$ END IF CommandLine$ = GetWindowsDir()+gUNINSTALLEXE+CommandLine$ ' Register it under the first product (suit or main product for single) s$ = Reg_GetProductAcronym(1) + gTOP$ IF NOT IsNewShell() THEN Caption$ = ProdRegKeyName$+" V"+ProdVer$+" "+gUNINSTALL grouptitle$ = Reg_GetProgManagerGroupName(1) CreateProgmanItem grouptitle$, Caption$, CommandLine$, GetWindowsDir()+gUNINSTALLEXE, cmoOverwrite Lot_RegisterObject s$, UNIN_CLASS_ICON$, grouptitle$ + "\" + Caption$ END IF 'print CommandLine$,"CommandLine$" 'Write the CommandLine 'print " before calling Lot_CreateRegKeyValueEx in share32" LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, RegKey$,_ "UninstallString",_ REG_SZ,_ CommandLine$, _ LENBP(CommandLine$)+1) 'print " after calling Lot_CreateRegKeyValueEx in share32",LReturn& IF LReturn& <> ERROR_SUCCESS THEN Lot_RegisterUninstaller = FALSE RegErrorMsg SID_ERR_REG_UNINST, gHLM$+RegKey$,"UninstallString",CommandLine$ ELSE Lot_RegisterUninstaller = TRUE END IF END IF ' IF IsRootProduct% ' Register suite products for Suite uninstall s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) szkey$ = gREGLOTUS + ProdNameAndVer$ + "\Products\" szkey$ = szkey$ + ProdRegKeyName$ + "\" + ProdVer$ IF s$ = gSMARTSUITE$ THEN IF NOT IsRootProduct% THEN IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$) = FALSE THEN IF Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKey$) <> 0 THEN Lot_RegisterUninstaller = FALSE EXIT FUNCTION END IF END IF LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, szKey$,_ "InfFileName", REG_SZ, ProdInfPath$, LENBP(ProdInfPath$)+1) END IF ELSE ' Delete these entries so single prodcut uninstall can work IF Lot_DoesRegKeyExistEx(HKEY_LOCAL_MACHINE, szKey$) = TRUE THEN _ LReturn& = Lot_RegDelAllSubKeys(HKEY_LOCAL_MACHINE, szKey) END IF Lot_RegisterUninstaller = (LReturn& = ERROR_SUCCESS) END FUNCTION PUBLIC FUNCTION Lot_RegisterObject(FeatureKeyWord$, ClassOfObject$, ObjectPath$) '** Purpose: Registers the [Miscellaneous Installed Objects] into cinstall.ini '** for standalone installs and into cinsnode.ini for node installs '** Author: MZ '** Arguments: FeatureKeyWord$ The KeyWord of the section that is associate '** with this object '** ClassOfObject$ The classes; The predefined (in globals.lss) '** classes are: '** UNIN_CLASS_PROGRAM_GROUP$ '** UNIN_CLASS_ICON$ '** UNIN_CLASS_FOLDER$ '** UNIN_CLASS_SHORTCUT$ '** UNIN_CLASS_START_MENU_ENTRY$ '** UNIN_CLASS_REGISTRY_KEY$ '** UNIN_CLASS_REGISTRY_VALUE$ '** UNIN_CLASS_REGISTRY_HIVE$ '** UNIN_CLASS_FILE$ '** UNIN_CLASS_FILE_GROUP$ '** UNIN_CLASS_DIRECTORY$ '** Returns: True if worked False otherwise '************************************************************************* DIM inidir$, s$,Network$ DIM NodeInstIniFile$,ObjectNum%,lrc&, ObjectPref$ DIM ObjectTag$, ObjectID$, LastObjectNumber%, dirSym$, temp% DIM ObjectName$ STATIC iniPath$ STATIC ThisInstallType$ 'Get the install type Network$ = GetSymbolValue(SYM_NETWORK$) s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) IF NOT IsNewShell() AND ClassOfObject$ = UNIN_CLASS_ICON$ THEN temp% = INSTR(ObjectPath$, "\") IF LEN(ObjectPath$) > temp%+40 THEN ObjectPath$ = LEFT$(ObjectPath$, temp%+40) END IF END IF 'TV: For server and distribution installs don't register any objects IF Network$ = gSERVER$ OR Network$ = gDISTRIBUTION$ THEN EXIT FUNCTION '** Initialization: IF ThisInstallType$ <> Network$ THEN ThisInstallType$ = Network$ '** Built the path to cinstall.ini (in standalone case) '** or cinstnod.ini (in NODE case) IF Network$ = gNODE$ AND s$ = gSMARTSUITE$ THEN inidir$ = GetSymbolValue(SYM_BASEDIR$) NodeInstIniFile$ = inidir$+"cinstnod.ini" iniPath$ = NodeInstIniFile$ ELSEIF Network$ = gNODE$ AND s$ = gSINGLE$ THEN dirSym$ = Reg_GetDirSymbolList(1) '** First product dir list IF GetListLength(dirSym$) >= 1 THEN dirSym$ = GetListItem(dirSym$, 1) '** First directory symbol inidir$ = GetSymbolValue(dirSym$) ELSE inidir$ = GetSymbolValue(SYM_STF_CWDDIR$) END IF NodeInstIniFile$ = inidir$+"cinstnod.ini" iniPath$ = NodeInstIniFile$ ELSEIF Network$=gSTANDARD THEN 'Get the install directory inidir$ = Lot_GetInstallDir() iniPath$ = MakePath(inidir$,gMISCOBJINI$) END IF 'print iniPath$,"IniPath$" '** Construct a list of objects already there PopulateCOBJECTLIST(iniPath$) END IF '** See if the object's already there, if not, write a new object '** and add to List ObjectName$ = FeatureKeyWord$+","+ClassOfObject$+","+ObjectPath$ ObjectName$ = NullTrim (ObjectName$) If ISELEMENT(COBJECT(ObjectName$)) = FALSE THEN gNCOBJECT% = gNCOBJECT% + 1 CreateIniKeyValue iniPath$, gMISCINSTALLEDOBJECTS,_ "Object"+LTRIM$(STR$(gNCOBJECT%)), _ ObjectName$, cmoOverwrite COBJECT (ObjectName$) = gNCOBJECT% END IF END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_GetDestDirValueFromInstallini(DestDirSym$) AS STRING '** '** Purpose: trims the net lotusapp directory to detect mapping. '** Author: Thangv, PD, JMD '** Arguments: path$ '** Returns: the modified path '************************************************************************* DIM DestDirSymVal$, rv%, source$ DIM gInstallIniFile$,inidir$ DIM uncvol$, dirPath$ DIM iniPath$ Lot_GetDestDirValueFromInstallini = "" 'Get the install directory 'Save initial value since it may change over course of install inidir$ = Lot_GetInstallDir() gInstallIniFile$ = MakePath(inidir$,gINSTALLINI$) iniPath$ = gInstallIniFile$ DestDirSymVal$ = GetIniKeyString(iniPath$,_ "Destination Symbols And Values", _ DestDirSym$) IF DestDirSymVal$ <> "" THEN rv% = DoesDirExist(DestDirSymVal$) IF rv% = 0 THEN '** TV: shouldn't get here even if destdirSymVal is UNC source$ = GetSymbolValue(SYM_STF_SRCDIR$) IF NOT Lot_IsUnvalidatedUNCPath(source$) THEN DestDirSymVal$ = MID$(source$,1,1)+MID$(DestDirSymVal$,2) ELSE Lot_SplitUNCPath source$, uncvol$, dirPath$ DestDirSymVal$ = uncvol$ + MID$(DestDirSymVal$,3) END IF rv% = Lot_CleanPath(DestDirSymVal$) IF rv% = 0 THEN ErrorMsg SID_ERR_NODENETMAP, "" ERROR STFQUIT END IF END IF END IF Lot_GetDestDirValueFromInstallini = DestDirSymVal$ END FUNCTION '************************************************************************* PUBLIC SUB Lot_WriteCriticalDirectories (InstallInifile$) '** '** Purpose: writes out the critical directories for uninstall in '** cinstall.ini, cinstnod.ini '** Author: Thangv '** Arguments: path to cinstall.ini/cinstnod.ini file '** Returns: '************************************************************************* DIM dirsyms%, gInstallIniFile$, prodDir$, progdir$ DIM prodsym$, AllProdNum%, prodNum%, symList$, i% 'the path to install.ini gInstallIniFile$ = InstallInifile$ 's$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) 'Loop through the products and log the directories AllProdNum% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN 'BaseDir$= GetSymbolValue(SYM_BASEDIR$) FOR prodNum%=1 TO AllProdNum% 'ProdAcronym$ = Reg_GetProductAcronym(prodNum%) 'Get the directory symbol symList$ = Reg_GetDirSymbolList(prodNum%) dirsyms% = GetListLength(symList$) FOR i% = 1 TO dirsyms% prodsym$ = GetListItem(symList$, i%) progdir$ = GetSymbolValue(prodsym$) CreateIniKeyValue gInstallIniFile$, "Critical Directories", prodsym$, progdir$, cmoOverWrite NEXT NEXT END IF END SUB PUBLIC FUNCTION GetLastPathComponent( ByVal szPath$) AS STRING '** '** Purpose: Returns the last component of a path '** '** Author: GJL '** Arguments: path '** Returns: The last dir name or file name, empty string if path '** ends in \ '************************************************************************* DIM offSet&, nextOff& GetLastPathComponent$ = szPath$ offSet& = InStr(szPath$,"\") nextOff& = offSet& DO WHILE nextOff& <> 0 nextOff = InStr(Mid$(szPath$,offset),"\") offSet& = offSet& + nextOff& LOOP IF offSet& > 0 THEN GetLastPathComponent$ = Mid$(szPath$,offSet&) END IF END FUNCTION '************************************************************************* FUNCTION Lot_AddToNTSystemPath(RegH&, RegKey$, VarName$, ByVal AddPath$) AS INTEGER DIM NewPath$, notused&, PathDir$ DIM RegValLen&, Pos%, Resave% Lot_AddToNTSystemPath = 1 If Lot_DoesRegKeyExistEx(RegH&, RegKey$) = FALSE THEN If Lot_RegCreateKeyEx(RegH&, RegKey$) <> 0 Then Lot_AddToNTSystemPath = 0 EXIT FUNCTION End If NewPath = "" Else RegValLen&=CLNG(1024) NewPath$=CreateBuffer(RegValLen&) if Lot_GetRegKeyValueEx(RegH&, RegKey$, VarName$,_ REG_EXPAND_SZ&,NewPath$,RegValLen&) <> 0 Then NewPath = "" End If End If NewPath$ = NullTrim(NewPath$) Resave%=0 Do While AddPath$ <> "" Pos%=InStr(AddPath$,";") If Pos=0 Then PathDir$ = AddPath$ AddPath = "" Else PathDir$ = Left$(AddPath$, Pos%-1) If RIGHT$(PathDir$,1) = "\" Then PathDir$ = LEFT$(PathDir$, LEN(PathDir$)-1) End If AddPath = Right$(AddPath$, LEN(AddPath)-Pos%) End If If InStr(NewPath$,PathDir$) = 0 Then If NewPath = "" Then NewPath=PathDir$ Else NewPath=NewPath$+";"+PathDir$ End If Resave%=1 End If Loop If Resave%=1 Then If Lot_CreateRegKeyValueEx(RegH&, RegKey$, VarName$,_ REG_EXPAND_SZ&,NewPath$,LEN(NewPath$)+1) Then Lot_AddToNTSystemPath = 0 End If End If END FUNCTION '************************************************************************* PUBLIC FUNCTION Lot_RegAppPath(ProgName$, szProgPath$, ByVal szSearchPath$, ByVal fCompPath%, ByVal KeyWord$) AS INTEGER '** Purpose: Add application path to registry '** Author: OM '** Arguments: '** ProgName$: Name of the program file '** szProgPath$: This is the path of program named above. It '** may be entered with or without the final '\' '** szSearchPath$: Directories separated by ';' to be added to search '** path. Directories should not have final '\'. '** fCompPath: True if component path should be added to search '** path. False if not. '** KeyWord$: The feature keyword associated with this object. '** For example, "FLWCORE" '** '** Returns: True if worked False otherwise '************************************************************************* DIM RegKey$, RegH&, PathDir$, notused&, s$, network$ szSearchPath$ = NullTrim(szSearchPath$) szSearchPath$ = LTrim(szSearchPath$) If fCompPath% Then network$ = GetSymbolValue(SYM_NETWORK$) IF network$ = gNODE$ THEN s$ = GetSymbolValue(SYM_NETCOMPONENT$) ELSE s$ = GetSymbolValue(SYM_COMPONENTSDIR$) END IF szSearchPath$ = szSearchPath$+";" + s$ szSearchPath$ = NullTrim(szSearchPath$) szSearchPath$ = LEFT$(szSearchPath$,LEN(szSearchPath$)-1) End If Lot_RegAppPath = 1 RegH&=HKEY_LOCAL_MACHINE& RegKey$=gREGWINNAME+gREGAPPPATH95+"\"+ProgName$ If Lot_DoesRegKeyExistEx(RegH&, RegKey$) = FALSE THEN notused&=Lot_RegCreateKeyEx(RegH&, RegKey$) End If If NOT RIGHT$(szProgPath$,1) = "\" Then szProgPath$ = szProgPath$ + "\" End If PathDir$ = szProgPath+ProgName$ if Lot_CreateRegKeyValueEx(RegH&,RegKey$,"",_ REG_SZ,PathDir$,LEN(PathDir$)+1) OR _ Lot_CreateRegKeyValueEx(RegH&,RegKey$,gREGAPPPATH95PATH,_ REG_SZ,szSearchPath$,LEN(szSearchPath$)+1) Then Lot_RegAppPath = 0 Else RegKey$ = gHLM$+"\"+RegKey$ Lot_RegisterObject KeyWord$, UNIN_CLASS_REGISTRY_HIVE$, RegKey$ End If If NOT IsNewShell() Then If Lot_AddToNTSystemPath(HKEY_LOCAL_MACHINE&, _ gREGAPPPATHNT1, gREGAPPPATHNTPATH, szSearchPath$) = 0 Then If Lot_AddToNTSystemPath(HKEY_CURRENT_USER&, _ gREGAPPPATHNT2, gREGAPPPATHNTPATH, szSearchPath$) = 0 Then Lot_RegAppPath = 0 Else RegKey$ = gHCU$+"\"+gREGAPPPATHNTPATH ' Lot_RegisterObject KeyWord$, UNIN_CLASS_REGISTRY_HIVE$, RegKey$ End If Else RegKey$ = gHCU$+"\"+gREGAPPPATHNTPATH ' Lot_RegisterObject KeyWord$, UNIN_CLASS_REGISTRY_HIVE$, RegKey$ End If End If If Lot_RegAppPath = 0 Then RegErrorMsg SID_ERR_REG_APPPATH, RegKey$, gREGAPPPATH95PATH, szSearchPath$ End If END FUNCTION DIM FixupDirectorySymbolList LIST AS STRING PUBLIC SUB MarkFixupSourceDirSymbol(szSubdirSymbol$) '************************************************************************* '** Purpose: Adds the symbol to a list of subdirectory symbols that must '** be reset for a node install based on contents of cinstall.ini on the '** server '** '** Author: JMDonohue '** Arguments: szSubdirSymbol$ Symbol to reset '************************************************************************** if (ISELEMENT(FixupDirectorySymbolList(szSubdirSymbol$)) = 0 ) then _ FixupDirectorySymbolList(szSubdirSymbol$) = "Yes" END SUB PUBLIC SUB Lot_FixupSourceDirectories '************************************************************************* '** Purpose: Changes the source location for node install files based on '** the location recorded in the cinstall.ini file on the server '** '** Author: JMDonohue '** Arguments: '************************************************************************** DIM ret%, s$ DIM rc%, Src$, chapter$, Dest$, DirSym$, Sect$ FORALL sym IN FixupDirectorySymbolList chapter$ = Lot_GetFirst("", F_NOTHING) WHILE (chapter$ <> "") DirSym$ = Lot_GetChapterValStr(chapter$, F_DESTDIRSYM) IF DirSym$ = ListTag(sym) AND _ INT(Lot_GetChapterValInt(chapter$,F_INOROUT)) = 1 THEN Src$ = Lot_GetDestDirValueFromInstallIni(DirSym$) IF Src$ <> "" THEN '' Adjust the path to account for an extra product level for the '' filename in the node .INF file Src$ = OneUp(Src$) IF Src$ = "" THEN GOTO SYMBOLERROR s$ = GetSymbolValue(SYM_SINGLESMARTSUITE$) '' For suite, need to remove two levels IF s$ = gSMARTSUITE$ THEN Src$ = OneUp(Src$) IF Src$ = "" THEN GOTO SYMBOLERROR END IF Dest$ = GetSymbolValue(DirSym$) Sect$ = Lot_GetChapterValStr(chapter$, F_NOTHING) IF Dest$ <> "" and Sect$ <> "" THEN _ AddSectionFilesToCopyList Sect$, Src$, Dest$ END IF END IF chapter$ = Lot_GetNext() WEND END FORALL ERASE FixupDirectorySymbolList EXIT SUB SYMBOLERROR: ErrorMsg 0, "Lot_FixupSourceDirectories: invalid symbol: "+DirSym$ ' ERROR STFQUIT END SUB PUBLIC FUNCTION Lot_RegIni(RegFileName$) AS INTEGER '************************************************************************* '** Purpose: Calls SDK program regini.exe to generate registry entries '** described in script file '** NOTE: Entries in script file have the following format: '** KeyName '** ValueName = value '** e.g., '** \registry\machine\system\currentcontrolset\services\lanmanserver\parameters '** DiskSpaceThreshhold = REG_DWORD 0x00000000 '** '** Author: JMDonohue '** Arguments: '** RegFileName$ Name of script file for registry creation '************************************************************************** Lot_RegIni = Lot_CreateConsoleProcess("regini.exe", RegFileName$) IF Lot_RegIni <> TRUE THEN _ ErrorMsg 0, "Error calling Lot_CreateConsoleProcess for regini.exe" END FUNCTION '************************************************************************* PUBLIC SUB ComboSelChanged(BoxNo&, Inst%) '** Purpose: Handles change in combo box selection '** Author: GL '** Arguments: '** BoxNo% combo/edit set. IDC_COMBO1 = 1 '** Inst% combo box item '** '************************************************************************* DIM uncPath$, fullPath$, dirPath$ DIM curCombo$, uncOff&, unusedPath$ DIM comboBox$, editBox$ comboBox = "IDC_COMBO"+Right$(Str$(BoxNo&),1) editBox = "IDC_EDIT"+Right$(Str$(BoxNo&),1) curCombo$ = GetListItem(comboBox, Inst%) fullPath$ = GetListItem("IDC_EDIT",CINT(BoxNo&)) Lot_SplitUNCPath fullPath$, uncPath$, dirPath$ uncOff& = INSTR(1, curCombo$, "\\") IF uncOff > 0 THEN Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$ ELSE uncPath$ = "" END IF SetListItem "IDC_EDIT", CINT(BoxNo&), uncPath$ + dirPath$ AddListItem SYM_UPDATELIST$, editBox EXIT SUB END SUB '************************************************************************* PUBLIC FUNCTION GetPathFromComboEdit(hDlg&, BoxNo%) AS STRING '** Purpose: Builds path from combo/edit box '** Author: GL '** Arguments: '** hDlg&: dialog handle '** BoxNo% combo/edit set. IDC_COMBO1 = 1 '** '** Returns: Fully qualified path. Empty string on failure '************************************************************************* DIM drvSel%, drvPath$, uncPath$, dirPath$, comboBox$ comboBox = "IDC_COMBO"+Right$(Str$(BoxNo%),1) drvSel% = ValidateEditBox(hDlg&, BoxNo%) IF drvSel% = 0 THEN GetPathFromComboEdit = "" EXIT FUNCTION END IF Lot_SplitUNCPath GetListItem("IDC_EDIT", BoxNo%), uncPath$, dirPath$ IF uncPath$ = "" THEN drvPath = LEFT$(GetListItem(comboBox, drvSel%), 2) ELSE drvPath = "" END IF GetPathFromComboEdit= drvPath$ + uncPath$ + dirPath$ END FUNCTION PUBLIC SUB Lot_RegisterFonts() '************************************************************************* '** Purpose: Traverses the copy list looking for sections whose destination '** directory symbol is "LOTUSFONTSDIR"; for each section, registers all '** font filenames with Windows, using the description corresponding to the '** font name in 'shared.ini' '** NOTE: Entries in 'shared.ini' file have the following format: '** FontFileName = Description '** e.g., '** ngoi____.ttf=News Gothic Italic (TrueType) '** NOTE: This function should not be used by clients -- called as part of '** toolkit processing '** '** Author: JMDonohue '************************************************************************** DIM s$, szSym$, szSect$, i%, j%, n%, chapter$, DirSym$, gSharedIniFile$ DIM FontDescList LIST AS STRING DIM FontFile$, FontDesc$, winkey$, FontPath$, ret%, Size%, regStatus&, Key$ szSym$ = "SECTIONFONTS" gSharedIniFile$ = MakePath(GetSymbolValue(SYM_STF_CWDDIR$), gSHAREDINI$) IF WhatPlatform() = PLATFORM_WIN95 THEN winkey$ = "Windows" ELSE winkey = "Windows NT" END IF Key$ = "SOFTWARE\Microsoft\" + WinKey$ + "\CurrentVersion\Fonts" chapter$ = Lot_GetFirst("", F_INOROUT) WHILE (chapter$ <> "") DirSym$ = Lot_GetChapterValStr(chapter$, F_DESTDIRSYM) IF DirSym$ = SYM_LOTUSFONTSDIR$ THEN szSect$ = Lot_GetChapterValStr(chapter$, F_NOTHING) n% = FGetSectionFileList (szSym$, szSect$, 1) n% = GetListLength(szSym$) '' For each font in section, strip off path components '' and create list of filenames and descriptions FOR i% = 1 TO n% s$ = GetListItem(szSym$, i%) IF ISELEMENT(FontDescList(s$)) = FALSE THEN _ FontDescList(s$) = GetIniKeyString(gSharedIniFile$, "Fonts", s$) NEXT RemoveSymbol szSym$ END IF chapter$ = Lot_GetNext() WEND ' Traverse list, register all font files ' If font name not in database, use font name for description FORALL sym IN FontDescList FontFile$ = ListTag(sym) FontDesc$ = FontDescList(ListTag(sym)) IF FontDesc$ = "" THEN FontDesc$ = FontFile$ FontPath$ = GetSymbolValue(SYM_LOTUSFONTSDIR$) + FontFile$ ret% = AddFontResource(FontPath$) Size% = len(FontPath$) + 1 regStatus& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, _ Key$, FontDesc$, REG_SZ, FontPath$, Size%) END FORALL END SUB PUBLIC CONST LIBFLAG_FRESTRICTED = 1 PUBLIC CONST LIBFLAG_FCONTROL = 2 PUBLIC CONST LIBFLAG_FHIDDEN = 4 Declare Function ltyplib Lib "OLEAUT32" Alias "LoadTypeLib" (Byval t As Unicode String, j As Long ) As Long Declare Function rtyplib Lib "OLEAUT32" Alias "RegisterTypeLib" (Byval a As Long, Byval b As Unicode String, Byval c As Unicode String) As Long PUBLIC FUNCTION New_RegisterTypeLib( typelibname as string, helpdir as string ) as long ' Does registration for a type library, returns zero if successful ' Originally by Scott Matsimoto Dim typlib As Long Dim hresult As Long typlib = 0 hresult = ltyplib( typelibname, typlib) if hresult = 0 then hresult = rtyplib( typlib, typelibname, helpdir) end if New_RegisterTypeLib = hresult END FUNCTION PUBLIC FUNCTION Lot_RegisterTypeLib(ID$, Version$, Description$, helppath$, filename$, flags%) AS INTEGER '************************************************************************* '** Purpose: Creates necessary registry entries for Type Libraries '** '** Arguments: '** ID$ ID, "29130064-2EED-1069-BF5D-00DD011186B7", e.g. '** Version$ Version '** Description$ Description '** helppath$ Pathname of directory containing help files '** filename$ Fully qualified name of file '** flags% See below(default is 0): '** '** Flag Value Description '** LIBFLAG_FCONTROL The type library describes controls and should not be '** displayed in type browsers intended for nonvisual objects. '** LIBFLAG_FRESTRICTED The type library is restricted and should not '** be displayed to users. '** LIBFLAG_FHIDDEN The type library should not be displayed to users, '** although its use is not restricted. To be used by '** controls; hosts should create a new type library that '** wraps the control with extended properties. '** '** Returns: TRUE if successful, FALSE otherwise '** '** Author: JMDonohue '************************************************************************** DIM key$, s$, flagstr$ DIM LReturn& key$ = "Typelib\" + ID$ + "\" + Version$ LReturn& = Lot_CreateRegKeyValueEx(HKEY_CLASSES_ROOT, key$,_ "", REG_SZ, Description$, LENBP(Description$)+1) IF LReturn& <> ERROR_SUCCESS THEN GOTO FAILED s$ = key$ + "\" + "0\win32" LReturn& = Lot_CreateRegKeyValueEx(HKEY_CLASSES_ROOT, s$,_ "", REG_SZ, filename$, LENBP(filename$)+1) IF LReturn& <> ERROR_SUCCESS THEN GOTO FAILED s$ = key$ + "\" + "HELPDIR" LReturn& = Lot_CreateRegKeyValueEx(HKEY_CLASSES_ROOT, s$,_ "", REG_SZ, helppath$, LENBP(helppath$)+1) IF LReturn& <> ERROR_SUCCESS THEN GOTO FAILED s$ = key$ + "\" + "FLAGS" flagstr$ = CStr(flags%) LReturn& = Lot_CreateRegKeyValueEx(HKEY_CLASSES_ROOT, s$,_ "", REG_SZ, flagstr$, LENBP(flagstr$)+1) IF LReturn& <> ERROR_SUCCESS THEN GOTO FAILED Lot_RegisterTypeLib = TRUE EXIT FUNCTION FAILED: Lot_RegisterTypeLib = FALSE END FUNCTION PUBLIC FUNCTION OneUp(s$) AS STRING '************************************************************************* '** Purpose: Removes the last element of a filename '** e.g. d:\lotus\compnent ==> d:\lotus\ '** '** Author: JMDonohue '** Arguments: s$ string to strip '** Returns: stripped string or null string if invalid '** '************************************************************************* DIM i% i% = Len(s$) - 1 'Assume last character is \ DO i% = i% - 1 IF i% = 0 THEN ErrorMsg 0, "Toolkit:OneUp: String does not contain \: "+s$ OneUp = "" EXIT FUNCTION END IF LOOP UNTIL Mid(s$, i%, 1) = "\" OneUp = Mid(s$, 1, i%) END FUNCTION PUBLIC FUNCTION Lot_AreAnyNodeOptionsAvail() AS INTEGER '************************************************************************* '**Purpose:Determine whether any node options are available '**for the products selected. '** '**Returns:TRUE if any options are available '** FALSE if none '** '**Autor:GLutz '************************************************************************* DIM AllProdNum%,AllOptNum%,prodNum%,chpt$ Lot_AreAnyNodeOptionsAvail = FALSE 'Loop through the products and find the avail node options AllProdNum% = 0 AllProdNum% = Reg_GetNumberOfProducts() IF AllProdNum% <> 0 THEN 'Loop through the products FOR prodNum%=1 TO AllProdNum% AllOptNum% = 0 AllOptNum% = Lot_GetNumOfNodeOptAvailToNodeForProd(prodNum%) IF AllOptNum% <> 0 THEN chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(prodNum%)_ + gTOP$) IF (INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1) THEN Lot_AreAnyNodeOptionsAvail = TRUE EXIT FUNCTION END IF END IF NEXT END IF END FUNCTION '*********************************************************************** PUBLIC FUNCTION RemovePriorVersion(ProdRegKeyName$,ProdVer$) AS INTEGER '** '**Removes previous installations of 32 bit product versions. '** '**Parameters: '** ProdRegKeyName$:Product's registry name (WordPro) '** ProdVer$:Version to be remove (96.0) '** '** '** DIM prodCount%, i%, status&, RegKey$, PlatformStr$ DIM cmdLine$, dwStatus&, cbBuf&, exeName$, newCmdLine$ STATIC cmdBuf(10) AS STRING, cmdCount% IF ProdRegKeyName$ = "begin" AND _ ProdVer$ = "execution" THEN FOR i% = 0 TO cmdCount% '***This call launches uninstall '***dwStatus should be STILL_ACTIVE(259) dwStatus& = Lot_ExecUninstall(cmdBuf(i%)) WHILE dwStatus& = STILL_ACTIVE dwStatus& = Lot_ExecUninstall("") WEND NEXT ELSEIF ProdRegKeyName$ = "reset" AND _ ProdVer$ = "buffer" THEN cmdCount% = 0 ELSE exeName$ = "lunin10.exe" PlatformStr$ = gREGWINNAME RegKey$=PlatformStr$+"\Uninstall\"+ProdRegKeyName$+" V"+ProdVer$ '** returns ERROR_SUCCESS (0) status& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,RegKey$,_ "UninstallString",dwStatus&,cmdLine$,cbBuf&) IF status& = ERROR_SUCCESS THEN cmdLine$ = NullTrim(cmdLine$) '***for dev purposes don't use automated uninstall cmdBuf(cmdCount%) = MID$(cmdLine$,INSTR(1,cmdLine$,_ exeName$,1)) + " /A upgrade.rsp /S" 'cmdLine$ = MID$(cmdLine$,INSTR(1,cmdLine$,exeName$,1)) cmdCount% = cmdCount% + 1 END IF END IF END FUNCTION PUBLIC SUB IncrementSharedDLLCount(s$) '**************************************************************************** '** Purpose: Increments the shared dll count in registry. '** '** Author: JGHAZAL, JMD '** Arguments: s$ shared file fully qualified pathname '** '**************************************************************************** DIM regStatus&, subkey$, Descnum as variant, nsize&, Descnum2& subkey$ = "SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs" nsize& = 4 IF Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, subkey$, s$, REG_DWORD, Descnum, nsize&) = 0 THEN Descnum2& = val(Descnum) + 1 ELSE Descnum2& = 1 END IF regStatus& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, subkey$, s$, REG_DWORD, Descnum2&, nsize&) END SUB