A Complete List of Environment Variables on Windows 10 and 11

Environment variables play a crucial role in the Windows operating system, allowing it to store and manage various system settings and configurations. These variables serve as placeholders for essential information, enabling the operating system and applications to access specific data or resources. In this gearupwindows article, we will provide a comprehensive list of environment variables found in Windows 10 and Windows 11, along with their purposes and significance.

Understanding Environment Variables

Environment variables are dynamic values that are essential for the functioning of both the operating system and installed applications. They are stored in the Windows Registry and can be system-wide or user-specific. These variables are used to define various settings and parameters, control system behavior, and make the OS environment adaptable to different users and situations.

To access environment variables on Windows, you can use the Command Prompt, PowerShell, or simply type the variable name enclosed in percent signs (%) in the Run dialog. To view user-specific environment variables, you can use the “set” command in Command Prompt or PowerShell, and to see system-wide variables, you may need administrator privileges for certain operations.

List of Common Environment Variables

1. PATH: Perhaps one of the most important environment variables, `PATH` defines a list of directories where the operating system looks for executable files when you run a command from the command prompt or run dialog. It is vital for locating and executing various programs and scripts.

2. USERPROFILE: This variable points to the current user’s profile directory, which typically resides in the “C:\Users” folder. It is useful for accessing user-specific data, settings, and documents.

3. `TEMP` and `TMP`: These variables define the location of temporary files used by the system and applications. They are often set to the “C:\Users\<username>\AppData\Local\Temp” directory.

4. COMPUTERNAME: It contains the name of the computer, making it easy to identify the machine on a network.

5. USERNAME: This variable stores the name of the currently logged-in user.

6. OS: It contains information about the Windows operating system version and edition.

7. SYSTEMROOT: Points to the Windows installation directory, typically “C:\Windows.”

8. HOMEPATH: Refers to the user’s home directory. It complements the `USERPROFILE` variable.

9. APPDATA: This variable specifies the path to the application data folder for the current user. It is commonly used by applications to store user-specific settings and configurations.

10. `PROGRAMFILES` and `PROGRAMFILES(X86)`: These variables point to the directories where 32-bit and 64-bit programs are installed, respectively.

11. LOGONSERVER: It contains the name of the domain controller used for authentication during the logon process on a Windows domain.

12. SYSTEMDRIVE: Specifies the drive letter where the Windows system files are located, typically “C:.”

13. `NUMBER_OF_PROCESSORS` and `PROCESSOR_ARCHITECTURE`: These variables provide information about the processor configuration, such as the number of processors and the architecture (e.g., x86, x64).

14. USERDOMAIN: Contains the name of the domain to which the user is currently logged in.

15. WINDIR: Points to the Windows directory where the core operating system files are stored.

Additional Environment Variables

In addition to the common environment variables mentioned above, there are many more that serve various purposes. Some of these include:-

16. ALLUSERSPROFILE: The path to the “All Users” profile directory.

17. CD: Outputs the current directory path in the Command Prompt.

18. CMDCMDLINE: Outputs the command line used to launch the current Command Prompt session.

19. CMDEXTVERSION: Outputs the number of current command processor extensions in the Command Prompt.

20. CommonProgramFiles: The path to shared program files for all users.

21. COMMONPROGRAMFILES(x86): The path to shared program files for all users.

22. CommonProgramW6432: The path to shared program files for 64-bit applications, commonly “C:\Program Files\Common Files.”

23. COMSPEC: The path to the Windows Command Prompt executable, typically “C:\Windows\System32\cmd.exe.”

24. DATE: Outputs the current date in the Command Prompt.

25. DriverData: The path to the DriverData directory, commonly “C:\Windows\System32\Drivers\DriverData.”

26. ERRORLEVEL: Outputs the number defining the exit status of the previous command in the Command Prompt.

27. HOMEDRIVE: Specifies the drive letter for the user’s home directory, often “C:.”

28. LOCALAPPDATA: The path to the local application data folder for the current user, usually “C:\Users<username>\AppData\Local.”

29. OneDrive: The path to the OneDrive folder for the current user, e.g., “C:\Users<username>\OneDrive.”

30. PathExt: A list of executable file extensions used by the system when searching for executable files, e.g., “.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc.”

31. PROGRAMDATA: The path to the “ProgramData” directory, typically “C:\ProgramData.”

32. ProgramW6432: The path to program files for 64-bit applications, usually “C:\Program Files.”

33. PROCESSOR_IDENTIFIER: A string that describes the processor’s characteristics.

34. PROCESSOR_LEVEL: Outputs the processor level.

35. PROCESSOR_REVISION: Outputs the processor revision.

36. PSModulePath: %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\.

37. PUBLIC: The path to the “Public” user’s profile directory.

38. RANDOM: Outputs a random number from 0 through 32767 in the Command Prompt.

39. SESSIONNAME: The name of the current Terminal Server session.

40. TIME: Outputs the current time in the Command Prompt.

41. USERDNSDOMAIN: The DNS domain of the user’s domain account.

42. USERDOMAIN_ROAMINGPROFILE: The domain where the user’s roaming profile is stored.

43. USERPROFILE: The path to the user’s profile directory.

44. windir: The path to the Windows directory.

Conclusion

Environment variables are essential components of the Windows operating system, allowing it to adapt to various situations and users by providing dynamic information and system settings. Understanding these variables is crucial for system administrators, power users, and developers who need to manage or customize the Windows environment. This list of environment variables in Windows 10 and 11, along with their explanations, should serve as a valuable reference for anyone looking to work with these vital system components.

Leave a Reply