How to Set Up Environmental Variables on Windows and on an Azure Website

First, let’s start with Windows 7

  • Open up the start menu.

  • Right click computer and select properties

start

properties

  • Select Advanced system settings

advanced settings

  • Select Environment Variables

environmental variables

  • Under System Variables select new

system variables

  • Add the variable name and the variable value and click ok.

variable name

  • You environmental variables are now set up on your local machine. In order to use them please restart your command line and they should be available once it comes back on.

Now let’s take a look at how to do the same for windows azure websites.

web apps

  • Select Configure

configure

  • Scroll down until you find app settings

app settings

  • Insert your environmental variables into the key value slots and press save.

save

  • Your variables are now saved on to you Web App. Restart your server and you’re done.

Paulo Diniz