Is there any freeware to manage environment variables in Windows 7?

I am looking for a comfortable editor for all environment variables defined in Windows. The default method to edit them is rather annoying me. Does anyone know something like that?


Solution 1:

In a quick search of the web, there appear to be few such apps.

Rapid Environment Editor doesn't require installation and is the only result in the first two pages of a google search for "modify windows 7 environment variables app".

Environment Variables can be set using PowerShell and Batch scripting. I assume vbscript can do it as well. It shouldn't be too hard, if you have a favorite language, to script such an input.

Solution 2:

The best way that I know of for handling environment variables on a machine with Powershell (which your W7 machine has) is to use, well, Powershell. Here are some examples based on your comments.

Want to search all the env variables for any theat has Temp somewhere in the value?

Get-ChildItem env: | Where-Object{$_.Value -Like '*temp*'}

Want to see the path variable without the semicolon delimeters?

$env:path.split(';')

Solution 3:

  1. Create a batch file (ie: setter.bat) containing the following:

    @echo off
    setlocal enableextensions enabledelayedexpansion
    for /F "tokens=1,2* delims==" %%i in (envvars.txt) do setx %%i "%%j"
    
  2. Open a command prompt, and navigate to where you saved the above batch file.

  3. Type Set > envvars.txt to export your list of environment variables to a text file named "envvars.txt".
  4. Open envvars.txt in you favorite text editor and change things as you would like.
  5. Save the changes.
  6. Run the batch file (setter.bat) to apply your changes.
  7. They will take effect immediately; but not to the currently open command prompt window(s). Open a new command prompt to verify.

The batch file iterated through the exported list you modified, for each line it splits it at the "=" and then uses SetX to set the environmental variables (regular "set" only sets them for the scope of the batch file).

From there you can make additional changes by re-exporting, or changing the existing envvars.txt, and running the batch file again.

Note: Keep a copy of your original export file (as a backup). :)