                         IniMaint
          Copyright 1992, 1993, 1994 by Carry Associates

IniMaint is an OS/2 PM program to display and manage *.INI files and
is distributed by Carry Associates, 990 Ironwood Court, Marco Island,
FL, 33937-4458. Telephone number is 813-642-9126. The application was
written by and is supported by Larry J. Martin. You can obtain
Technical support by calling the number above, by leaving an Email on
Compuserve for 72662,3616 or for the same ID in the OS2AVEND Forum
Section 1.

The cost for IniMaint is $29.95 for a single user license and $299.00
for an unlimited corporate license. There is a $7.00 shipping and
handling charge to ship a diskette.  Payment can be made via a check
drawn on a US bank, we will invoice against a corporate purchase
order or we will charge either a Visa or MasterCard credit card.

WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

IniMaint gives you the ability to make virtually any change you want
to any of the INI files in your OS/2 environment. Making changes to
these files must be done with care because you can do serious and
unpredictable damage to your environment. It is STRONGLY SUGGESTED
that you insure that you have a usable backup of any INI file that
you modify in any way.

WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

The enclosed is a Version 3.3a of IniMaint and has the following
known problems and/or incomplete features:

1. The Initial Dialog cannot be dismissed using the Enter Key, the
Mouse must be used.

2. If the Groups Dialog is displayed, a new Group is selected and
then OK is selected without actually making any changes to any of the
Groups or the Applications in a Group, then the Last Group Displayed
is not updated and a subsequent use of the Groups Dialog will revert
back to the previous Last Group.

3. There is no Help available for the standard OS/2 New File Dialog.


                 REPORTED COMMENTS OR PROBLEMS

The following items are problems that have been reported, but cannot
be reproduced or comments that I have received from one or more
users. Any assistance on the problems or additions to the comments is
more than welcome.

1. It was pointed out that although the Cursor in the Value MLE can
be an Insert Cursor, there is no way to Insert information. My
response is that the only way to change the length of a Value is by
using the Replace Value Dialog because changing the expected length
of an INI Key Value can cause unusual and unexpected errors. I
further responded that the only way to change the cursor is to
change it System wide, therefore, changing it only when it is in the
MLE is a non trivial problem and I have not attempted to do it even
though it leaves the apparent conflict between the appearance of the
Cursor and the actual effect when a key is depressed.

                        INSTALLATION

To install the this version you must:

1. Run the Install program that is on the supplied diskette and
follow the instructions in the Readme and as displayed by Install.

2. You may optionally add the entry: SET INIMAINT= to your CONFIG.SYS
file specifying the path and filename of an INI file that you want
IniMaint to use to store it's operational information. If this entry
is not found in the Environment, IniMaint will store it's operational
information in the OS2.INI file.

                        OPERATION

The application can be run in either of two modes. Normal Mode will simply 
run the application in the normal manner, starting with the INI File that was 
current that last time the Application was shut down. Tools Mode will run a 
specifc function and, once that function is complete, the application will 
automatically exit.

                        TOOLS MODE

The Install Program created a Tools Folder. This Folder contains an Icon for 
each of the Tools that is appropriate to this application. In order to run a 
specific Tool all you need to do is click on the appropriate Icon. If the 
Tool starts with a Menu, for example Copy, you will see the Menu appear on 
the Desktop and the Tool will execute once a Selection is made. If the Tool 
involves a Dialog, for example Repair INI File, the Dialog will appear on 
the Desktop and the Tool will terminate as soon as the Dialog is dismissed. 
If the Tool simply does some function, for example Backup the Desktop, then 
the function will run and then terminate.

The purpose of the Tools is to make it much easier for the user to use the 
various features of the application without having to navigate through all of 
the Menus. There is no difference between running a feature via the Tools and 
selecting it from the Menu while running in Normal Mode. The Tools run the 
exact same EXE file as the Normal Mode does, the only difference is that the 
Tools pass a parameter to the EXE file telling to to run in Tools Mode and 
which Tool to run.

                       NORMAL MODE

To run IniMaint simply start it by clicking on the IniMaint.EXE file
or start it from the Group to which it has been added. When IniMaint
first comes up, it will default to editing the INI file that is
identified by the system as the user INI file. This is normally
C:\OS2\OS2.INI. The name of the current file is always displayed in
the TITLE bar of the main window.

IniMaint can also be started with an initial INI file specified on
the command line. This allows IniMaint to be started with a new file
by using the command line, but also allows for it to be started by
dropping a file on the ICON on the desktop or double clicking on an
INI file, once the association is set up.

IniMaint will locate the window in a default location, but you can
move and or size the window as you choose. When IniMaint is shut
down, it will remember the file that it was currently working with as
well as the size and location of the window and will restore all of
these the next time it is run.

There are a number of IniMaint functions which will take some time
to execute. For example, the maximum length Key Value that IniMaint
will load into the Key Value Window is 60,000 bytes. Since each line
only displays 8 bytes, this comes to 7,500 lines and it takes well
over a minute. There are other similar types of functions, although
the example is the longest. During these long operations, it is not
possible to do any other IniMaint operations. However, the long
functions are done in separate threads and the Message Queue is not
blocked, therefore it is possible to go do some other, non-IniMaint,
function during this time. In addition, since there are a number of
reasons why a user might not want to wait until the lengthy function
is completed, for example, it might have been selected in error,
any IniMaint operation that takes a long time and displays the Wait
Pointer can be terminated by hitting the ESC key.

