
LWed - Windows INI file editor.

Version 2.2.7 of 1997-04-25, Copyright 1996,1997 (C) Laszlo Radanyi

TABLE OF CONTENTS____________________________________________________________

1. LICENSE AGREEMENT                            

2. INTRODUCTION

3. USER'S MANUAL
   3.1 Basic functions
   3.2 Advanced functions
   3.3 The built-in help

4. ABOUT THE AUTHOR


1. LICENSE ISSUES____________________________________________________________

This  version  of  LWED is distributed as SHAREWARE.  You may use the program
unlimitedly for 30 days  at which time you have to decide to eighter  discard
the program or register it. You are encouraged to distribute the unregistered
version  of  LWED as  long as the package is not modified.

The  registration  fee is 5 USD,  which  is best  sent  via  snail mail after
contacting the author via email.

By  registering  LWED, you gain a  single user license to the product and you
help the author to make  even  better  products.  Registered users  also have
life-time support for the product via email. All registered  users have right
to all new versions of lwed as long as the license is valid.

Upon registering, the user receives a registered version of the program which
has different license conditions.

THIS PROGRAM  IS DISTRIBUTED  IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT
ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTIBILITY OR FITNESS
FOR A PARTICULAR PURPOSE.

THE  USER  SHOULD  BE   AWARE  OF  THE  RISKS  OF  MANIPULATING  THE  WINDOWS
INITIALIZATION  FILES.   CARELESS  CHANGES  TO  SOME  INI  FILES  MAY  RENDER
THE SYSTEM  UNUSABLE. THE  AUTHOR OF LWED ACCEPTS NO RESPONSIBILITY  FOR  ANY
LOSS OF  FUNCTIONALITY OR  LOSS OF DATA AS RESULT OF THE USE OF THIS PRODUCT.
       
Windows is the registrated trademark of Microsoft Corporation.
4DOS a registered trademark of JP software Inc.


1. INTRODUCTION______________________________________________________________

Lwed  is  a  utility  for  manipulating  Windows(TM)  INI files from DOS. Its
history is simple;  its function may be simple too, but over the years,  LWED
has  grown to  be  able to  do  most  of what a power user should want from a
program of this kind.

The program is  started with a flag for the desired operation and  parameters
for this  operation. Each  action  has a more or less verbose name, which may
make  them  easier  to  remember.  Most  of the functions have a shorter, one
character name too.

There  is  a  built-in   help   system   with  several  pages  of information
on switches.  I  have  tried  to arrange the switches in increasing chance of
usage,  but  the  main  purpose  behind  using pages  is that there  are more
functions than can be showed on a singe page in DOS.

Rather  than  writing  a  command  for changing one value at a time in an INI
file,  LWED  can  MERGE  two  INI  files.  This is done in a straight forward
manner; see the section about '--merge'.

You  are  very  welcome with  comments  about  this program; I am particulary
interested in comments about how the program fits different needs. 

Although  there  are  a  lot  of other  INI  file  manipulating  utilities on
the Internet, I sincerely believe that this is THE one you need.


3. USER'S MANUAL_____________________________________________________________

LWED  is a  DOS  command-line mode program,  and  it  is  aimed at  batch use
that is, it needs command-line arguments to complete a function.

Switches - or modes - can be forward slashes  '/' which is  very common under
DOS,   and  you can  also  use  a  dash  '-'. You need two switch  characters
for  a  verbose  switch,  like  '--' or '//'. Any  other  switches  or switch
combinations  will  cause  LWED  to  exit  and  leave  a short message on the
standard error stream.

The  arguments  used  by  the  program  are  referenced between less-than and
greater-than signs. The names used are as follows:

<ini file name>  The target INI file name.
                 If this file is in the same directory as LWED, only the file
                 name is necessary,otherwise the full path needs to be given.
<section>        The  target section, that is, the INI value  starting  after
                 a string enclosed in brackets as in  [section] and until the
                 next such section name is encountered.
