home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / window / miscutil / enved2 / enved.rex < prev    next >
Encoding:
OS/2 REXX Batch file  |  1987-07-15  |  618 b   |  30 lines

  1. /* Use KEDIT to edit the DOS envrionment */
  2. trace
  3. temp1='d:$enved1.dat'
  4. temp2='d:$enved2.dat'
  5. 'SET >'temp1
  6. 'KEDIT' temp1
  7. if lines(temp1)=0 then exit
  8. 'SET >'temp2
  9. do while lines(temp2)
  10.   parse value linein(temp2) with var '=' val
  11.   select
  12.   when var='PROMPT' then var'='
  13.   when var='COMSPEC' then nop
  14.   when var='PATH' then nop
  15.   otherwise 'SET' var'='
  16.   end
  17. end
  18. do while lines(temp1)
  19.   x=linein(temp1)
  20.   parse var x var '=' val
  21.   var=translate(var)
  22.   select
  23.   when var='PROMPT' then var val
  24.   when var='PATH' then var val
  25.   otherwise 'SET' var'='val
  26.   end
  27. end
  28. 'ERASE' temp1
  29. 'ERASE' temp2
  30.