Setting Environment Variables in the Registry

After all these years, Windows still provides a tiny little edit box for editing the PATH (and other) environment variables. It's especially annoying when setting up scripting languages like Python, Perl, Ruby and Groovy for PATH access.

To make this setup process easer, it helps to define HOME variables for each scripting language. To do this, we need to use the Registry Editor to add new environment variables.

  1. Open the Windows Registry Editor: Start->Run->regedit.
  2. Navigate to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment.
  3. Create new String Values for GROOVY_HOME, PERL_HOME, PYTHON_HOME, RUBY_HOME.
  4. Add %GROOVY_HOME%\bin; to the front of the Path variable.
  5. Add %PERL_HOME%\bin; to the front of the Path variable.
  6. Add %PYTHON_HOME%; to the front of the Path variable. Note: Unlike most scripting languages, Python's executables are in the root of the installation directory, not a bin subfolder.
  7. Add %RUBY_HOME%\bin; to the front of the Path variable.
  8. Editing the registry does not update the Environment Variables, so you need to open the System control panel's Environment Variable editor and fake edit a variable to apply your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options