ENVSET.COM Documentation. Version 1.0 August, 1989 (c) 1989 John Sloan.

(John Sloan, Compuserve 73727,2162)

PURPOSE: This utility is used in a batch file to set an environment variable to a value or create a new environment variable. An example would be if you had a replacement for the DOS "TYPE" command such as the "BROWSER" utility which did not prompt you for a filename if you just issued the command "BROWSER" but instead gave you a nasty error message. This utility can get around this by letting the batch file prompt you for a filename, as it does in the example below. USAGE: To use it, the batch file command is: "envset TEMP.BAT ENAME" where: -TEMP.BAT is the name of a temporary batch file which will contain the fully written command to set the environment variable. -ENAME is the environment variable you wish to use. EXAMPLES: Listing of file browse.bat: @echo off if not "%1" == "" goto name echo Please enter the filename to be browsed, echo and press "Enter": c:\tools\envset c:\temp01.bat tempname call c:\temp01.bat c:\utils\browser %tempname% set tempname= del c:\temp01.bat goto end :name c:\utils\browser %1 :end If a filename is entered at the command line after the command "BROWSE", then the utility BROWSER in directory c:\TOOLS is executed. If the command "BROWSE" is entered with no filename to be browsed, then ENVSET is run to ask for interactive input to get a filename to be browsed. The utility ENVSET will ask for a filename to be entered, then set the environment variable "tempname" to that filename. It then runs the "BROWSER" utility with that filename as input and then gets rid of the extra TEMP.BAT file and the unnecessary environment variable TEMPNAME

that we are finished using. We have the "BROWSER" utility in C:\UTILS and envset utility in C:\TOOLS and we set up the temporary batch file TEMP99.BAT in the root directory. Copyright/License/Warranty -------------------------This document and the program file ENVSET.COM ("the software") are copyrighted by the author. The copyright owner hereby licenses you to: use the software; make as many copies of the program and documentation as you wish; give such copies to anyone; and distribute the software and documentation via electronic means. There is no charge for any of the above. However, you are specifically prohibited from charging, or requesting donations, for any such copies, however made; and from distributing the software and/or documentation with commercial products without prior permission. An exception is granted to not-for-profit user's groups, which are authorized to charge a small fee (not to exceed $7) for materials, handling, postage, and general overhead. NO FOR-PROFIT ORGANIZATION IS AUTHORIZED TO CHARGE ANY AMOUNT FOR DISTRIBUTION OF COPIES OF THE SOFTWARE OR DOCUMENTATION, OR TO INCLUDE COPIES OF THE SOFTWARE OR DOCUMENTATION WITH SALES OF THEIR OWN PRODUCTS. THIS INCLUDES A SPECIFIC PROHIBITION AGAINST FOR-PROFIT ORGANIZATIONS DISTRIBUTING THE SOFTWARE, EITHER ALONE OR WITH OTHER SOFTWARE, AND CHARGING A "HANDLING" OR "MATERIALS" FEE OR ANY OTHER SUCH FEE FOR THE DISTRIBUTION. NO FOR-PROFIT ORGANIZATION IS AUTHORIZED TO INCLUDE THE SOFTWARE ON ANY MEDIA FOR WHICH MONEY IS CHARGED. There is no restriction on the use of this software in commercial or institutional environments. No copy of the software may be distributed or given away without this document; and this notice must not be removed. There is no warranty of any kind, and the copyright owner is not liable for damages of any kind. By using this free software, you agree to this.

First Edition (August 1989) (c) John Sloan 1989