IniMaint will normally store the current operating information such
as the size and position of the windows, that INI file that is
currently being edited and a large number of other items, in the User
INI file, OS2.INI. This is sometimes not a convenient location, since
this file gets completely replaced when a new version is installed
and a problem with the OS2.INI file would mean that IniMaint would
not run. IniMaint will use a different INI file and will create the
file, if necessary, if an Environment Variable INIMAINT= is placed in
the CONFIG.SYS file or in a CMD file that executes IniMaint. For
example, if the user wanted IniMaint to use the file INIMAINT.INI in
the C:\OS2\APPS subdirectory, they would code:
    SET INIMAINT=C:\OS2\APPS\INIMAINT.INI

                     GETTING STARTED

If you did not obtain your copy of IniMaint to address a specific
problem or you are not familiar with INI files and the kinds of
things that IniMaint allows you to do with them, then it is strongly
suggested that you review the Getting Started entry in the Help file
along with the other General Help subjects.

                   MAIN WINDOW DESCRIPTION

The Main Window contains three standard child windows. Two of these
windows are Listboxes and the third is a MLE.

The upper left Listbox will always contain the list of Applications
for the current INI file.

The upper right Listbox will contain the list of Key Names for the
Application that is currently selected in the Application Listbox.

The MLE, at the bottom, will contain the hex and ASCII display of the
contents of the Key Name that is selected in the Key Listbox.

The Cursor will normally be forced to the MLE and the value of the
data can be modified by changing either the hex or the ASCII fields
of the MLE. The cursor cannot be moved to any portion of the MLE that
does not contain data that can be modified and any modification to
one type of data, hex or ASCII, will immediately be reflected in the
other data.

The actual data in the INI file is not changed until the user selects
the Update Item on the Action Menu or selects a different Key or
Application in the same INI file. At this time, you will be asked to
confirm that you want the INI file modified, unless you have turned
the warning option off, see below.

                 IniMaint POPUP MENUS

In addition to the standard menu entries described below, each window
has a Popup Menu that will appear when the standard action is taken,
clicking once with the Right Mouse Button is the default. Each of the
three primary windows has its own Menu and the Menu will contain those
items which are general to the entire Application and those that
apply to the entries in that particular window. Most of the items on
these menus are discussed below, however, there are three items on
each menu that are unique to the Popup Menus and they are:

1. Explain will attempt to give the user an explanation of the
meaning of the currently selected Application and Key. Not every
Application will have an explanation, but an attempt has been made to
explain all of the standard OS/2 entries as completely as possible.

2. Write Window to a File will cause the entries in the window in
question to be written to a file, so they could be reviewed without
IniMaint running.

3. Print Window will cause the entries in the Window to be printed on
the default printer.

                 IniMaint MENU OPTIONS

The various IniMaint Menu options are:

1. File gives the user the ability to change INI files, refresh the
current INI file, Dump the contents of the IniMaint variables,
compare two INI files and Exit from IniMaint.

The Compare option allows the user to Compare two INI files on any
one of three different levels:
   A. List Applications that are in one INI file, but not the other.

   B. A. above plus any Key Names that are in one file, but not the
      other.

   C. A. and B. above plus any Key Values that are in both files, but
      are not equal.

The differences are displayed in a Listbox within a Dialog that
allows the user to print or write a listing of the Listbox contents
and/or create an INI file with some or all of the Applications or
Keys that have differences.

2. Options will display a Dialog that gives you the ability to:

   A. Turn off the display of the opening IniMaint Dialog.

   B. Turn off the dialogs that will ask for confirmation before
      Deleting or Modifying the contents of the Current INI file.

3. Groups will display a Dialog that allows you to define and manage
the various Groups for this INI file. A bit of explanation is needed
here. IniMaint gives the user the ability to arrange the applications
in any INI file into Groups. These Groups can then be used in a
number of different IniMaint areas and greatly ease the problems of
handling an INI file with a large number of applications. For
example, the OS2.INI file might be divided into two Groups, System
and Private. The System Group would be the applications put in the
file by OS/2 Install and the Private Group would be the remaining
applications. More or fewer Groups could be defined. How the user can
use Groups within the IniMaint structure will become more clear
below. The Groups Dialog gives the user the ability to define new
Groups, to add and delete Applications and Delete Groups.

The procedure for establishing a new Group is to select Groups in the
Group Dialog, select New Group, and supply a name. Once this is done,
the Title of the Dialog will show the current Group and the new Group
will be added to the Group Menu. You add Applications to the Group by
selecting them in the Listbox.

The Listbox will display a specific Group or, if you want to know if
there are any Applications that are not in a Group, will display all
Groups. A single Application can be a member of up to 5 different
Groups at any one time, so it is possible to define overlapping
Groups.

