in reply to vienv - Edit local environment variables on Win32

I wonder, wouldn't a short batch file with something like this work?

@echo off set > %temp%\env.bat perl -i.bak -wpe "$_ = q/set / . $_" %temp%\env.bat notepad %temp%\env.bat call %temp%\env.bat

Replies are listed 'Best First'.
Re^2: vienv - Edit local environment variables on Win32
by tye (Sage) on Oct 11, 2010 at 14:07 UTC

    Why not set | perl -pe "s/^/set /" > %temp%\env.bat ?

    Of course, you lose the confirmation feedback on what actually changed and the intuitive "delete the line to delete the environment variable" behavior and have higher risk of accidentally running other commands.

    - tye