***************************************************************************** INIPACK(tm) (c)1994 (all rights reserved) Westfall Computer Services ***************************************************************************** USERS: SYSTEM ADMINISTRATOR (for MicroSoft(TM) WINDOWS(R) vended from a network server) INISET.EXE (Setup for INIPKG prior to WINDOWS package installation) INIPKG.EXE (Package the changes after a WINDOWS package installation) INIMRG.EXE (Repeat the changes of a WINDOWS installation) This series of programs are intended to allow a networked WINDOWS system administrator to record changes to files during the installation of a WINDOWS software package, and produce a repeatable method of installing these changes to other networked users when WINDOWS itself is vended via the network. Registered version options include and options. ***************************************************************************** PROCEDURES: First change to your current WINDOWS directory. Then copy any previous run's '.MRG' or '.PKG' files to a separate directory. (so that this package info isn't lost for future upgrades or additions) (You can't do too many backups, can you?!) Ensure that no '.MRG', '.PKG' or '.IMD' files exist, Next run INISET to setup for change recording. (INISET will copy all selected files to the format .xxx) (where xxx starts at 000 and continues until it finds a unique name) Then install the WINDOWS software package using it's regular install procedures. Run INIPKG, allow it to generate it's '.MRG' or '.PKG' file(s), in it's INIMRG compatable format. The INIMRG compatable files created then may be utilized in your network user startup code for system-wide integration. ***************************************************************************** TERMINOLOGIES: (Basic WINDOWS '.INI' orientation) An '.INI' file is a WINDOWS compatable '.INI' file. * A '[section]' is part of a WINDOWS '.INI' file declaration. * An 'element' is a named string descriptor within a '[section]', who's name is terminated by the '=' sign. (ie: Beep=yes) (Where: Beep is the 'element' and 'yes' is the argument) * An 'action' is an 'element' or 'section' command operation. * An 'ORG' file is an INISET created copy of an original file. * An '.IMD' file is an INISET created file for INIPKG to check for changes to existing 'ORG' files. * A '.MRG' file is an INIMRG compatable control file created by the INIPKG program, or user generated. * A '.PKG' file is an INIMRG compatable PACKAGE control file. (PACKAGES contain the commands of multiple '.MRG' files, and have additional COPY and 'TEXT' file processing capabilities. * TERMINOLOGIES (Extended System 'TEXT' file processing under PACKAGE VERSION): A 'TEXT' file is a DOS compatable file with the extensions: '.BAT' or '.SYS' or a file transformed with the '.T' command. * A 'variable' is a named string descriptor within a 'TEXT' file. * A '.CPY' file is neither a TEXT nor '.INI' file and cannot be internally processed by INIMRG, therefore it is simple copied. * WARNING: Some variables have no '=' sign to terminate the variable name declaration, such as PATH and PROMPT. Additionally some 'variables' have no descriptor at all, but are complete lines. (ie: C:\SBPRO\DRV\MSCDEX.EXE /V /D:MSCD001 /M:15) (Complications are discussed in the PROGRAMMERS NOTES SECTION) ***************************************************************************** ============================================================================= NOTICE TO REGISTERED USERS OF INIPACK (v1.xx - v2.02) Version v2.01 and up is now compiled under the LARGE memory model. and adds 'far' calls for total in-core processing. * v2.10 Adds TEXT file processing capabilities for '.BAT' and '.SYS' files. Allows for case insensitivity. * INIMRG v1.40 uses new calling sequences and options. v1.50 adds internal file naming to control file. v2.00 adds file copying commands, and searches environment variables better. (REGISTERED USER VERSION ONLY) v2.01 adds the ability to hide copyright notices & delays. v2.02 now operates in a DOS SHELL call from WINDOWS under which previous versions failed with a runtime error R6013. (Kudos to Dick Westfall at Goodyear Tire and Rubber Headquarters for finding this glitch/bug in MS WINDOWS 3.1 and Microsoft 'C') (v2.02: We got around the bug by disabling pointer checking, as the 'far' pointers were not out-of-range) * INISET v2.00 adds 'profile' and 'listfile' control. (REGISTERED USER VERSION ONLY) v2.02 now operates in a DOS SHELL call from WINDOWS. v2.10 Adds non-ini file processing capabilities for TEXT Also adds unique filename generation for 'ORG' files. * INIPKG v1.10 adds 'package' management output. v2.00 adds 'profile' and 'listfile' control. (REGISTERED USER VERSION ONLY) v2.02 now operates in a DOS SHELL call from WINDOWS. v2.10 Adds non-ini file processing capabilities for TEXT Also adds unique filename generation for 'ORG' files. * Please read the notes following in the appropriate sections of this file. (No INIMRG changes are required for any version update) (Command line arguments for 'ORG' file suffix has been removed) ============================================================================= ***************************************************************************** Discussion of INISET v2.10 Program ***************************************************************************** NAME: INISET.EXE PURPOSE: Copy original files and record the current state prior to a WINDOWS package installation. FUNC: INISET takes an snapshot of files by copying them to 'ORG' files in their respective directories, and produces an intermediate file 'INIPKG.IMD' containing the names of all files in the snapshot. CALL: INISET [ -H ] [ -P ] [ -L ] OPTIONS: ? -? /? -H /h help mode. -L /l Produce listing of original files to filename . (REGISTERED VERSION OPTIONS) -P /p Search directories and files named in the profile. RETURNS: 0 = no errors, otherwise error occurred. NOTES: If any prior runs of INISET have been performed, then you must first ensure that any previously generated copies of '.MRG' files and '.IMD' files are removed from the current directory. (ie: Phased or Multiple installations) '-L' option: An optional listfile may be produced by using the option: '-L' and naming where you wish this file to reside. This file will contain all files that INIPKG will review for changes. (And has created 'ORG' files for.) '-P' option: The default is to scan the '.\' and '.\SYSTEM' directories for '.INI' files. This may be changed by using the '-P' option. PROFILE: Profile contents may include a directly named search path, and/or the current directory, or an environment named variable, a path or a file. The structure of a sample file may be as follows: (using any combination, one per line) *.INI *.DLL SYSTEM\*.INI SYSTEM\*.DLL C:\AUTOEXEC.BAT C:\CONFIG.SYS %windir%\*.INI %windir%\SYSTEM\*.INI %windir%\SYSTEM\*.DLL %windrv%\%windir%\%winsys%\*.%EXT% ENVIRONMENT: '%ENV%' Environment variable search methods include: DiReCt: As entered. UPPER: Translate variable name to UPPER case. lower: Translate variable name to LOWER case. All three methods are tried before the program will return with a "Can't find environment variable 'xxxx' message" LIMITS: Scannable files maximum: (1000) Maximum file size: (MEMORY AVAILABLE UNDER LARGE MODEL) Maximum line length: (256 Bytes) All processing is performed 'in core' and thus adds it's limit to file size. Only 'DOS' native memory is currently used. ***************************************************************************** Discussion of INIPKG v2.10 Program ***************************************************************************** NAME: INIPKG PURPOSE: Process the changes made by a WINDOWS installable package, and produce a repeatable installation. Func: INIPKG parses the intermediate file 'INIPKG.IMD' and produces INIMRG control file(s) for the NEW, CHANGED and DELETED files. The filenaming convention for these created files is: Standard: '\.MRG' or Package Version: '.PKG' CALL: INIPKG [-H -K -L -M -P -S] [-L ] [-M ] [-P ] [-S ] OPTIONS: ? -? /? -H /h help mode. -K /k keep INIPKG.IMD and 'ORG' files after processing. -L /l produce listing of changed files to filename . -M /m use suffix '' instead of '.MRG' for non-package files. (REGISTERED VERSION OPTIONS) -P /p search directories and files named in the profile file. -S /s produce single file as output (package version). (all .INI file changes written to one '.PKG') RETURNS: 0 = no errors, otherwise errors occurred. 8 = unregistered version violation. NOTES: Some '.INI' files may contain sub-ascii characters, and INIPKG will ignore processing of these files. (ie: v5.0 of QC.INI) '-L' option: An optional listfile may be produced by using the option: '-L' and naming where you wish this file to reside. This file will contain all files that were changed during your installation. (And has made '.MRG' files or a '.PKG' file for.) (REGISTERED VERSIONS ONLY:) '-P' option: See discussion PROFILE: under INISET. If files named in the profile are found, and they do not carry file extension '.INI', '.BAT' or '.SYS', then INIPKG will produce a 'CPY' file and produce code in the '.PKG' file to simply copy that file. * WARNING: The ability of this program to determine the changes to a TEXT file may require you to manually edit the '.PKG' file after creation. Be sure and check the TEXT commands for only those changes you wish to implement. (See PROGRAMMERS NOTES) * '-S' option: Instead of creating a '\.MRG' file for each file that was changed or added, the entire output is bundled into a single '.PKG' with the appropriate commands. (Note that the suffix will be modified to '.PKG'). RULES: All '.INI' file lines must end with a CR/LF. (0x0d 0x0a) Fully Case Sensitive (except on environment variables) Whitespace characters are ignored. LIMITS: Scannable files maximum: (1000) Maximum file size: (MEMORY AVAILABLE UNDER LARGE MODEL) Maximum line length: (256 Bytes) All processing is performed 'in core' and thus adds it's limit to file size. Only 'DOS' native memory is currently used. ***************************************************************************** Discussion of INIMRG v2.10 Program ***************************************************************************** ***************************************************************************** NAME: INIMRG PURPOSE: Modify MicroSoft WINDOWS(tm) '.INI' files and other files via an external control program. USEAGE : INIMRG .??? [[ outfile ] [ options ]] if is not named, output is to '<.\ctlfile>.INI'. (see option 'A' below) OPTIONS: -H /h help mode: (print help message, abort further processing) -S /s silent mode: (no errors displayed) -A /a absolute path is same for and all .INI (REGISTERED VERSION OPTIONS TO STANDARD MODE) -I /I assume all {output} file names are in the control file. (this option is assumed if the suffix is '.PKG'). RETURNS: 0 = Operation completed ... no errors 1 = Destination file problem 2 = Source file problem 3 = Memory allocation problem 4 = Interpreter syntax problem 5 = No current segment 6 = Internal control {filename} problem 7 = Internal copy [filename] problem 8 = Unregistered version violation 9 = Lexical error, TEXT command given on .INI file. 10 = Lexical error, .INI command given on TEXT file. NOTES: 'A' option and the declaration of are mutually exclusive. If 'I' option used, and is named, is ignored. Any '' or '.{output}' file not explicitly named, assumes the file extension is: '.INI'. EXAMPLE1: inimerge system.mrg (output to '.\system.ini') EXAMPLE2: inimerge P:\user\data\system.mrg /A (output to 'P:\user\data\system.ini') EXAMPLE3: inimerge P:\user\data\inimerge.mrg W:\windows\system.ini (output to 'W:\windows\system.ini') EXAMPLE4: inimerge P:\user\data\inimerge.mrg W:\windows\system.ini /A (output to 'P:\user\data\system.ini') (/A option overrides ) (REGISTERED VERSION ADDITIONAL EXAMPLES) EXAMPLE5: inimerge P:\user\data\inimerge.mrg /I (assumes 'package style output' as EXAMPLE 6) EXAMPLE6: inimerge P:\user\data\package.PKG ([multiple] output to '{namedfile[.INI]'}) EXAMPLE7: inimerge P:\user\data\package.PKG -A ([multiple] output to 'P:\user\data\{namedfile[.INI]}' ) RULES: All lines not beginning with a '.' (in position 0) are ignored. All lines must end with a CR/LF. (0x0d 0x0a) Maximum line length: (256 Bytes) A section must be declared prior to any element commands. Fully Case Sensitive. (except on environment variables) See lower case action declaration for explanation of case indepence. Whitespace characters are ignored except on exact match lines. Environment Variable are denoted by '%' as prefix and suffix. '%%' denotes the '%' sign. See ENVIRONMENT: under INISET for discussion. CONTROL FILE COMMANDS: (FILE COMMANDS:) .[ Copy command: structure .[] [] (perform a 'DOS' copy of source to destination.) (If '-A' option is used, Absolute path naming is used) (The characters between '[' and ']' must be a valid filename, but are not checked for validity prior to processing.) (Full pathnames may be included, and '%' environment processing is available) .{ Declare and open/create the output file to process. ie: '.{outfile}' (if the suffix is not declared, assumed is .INI) (If '-A' option is used, Absolute path naming is used) (The characters between '{' and '}' must be a valid filename, but are not checked for validity prior to processing.) (Full pathnames may be included, and '%' environment processing is available) SECTION COMMANDS: (each section command MUST be followed by a [section] argument) NOTE: Each command is normally case sensitive, but can be made case insensitive by using the lower case counterpart of that command. ie: (.R) to (.r) .L locate a [section], make it current, and if not found, skip till next .L, .S, or .R command is found ... or (ie: validating package installation) .R remove this [section] and all elements following (in the named section) from destination file. (ie: de-install software package segment). .S locate a [section], make it current, and not found, append section header to end of file. (ie: initial package installation) ELEMENT COMMANDS: (each element command MUST be followed by an argument) (Element commands are processed on most recently named [section]) .F locate element and replace the current element with the entire source element line. If the element is not found, then the element is appended to the end of the current section. (ie: Find/Add/Update 'element=' statements) .M same as '.F' above but entire line must be an exact match. (ie: Ensuring 'device=device.drv' exist) .D locate element by name in current section and remove it. (ie: Deleting 'element=') (don't need to know argument) .X locate element line in current section and remove it from file. entire line must be an exact match. (must know argument) (ie: Deleting 'device=device.drv') ............................................................................. (REGISTERED VERSIONS: ADDITIONAL TEXT FILE PROCESSING COMMANDS v2.10) .T Declare that the current file is a 'TEXT' file which has no [sections]. (as in a .BAT or .SYS file) (processing is performed globally on the file) (This command is assumed if the file suffix is '.BAT' or '.SYS') (the -A option 'absolute path naming' is suspended for the duration of processing of this declared TEXT file.) You may elect to process an .INI file as a TEXT file with this command, but [section] processing is then not permitted until the next file command occurs. (SUBSTRING COMMANDS:) (Use of these commands on an '.INI' file will abort with exit code 9) .A if the variable name is found, and the substring is not found in it's contents, then append the substring to the end of the current contents. if the variable is not found, then append a new variable to the end of file. (ie: Update 'variable=' statements) .K if the variable name is found, perform a substring search of the contents, and if the substring is found, remove it. if the variable after processing has no contents, then the variable itself is removed. (ie: Remove variable = foo0;'foo1' statements and/or Remove 'variable=' statements) .J Same as '.K' above, but an empty variable name is not removed. (ie: Remove variable = foo;'foo1' statements) (EXCLUDED COMMANDS FOR TEXT FILE PROCESSING:) .L .R .S .l .r .s (Use of these commands will abort with a exit code of 10) (CONTEXT CHANGES FOR TEXT FILES TO ELEMENT COMMANDS:) .F .M .D .X .f .m .d .x (All are performed globally on the file rather than by [section]) ***************************************************************************** Sample control file for inimerge v2.10 ***************************************************************************** Begin processing below with the first '.' encountered (in line position 0) ***************************************************************************** .[WINDLL.001] [WINDLL.DLL] (Perform a 'DOS' copy of '.\source' to '.\destination') .[%windrv%\%windir%\WIN.001] [WIN.XTR] (Perform a 'DOS' copy of pathed source to '.\destination') .{SYSTEM} (write changes to current file (if any), open/create file '.\SYSTEM.INI') (if 'A' option was used, output is to '\SYSTEM.INI') .{C:\%windrv%\filename.ini} (output to named file) (if 'A' option is used, output overrides to '\filename.ini') .S[section] (The above command will be ignored because '.' is not in position 0) .S [SysInit] (locate the section called 'SysInit' and if not found, append to EOF) .F frank=input_valued (locate element 'frank' in '[SysInit]' and replace it's argument with 'input_valued' or add element 'frank' to the end of '[SysInit]' section) .F dick = 110%% (same action as above) (showning escape character '%%' translation to '%') (output will be: "dick = 110%") .D Dad= (find element 'Dad' (if any) in section [Sysinit] and remove it) .M device= device_checked_or_added (merge in device statement to '[Sysinit]' if exact match is not found) .M device=%TMP%\test.drv (same action as above) (showing use of environment variable 'TMP') .R [PackageData] (remove the section '[Packagedata]' along with all it's elements) ............................................................................. (ADDITIONAL EXAMPLES FOR REGISTERED VERSIONS: TEXT FILE PROCESSING) .{C:\AUTOEXEC.BAT} (write changes to current file (if any), open/create file 'C:\AUTOEXEC.BAT') ('-A' option (if used) is ignored for TEXT files) .T (Declare this a TEXT file ... no sections) (Actually, this command is assumed because of the .BAT file suffix) .A PATH=;C:\WINDOWS\NEW_DIR (Add the named path to the PATH variable, or add new PATH variable) .K PATH=;C:\WINDOWS\NEW_DIR (Remove the named path from the PATH variable (if found)) (if the PATH is empty afterwords, remove the PATH variable) .F FILES=50 (Same as .INI command but no section required) (If not found ... append to EOF) .D HSSCAND= (Same as .INI command but no section required) .X HSSCAND=C:\dev\etc ... (Same as .INI command but no section required) ***************************************************************************** ***************************************************************************** PROGRAMMER'S NOTES & WARNINGS: Basic System: operates predictably. DEVICE statement changes are recognized by INIPKG and use the .X and .M actions rather than .D and .F actions. INIPKG produced files always delete the changed variables prior to updating them, this gives you the ability to backtrack to their original settings. Package System: All '.MRG' files are combined into one PACKAGE file. be sure to double check INIPKG's work for requirements of specific placement of an element within a file. Text File Processing: As we all know, DOS is rather disorganized about the way AUTOEXEC.BAT and CONFIG.SYS are configured. There can be many types of 'variable' declarations in these files (or none at all). ie: 1: SET Variable=foo 2: Variable = foo 3: Variable foo 4: C:\foo ... And some variables cannot be relocated. To solve this the INIPKG uses .J and .A rather than .X and .M on TEXT files. INIMRG can be fooled by multiple runs so that if the substring named (in .J) is not exactly what is expected, the modified variable may become corrupt. ie: { ORIGINAL: PATH C:\foo9;C:\foo1;C:\foo2 at INISET. WANTED : PATH C:\foo0;C:\foo1;C:\foo2;C:\foo3 (foo9 to be removed, foo0 & foo3 added) INIPKG .J PATH C:\foo9;C:\foo1;C:\foo2 Output: .A PATH C:\foo0;C:\foo1;C:\foo2;C:\foo3 CURRENT: PATH C:\foo9;C:\fooX;C:\foo1;C:\foo2 (different than ORIGINAL) ^^^^^^^^ Results in no exact substring find during '.J': So ... PATH C:\foo9;C:\foo0;C:\foo1;C:\foo2 C:\foo0;C:\foo1;C:\foo2;C:\foo3 is the unwanted outcome. (foo9 to be removed, foo0 & foo3 added) Manually change '.PKG' To: .J PATH C:\foo9; .A PATH ;C:\foo0 .A PATH ;C:\foo3 CURRENT: PATH C:\foo9;C:\fooX;C:\foo1;C:\foo2 RESULT: PATH C:\fooX;C:\foo1;C:\foo2;C:\foo0;C:\foo3 (in original TEXT file location) Additionally ... note that the PATH ';' separator is not recognized as a 'substring delimitor' and must be hand changed if it is incorrect positionally. } If there is enough response, then I may code in some special action(s) for this situation. ***************************************************************************** Upcoming Additions: INICON v1.0 Insert ICON in specified or created WINDOWS group. ***************************************************************************** Current Versions: MicroSoft 'C' Source Code Available. SINGLE SERVER LICENSE: Register Register Upgrade Upgrade Additional No Source W/Source No Source W/Source License INIMRG v2.10 $200.00 $450.00 $25.00 $50.00 $100.00 INISET/INIPKG v2.10 $125.00 $400.00 $25.00 $50.00 $ 75.00 INIPACK (all packages) $250.00 $650.00 $35.00 $75.00 $125.00 All updates from v2.x to v2.10 are provided free of charge. Registered users will receive INICON v1.0 when available (development is subject to market demand) Payable in U.S. Funds, shipping to U.S.A and Canada is Included. ***************************************************************************** ***************************************************************************** Copyright (c)1994 all rights reserved. Westfall Computer Services 356 Stanley Road Akron, Ohio 44312-2126 Telephone: (216)-733-0994 Modem: (216)-733-0995 (UNIX system: Login as 'register') ***************************************************************************** ***************************************************************************** Disclaimer: W.C.S. accepts NO liability for damages, either consequential or inconsequential, arising from, apparent to, or directly caused by this software package or any element thereof. Responsibility: W.C.S. will gladly fix any error located within this software, and will provide free replacement along with the most current version to registered users. Suggestions are welcomed via Postal Mail or 'email' on our registration system. ***************************************************************************** ***************************************************************************** ***************************************************************************** ***************************************************************************** *****************************************************************************