Page 1 of 3 123 LastLast
    Environment Variables in Windows 10

    Environment Variables in Windows 10

    Complete List of Environment Variables in Windows 10
    Published by
    2014-12-11
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 17,517

    Show Printable Version 


    Complete List of Environment Variables in Windows 10


    information   Information
    Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. The variables can be used both in scripts and on the command line. Environment variables makes it easy when certain standard directories and parameters need to be referenced but where the actual locations or names can vary from computer to computer.

    This tutorial will show you a complete list of environment variables that can be used to reference standard directories and parameters in Windows 10.

    Note   Note
    User environment variables are stored in the registry key below:

    HKEY_CURRENT_USER\Environment

    System environment variables are stored in the registry key below:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment


    You can open a command prompt, type set, and press Enter to display all current environment variables on your PC.


    You can open PowerShell, type Get-ChildItem Env:, and press Enter to display all current environment variables on your PC.





    Environment Variables Values (may vary)
    %ALLUSERSPROFILE% C:\ProgramData
    %APPDATA% C:\Users\(user-name)\AppData\Roaming
    %CD% Current directory full path
    %CMDCMDLINE% Returns exact command line used to start current cmd.exe session.
    %CMDEXTVERSION% Number of current command processor extensions.
    %CommonProgramFiles% C:\Program Files\Common Files
    %CommonProgramFiles(x86)% C:\Program Files (x86)\Common Files
    %CommonProgramW6432% C:\Program Files\Common Files
    %COMPUTERNAME% BRINK-PC
    %COMSPEC% C:\Windows\System32\cmd.exe
    %DATE% Current date in format determined by Date command
    %ERRORLEVEL% Number defining exit status of previous command or program
    %HOMEDRIVE% C:
    %HOMEPATH% C:\Users\(user-name)
    %LOCALAPPDATA% C:\Users\(user-name)\AppData\Local
    %LOGONSERVER% \\MicrosoftAccount
    %NUMBER_OF_PROCESSORS% 8
    %OS% Windows_NT
    %PATH% C:\WINDOWS
    C:\WINDOWS\system32
    C:\WINDOWS\System32\Wbem
    C:\WINDOWS\System32\WindowsPowerShell\v1.0
    %PATHEXT% COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    %PROCESSOR_ARCHITECTURE% AMD64
    %PROCESSOR_IDENTIFIER% Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
    %PROCESSOR_LEVEL% 6
    %PROCESSOR_REVISION% 3c03
    %ProgramData% C:\ProgramData
    %ProgramFiles% C:\Program Files
    %ProgramFiles(x86)% C:\Program Files (x86)
    %ProgramW6432% C:\Program Files
    %PROMPT% Code for current command prompt format. Code is usually $P$G
    %PSModulePath% C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    %PUBLIC% C:\Users\Public
    %RANDOM% To get random number between 0 and 32767
    %SessionName% When logging on directly to machine, returns "Console".

    When client connects via terminal server session, is combination of
    connection name, followed by pound symbol {#} and session number.
    %SystemDrive% C:
    %SystemRoot% C:\Windows
    %TEMP% C:\Users\(user-name)\AppData\Local\Temp
    %TIME% Current time in format determined by Time command
    %TMP% C:\Users\(user-name)\AppData\Local\Temp
    %USERDOMAIN% BRINK-PC
    %USERDOMAIN_ROAMINGPROFILE% BRINK-PC
    %USERNAME% (user-name)
    %USERPROFILE% C:\Users\(user-name)
    %WINDIR% C:\Windows










    That's it,
    Shawn



  1. Joined : Jan 2015
    Posts : 16
    Windows 10
       2016-03-07 #1

    How we use this?
    For example tried %OS% on CMD, PS and RUN but not work?
      My System SpecsSystem Spec


  2. Joined : Oct 2013
    Posts : 17,517
    64-bit Windows 10 Pro build 15014
       2016-03-07 #2

    Hello Yasak,

    The %OS% variable contains a symbolic name of the operating system family to distinguish between differing feature sets in batchjobs. In this case, it would for when you want to use the Windows_NT string.

    I'm not sure what you could use it for though.
    Last edited by Brink; 2016-03-07 at 11:17.
      My System SpecsSystem Spec


  3. Joined : Jan 2015
    Posts : 16
    Windows 10
       2016-03-07 #3

    Ok understood.
    Thank you for answer
      My System SpecsSystem Spec


  4. Joined : Oct 2013
    Posts : 17,517
    64-bit Windows 10 Pro build 15014
       2016-03-07 #4

      My System SpecsSystem Spec


  5. Joined : Jun 2015
    Posts : 10,908
    Windows 10 Pro / Windows 10 TP / Windows 8.1 Pro / Windows 7 Pro
       2016-07-06 #5

    Shawn,
    Do you know why I cannot access certain environment variables?
    For example, if I want to go to %appdata% through search I get this result
    Attachment 88572

    I also cannot get access to 'Change my environment variables' in User Account.
      My System SpecsSystem Spec


  6. Joined : Oct 2013
    Posts : 17,517
    64-bit Windows 10 Pro build 15014
       2016-07-06 #6

    Hello Martijn,

    Odd. That looks more like it's through "Open with" instead of Search.

    Are you able to open Environment Variables using the path below instead?

    Click image for larger version. 

Name:	Environment_Variables.png 
Views:	158 
Size:	45.8 KB 
ID:	88618
      My System SpecsSystem Spec


  7. Joined : Jun 2015
    Posts : 10,908
    Windows 10 Pro / Windows 10 TP / Windows 8.1 Pro / Windows 7 Pro
       2016-07-06 #7

    That pops up when I enter %appdata% in search through Windows logo + r search, if I presss only Windows logo it works fine.

    Yes that works fine.
      My System SpecsSystem Spec


  8. Joined : Oct 2013
    Posts : 17,517
    64-bit Windows 10 Pro build 15014
       2016-07-06 #8

    Interesting. %AppData% opens the C:\Users\Brink\AppData\Roaming folder for me in the Run command dialog.

    What does it open when you use %AppData% in the address bar of File Explorer and press Enter? It will be interesting to know if it does the same, or opens the correct folder.
      My System SpecsSystem Spec


  9. Joined : Jun 2015
    Posts : 10,908
    Windows 10 Pro / Windows 10 TP / Windows 8.1 Pro / Windows 7 Pro
       2016-07-06 #9

    That opens the right path C:\Users\<user>\AppData\Roaming.
    Last edited by axe0; 2016-07-07 at 04:43. Reason: removed name
      My System SpecsSystem Spec


 
Page 1 of 3 123 LastLast


Similar Threads
Tutorial Category
Recovery Environment - Use to Troubleshoot Windows 10 Failure to Boot
How to Troubleshoot Windows 10 failure to boot using Recovery Environment Windows failing to boot can be a daunting experience, the Recovery environment built into Windows 10 is designed to overcome a variety of problems that cause Windows 10 to...
Tutorials
recovery environment?
Hi guys; what is "recovery environment" that comes up when booting win 10TP?
General Support
Solved A possible issue when setting up a folder in the environment path...
The other day I was setting up this: C:\Python27 in the environment variable path so I can access Python from the command prompt. Usually in the previous builds and in Win8/Win7 you just perform the set up in the PC/Computer properties and when...
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:10.
Find Us
Twitter Facebook Google+



Windows 10 Forums