home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / ENV_31.ZIP / ENVIRON.DOC < prev    next >
Text File  |  1993-08-21  |  30KB  |  573 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.   █████████   ███   ███   ███   ███   ███   ████████     ███████    ███   ███
  16.   ███▒▒▒▒▒▒▒  ████  ███▒  ███▒  ███▒  ███▒  ███▒▒▒███   ███▒▒▒███   ████  ███▒
  17.   ███▒        █████ ███▒  ███▒  ███▒  ███▒  ███▒  ███▒  ███▒  ███▒  █████ ███▒
  18.   ████████    ███▒█▒███▒  ███▒  ███▒  ███▒  ████████▒▒  ███▒  ███▒  ███▒█▒███▒
  19.   ███▒▒▒▒▒▒   ███▒█████▒   ███ ███▒▒  ███▒  ███▒███▒▒   ███▒  ███▒  ███▒█████▒
  20.   ███▒        ███▒ ████▒   ███▒███▒   ███▒  ███▒ ███    ███▒  ███▒  ███▒ ████▒
  21.   █████████   ███▒  ███▒    ▒███▒▒▒   ███▒  ███▒  ███    ███████▒▒  ███▒  ███▒
  22.    ▒▒▒▒▒▒▒▒▒   ▒▒▒   ▒▒▒      ▒▒▒      ▒▒▒   ▒▒▒   ▒▒▒    ▒▒▒▒▒▒▒    ▒▒▒   ▒▒▒
  23.  
  24.                                   Version 3.1
  25.                                 August 21, 1993
  26.  
  27.  
  28.  
  29.                        Copyright 1992, 93 by David E. Key
  30.                                 Arlington, Texas
  31.  
  32.                              CompuServe 76264,1532
  33.  
  34.  
  35.                                TABLE OF CONTENTS
  36.      _____________________________________________________________________
  37.  
  38.  
  39. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  40.  
  41. OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  42.  
  43. CHAPTER 1 - SYSTEM REQUIREMENTS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
  44.       HARDWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
  45.       A NOTE ON VIDEO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
  46.  
  47. CHAPTER 2 - EXECUTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  48.       USER SELECTED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  49.             Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  50.             Delete with Configuration File . . . . . . . . . . . . . . . . . . . . . . . . .  6
  51.             User Specified Delete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  52.             Restore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
  53.             User Specified Insert. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
  54.       AUTOMATIC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
  55.             Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
  56.             Delete with Configuration File . . . . . . . . . . . . . . . . . . . . . . . . .  8
  57.             User Specified Delete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
  58.             Restore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  59.             User Specified Insert. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  60.  
  61. CHAPTER 3 - COMMAND LINE PARAMETERS. . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  62.       DESCRIPTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  63.       AVAILABLE COMBINATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  64.  
  65. CHAPTER 4 - RELATED FILES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  66.       SAVED ENVIRONMENT FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  67.       CONFIGURATION FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  68.  
  69. CHAPTER 5 - LIMITATIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  70.  
  71.  
  72.                                   INTRODUCTION
  73.      _____________________________________________________________________
  74.  
  75.  
  76. ENVIRON's reason for existence is to solve the now quite popular (and rather
  77. irksome) practice of each application needing a battery of environment vari-
  78. ables ... especially those on the network that administrators use to control
  79. the working environment.  The program is designed for use in batch files after
  80. the user becomes comfortable with the workings by using the "user selected"
  81. mode.  Using a little creativity, you should find it quite easy to accomplish
  82. just about anything that has to do with these little critters.
  83.  
  84. If you find ENVIRON useful, a gift of any amount would be appreciated.  There
  85. is no warranty of any kind.  The copyright owner does not warrant that the
  86. software will meet your requirements or that it is error free, nor may the
  87. copyright owner be help responsible for any loss of profits or data.  Whether
  88. you like the software or not, I would appreciate any comments related to
  89. problems you're having or suggestions for improvement.  Please address all
  90. correspondence to:
  91.  
  92.                            David E. Key
  93.                            6018 Lakehurst Court
  94.                            Arlington, TX  76016-1024
  95.  
  96.  
  97.  
  98.                                     OVERVIEW
  99.      _____________________________________________________________________
  100.  
  101.  
  102. ENVIRON is a utility that can be used to delete selected variables from the DOS
  103. master environment, storing those selected to a file before it does so.  It can
  104. also be used to restore these saved variables, or a selected subset thereof to
  105. the master environment.  In addition, variables and their contents can be
  106. inserted into the master environment much like using DOS' "SET" command.  There
  107. are two modes of operation; "user selected" and "automatic".
  108.  
  109. "User selected" presents a screen showing the variables, and offering the user
  110. the opportunity to mark them for deletion or restoration.  There are several
  111. options within this mode that can be specified via command line parameters. 
  112. Discussion of these is deferred to the following chapters.
  113.  
  114. "Automatic" simply runs the program "silently" (i.e. no screens are presented
  115. or messages are printed as long as execution completes successfully).  If
  116. execution is completed successfully a value of 0 is returned to DOS upon
  117. termination.  Otherwise a value of 1 is returned.  This mode also provides for
  118. several command line parameters.
  119.  
  120.  
  121.                          CHAPTER 1 - SYSTEM REQUIREMENTS
  122.      _____________________________________________________________________
  123.  
  124.  
  125. HARDWARE
  126. --------------------------------------------------------------------------
  127. The ENVIRON.EXE program requires about 96K of memory.  It was developed and
  128. tested exclusively under MS-DOS 5.00.  How it will behave under another operat-
  129. ing system, I have no idea.  However, because of the method used to "grab" the
  130. master environment, I feel fairly comfortable that it should not be a problem. 
  131. The code is written in C++ and should run on anything greater than or equal to
  132. an 80x86.  There are no floating point routines, so performance with a coproc-
  133. essor is moot.  Disk size is certainly no issue.  The only additional file
  134. space required by the program is equal to the size in bytes of the variables
  135. removed from the environment plus 2 times the number of variables plus 81
  136. bytes.
  137.  
  138. A NOTE ON VIDEO
  139. --------------------------------------------------------------------------
  140. ENVIRON writes directly to video memory in "user selected" mode and uses the
  141. following steps to determine what that address should be.  First, the mode is
  142. tested and if it is not equal to 7 the address is set to B800h.  If the mode is
  143. 7, the address used is B000h.  If the mode is equal to 3, color is added,
  144. otherwise text is presented in black and white.  If you experience video
  145. problems it can probably be traced to the above.  "Automatic" mode uses no
  146. video except upon error such as being unable to find the saved environment
  147. file, or being unable to change directories.
  148.  
  149.  
  150.                              CHAPTER 2 - EXECUTION
  151.      _____________________________________________________________________
  152.  
  153. USER SELECTED
  154. --------------------------------------------------------------------------
  155.       Delete
  156.       ------
  157.       In "user selected" delete mode a screen similar to the following example
  158.       is presented:
  159.  
  160. ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ DELETE MODE ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  161. ╔═════════════════════════════════════════════════════════════════════════════╗
  162. ║                                 ENVIRON.EXE                                 ║
  163. ║                       Environment Manipulation Utility                      ║
  164. ║                                 Version 3.1                                 ║
  165. ╚═════════════════════════════════════════════════════════════════════════════╝
  166.  
  167. √  PROMPT=$P$G
  168. √  TIGA=-MC:\TIGA -LC:\TIGA
  169. √  CLIPPER=F65,R26,V022,E0,X64
  170. √  RIMID=C6
  171. √  COMSPEC=C:\COMMAND.COM
  172. √  PATH=C:\;C:\DOS5;C:\PCTOOLS;C:\UTIL;C:\XTGOLD;C:\BORLANDC\BIN;C:\NORTON; ...
  173. √  S_1=Home
  174. √  S_2=of
  175. √  S_3=the
  176. √  S_4=free
  177. √  S_5=and
  178.  
  179.            ┌──────────────────────────────────────────────────────┐
  180.            │ Use arrow keys () to highlight item  █  F7 to mark │
  181.            │ / unmark  █  F2 to write selected  variables to file │
  182.            │ and remove from environment █ F10 to abort operation │
  183.            └──────────────────────────────────────────────────────┘
  184. ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ PGDN / PGUP for more ... ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  185.  
  186.       The top line of the screen provides information on the mode of operation. 
  187.       In this case, "DELETE MODE".  The available keys are listed in the out-
  188.       lined box near the bottom of the screen.  Not shown here, but obvious in
  189.       the program, the currently selected item is highlighted in BLACK on
  190.       LIGHTGRAY.  The arrow keys can be used to move up and down the list of
  191.       selections.  Those items that are marked with a "√" character are "select-
  192.       ed".  Selection can be toggled on and off by pressing the F7 key.  In this
  193.       mode all items are selected by default when the program is started.  If
  194.       there are more than 11 variables in the environment, a message is dis-
  195.       played on the bottom of the screen stating that PGDN or PGUP can be
  196.       pressed to view the next (or previous) screen of variables.  If any one
  197.       variable is greater than 74 characters in length, it is displayed with 3
  198.       trailing dots (...).  Not to worry, this is merely for cosmetics, the true
  199.       value is still "in there."  However, you would probably think that a good
  200.       program would let you use the right and left arrow keys to view the rest
  201.       of it.  Unfortunately, this isn't one of those kind of "good ones."  Once
  202.       all selections have been made, F2 can be pressed to write out the selected
  203.       variables to the "save" file and to remove them from the environment.  Of
  204.       course, there is an abort key ... pressing F10 at any time discards all
  205.       changes and returns you to DOS.  No changes are made in this instance.
  206.  
  207.  
  208.       Delete with Configuration File
  209.       ------------------------------
  210.       In "user selected" delete with configuration file mode the screen appears
  211.       exactly the same as that for "user selected" delete mode except that the
  212.       items specified in the configuration file are rendered unselectable. 
  213.       Their status is noted on color displays in DARKGRAY on BLUE.  On non-color
  214.       monitors their colors are LIGHTGRAY on BLACK.  It is impossible to over-
  215.       ride their status because the arrow keys cannot be used to highlight them. 
  216.       The top line of screen indicates "RESTRICTED DELETE MODE".  See Chapter 4,
  217.       "RELATED FILES", for a discussion of the configuration file. 
  218.  
  219.       User Specified Delete
  220.       ---------------------
  221.       This mode should not be confused with "user selected" delete mode.  In
  222.       this mode, wildcard parameters are given that specify which variables
  223.       should be marked for deletion by default, as opposed to which variables
  224.       should NOT be deleted by using the configuration file, or selecting them
  225.       all.  Once again, the screen appears exactly the same as that for "user
  226.       selected" delete mode except that the items matching the wildcard parame-
  227.       ters are marked for deletion with those not matching not being marked. 
  228.       All items are available for marking/unmarking in this mode.  The top line
  229.       of screen indicates "DELETE MODE".
  230.  
  231.       The wildcard parameters follow the same form as those used by DOS when
  232.       specifying file names to be acted upon by the operating system.  The
  233.       exception to this is that the "?" character is not supported.  If this
  234.       character is used, ENVIRON will search for it explicitly in the list of
  235.       environment variables.  The "*" is supported in one instance only per
  236.       wildcard parameter and may occur anywhere in the string.  Each wildcard
  237.       parameter MUST be separated by one space and should follow a SINGLE "/S:"
  238.       parameter.  A space after the initial "/S:" specifier is optional.  Some
  239.       examples:
  240.  
  241.       The parameter "AS*" would find:
  242.  
  243.                   ASCII
  244.                   ASKME
  245.                   ASTER
  246.  
  247.             it would NOT find:
  248.  
  249.                   FAST
  250.                   RASTER
  251.  
  252.       The parameter "*ED" would find:
  253.  
  254.                   ACTED
  255.                   SUPPORTED
  256.                   SEPARATED
  257.  
  258.             it would NOT find:
  259.  
  260.                   MEDELY
  261.                   BEDS
  262.  
  263.  
  264.       The parameter "FILE*BIG" would find:
  265.  
  266.                   FILE01BIG
  267.                   FILE02BIG
  268.  
  269.             it would not find:
  270.  
  271.                   FIL001BIG
  272.                   FIL002BIG
  273.  
  274.       It should be noted that the wildcard specifier is optional.  If the "*" is
  275.       not found when the selections are being parsed, an explicit match will be
  276.       attempted.  If the environment variable exists it will be deleted along
  277.       with those specified using a wildcard.
  278.  
  279.       Restore
  280.       -------
  281.       In "user selected" restore mode a screen similar to the following example
  282.       is presented:
  283.  
  284. ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ RESTORE MODE ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  285. ╔═════════════════════════════════════════════════════════════════════════════╗
  286. ║                                 ENVIRON.EXE                                 ║
  287. ║                       Environment Manipulation Utility                      ║
  288. ║                                 Version 3.1                                 ║
  289. ╚═════════════════════════════════════════════════════════════════════════════╝
  290.  
  291. √  NU=C:\NORTON
  292. √  S_FILEDIR=Z:\STATION\C6\
  293. √  S_FILE=49
  294. √  S_LOGIN=DAVID
  295. √  S_DRIVE=F:
  296. √  OS=MSDOS
  297. √  VER=V5.00
  298. √  S_DOS=V5.00
  299. √  S_MENU=RISKMAIN
  300. √  S_PROJECT=RISK_MANAGEMENT
  301. √  PRT_GROUP=RISK_PRT
  302.  
  303.            ┌──────────────────────────────────────────────────────┐
  304.            │  Use arrow keys () to  highlight item   █   F7 to  │
  305.            │  mark / unmark  █  F2 to insert  selected variables  │
  306.            │  into  environment   █   F10  to  abort   operation  │
  307.            └──────────────────────────────────────────────────────┘
  308. ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ PGDN / PGUP for more ... ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  309.  
  310.       The screen appears exactly the same as that for "user selected" delete
  311.       mode except that the F2 key restores the saved environment variables to
  312.       the master environment.  All other keys perform the same function as that
  313.       described above.  It should be noted that if all variables from the file
  314.       are not restored, those excluded are lost forever.  An ASCII file of the
  315.       same format could be created to restore these variables later if so
  316.       desired.
  317.  
  318.  
  319.       User Specified Insert
  320.       ---------------------
  321.       In specified insert mode the user may specify variables to insert into the
  322.       environment.  This option functions virtually the same as DOS' "SET"
  323.       command.  Each pattern parameter MUST be separated by one space and should
  324.       follow a SINGLE "/M:" parameter.  A space after the initial "/M:" specifi-
  325.       er is optional. For example, "ENVIRON /M:FOO=BAR FCC=COMM", would insert
  326.       the variables, "FOO" and "FCC" into the environment with the values of
  327.       "BAR" and "COMM" respectively.  This option may also be used in conjunc-
  328.       tion with restore mode (described above).  In this instance those vari-
  329.       ables specified with the "/M:" option are inserted into the environment as
  330.       well as those found in the saved environment file.  It should be noted
  331.       that the contents of the "/M:" option will override any identical variable
  332.       found in the saved file.
  333.  
  334. AUTOMATIC
  335. --------------------------------------------------------------------------
  336.       Delete
  337.       ------
  338.       "Automatic" delete mode performs the same function as "user selected"
  339.       delete mode except that no operator intervention is required or allowed. 
  340.       Unless some sort of unusual error occurs such as being unable to find a
  341.       specified directory or file, operation proceeds "silently" and a value of
  342.       0 is returned to DOS upon completion.  If an error occurs a value of 1 is
  343.       returned to DOS.  As with "user selected" delete, the default is to delete
  344.       all variables from the environment.  This is probably not the desired
  345.       effect so "automatic" delete with configuration file mode is provided to
  346.       retain those variables contained in the configuration file.  Automatic
  347.       user specified delete mode can also be used to filter the variables that
  348.       are removed.
  349.  
  350.       Delete with Configuration File
  351.       ------------------------------
  352.       "Automatic" delete with configuration file mode operates the same as its
  353.       "user selected" cousin except that no operator intervention is required or
  354.       allowed.  Unless some sort of unusual error occurs such as being unable to
  355.       find a specified directory or file, operation proceeds "silently" and a
  356.       value of 0 is returned to DOS upon completion.  If an error occurs a value
  357.       of 1 is returned to DOS.  As with the "user selected" mode, the default is
  358.       to delete all variables from the environment except those contained in the
  359.       configuration file.
  360.  
  361.       User Specified Delete
  362.       ---------------------
  363.       "Automatic" user specified delete mode operates the same as its "user
  364.       selected" cousin except that no operator intervention is required or
  365.       allowed.  Unless some sort of unusual error occurs such as being unable to
  366.       find a specified directory or file, operation proceeds "silently" and a
  367.       value of 0 is returned to DOS upon completion.  If an error occurs a value
  368.       of 1 is returned to DOS.  As with the "user selected" mode, the default is
  369.       to delete all variables from the environment that match the wildcard
  370.       parameters specified on the command line.
  371.  
  372.  
  373.       Restore
  374.       -------
  375.       "Automatic" restore mode performs the same function as "user selected"
  376.       restore mode except that no operator intervention is required or allowed. 
  377.       Unless some sort of unusual error occurs such as being unable to find a
  378.       specified directory or being unable to find the saved environment file,
  379.       operation proceeds "silently" and a value of 0 is returned to DOS upon
  380.       completion.  If an error occurs a value of 1 is returned to DOS.  As with
  381.       "user selected" restore, the default is to restore all variables to the
  382.       environment.  If this is not the desired effect, the saved environment
  383.       file could be edited to include only those needed.
  384.  
  385.       User Specified Insert
  386.       ---------------------
  387.       "Automatic" user specified insert performs the same function as "user
  388.       selected" specified insert except that no operator intervention is re-
  389.       quired or allowed.  Unless this option is used with the "restore" option
  390.       and an error occurs, operation proceeds "silently" and a value of 0 is
  391.       returned to DOS upon completion.  If an error occurs a value of 1 is
  392.       returned to DOS.
  393.  
  394.  
  395.                       CHAPTER 3 - COMMAND LINE PARAMETERS
  396.      _____________________________________________________________________
  397.  
  398. DESCRIPTION
  399. --------------------------------------------------------------------------
  400. Usage: 
  401.   C:\>ENVIRON </D[-(save file] | /R[-(save file] | /S:<wildcard(s)> | 
  402.               /M:<pattern(s)>> /C[-(config file] /A /H
  403.  
  404. Available Parameters:
  405.  
  406.       /H                -     Display online help screens.
  407.       /D[-(save file]   -     Delete variables from the environment optionally spec-
  408.                               ifying where to save the variables removed.  Or, in
  409.                               combination with the "/S" parameter, specify where to
  410.                               save the environment variables.
  411.       /C[-(config file] -     Use configuration file to specify those variables that
  412.                               should be excluded from deletion, optionally specify-
  413.                               ing where to find the configuration file.
  414.       /S:<wildcard(s)>  -     Delete all variables that match a specified pattern
  415.                               using the familiar DOS "*" wildcard character.  Multi-
  416.                               ple patterns can be specified by separating them with
  417.                               one space.  The "*" wildcard character is not required
  418.                               in which case the pattern is matched explicitly.  Use
  419.                               in combination with "/D" to specify where the vari-
  420.                               ables removed from the environment should be stored.
  421.       /R[-(save file]   -     Restore saved variables to the environment, optionally
  422.                               specifying where to find the saved file if other than
  423.                               the default.
  424.       /M:<pattern(s)>   -     Insert specific variables and their contents into the
  425.                               environment.  Multiple patterns can be specified by
  426.                               separating them with one space.  May be used in con-
  427.                               junction with the "/R[-(save file]" parameter to con-
  428.                               currently restore those variables saved in a file.
  429.       /A                -     Automatic mode, no user intervention required or al-
  430.                               lowed.
  431.  
  432. AVAILABLE COMBINATIONS
  433. --------------------------------------------------------------------------
  434. --------------------------------|  /H  |----------------------------------
  435. Display online HELP screens.
  436.  
  437. --------------------------| /D[-(save file]  |----------------------------
  438. User selected DELETE mode, default is delete all.  Optional file name specifies
  439. the drive, path, and name of the file in which to save the variables removed
  440. from the environment.  By default this file is saved in the root directory of
  441. the drive on which ENVIRON.EXE resides.
  442.  
  443. ----------------|  /D[-(save file] /C[-(config file]  |-------------------
  444. User selected DELETE mode, deletes all environment variables except those
  445. specified in the configuration file.  The optional, "/D" "save file" parameter
  446. functions the same as outlined above under "/D[-(save file]".  Optional "config
  447. file" specifies the drive, path, and name of the configuration file.  By
  448. default the configuration file is searched for in the same directory ENVIRON.-
  449. EXE is stored in.
  450.  
  451.  
  452. -----------------------|  /D[-(save file] /A  |---------------------------
  453. Automatic DELETE mode, default is delete all.  The optional, "/D" "save file"
  454. option functions the same as outlined above under "/D[-(save file]".  This is
  455. not a recommended combination as it will nuke everything in your environment.
  456.  
  457. --------------|  /D[-(save file] /C[-(config file] /A  |------------------
  458. Automatic DELETE mode, deletes all environment variables except those contained
  459. in the configuration file.  The optional, "/D" "save file" and "/C" "config
  460. file" parameters function the same as outlined above under "/D[-(save file]
  461. /C[-(config file]".
  462.  
  463. ------------------------|  /S:<wildcards(s)>  |---------------------------
  464. User specified DELETE mode.  Deletes only those variables matching the pat-
  465. tern(s) specified as wildcard(s).  All wildcard patterns must follow the first
  466. and only "/S:".  Subsequent wildcard patterns (after the first) must have 1 and
  467. only 1 space separating them.  Those patterns specified without the wildcard
  468. character will be matched explicitly.
  469.  
  470. ----------------------|  /S:<wildcards(s)> /A  |--------------------------
  471. Automatic DELETE mode.  Deletes only those variables matching the pattern(s)
  472. specified as wildcard(s).  All wildcard patterns must follow the first and only
  473. "/S:".  Subsequent wildcard patterns (after the first) must have 1 and only 1
  474. space separating them.  Those patterns specified without the wildcard character
  475. will be matched explicitly.
  476.  
  477. ------------------|  /S:<wildcards(s)> /D[-(save file]  |-----------------
  478. User selected DELETE mode.  "/S:" "wildcard(s)" parameter functions the same as
  479. outlined above under "/S:<wildcards(s)>".  The "/D" "save file" parameter
  480. serves ONLY to specify the location for storing the saved environment file.
  481.  
  482. -----------------|  /S:<wildcards(s)> /D[-(save file] /A  |---------------
  483. Automatic DELETE mode.  Functions the same as outlined above under "/S:<wild-
  484. cards(s)> /D[-(save file]".
  485.  
  486. -------------------------|  /R[-(save file]  |----------------------------
  487. User selected RESTORE mode, default is restore all variables contained in the
  488. saved environment file.  Optional file name specifies the drive, path, and name
  489. of the file in which the variables removed from the environment are saved.  By
  490. default this file is saved in the root directory of the drive on which
  491. ENVIRON.EXE resides.  The "save file" option MUST be used if the environment
  492. variables were saved in any location other than the default.
  493.  
  494. -----------------------|  /R[-(save file] /A  |---------------------------
  495. Automatic RESTORE mode.  Restores all variables contained in the saved environ-
  496. ment file.  The optional "save file" specifier functions the same, and with the
  497. same requirements as outlined under "/R[-(save file]".
  498.  
  499. ---------------------------| /M:<pattern(s)>  |---------------------------
  500. User selected, specified insert mode.  Those patterns specified after the "/M:"
  501. switch are inserted into the environment exactly as typed.  Multiple patterns
  502. may be specified by separating them with 1 and only one space.
  503.  
  504. -------------------------| /M:<pattern(s)> /A  |--------------------------
  505. Automatic, specified insert mode.  Functions the same as outlined above under
  506. "/M:<pattern(s)>".
  507.  
  508.  
  509. -------------------| /M:<pattern(s)> /R[-(save file]  |-------------------
  510. User selected, specified insert mode.  Functions the same as outlined above
  511. under "/M:<pattern(s)>" with the added option of restoring those variables
  512. contained in the saved environment file.  The optional "save file" specifier
  513. functions the same, and with the same requirements as outlined under "/R[-(save
  514. file]".
  515.  
  516. -----------------| /M:<pattern(s)> /R[-(save file] /A  |------------------
  517. Automatic, specified insert mode.  Functions the same as outlined above under
  518. "/M:<pattern(s)> /R[-(save file]".
  519.  
  520.       The sequence of these parameters on the command line is insignificant. 
  521.       Specification of individual parameters must be separated by at least one
  522.       space.
  523.  
  524.  
  525.                            CHAPTER 4 - RELATED FILES
  526.      _____________________________________________________________________
  527.  
  528. SAVED ENVIRONMENT FILE
  529. --------------------------------------------------------------------------
  530.       Upon executing ENVIRON in any of the delete modes a file entitled
  531.       SAVEDENV.TXT is written to the root directory of the disk on which
  532.       ENVIRON.EXE resides unless overridden using the "-(save file" option (see
  533.       description above).  This is a flat, ASCII file that writes each variable
  534.       and its associated value (separated by an "=" sign) to its own line in the
  535.       file.  This file can be edited with a text editor, deleting or adding
  536.       lines as desired.  Just be sure to follow the same format as that found in
  537.       the file created by ENVIRON itself.  Each time this file is written a
  538.       header precedes the variables identifying it as an ENVIRON.EXE byproduct. 
  539.       If the resulting file contains no variables it will still be saved to disk
  540.       with the header line being its only contents.  This allows ENVIRON to
  541.       execute in automatic mode without displaying an error message when a
  542.       restore is attempted and there is really nothing for ENVIRON to do.
  543.  
  544. CONFIGURATION FILE
  545. --------------------------------------------------------------------------
  546.       A copy of an example configuration file should be included with this
  547.       distribution and is entitled ENVIRON.CFG.  Unless its location is speci-
  548.       fied on the command line, it must reside in the same directory as ENV-
  549.       IRON.EXE.  The config file is used to identify the variables that should
  550.       NOT be deleted when ENVIRON is run with the "/D" parameter.  Basically,
  551.       variables to exclude are listed on individual lines WITHOUT the associated
  552.       "=" sign or the variable's purported contents.  Comments can be added by
  553.       placing a semicolon anywhere on the line.
  554.  
  555.  
  556.  
  557.                             CHAPTER 5 - LIMITATIONS
  558.      _____________________________________________________________________
  559.  
  560. There are several limitations in the program worth mentioning.  First, the
  561. number of environment variables that the program can handle is limited to 64. 
  562. In User Selected Delete Mode, the maximum number of wildcard combinations
  563. following the "/S:" parameter is 15.  In User Specified Insert Mode, the
  564. maximum number of patterns is 15 as well.  And finally, environment variables
  565. greater than 128 characters in length are not supported.
  566.  
  567. One "quirk" I have found, and still don't know the reason for, relates to
  568. deleting the "COMSPEC" variable from the environment.  The variable is not
  569. visible after using the DOS "SET" command, and restores without problem.  But,
  570. shortly after that some or all of the environment variables disappear when
  571. other applications are used.  For this reason I would strongly suggest that you
  572. NOT delete the "COMSPEC" variable.
  573.