<key>            The  string  before the  first equal sign on one line in the
                 given section.
<value>          The  string  after the  first  equal sign on one line in the
                 given section.
<variable>       The  name  of  the environment  variable to use for the '-e'
                 function.
                     
3.1 Basic functions__________________________________________________________

The basic functions are the most used or  oldest functions; they are probably
what you would expect from a program like this.

-h or --help
    This launches the built-in help system. Read more about it in section 3.3
    
-v or --version
    Prints version information along with registration data  to  the standard
    output stream.  The version information  is necessary  when communicating
    with the author. This  can  also  help  you  to  see  if there is a newer
    version  distributed.  Newer  versions  are  generally  better  since the
    reported bugs are always corrected before new functionality is added.
    
-r or --read
    Prints <value> of <key> to the standard output stream.

-w or --write
    Changes an existing <key> <value> as specified; if the key doesn't exist,
    a new key is created.
     
-a or --append
    Appends  <value> to the current value of <key>. If the key doesn't exist,
    a new key is created. 

-i or --insert
   or --prepend
    Inserts <value> immediately after the equal sign '=' of <key>. If the key
    doesn't exist, a new key is created.

-d or --delete
	Removes <key> from <section>.
    
-m or --merge
   Writes  the contents of <source file> into <target file> just as you would
   write value for value. Please  pay attention to that MERGE does NOT handle
   SYSTEM.INI/[386Enh]  very   well,   since  it  uses   standard  INI  write
   operations; that is, for each [section],  for each key in the source file,
   it writes [Section]/key=value into the target file.  This  means  that the
   first device= statement could be over written several times.

-e or --read_to_environment
   Reads <value> into <variable> in the master environment.  If  the variable
   is not set, a new is written. WARNING: This function relies on Int2E. 4DOS
   users  should  be  particulary  careful  with  this function, see the 4DOS
   manual for more information.

3.2 Advanced functions_______________________________________________________

-c or --comment
    Inserts a comment character ';' before the entry.
    
-q or --write_quoted
    Writes <value> inside of double quotes. For example :
    
    LWED -q TEST.INI section key quotedValue
    
    results in the following entry written into the file TEST.INI in the same
    directory as LWED.EXE:
    
    [section]
    key="quoted value"

--write_blind
    Writes  <key>=<value>  as first entry  in <section> without search for an
    already existing value.
   
--write_pair
    Searches  for  <key>=<value>  under  <section> and  creates the key if it
    doesn't exist. This is essentially the  same function as write,  but this
    one also looks for the supplied value.
    ** NOTE **
    The  pair functions  all are primarily intended to deal with the [386Enh]
    section  in  SYSTEM.INI,  since this section contains a lot of keys named
    'device' but different values.
    
--comment_pair
    Searches for <key>=<value> under <section> and places a comment character
    before the key. This is the same function  as 'write_comment' but it also
    looks for the value.
    
--delete_pair
    Searches for <key>=<value> under <section> and removes the entry.

--delete_section
    Removes <section> from the INI file named <ini file name>.

--read_section
    Prints the entire contents of <section> to the standard	output stream.


3.3 The built-in help________________________________________________________

The  built-in  help  is  invoked  by  issuing  the  command  'LWED'  alone on
the command line or by giving eighter of the '?' 'h' options.

Help consists of three pages, BASIC, ADVANCED and  MISCELLANEOUS.  All  pages
are just written to the standard output.

LWED waits for a keystroke on all screens;  you  can  go  to  eighter page by
pressing '1' (ONE) '2', or '3'.

You exit help by pressing any other key than '1','2' or '3'.


4. ABOUT THE AUTHOR__________________________________________________________

Laszlo Radanyi  is  working  as  ScriptX/C/C++ developer at Linne Interactive
Design in Gothenburg, Sweden.
He can be reached at 'lrd@plea.se' or 'laszlo@interactive.se'.

