NAME editenv - display, create, change or delete environment variable. SYNOPSIS editenv [-hHvV] [-cdepu] [var[=value] ...] DESCRIPTION editenv lists, creates, changes or deletes environment variables in the registry on Windows NT type operating systems (Windows NT/2000/XP) and in autoexec.bat on Windows 95 type operating systems (Windows 95/98/Me). Options editenv can be executed with the following options: -a print author information -h print overview of options -H print program description -c edit autoexec.bat in current dir. (Win95) -d delete specified variable -e use current environment -u env. variable in user hive (WinNT) -p print platform information -v+ verbose; print progress information (-v: stdout, -V:stderr) -- end option section Processing If the operating system is Windows NT type, the specified environment variable is created or updated in or deleted from the registry. If option -u is specified, it is done in the 'current user' part of the registry, otherwise it is done in the 'local machine' part. If the operating system is Windows 95 type, autoexec.bat is edited, or created if none exists. First autoexec.bat is scanned to look for ocurrences of the specified variable and if found, the last location is remembered. Then a new autoexec.bat is created with the environment variable updated or removed. Note: if multiple definitions of the variable exist, the last but one becomes active again after removal of the last occurrence. Error messages Most error messages editenv can issue, concern file operations that fail. Program exit status When a file cannot be properly processed, the program stops and issues an error message. The failure to process a file is reflected in the programs exit status (see DIAGNOSTICS below). ENVIRONMENT none. FILES editenv uses and creates the following files: c:\\autoexec.bat on Windows 95 type operating system this file is created, or edited to add, remove, or change the specified environment variable(s). c:\\autoexec.new see c:\\autoexec.bat. this file holds the contents of the autoexec.bat being build. c:\\autoexec.sav see c:\\autoexec.bat. this file holds the contents of the last autoexec.bat DIAGNOSTICS editenv can return the following exit values: 0 success: program execution has been successfully completed, 1 commandline error: an invalid option is specified, 2 processing error: a file could not be opened or closed, an error occurred while writing to an output file, 3 interruption: the user interrupted the program, 4 internal error: an unexpected situation in program behaviour occurred. SEE ALSO (none) LIMITATIONS on Windows 95 type operating systems it is assumed that the file autotexec.bat is located in c:\. BUGS (to be determined.) AUTHOR M.J. Moene (moene@biophys.LeidenUniv.nl) registry editing part inspired on code by Arno C.J. van Amersfoort Huygens Laboratorium Niels Bohrweg 2 2333 CA Leiden The Netherlands