Thursday, November 03, 2005

Creating Environment Variables

The use of environment variables dates back to MS-DOS days. These variables hold information that they system and applications needed to perform different functions or to find information on the hard drive.

These variables are still used under Windows to perform different actions. For example, the PATH environment variable contains all the directories that Windows will search when its looking for an executable file. Other environment variables like TEMP contain the path for the system or applications to place temporary files.

To view or change any of the environment variables in Windows:
  • Open the control panel folder
  • Double-click the System control panel
  • Click the Advanced tab.
  • Press 'Environment Variables' button.
Note: Changes in the 'User Variables' box, only applies to the current logged on user. Changes in the 'System Variables' box applies to all users.

To create a new environment variable:
  • Press the New button (under the User or System variable box).
  • In the New User or System Variable dialog box, in the 'Variable name' field, type the name of the variable that you want to create (ex: "Test_Variable"), and in the 'Variable value' box enter the value of the variable (ex: "C:\Test").
  • Press the OK buttons to apply the changes and close the dialog boxes.

No comments: