For example, a running process can query the value of the TEMP environment variable to discover a suitable place to store temporary files, or the AppData variable to find a quick way to get access to the Roaming folder in the user’s profile folder.Īpplications or services can use the information defined by environment variables to determine various things about the OS, for example, to detect the number of processes, the currently logged in user’s name, the folder path to the current user’s profile or the temporary files directory. Environment Variables are a set of dynamic named values that can affect the way running processes will behave on a computer.
They existed in OSes before Windows as well, such as MS-DOS. Environment variables in an operating system are values that contain information about the system environment, and the currently logged in user.