By default, Windows uses certain environment variables to allow users to quickly access certain paths and directories within the operating system. This helps to make Windows easier to navigate. By defining and setting up your own custom environment variables, you can create direct paths and shortcuts to apps, directories, URLs and more.
Environment variables in Windows 7 are queued by percent (%) characters. So, if you’ve not used environment variables before, you can get started simply by launching the start menu and typing any of the following commands into the Search programs and files box in Windows 7.
Notice how if you were to simply type the term appdata into the Search programs and files box, it would return a wide variety of different results. However, if you type the term %appdata% into the Search programs and files box, you are queuing an environment variable, thus, you are taken to the AppData Roaming directory.
Now that you’re slightly accustomed to using environment variables, let’s get started on how you add, edit or delete environment variables. Start by launching the start menu and typing the search terms environment variable into the Search programs and files box, without % symbols.
From here, you should get a search result listing of Edit environment variables for your account. Select it to jump to the Environment Variables pane.
Now, let’s get started by adding a very simple environment variable to Windows 7. Click the New… button listed under the System variables section. This will present you with the New System Variable window, where you can define a variable name and a variable value.
The Variable name: text area lets you define a simple name for the environment variable. The Variable value: text area lets you define a path or other value that is triggered when the variable name is used. So, let’s create a very simple environment variable for the HelpDeskGeek website. Here are the values:
Click the OK button to add your custom variable, and click the OK button on the Environment Variables window to close and apply the variable.
With that done, you can now test the variable from the Search programs and files option of the start menu. For our demo, we will simply type the variable HelpDeskGeek, with % symbols, such as %HelpDeskGeek%.
From here, the search function of the Start Menu will find the HelpDeskGeek variable, and of course, selecting it or hitting the Enter button on the keyboard will activate the variable, which in this case, will immediately open the HelpDeskGeek homepage using the defined default web browser.
Now, let’s demonstrate a Windows directory variable using the SkyDrive app. Note that this could also be DropBox or any other app that you’d like to set a variable for.
With SkyDrive installed in Windows 7, you can access it by simply typing the search terms skydrive into the Search programs and files box. This will return the SkyDrive app along with several other listings that have incorporated the word SkyDrive somewhere in the listing. Thus, it will return the SkyDrive directory and subdirectories, but you may get multiple search results and have to scroll through them to find the directory you want.
However, if you want to jump directly to a specific directory quickly without having to queue numerous results, you may want to simply add a variable. So, let’s add a new variable for a subdirectory folder of SkyDrive, simply titled NerdyStuff.
With the variable added, now whenever the term %NerdyStuff% is used, it will queue only the specified directory, which in this case is the path:
C:\Users\Administrator\SkyDrive\HelpDeskGeek Docs\Nerdy Stuff
Those are just a few very simple ways that you can create your own custom environment variables in Windows 7. Of course, with more Windows and programming knowledge, you could setup more complex and command based variables also.
Thank you for stopping by the site for today’s post. If any of our site visitors or subscribers know of any other environment variable tips for Windows 7, feel free to leave a comment. Enjoy!