4. Size will calculate the minimum amount of Disk Space that would be
required for an INI file that contained a selected set of
Applications in the current INI file. When this item is selected, the
user will be asked what he wants to Size. There will always be
several choices, the various standard INI files, the current file and
the currently selected Application. If there are any Groups defined,
then they will be included among the selections. If there are more
than one Group defined, then there will be an All Groups selection.

5. Actions gives the user the ability to do a number of things:

   A. Update Current Key will write any changes that have been made
      to the data in the MLE into the current INI file.

   B. Delete Application and Delete Key will do the obvious.

   C. Add Application, Add Key and Replace Key Value are all the same
      function except entered at different points. Add Application
      will ask for the name of a new Application to add to the
      current INI file and then fall through to the Add Key, since
      the Applications must have at least one Key. The Add Key will
      ask for the name of the new Key and then fall through to the
      Replace Key Value, since any Key Name must have an associated
      Value. This will cause the Key Dialog box to be displayed. The 
      Application and Key Names will be shown at the top of the
      Dialog, followed by the current length of the data, the ASCII
      representation of the data and the hex representation of the
      data. This is the only option that will change the length of
      a Key Value. Care must be taken when doing this, as many
      applications depend on knowing the length of the INI items. As
      the ASCII or hex values are changed, the changes will appear in
      the other window and the length will be updated. The only
      exception is when only a single hex digit is entered. The ASCII
      window is not updated until two hex characters are entered.

   D. Rename and Duplicate Key give the user the ability to change
      the name of an existing Key or to make a duplicate copy of the
      Key using a different Key Name.

   E. Copy and Move will ask the user to select a Target File for the
      Copy/Move and will then give the user the same choices as Size
      above. The selected Applications will then be moved or copied
      to the Target INI file, which will be created, if it does not
      exist. This function is done Key by Key, so it will sometimes
      take some time. However, the PM message queue is not blocked
      while the move/copy is being done. The actual move or copy is
      done by a separate program INICOPY, that can also be run as a
      batch program, see below.

   F. Backup allows for an easy Backup of the System INI File, User 
      INI File or both the System and User INI Files. Once the user
      has selected names for the normal backups for the two files,
      these files will be presented as the default for additional
      backups. The user can set an Option that will bypass asking
      the user if he wants to use the defaults. This selection will
      always delete the target files before doing the backup, which
      is one of the ways it varies from the Copy selection.

6. Recover contains a list of capabilities designed to give the user
the ability to recover from corrupted INI files. These capabilities
are:

   A. Change User and/or System INI Files give the user the ability
      to change the INI files that OS/2 is currently using to new
      files. The primary use of this capability is to allow the user
      to make changes to the User or System INI files that he knows
      need to be made, but cannot make to the current User or System
      Files because of protection built into OS/2. Great care must be
      exercised when doing this, but it will sometimes represent the
      only way that problem entries can be removed from an INI File.

   B. Repair inconsistencies between the INI file and the Desktop.

   C. Condense the Current INI file, the System INI File, the User
      INI File or both the System and User INI Files. The Condense
      is necessary because of the way updating is done to the INI
      files. The updating will leave empty areas in the INI files and
      these areas tend to get fragmented, thus causing the overall
      size of the INI file to grow, sometimes grow very large.
      Condensing the System or User INI files is not a simple task,
      since they cannot be copied or erased while they are being used
      by OS/2. This item switches the files to the copies long enough
      to erase the old files and copy a condensed backup to the
      original names. The only problem this causes is that it will
      reset the desktop to the boot desktop. This function is removed
      for Version 2.1 of OS/2 and beyond, since the handling of the
      INI files was changed to automatically remove the empty space.

   D. There are two items to Test for and Reset the condition where
      the User and System INI files cannot be updated. When this
      condition is found, the user will be asked if he wants to 
      correct the condition and, if he answers yes, the User and
      System INI files will get changed so that they will be able
      to be updated. The process involves making a copy of the INI
      files and switching to them, so it takes a minute or so and
      involves resetting the Desktop.

7. Find allows the user to search the Application Listbox, the Key
Name Listbox, the Key Value MLE, all of the Key Names in the current
INI file, all of the Key Values for the current Application or all of
the Key Values in the current INI file for either an Ascii string or a
Hex value.

                             INICOPY

INICOPY is the program that is used by IniMaint to do the actual
COPY/MOVE operations. This option is implemented as a separate program
so that the user will have the ability to make copies of INI files,
including the User and System INI files, at any time during the day.

The parameters expected by INICOPY are:

Required Parameters:

-Ifilename  - The fully qualified path and filename of the Source,
              Input, INI file.

-Ofilename  - The fully qualified path and filename of the Target,
              Output, INI file. The Target will be created if it does
              not exist.

Optional Parameters:

-Fx         - Function requested - Default is C(opy)
              C = C(opy)
              M = M(ove)

-E          - COPY/MOVE Entire INI file - Default
                                            
-A          - COPY/MOVE All Groups
                                             
-Ggroup     - COPY/MOVE Specific Group
                                             
-Sapp       - COPY/MOVE Specific Application

-T          - Use Fast Copy. This is only valid if -E is also specified
