K-INSTALL for Windows 1.3 Copyright (c) 1994-95 by Rob McDonell, ARK ANGLES All Rights Reserved INSTALLATION AND OPERATION INFORMATION INTRODUCTION K-INSTALL is one of the most powerful and flexible installation programs around, in a very robust and compact package. It comes in both DOS and Windows versions. Both versions feature a wide set of capabilities such as: * checking DOS version, * deleting files prior to installation, * installing from and to any drive and directory * installing within the same directory * installing files to several different directories, * optionally replacing pre-existing files, * prompting for additional disks as necessary, * asking whether to install optional components, * unpacking LZH, ZIP, ARJ and self extracting archives, * expanding compressed files, * updating AUTOEXEC.BAT and CONFIG.SYS, * creating or modifying a file with registration data, * creating or modifying INI files (Windows version only), * adding a group and items to Program Manager (Windows version only), * running external programs before and/or after installation, * providing messages and a status bar as installation proceeds, * giving additional instructions at the conclusion of the program, * running the main program from the installation program, * uninstalling the program again, * modifying display colours, layout and graphic, and much more. And it's all controlled from a single settings file. SYSTEM REQUIREMENTS K-INSTALL for Windows will run on any IBM-PC or compatible computer running Windows 3.1. A 386SX or greater machine running Windows in Enhanced Mode is desireable, particularly for unpacking archives. INSTALLATION K-INSTALL installs itself! Run SETUP.EXE to unpack and copy the whole package. You get the SETUP program itself, documentation, and samples to show the full power of this versatile software. PROGRAM DESCRIPTION K-INSTALL is a flexible and powerful program. There are many options to tailor it to run just as you need it. However you can also get the basics up and running very quickly. The INSTALL or SETUP executable file can be renamed if required. THE SETTINGS FILE K-INSTALL uses a settings file to control it's many functions. File names, directories, and many other options are defined by special keywords. Suitable default values are used for any options not explicitly defined, ensuring that the settings file can be extremely simple. CREATION AND USE OF DIRECTORIES K-INSTALL can be run from any drive or directory. When running on DOS version 3.0 or later it will automatically identify it's own location and look for all other installation files in the same place. On DOS versions earlier than 3.0 it will assume it is running from A:\. For multi disk installs the user can change the "from" drive and/or directory for each new disk, allowing faster installation using two drives alternately, or installation from multiple directories on a hard disk. K-INSTALL automatically asks for and creates a main directory in which to install the program, but any other directories can also be created and/or accessed. This includes subdirectories of the main directory, plus the boot directory, the DOS directory, the Windows directory, and the Windows SYSTEM directory. K-INSTALL can also be set to always overwrite existing files, or only overwrite older files, or never overwrite existing files. The default directory is specified with the DIR keyword in the settings file. The other directory options are controlled through INSTALL keywords. K-INSTALL can install a program within the same directory, automatically identifying files that do not have to be copied, while still unpacking archives and expanding compressed files. ARCHIVES AND COMPRESSED FILES K-INSTALL automatically unpacks any files with extensions of .LZH, .ZIP, .ARJ, and .EXE if the files have the unpack identifier in the file name. The unarchiving programs used are LHA.EXE, PKUNZIP.EXE and ARJ.EXE respectively. The options parameters passed to these unarchiving programs when they are run may be altered by the LHA, ZIP and ARJ keywords. The unpack identifier is normally a single underline, which means that files such as _ABC.ZIP or MY_FILE.LHA or ARCHIVE_.EXE will be unpacked automatically. The unpack identifier can be changed in the settings file with the UNPAK keyword. If you do not wish any files to be unpacked then it is a good idea to change the unpack identifier to characters that are invalid in file names, such as "<" or ">" or ":" etc. K-INSTALL also automatically expands COMPRESSed files where the last character of the file extension is a single underline. This is not changed by the UNPAK keyword. If you wish to unpack other types of archives (such as .ARC, .PAK or .ZOO files), or you want to use a different unarchiving program for .LHA, .ZIP and .ARJ files (such as UNZIP.EXE instead of PKUNZIP.EXE), then a file extension and associated unarchiving program can be defined with the ARCHIVE keyword. Appropriate versions of the unarchiving program(s) must be accessible to K-INSTALL to enable it to automatically unpack any archives that are not self-extracting. Also, in the DOS version of K-INSTALL (but not the Windows version), the program EXPAND.EXE must be accessible to enable automatic expansion of compressed files. This means the decompression program(s) must be either somewhere in the user's DOS Path (but this cannot usually be relied upon), or on the installation disk itself. For multi disk installs the decompression program(s) should actually be installed from the first disk to the main program directory, from where they will be available to unpack archives on subsequent disks, otherwise the decompression program(s) would need to exist on every disk that contained an archive or compressed file. Note that multi-volume archives and subdirectories within archives are not explicitly supported. Use a separate archive for each group of files and for each different subdirectory into which the files are to be unpacked. USER DATA At the commencement of the installation process K-INSTALL always asks the user which directory to install the program to. The default value for this is specified through the DIR keyword. The user can also specify whether to install certain optional components of the package. This is controlled by INSTALL keywords. Most importantly, K-INSTALL can be set up to request other information from the user such as serial number, name, company, address, even configuration preferences. The information can be validated for completeness and correctness, which can be particularly useful to ensure that the user has a genuinely registered package and knows the required format of data such as the program serial number. The entry of user information is specified through INPUT keywords. The actual data entered by the user can be used in the AUTOEXEC.BAT file through the AUTO and SHELL keywords, in the CONFIG.SYS file through the CONF keyword, in the registration data file through the REG keyword, in INI files through the INI keyword, and in the Windows Program Manager descriptions through the GROUP and ITEM keywords. UPDATING SYSTEM CONFIGURATION FILES Many options are available to modify the configuration of the user's computer. This includes updating the DOS PATH in AUTOEXEC.BAT, and the FILES and BUFFERS value in CONFIG.SYS. Any number of other lines may also be added to both of these files. These options are enabled through the PATH, AUTO, SHELL, CONF, FILES and BUFFERS keywords. In the Windows version, additional options are available to create or modify the Windows WIN.INI or private INI files. This is done through the IFILE, ISECT and INI keywords. Program Manager can also be updated with the GROUP and ITEM keywords. As mentioned, all these functions can include user entered data as defined in INPUT keywords. For safety, backup copies of AUTOEXEC.BAT and CONFIG.SYS are taken prior to modification, and the original versions are automatically restored if the modification fails for any reason. CREATING A REGISTRATION DATA FILE K-INSTALL can create or modify a file with any combination of predefined and user entered data. This is much more flexible than standard INI file creation, and allows complete control over the format of the file. It is possible to create a registration data file which validates that the program is a genuine registered version, or a configuration file which defines the various charateristics of how the program will run, or even a batch file to run the program with user-defined parameters. The file may be an INI-type text file, or a machine readable data file using either C format (null terminated strings) or Pascal format (length byte folled by string). The C or Pascal formats allow data to be written directly into EXE files or DDLs or the like. The creation of this file is done using the RFILE and REG keywords in conjunction with INPUT keywords. UNINSTALLATION K-INSTALL can keep a log of all new files written and all directories created. The uninstall function can be run immediately or at any time in the future from the same install program, deleting any files that are still in the same location, and then removing any directories that are now empty again. Confirmation is requested from the user before deleting files from the Windows System directory. Uninstall will not (in this version) undo changes to AUTOEXEC.BAT, CONFIG.SYS, INI files and Program Manager. Users appreciate an uninstall facility with their software, especially for Windows applications, so it should be highlighted as a major feature of your programs. It is a good idea to add an Uninstall icon to Program Manager which runs K-INSTALL with a bare minimum settings file. In particular the settings file should omit the RUN and CATALOG keywords so that users see only the Uninstall and Exit buttons. ADDITIONAL INFORMATION The appearance of K-INSTALL can be highly customised in terms of screen layout, colour and text. This is done through the TITLE, MSG, COLS, PATTERN, PICTURE and ICON keywords in the settings file. The CATALOG keyword can also be used to link a separate catalogue or other information file into the main install screen. While K-INSTALL is installing the program it provides information about each file copied or unpacked, and can also display a progress indicator showing how much has been completed. The progress indicator is controlled through the file sizes defined with INSTALL keywords in the settings file, and requires there to be at least one INSTALL record with a positive size value to operate. The progress indicator is as accurate as the sizes entered on the INSTALL record(s). When K-INSTALL terminates it provides final instructions on the status of the program, how to run it, and where to get more information. This is customised through the RUN and WIN and DOC keywords in the settings file. GETTING STARTED FAST K-INSTALL has many features, but you don't have to know about them all to use the program effectively - a very simple settings file will get you started. K-INSTALL uses sensible defaults for anything not specified, while still utilising many of its powerful functions. In fact, K-INSTALL can run without a settings file at all! However, to give the program just that little customisation that you want, follow these steps: 1. Copy SETUP.EXE into a directory that contains your program. 2. Use a basic text editor (such as EDIT in DOS, or NOTEPAD in Windows) to create a new file. 3. Enter three lines into the file, using the TITLE, DIR and INSTALL keywords to describe the name of the program, the default directory, and the total space it requires in KBs, for example: TITLE My Favourite Program DIR C:\MYPROG INSTALL *.*,,320 4. Save the file as SETUP.SET. 5. Now run SETUP.EXE in your directory. You already have a complete working installation program, attractively presented, that will copy everything from your directory to wherever the user specifies, and includes checking the available space on the destination drive, giving a full status display as the install proceeds, automatically unpacking archives that contain an underline character, displaying information to the user at the end of the program, and allowing the user to uninstall either immediately or any time in the future. 6. You can now go back and continue to customise SETUP.SET as much as you like for additional options such as multi disk installs, optional component installs, system configuration updating, your own screen layout and colour scheme, and many others. SAMPLE.SET provides a complete list of keywords for you to choose from and complete. The other sample files show different combinations of these settings. THE SETTINGS FILE The settings file is a plain ASCII file that can be created and updated with any editor in DOS or Windows. The default settings file has the same name as the installation program itself with an extension of ".SET". Therefore if the installation program is SETITUP.EXE then the settings file must be called SETITUP.SET. A different settings file can be used by entering its name (as a parameter when running K-INSTALL. For example, INSTALL MYSET.TXT Will read the settings from "MYSET.TXT". If no file extension is entered then ".SET" is presumed. Do not enter a directory name, as the settings file must always be in the same directory as the installation program. Each option is defined in the settings file by a single keyword, often followed by one or more additional parameters. For example, to specify that the main program directory is to be added to the DOS Path in AUTOEXEC.BAT the line: PATH is added to the settings file. To specify the default directory in which to install the program a line like: DIR C:\GAMES\BLASTER or similar is added. Or to describe files or groups of files to install, include lines such as: INSTALL READ.ME, ., 4, 10 INSTALL MYPROG.*, , 4,260, First Install Disk INSTALL *.EX_, *.EXE, 3, 85, Second Install Disk INSTALL *.DLL, ~SYS, 2, 120, Second Install Disk, Update modified DLLs? INSTALL *.VB_, ~SYS\*.VBX, 4, 170, Third Install Disk, Update VBXs? Each of these and many more options are detailed below. Keywords may be in upper or lower case. Some keywords have a short and a long form, and either may be used interchangeably. Keywords that require additional parameters must be followed by a space before any parameters. Parameters may be in upper or lower case. Parameters are separated from each other by commas. Any number of spaces may also be added between parameters for readability. Parameters that themselves contain commas must be enclosed in double quotes. Numeric parameters may be entered in either decimal or hexadecimal format. A hexadecimal number is identified by a trailing "h" or "H", as in "c000h" or "FFh" or "10h". All numeric parameters must be integers. In most cases, keywords may be entered in any order in the settings file. Keywords that allow multiple entries, such as INSTALL, DEL, MKDIR, AUTO, CONF, REG etc will be processed in the order in which they appear in the file. The only keywords that are sequence dependent are IFILE and ISECT which must come before their corresponding INI records, Blank lines and REMarks lines may be inserted anywhere into the settings file for readability. DICTIONARY OF SETTINGS The following list describes all available settings. Parameters in square brackets [ ] are optional. REM Allows additional remarks to be inserted into the settings file without altering the operation of the INSTALL program. Useage: REM [text] where text is any explanatory notes or additional information for anyone editing the settings file. Example: REM This file last modified by Rob McDonell 1.2.95 TITLE Defines a descriptive name for the program to be installed, which is used throughout K-INSTALL as a title for the program. Useage: TITLE text where text is any text including spaces. Example: TITLE Super Space Blasters II Default: The general term "Program" is used. MSG Specifies a fixed message to be displayed on the K-INSTALL screen. Useage: MSG [text] where text is the message to be displayed. Example: MSG Another quality product from Blasterware Default: No message is displayed. CATALOG Specifies the file name and extension of a product catalogue program that can be run from K-INSTALL. Useage: CATALOG [fileext[,parameters]] where fileext is the name of the catalogue program, or blank to turn the option off. No directory should be specified as K-INSTALL will search the installation disk, the main program directory, and the user's Path to find the file. parameters is any additional parameters for the program. Examples: CATALOG CATALOG.EXE CATALOG BROWSE.COM, PROGRAMS.TXT Default: No catalogue program defined, option not enabled. DOSVER Defines the minimum DOS vewrsion required by the program being installed. If the user's DOS version is not greater than or equal to this value then installation is terminated. Useage: DOSVER [major[.minor]] where major is the major part of the version number, ie "6". where minor is the minor part of the version number, ie "22". Ensure that minor numbers are specified to two digits, so version 6.2 must be written as 6.20. Examples: DOSVER 3.10 DOSVER 4 Default: No DOS version defined, no checking done. DIR Defines the default directory in which the program is to be installed. Useage: DIR [dirname] where dirname is the full drive and directory name, or blank to install to the current directory. Examples: DIR C:\GAMES\BLASTER DIR D:\ACCOUNTS Default: No directory defined, program would be installed to the current directory. RUN Specifies the file name and parameters to run the main program being installed. This allows K-INSTALL to give instructions on how to run the program, and also allows the user to run it directly from the installation program. This option can be left blank if the program is a collection of utilities or text files. Useage: RUN [fileext[,parameters]] where fileext is the file name and extension of the program to be run. No directory should be specified as K-INSTALL will search the installation disk, the main program directory, and the user's Path to find the file. parameters is any additional parameters for the program. Examples: RUN CLOCK.COM RUN BLAST.EXE, /VGA /NOSOUND Default: No name defined, program cannot be run from K-INSTALL. DOC Specifies the name of a README or other information file or document to which the user's attention should be drawn at the termination of K-INSTALL. Useage: DOC [fileext] where fileext is the file name and extension of the documentation file. No directory should be specified, as this file name is used for reference only. Example: DOC BLAST.TXT DOC README.NOW Default: No documentation file defined, option not enabled. INSTALL Specifies a file or group of files to be copied and/or unpacked. It includes information about how and where to copy the files, the space required, the prompt for inserting a new disk if required, and a prompt to ask the user whether to install the files at all. Up to 40 INSTALL records may be specified. Useage: INSTALL filespec[,dest[,repl[,size[,disk[,prompt]]]]] where filespec is the name and extension of the file(s) to be installed. Wildcards are allowed. dest is the directory to install the files to and/or new name for the files being copied. The directory is specified relative to the main directory entered by the user: . is the main directory (same as blank) .. is the parent directory of that drive \ is the root directory of that drive ABC is a subdirectory of the main directory Five special directory identifiers marked with a tilde "~" can be used for specific directories (these identifiers must be in upper case): ~MAIN is the main directory (same as "." or blank) ~DOS is the Dos directory ~WIN is the Windows directory ~SYS is the Windows System directory ~BOOT is the root directory of the boot drive A new filespec can be added to the dest parameter to rename the files as they are copied. If there is no filespec, or there are wilcards ("*" or "?") for both the name and extension, then the file retains its original name. If there is a wildcard name and specific extension then just the extension is changed. If there is a wildcard extension and specific name then just the name is changed. If the file being copied is an archive to be automatically unpacked, then the new filespec is ignored and the file names are obtained from within the archive. repl is the method of deciding whether to replace existing files with the same name in the destination directory: 0 don't replace anything, copy only new files 1 replace older files on user confirmation 2 replace older files 3 replace all files on user confirmation 4 replace all files size is the space in KB required to install the files. disk is the name by which to ask the user to insert another disk if no files matching the filespec are found on the current disk. This enables single or multi disk installs using the same settings file - the additional disks are only requested if necessary. prompt is the question to ask the user as to whether to install the files represented by this INSTALL record. If this is not blank then the INSTALL record is taken as a conditional install, that is, the user is asked whether they want to install them or not. The question should be asked in such a way that a positive response indicates that the files should be installed. This allows the user to choose how much of the function of the total package they wish to install. If consecutive INSTALL records contain the same question then the user is asked only once. Examples: INSTALL BLAST.EXE, ., 2, 125, Install Disk 1 INSTALL BLAST.OV_, *.OVL, 2, 220, Install Disk 1 INSTALL SAMPLE.*, ., 2, 140, Install Disk 2 INSTALL *.HLP, ., 1, 130, ,Do you want to install the Help files? INSTALL SAMPLES.ZIP, SAMPLES, 2, 90, Disk 2, Install sample files? INSTALL *.DLL, ~SYS, 1, 430, Third Install Disk, Update DLLs? INSTALL *.DL_, ~SYS\*.DLL, 1, 280, Fourth Install Disk, Update DLLs? INSTALL *.EX_, ~MAIN\*.EXE, 1, 90, Setup Disk INSTALL *.DL_, ~SYS\*.DLL, 1, 90, Setup Disk Default: prompt defaults to blank (files are installed without asking the user), disk defaults to blank (presuming a single disk install), size defaults to 0 (space on target disk will not be checked), repl defaults to 0 (copies only if files do not exist), dest defaults to blank (the main program directory entered by the user, file is not renamed). If no INSTALL records at all are entered then K-INSTALL defaults to a simple all- on-one-disk installation, ie filespec is "*.*", dest is blank, repl is 0, size is 0, disk and prompt are blank. FIRST Specifies a program or command to be executed at the beginning of the installation. This can be used to perform a DOS command or run some other specilised program to perform additional processing. Useage: FIRST [command[,parameters]] where command is the program or command to be executed. parameters is any additional parameters for the program. Examples: FIRST DOFIRST.COM FIRST MKDIR, C:\TEMP Default: No additional processing is performed before installation. LAST Specifies a program or command to be executed at the end of the installation. This can be used to perform a DOS command or run some other specilised program to perform additional processing. Useage: LAST [command[,parameters]] where command is the program or command to be executed. parameters is any additional parameters for the program. Examples: LAST DOLAST.EXE LAST ARJ.EXE, SAMPLES LAST PRINT, READYREF.TXT Default: No additional processing is performed after installation. UNPAK Defines the identifier that indicates that an archive file is to be automatically unpacked by K-INSTALL. Useage: UNPAK string where string is between 1 and 8 valid filename characters. Example: UNPAK && Default: A single underline indicates an archive to be unpacked, so files such as _ABC.ZIP or MY_FILE.LHA or ARCHIVE_.EXE will be unpacked automatically by K-INSTALL into the directory defined in the relevent INSTALL record. LHA Sets the options used by LHA.EXE when automatically unpacking .LZH files. Useage: LHA [parms] where parms is all the options required by the unarchiving program. Example: LHA e /m1 Default: The options "e /ma1" are used. ZIP Sets the options used by PKUNZIP.EXE when automatically unpacking .ZIP files. Useage: ZIP [parms] where parms is all the options required by the unarchiving program. Example: ZIP -o Default: The options "-o -Jhrs" are used. ARJ Sets the options used by ARJ.EXE when automatically unpacking .ARJ files. Useage: ARJ [parms] where parms is all the options required by the unarchiving program. Example: ARJ e Default: The options "e -y" are used. ARCHIVE Defines an additional unarchiving program and associated file extension and optional parameters. Useage: ARCHIVE ext[,prog[,parms] where ext is the file extension of files to be unarchived. prog is the program name and extension of the unarchiving program. parms is all the options required by the unarchiving program. Example: ARCHIVE .ZIP, UNZIP.EXE, -o Default: No unarchiving program defined, function not enabled. DEL Specifies the name of a file to be deleted prior to the commencement of installation. This can be used to remove existing files, usually from an earlier version of the same program, which are incompatible with this new version. Wildcards are not permitted. Up to 5 DEL records may be specified. Useage: DEL filename where filename is the directory, file name and extension of the file to be deleted. The directory is specified relative to the main program directory entered by the user. This can be specified using the normal DOS directory symbols ".", "..", "\" etc, or a subdirectory name, or the special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT". See the INSTALL keyword for more details. Examples: DEL PREVIOUS.DOC DEL ~DOS\OLD.EXE DEL ~MAIN\UNWANTED.DAT Default: If the directory is blank then the file is deleted from the main program directory. If there is no DEL record then no files are deleted. MKDIR Specifies the name of a directory to be created following completion of installation. Up to 5 MKDIR records may be specified. Useage: MKDIR dirname where dirname is the directory to create, relative to the main program directory entered by the user. This can be specified using the normal DOS directory symbols ".", "..", "\" etc, or a subdirectory name, or the special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT". See the INSTALL keyword for more details. Examples: MKDIR PRIVATE MKDIR ~BOOT\TEMP Default: No directories are created except those to which files are copied. INPUT Specifies a variable that may either be a constant or a user entered item. The value of this variable may then be inserted into the system configuration files, INI files or registration data file using "~0" for the first value, "~1" for the second value etc. Up to 10 INPUT records may be specified, giving variables from "~0" to "~9". Useage: INPUT [size[,data[,prompt]]] where size is the maximum length of the variable. data is the literal data (if prompt is blank) or the format of the data to be entered (if prompt is not blank). If the prompt parameter is not blank, then this parameter is a mask to validate the format of the data entered by the user. It may contain any combination of literal characters and wildcards. Wildcards work in a similar way to those in DOS, but with additional capabilities. There are four wildcard characters: @ is for any one alphabetic character # is for any one numeric character ? is for any one character * is for any number of characters Use a single asterisk "*" to indicate that anything can be entered, including a blank line. Use a combination "?*" to indicate that at least one character must be entered (ie, anything except a blank). Use other wildcard combinations to restrict the valid input even further, such as "?* ?*" to indicate that the input must be at least two words, or "@@?" to indicate that the input must be three characters long, the first two of which must be alphabetic, or "#A" to indicate that the input must be a number followed by the letter "A". This facility is very useful to ensure that the user is properly registered and knows how to enter the right information in the right place. prompt is the name of the data item that the user is asked to enter. If this is blank then the value entered in the data parameter is used literally as a constant. If it is not blank then it is used as the prompt to ask the user to enter certain information. Examples: INPUT 6, @@######, Serial Number INPUT 30, ?* ?*, First and Last name INPUT 60, *, Address INPUT 8, ##/##/##, Date Note: Ensure that the size and mask are compatible. Specifying a length of 2 and a mask of "???" will block the user from ever entering a valid value for the variable. Default: prompt defaults to blank (no user input requested), data defaults to blank (no value assigned), and size defaults to 0 (no specific size) if not entered. RFILE Specifies the location, name and format of a registration data file. The information in this file can be constructed from any combination of predefined and user entered data such as name, address, program serial number etc. The user data is controlled through INPUT keywords. Useage: RFILE [filename[,format]] where filename is the full directory, name and extension of the registration data file. The directory is specified relative to the main program directory entered by the user. This can be specified using the normal DOS directory symbols ".", "..", "\" etc, or a subdirectory name, or the special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT". See the INSTALL keyword for more details. The directory must exist, or be created through an INSTALL or MKDIR keyword. format is the way in which the data is written to the file: C is C language format, ie null terminated string P is Pascal format, ie length byte followed by string T is plain Text format such as created by any editor In Text format all information is written sequentially to a normal text file, and completely replaces any existing file with the same name. In C or Pascal format information can be placed precisely in an existing file, or a new file created. If more that one character is entered for format just the the first character is examined to determine whether it is C or P. Examples: RFILE BLASTER.DAT, P RFILE ~WIN\MYPROG.INI RFILE \STARTUP.BAT, TEXT Default: If filename is blank, or there is no RFILE record, then no registration data file is defined, option not enabled. If the format is blank or anything starting with other than "C" or "P" then text format is presumed. If there is no directory specified then the main program directory is presumed. REG Specifies text to be written to a registration data file. Up to 20 REG records may be specified. The data may include any variables or special directory identifiers. Useage: REG [position[,size[,text]]] where position is the incremental position in the file where the data is to be written in a C or Pascal format file, that is, the number of bytes to skip over from the end of the previously written text. This is ignored in a Text format file. size is the length of the data required. In a Text format file the information is truncated to this length, in a C or Pascal format file it is truncated or padded out as necessary to exactly this length. text is the data to be written to the file. This may include any of the defined variables "~0" to "~9" and special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT" which are translated to their actual values as the file is written. Examples: REG 0, 0, Colour=7 4 6 REG 0, 0, Serial=~0 REG 0, 0, UserName=~1 REG 37, 16, UnlockCode872915 REG 58, 8, ~3 Default: text defaults to blank, and position and size default to 0 if not entered. If no REG records at all are entered then K-INSTALL does not create a registration data file. BAK Specifies the file extension to be used when backing up AUTOEXEC.BAT and CONFIG.SYS prior to alteration. Useage: BAK ext where ext is the file extension to be used for backups. Ensure that it commences with a fullstop. Examples: BAK .BAK BAK .OLD Default: A file extension of ".ARK" is used for backup files. PATH Specifies that the main program directory is added to the PATH statement in AUTOEXEC.BAT. The file is updated if the directory does not already exist in AUTOEXEC.BAT. Confirmation is always obtained from the user before modifying AUTOEXEC.BAT, and the file is backed up before alteration. Useage: PATH Default: The PATH is not altered. AUTO Specifies a line that is to be added to AUTOEXEC.BAT. The line is added after all other lines in AUTOEXEC.BAT except for a final DOSSHELL or WIN or other shell command (see SHELL keyword below). Confirmation is always obtained from the user before modifying AUTOEXEC.BAT, and the file is backed up before alteration. Useage: AUTO [text] where text is the line to be added to the file. This may include any of the defined variables "~0" to "~9" and special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT" which are translated to their actual values as the file is written. Examples: AUTO REM Run VET Anti-Virus program AUTO ~MAIN\VET /# AUTO SET VETDIR=~MAIN Default: No lines are added to AUTOEXEC.BAT. SHELL Specifies a line that is to be added to the end of AUTOEXEC.BAT. Existing calls to DOSSHELL or WIN are replaced. The PATH statement and any lines defined by AUTO keywords are inserted before this line if necessary. Confirmation is always obtained from the user before modifying AUTOEXEC.BAT, and the file is backed up before alteration. Useage: SHELL [text] where text is the line to be added to the file. This may include any of the defined variables "~0" to "~9" and special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT" which are translated to their actual values as the file is written. Examples: SHELL KMENU /td/vd Default: No lines are added to the end of AUTOEXEC.BAT. FILES Specifies a minimum value for the FILES setting in CONFIG.SYS. The file is updated if the FILES value is less than that specified. Confirmation is always obtained from the user before modifying CONFIG.SYS, and the file is backed up before alteration. Useage: FILES [number] where number is the minimum value for FILES that is required. Example: FILES 20 Default: The FILES value is not altered. BUFFERS Specifies a minimum value for the BUFFERS setting in CONFIG.SYS. The file is updated if the BUFFERS value is less than that specified. Confirmation is always obtained from the user before modifying CONFIG.SYS, and the file is backed up before alteration. Useage: BUFFERS [number] where number is the minimum value for BUFFERS that is required. Example: BUFFERS 20 Default: The BUFFERS value is not altered. CONF Specifies a line that is to be added to CONFIG.SYS. The line is added at the end of the file. The FILES and/or BUFFERS statements are inserted before this line if necessary. Confirmation is always obtained from the user before modifying CONFIG.SYS, and the file is backed up before alteration. Useage: CONF [text] where text is the line to be added to the file. This may include any of the defined variables "~0" to "~9" and special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT" which are translated to their actual values as the file is written. Example: CONF DEVICE=~DOS\MSCDEX.SYS CONF DEVICE=~MAIN\TDRIVER.SYS /F:200 /D /L:~BOOT Default: No lines are added to CONFIG.SYS. IFILE Specifies the location and name of an INI file to be created or modified. The information in this file can be constructed from any combination of predefined and user entered data such as name, address, program serial number etc. The user data is controlled through INPUT keywords. The actual data written to the file is defined with ISECT and INI keywords. Useage: IFILE [path] where path is the full directory, name and extension of the INI file. The directory is specified relative to the main program directory entered by the user. This can be specified using the normal DOS directory symbols ".", "..", "\" etc, or a subdirectory name, or the special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT". See the INSTALL keyword for more details. The directory must exist, or be created through an INSTALL or MKDIR keyword. Examples: IFILE MYPROG.INI IFILE ~WIN\WIN.INI IFILE Default: If path is blank, or there is no IFILE record, then data is written to WIN.INI in the WINDOWS directory. If there is a file name and extension but no directory then the main program directory is presumed. ISECT Specifies the section name under which the INI data is to be written. Sections are recorded in the INI file enclosed in square brackets, however the section name here should be entered without square brackets. The section will be created in the INI file if it does not already exist. Useage: ISECT section where section is the name of the section to which the data is written. Examples: ISECT Desktop ISECT MyApplicationSettings Default: If there is no ISECT record then any data is written to a section called NoSection. INI Specifies data to be written to an INI file. Up to 20 INI records may be specified. They may be preceeded and interspersed by as many IFILE and ISECT records as required to write data to multiple files and sections. The data may include any variables or special directory identifiers. Useage: INI key[=data] where key is the name of the item for which a value is being defined, such as "Colour" or "Directory" or "Font". data is the value being assigned to the above item, such as "Red" or "~MAIN" or "Arial". This may include any of the defined variables "~0" to "~9" and special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT" which are translated to their actual values as the file is written. Examples: IFILE MYPROG.INI ISECT Main INI Colour=7 4 6 INI Dir=~MAIN INI Serial=~0 INI UserName=~1 ISECT Defaults INI OpenEmpty=Yes INI AutoSave=Yes INI PromptOnDelete=No Default: if data is blank then any existing value assigned to that item name is deleted. GROUP Specifies the name of a Group to be added to Program Manager if it does not already exist. Useage: GROUP text where text is the name of the group. Examples: GROUP Space Blaster GROUP My Favourite Programs Default: if there is no GROUP record specified then any Items will be added to a group called Applications in Program Manager. ITEM Specifies the name and other information about a program item to be added to the Program Manager group defined with the GROUP keyword. Useage: ITEM cmd[,name[,icon[,index[,x,y[,dir[,hotkey[,min]]]]]]] where cmd is the full command line required to run the program. This parameter should contain at least the name of the executable file for the program. It can also include the full path of the file and any parameters required by it. name is the title that is displayed below the icon in the group window. icon is the location and filename for the icon to be shown in the group window. The file can be either a Windows executable file or an icon file. index is the index of the icon in the file identified by the icon parameter. This parameter is an integer, and the first icon's index is 0. SETUP.EXE contains two icons, the first for install and the second for uninstall. PROGMAN.EXE contains five icons that can be used for non-Windows programs. x,y is the horizontal and vertical position of the icon in the group window. These parameters are integers, and both must be specified to set the position of the icon. dir is the name of the default (or working) directory. hotkey is the hot (or shortcut) key that is specified by the user. min is whether an application window should be minimized when it is first displayed. All the above parameters may include any of the defined variables "~0" to "~9" and special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT" which are translated to their actual values as Program Manager is updated. Examples: GROUP Space Blasters ITEM ~MAIN\BLASTER.EXE,Space Blasters Game ITEM ~MAIN\BLASTER.HLP,Help for Space Blasters,BLASTHLP.ICO ITEM ~MAIN\SETUP.EXE,Uninstall Space Blasters,,1 Default: If min is blank then the program is not minimised when run. If hotkey is blank then no shortcut key is defined. If dir is blank then the working directory is taken from the cmd parameter. If x,y is blank then Program Manager places the icon in the next available space. If index is blank then the first icon in the icon file is used. If the icon is blank then Program Manager uses the first icon in the file specified in the cmd parameter, or if that is not an executable file then the first icon in the associated executable file, or if there is no associated file then a default icon is used. COLS Specifies the colours used throughout K-INSTALL. Useage: COLS [top[,bot[,titl[,shad[,depth[,msg[,menu]]]]]]] where top is the background colour at the top of the window. bot is the background colour at the bottom of the window. titl is the text colour for the title line. shad is the text colour for the title shadow. depth is the amount of offset of the shadow from the title line, where positive numbers are below and to the right, and negative numbers are above and to the left, and zero means no shadow. msg is the text colour for the message line. menu is the text colour for the main menu items. Colours are made up three components, Red, Green and Blue. Each component has an intensity from 0 to 255, specified in one byte. A complete colour code therefore has three bytes, giving decimal numbers from 0 to 16777215, or hexadecimal from 000000h to FFFFFFh. The lowest order byte is the Red value, the next byte is the Green value, and the highest byte is the Blue value. Any number of intermediate colours can be made by mixing different intensities of these three colours. To derive the colour code for a specific colour: take the value for Red, add the value for Green multiplied by 256, and add the value for Blue multiplied by 65538. In hexadecimal, write the Blue byte followed by the Green byte followed by the Red byte. Using codes where each of the three colours are divisible by 64 (40h) minimises dithering. The most common and attractive colour values are: Decimal Hex Colour 0 000000h Black 128 000080h Dark Red 255 0000FFh Light Red 32768 008000h Dark Green 32896 008080h Brown 65280 00FF00h Light Green 65535 00FFFFh Yellow 8288608 800000h Dark Blue 8388736 800080h Dark Magenta 8421376 808000h Dark Cyan 8421504 808080h Dark Grey 12632256 C0C0C0h Light Gray 16711680 FF0000h Light Blue 16711935 FF00FFh Light Magenta 16776960 FFFF00h Light Cyan 16777215 FFFFFFh White The skew and depth qualities normally work best with just small values up to about 3 and down to about -3. Examples: COLS 255, 0, 0, 16777215, 0, 2, 16777215, 12632256 COLS ff0000h ff00ffh, 2, 0, ffffffh, 1 Default: all colours and options default to reasonable values if there is no COLS keyword: top background Light Cyan bottom background Light Green background skew -1 title White shadow Black shadow depth 1 message Black main menu Black Individual colours default to black and skew and depth default to zero if they are missing from the COLS record. PATTERN Defines the makeup of the background of the main K-INSTALL screen. The background can be either a small bitmap repeated over the whole screen, or a hatched pattern, or two plain colours that merge into each other in the middle oif the screen. Only one of these three methods is used to generate the background, and K-INSTALL will attempt each in turn until valid parameters are found. If a bitmap is used then it must be added to the EXE file using a resource editor, or exist as a separate BMP file. Useage: PATTERN [name[,style[,skew]]] where name is the name of a bitmap resource or file name. The bitmap may be up to 8 bits square, and is painted repeatedly all over the background of the window. If the bitmap is larger than 8 bits square then only the first 8 bits in each direction are used. If name is valid then the style and skew parameters are ignored. style is the type of hatch that used to form a background pattern: 0 no hatch 1 horizontal lines 2 vertical lines 3 forwards diagonal lines 4 backwards diagonal lines 5 vertical and horizontal crossed lines 6 forwards and backwards diagonal crossed lines This parameter is only used if the name parameter is blank or invalid. If style is greater than 0 then the skew parameter is ignored. The foreground colour of the hatch pattern is the top colour as defined by the COLS keyword. The background colour of the hatch pattern is the bottom colour as defined by the COLS keyword. skew is the relative weight given to the top and bottom colours of the background in the way in which they graduate from one to the other. Positive numbers give more emphasis to the top colour, and negative numbers give more emphasis to the bottom colour, and zero means both colours are weighted evenly. The top and bottom colours are defined by the COLS keyword. This parameter is only used if the name parameter is blank or invalid and the style parameter is blank or less than or equal to 0. Note: Normally only one of the above three parameters need be entered, as the first valid non-blank/non zero parameter will define how the background is generated. Examples: PATTERN MINILOGO.BMP PATTERN BITMAP_1 PATTERN , 6 PATTERN , , 1 Default: name defaults to blank and style and skew default to 0. If a valid name is entered then the background is generated from the bitmap and the style and skew parameters are ignored. If name is blank or invalid and style is greater than 0 then the background is generated from the hatch pattern and the skew parameter is ignored. If name is blank or invalid and style is less than 1 then the background is a graduated colour change from the top to the bottom of the screen using the skew parameter if entered. If there is no PATTERN record then the background is a simple graduated colour change using a skew of 0. PICTURE Defines a graphic that is displayed in the main K-INSTALL screen. The graphic is a bitmap that must be added to the EXE file using a resource editor, or exist as a separate BMP file. Useage: PICTURE [name[,Xpos[,Ypos[,Xrel[,Yrel[,style[,X1pos[,Y1pos[,X1rel[,Y1rel[,mode]]]]]]]]]]] where name is the name of the bitmap resource or file name. Xpos is the horizontal location of the graphic as an absolute number of pixels from the left of the window. This is added to the value derived from Xrel if defined. Ypos is the vertical location of the graphic as an absolute number of pixels from the top of the window. This is added to the value derived from Yrel if defined. Xrel is the horizontal location of the graphic as a percentage of the way across the window, 50 being the middle and 100 the right edge. This is added to the value derived from Xpos if defined. Yrel is the vertical location of the graphic as a percentage of the way down the window, 50 being the middle and 100 the bottom edge. This is added to the value derived from Ypos if defined. style is the method by which the bitmap is superimposed over the existing background of the window: 0 OVERLAY: the bitmap is shown with the background showing through any white parts 1 COPY: the bitmap is copied over the top of the background, completely replacing it. 2 AND: the bitmap and background are combined bit by bit with the AND function. 3 OR: the bitmap and background are combined bit by bit with the OR function. 4 XOR: the bitmap and background are combined bit by bit with the XOR function. 5-9: other effects. The first two styles are generally the most useful, but it is worth experimenting to see the different effects they all have. X1pos is the width of the graphic as an absolute number of pixels. This is added to the value derived from X1rel if defined. If the total value is not zero then the graphic is stretched or compressed to this width. Y1pos is the height of the graphic as an absolute number of pixels. This is added to the value derived from Y1rel if defined. If the total value is not zero then the graphic is stretched or compressed to this height. X1rel is the width of the graphic as a percentage of the width of the window, 50 being half the width and 100 the whole width. This is added to the value derived from X1pos if defined. If the total value is not zero then the graphic is stretched or compressed to this width. Y1rel is the height of the graphic as a percentage of the height of the window, 50 being half the height and 100 the full height. This is added to the value derived from Y1pos if defined. If the total value is not zero then the graphic is stretched or compressed to this height. mode is the method by which the bitmap is stretched: 1 preserves black pixels at the expense of white ones 2 preserves white pixels at the expense of black ones 3 treats all colours in the same way Example: PICTURE MAINLOGO.BMP, 0, 0, 100, 50, 1 Note: Transparent bitmaps, that is those copied with style 0, cannot be stretched. Default: Xpos, Ypos, Xrel, Yrel, style, X1pos, Y1pos, X1rel, Y1pos and mode all default to zero if not entered. If name is blank or invalid or there is no PICTURE record then no graphic is defined or displayed. ICON Defines an icon that is displayed in the main K-INSTALL screen. The icon must be added to the EXE file using a resource editor. The EXE file already contains two icons, the first being the Install icon and the second being the Uninstall icon. Useage: ICON [index[,Xpos[,Ypos[,Xrel[,Yrel]]]]] where index is the number of the icon resource. Xpos is the horizontal location of the icon as an absolute number of pixels from the left of the window. This is added to the value derived from Xrel if defined. Ypos is the vertical location of the icon as an absolute number of pixels from the top of the window. This is added to the value derived from Yrel if defined. Xrel is the horizontal location of the icon as a percentage of the way across the window, 50 being the middle and 100 the right edge. This is added to the value derived from Xpos if defined. Yrel is the vertical location of the icon as a percentage of the way down the window, 50 being the middle and 100 the bottom edge. This is added to the value derived from Ypos if defined. Example: ICON 1, 0, 20, 50, 0 Default: Xpos and Ypos default to zero if not entered. If Index is blank or invalid or there is no ICON record then no icon is defined or displayed. LOG Specifies the name of an installation log file used to record all files that have been copied and directories created by K-INSTALL. This allows the program to be uninstalled by deleting all these files and directories again, regardless of where they have been copied or created. The log file is always created in the main program directory. Useage: LOG [fileext] where fileext is the file name and extension of the log file, or blank to turn the option off. No directory should be specified as the log file is always created in the main program directory. Examples: LOG INSTALL.LOG LOG Default: Option enabled with log file name "UNINSTAL.LOG". Note: For the uninstall process to work, the INSTALL program itself must be copied to the main program directory where the log file is also created. The associated settings file must also be copied if it changes the name of the log file. This can be done with a simple INSTALL record such as: INSTALL INSTALL.*, ., 2, 18 REMOVE Specifies the name of a file to be deleted during uninstallation. This can be used to remove files that are created by the main program, such as configuration files, private INI files, temporary files etc. Wildcards are not permitted. Up to 5 REMOVE records may be specified. Useage: REMOVE filename where filename is the directory, file name and extension of the file to be deleted. The directory is specified relative to the main program directory entered by the user. This can be specified using the normal DOS directory symbols ".", "..", "\" etc, or a subdirectory name, or the special directory identifiers "~MAIN", "~DOS", "~WIN", "~SYS", "~BOOT". See the INSTALL keyword for more details. Examples: REMOVE MYPROG.CFG REMOVE ~MAIN\SORT.TMP REMOVE ~WIN\MYPROG.INI Default: If the directory is blank then the file is deleted from the main program directory. If there is no REMOVE record then no files are deleted. ---+++---