home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
systools
/
enved
/
enved.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-12-09
|
3KB
|
65 lines
/*********************************************************************
* *
* ENVED - An Environment Editor *
* *
* enved.cmd Invoke the OS/2 environment editor *
* *
*********************************************************************
* This is an OS/2 full screen or windowed command prompt program to *
* present a copy of the current environment variables in an easily *
* editable format. The current settings can be changed or deleted *
* and new variables may be added, all from the full screen inter- *
* face. *
* *
* Usage: *
* *
* ENVED [var1] [var2] [...] *
* *
* Where: *
* *
* var1, var2 etc. are a list of specific environment variables *
* to be edited. If none are supplied the current complete en- *
* vironment is presented. *
* *
* This program will run under OS/2 1.3 and OS/2 2.0 or later. It *
* requires REXX to be installed and the ENVED.DLL to be available *
* in the LIBPATH. *
* *
* By: Tim Baldwin *
* IBM UK Laboratories, Hursley Park, Winchester, UK *
* BALDWINT at WINVMB GBIBMN56 at IBMMAIL *
* baldy@vnet.ibm.com *
*********************************************************************
* (C) Copyright IBM Corporation 1993. All rights reserved. *
*********************************************************************/
/* Most of the work is done by functions in the ENVED.DLL. */
/* Ensure we have access to this DLL. */
call RxFuncAdd "EnvEdit", "ENVED", "ENVED"
if RxFuncQuery("EnvEdit") <> 0 then do
say "ENVED Error: cannot locate ENVED.DLL."
say ""
say "ENVED requires access to ENVED.DLL. Please ensure this"
say "file is available in a directory listed in your LIBPATH."
exit 1
end
/* Display the full screen edit panel */
arg list
count = EnvEdit("environ", list)
/* On return from the edit panel call REXX to perform required */
/* environment changes. */
do i = 1 to count
parse var environ.i envvar"="envval
rc = value(envvar, envval, "OS2ENVIRONMENT")
end
/* Return to OS/2 */
exit 0