home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR24
/
INIMT30F.ZIP
/
SYSMAINT.TXT
< prev
next >
Wrap
Text File
|
1994-01-07
|
31KB
|
610 lines
SysMaint
Copyright 1993, Carry Associates
SysMaint is an OS/2 PM program to display and manage *.INI files and
all Extended Attributes. It is distributed by Carry Associates, 990
Ironwood Court, Marco Island, FL, 33937. 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 71435,470 or for
the same ID in the OS2AVEND Forum Section 1.
SysMaint is an extension of IniMaint and shares many of the same
files with IniMaint. Therefore, some of the discussion below will
appear to apply to IniMaint rather than SysMaint. However, because of
the close relationship between the two programs, the discussion
applies to both programs. SysMaint and IniMaint also share some
common files such as documentation files, the same help file and the
same API DLL. In order to ease compatibility problems with those who
are using IniMaint, these common files will still start with ini...
rather than the expected sys....
When SysMaint extracts the Extended Attributes from a file or
directory, the Extended Attributes are placed in a file that has an
internal structure and organization that is very similar to the OS/2
INI files. Therefore, when the user is viewing a set of Extended
Attributes, the appearance of the information is very similar to what
you would see when editing an INI file. This makes the discussions
below, which often refer to INI files, equally applicable to files
which contain Extended Attributes.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
SysMaint gives you the ability to make virtually any change you want
to any of the INI files or any of the Extended Attributes 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 or Extended Attribute that you modify in
any way.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
The enclosed is Version 3.0f of SysMaint 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.CMD file that is on the supplied diskette and
follow the instructions.
2. You may optionally add SysMaint to one of the Groups on your
Desktop.
3. 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
SysMaint to use to store it's operational information. If this entry
is not found in the Environment, SysMaint will store it's operational
infomration in the OS2.INI file.
GETTING STARTED
If you did not obtain your copy of SysMaint to address a specific
problem or you are not familiar with INI files, Extended Attributes
and the kinds of things that SysMaint allows you to do with them,
then it is strongly suggested that you review the Getting Started
entry in the Hlep file along with the other General Help subjects.
OPERATION
To run SysMaint simply start it by clicking on the SysMaint.EXE file
or start it from the Group to which it has been added. When SysMaint
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.
SysMaint can also be started with an initial INI file specified on
the command line. This allows SysMaint 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.
SysMaint will locate the window in a default location, but you can
move and or size the window as you choose. When SysMaint 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 SysMaint functions which will take some time
to execute. For example, the maximum length Key Value that SysMaint
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 SysMaint 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-SysMaint,
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 SysMaint operation that takes a long time and displays the Wait
Pointer can be terminated by hitting the ESC key.
SysMaint 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 SysMaint would
not run. SysMaint will use a different INI file and will create the
file, if necessary, if an Environment Variable SysMaint= is placed in
the CONFIG.SYS file or in a CMD file that executes SysMaint. For
example, if the user wanted SysMaint to use the file SysMaint.INI in
the C:\OS2\APPS subdirectory, they would code:
SET INIMAINT=C:\OS2\APPS\SYSMAINT.INI
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 or Current set of Extended Attributes.
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 or Extended Attribute 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 or Extended Attribute
file. At this time, you will be asked to confirm that you want the
INI or Extended Attribute file modified, unless you have turned the
warning option off, see below.
SysMaint 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 thos
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
SysMaint running.
3. Print Window will cause the entries in the Window to be printed on
the default printer.
SysMaint MENU OPTIONS
The various SysMaint Menu options are:
1. File gives the user the ability to change INI or Extended Attribute
files, refresh the current INI or Extended Attribute file, Dump the
contents of the SysMaint variables, compare two INI or Extended
Attribute files and Exit from SysMaint.
The Compare option allows the user to Compare two INI or Extended
Attribute files on any one of three different levels:
A. List Applications that are in one INI or Extended Attribute 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 or Extended Attribute 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 SysMaint Dialog.
B. Turn off the dialogs that will ask for confirmation before
Deleting or Modifying the contents of the Current INI or
Extended Attribute file.
3. Groups will display a Dialog that allows you to define and manage
the various Groups for this INI or Extended Attribute file. A bit of
explanation is needed here. SysMaint gives the user the ability to
arrange the applications in any INI or Extended Attribute file into
Groups. These Groups can then be used in a number of different
SysMaint areas and greatly ease the problems of handling an INI or
Extended Attribute file with a large number of applications. For
example, the OS2.INI or Extended Attribute file might be divided into
two Groups, System and Private. The System Group would be the
applications put in the file by OS2 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 SysMaint 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 or Extended Attribute file that contained a
selected set of Applications in the current INI or Extended Attribute
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 or Extended Attribute 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 or Extended Attribute 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 or Extended Attribute 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 or Extended Attribute 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 or Extended Attribute 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 inconsistancies between the INI files 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 currrent
INI or Extended Attribute file, all of the Key Values for the current
Application or all of the Key Values in the current INI or Extended
Attribute file for either an Ascii string or a Hex value.
8. The Desktop menu has a number of entries that are associated with
the maintenance of the Desktop.
A. A Defaults Dialog that allows the user to set various Default
entries and values for the Desktop Items.
B. Reset Desktop will simply reset WPS and is normally used for
testing purposes. However, there are certain kinds of manual
changes that can be made to the OS2.INI and OS2SYS.INI files
that require that the WPS be reset in order for them to become
effective and this entry will accomplish the reset.
C. Backup Desktop will make a Simple Backup of the Desktop. This
menu item will maintain the number of backup generations
currently specified in the Desktop Defaults.
D. Create Backup CMD file will generate a CMD file using the name
that is specified in the Defaults Dialog and generate a CMD
file that will create a Simple Backup of the Desktop, including
maintenance of the number of generations that are specified in
the Defaults.
E. Create Restore CMD File will create a CMD file that can only be
run when the PM Shell and WPS are not active, such as after a
boot from a diskette. This CMD file will accept a generation
number as a parameter and, if no generation is specified, will
default to generation 01, tell the user that the default is
being used and only do the restore with the default if the user
hits the enter key.
F. Restore the Desktop ID will fix the problem where the Desktop
Menu has lost the items which are unique to the Desktop, such
as Shutdown. This condition is caused by a problem in the
Extended Attributes for the Desktop Directory and this menu
item will fix that problem.
G. Restore Desktop Directory will restore the Desktop Directory
structure from any one of the generations of Simple Backup
files created by the Backup facilities of SysMaint. While this
can be done while WPS and PM are active, it can cause a problem
if there is anything else running at the time.
H. Restore Desktop INI Files is similar to the item above, except
it will restore the OS2.INI and OS2SYS.INI files from the
backup. Once again, it can be done while WPS and PM are active
but problems can occur if other things are running while this
restore is being done.
9. Extended Attributes is the menu used to access Extended Attributes
for a file, directory or a group of files and/or directories. The
menu structure has two levels. The first selection is the function
desired and this will caus a second menu to appear which will allow
selection of which files and/or directories the function should apply
to. All of these are described more completely in the online help
files.
Many of the Extended Attribute functions involve taking the Extended
Attributes from one set of files and/or directories and adding them
to another set of files and/or directories. In order to do this,
SysMaint must have a way of deciding which files and directories
match each other. The basic way this is done is by removing the base
information from each path and doing the compare on the remainder of
the name. For example, if the Extended Attributes for all of the
files and directories in the C:\OS2\SOURCE directory were to be
copied to the D:\TARGET directory, then the file
C:\OS2\SOURCE\FILE.NME would be determined to match
D:\TARGET\FILE.NME and the Extended Attributes for the FILE.NME file
would be copied from one file to the other. In addition, the
directory C:\OS2\SOURCE\SUBDIR1 would be determined to match
D:\TARGET\SUBDIR1 and the directory Extended Attributes would be
copied from one directory to the other.
Aside from the functions that act on the Extended Attributes, there
are a few utility functions on this menu:
A. Defaults will present a Dialog box that allows the user to set the
various defaults for the Extended Attribute menu operations.
B. Describe Current File will tell the user the selection criteria
used to create the set of Extended Attributes that are currently
being displayed in the window. This information is kept in special
control areas of the file and is not visible, thus the need to give
the user some way of verifying the source for the current set of
Extended Attributes.
C. Update From Currnet File will use the Extended Attribute
information in the currently displayed file and the internal control
information to Join the displayed Extended Attribute information to
the files and/or directories from which it was extracted. For
example, if a user want to modify the Extended Attributes for some
files and/or directories they would use View to extract the Extended
Attributes to a temporary file, use the normal editing capabilities
to make the desired modifications and then use Update to replace the
Extended Attributes for the files and/or directories.
The available functions are:
A. View allows the user to view and, if desired, modify the Extended
Attributes.
B. Test will examine the Extended Attributes for the selected set of
files and/or directories and present a window that will tell the user
whether the Extended Attributes are valid or invalid.
C. Save will copy the Extended Attributes to a save file which can
later be used to View the Extended Attributes or can be used to Join
them back to the original files and/or directories.
D. Copy will Copy the Extended Attributes from one set of files
and/or directories to another set of files or directories. The
Extended Attributes of the original files are not modified. The
Extended Attributes will be attached to files and/or directories on
the Target based on the name matching algorithm described above.
E. Move does exactly the same thing as the Copy does with the
exception that the Extended Attributes for the Source files and/or
directories will be deleted.
F. Split does the same as Move, except the Extended Attributes are
added to a file that can be Viewed or used to Join the Extended
Attributes to another set of files and/or directories.
G. Join takes the Extended Attributes in a Saved, or Split file and
rejoins them to the files and/or directories selected. If the
Extended Attributes are not Joined to the original files and/or
directories, then the matching algorithm above will be used to
determine which files and/or directories to update.
H. Compare will compare the Extended Attributes for one set of files
and/or directories to those for another set of files and/or
directories. The matching algorithm described above is used to
determine which sets of files and/or directories should be compared
to each other.
I. Compare to Saved EAs will compare the Extended Attributes for a
set of files and/or directories to the Extended Attributes in a Saved
or Split EA file. This can be used to see what kind of changes were
made to the Extended Attributes for a set of files and/or directories
because of some action on the Desktop.
Once the function is selected, the list of what type files and/or
directories the function should apply to is presented. These
selections and their effects are:
A. Single File will perform the function against a single file. The
user will be presented with a file selection dialog that will allow
them to select the file.
B. Single Directory will perform the function against a single
directory. The user will be presented with a modified file
selection dialog that will only show the drive and directory entries.
The directory must be selected by double clicking on the desired
directory. Simply selecting the directory and then clicking on OK
will not work because of the way that the file selection dialog
handles the various mesages.
C. All Files in Directory will perform the function against all the
files in a selected directory. The user will be presented with a
modified file selection dialog that will only show the drive and
directory entries. The directory must be selected by double clicking
on the desired directory. Simply selecting the directory and then
clicking on OK will not work because of the way that the file
selection dialog handles the various mesages.
D. All Directories in Directory will perform the function against
all the subdirectories in a selected directory. The user will be
presented with a modified file selection dialog that will only show
the drive and directory entries. The directory must be selected by
double clicking on the desired directory. Simply selecting the
directory and then clicking on OK will not work because of the way
that the file selection dialog handles the various mesages.
E. All Files & Dirs. in Directory will perform the function against
all the files and subdirectories in a selected directory. The user
will be presented with a modified file selection dialog that will
only show the drive and directory entries. The directory must be
selected by double clicking on the desired directory. Simply
selecting the directory and then clicking on OK will not work because
of the way that the file selection dialog handles the various
mesages.
F. All Files in Directory and SubDirs. is the same as C. above,
except that SysMaint will include not only the files in the
directory but any files found in any subdirectory of the selected
directory.
G. All Directories in Directory and SubDirs. is the same as D. above,
except that SysMaint will include not only the subdirectories in the
directory but any subdirectories found in any subdirectory of the selected
directory.
H. All Files & Dirs. in Directory and SubDirs. is the same as E.
above, except that SysMaint will include not only the files and/or
subdirectories in the directory but any files and/or subdirectories
found in any subdirectory of the selected directory.
I. All Files on Drive will perform the function against all the
files on a selected drive. The user will be presented with a
modified file selection dialog that will only show the drive
entries. The drive must be selected followed then the OK box.
J. All Directories on Drive will perform the function against all the
directories on a selected drive. The user will be presented with a
modified file selection dialog that will only show the drive
entries. The drive must be selected followed then the OK box.
K. All Files & Directories on Drive will perform the function against
all the files and/or directories on a selected drive. The user will
be presented with a modified file selection dialog that will only
show the drive entries. The drive must be selected followed then the
OK box.
INICOPY
INICOPY is the program that is used by SysMaint 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 or Extended Attribute files,
including the User and System INI or Extended Attribute 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 or Extended Attribute file.
-Ofilename - The fully qualified path and filename of the Target,
Output, INI or Extended Attribute 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 or Extended Attribute 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