Use powershell to quickly set the environment variables on Windows

Instead of doing these steps in this screenshot

Set Windows Machine Environment Variable By CLI

you can run one command in CMD to achieve the same goal

powershell [System.Environment]::SetEnvironmentVariable('ANT_HOME', 'C:\tools\apache-ant-1.9.4\bin', 'Machine')

  • Set variable ANT_HOME
  • to Value C:\tools\apache-ant-1.9.4\bin
  • at Machine level

DONE!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s