Movatterモバイル変換


[0]ホーム

URL:


Windows 10 Help Forums


Environment Variables in Windows 10  

Page 1 of 4123...LastLast
    Environment Variables in Windows 10

    Environment Variables in Windows 10

    Complete List of Environment Variables in Windows 10
    Published byCategory:General Tips
    15 Dec 2022
    Designer Media Ltd




    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.

    Thevariable (ex: "%UserProfile%") is used as a type of shortcut of thevalue (ex: "C:\Users\<username>").

    There are two types of environment variables:user environment variables (set only for current user) andsystem environment variables (set for all users).

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

    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 acommand prompt, typeset, and pressEnter to display all current environment variables on your PC.

    You can openPowerShell, typeGet-ChildItem Env:, and pressEnter to display all current environment variables on your PC.




    %ALLUSERSPROFILE%C:\ProgramData
    %APPDATA%C:\Users\\AppData\Roaming
    %CD%(command prompt only) Current directory full path
    %CMDCMDLINE%(command prompt only) Returns exact command line used to start current cmd.exe session.
    %CMDEXTVERSION%(command prompt only) 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%The computer name of the current local system.
    %COMSPEC%C:\Windows\System32\cmd.exe
    %DATE%(command prompt only) Current date in format determined byDate command
    %DriverData%C:\Windows\System32\Drivers\DriverData
    %ERRORLEVEL%(command prompt only) Number defining exit status of previous command or program
    %HOMEDRIVE%C:
    %HOMEPATH%\Users\
    %LOCALAPPDATA%C:\Users\\AppData\Local
    %LOGONSERVER%\\MicrosoftAccount
    %NUMBER_OF_PROCESSORS%
    %OneDrive%Current OneDrive folder location
    %OS%Windows_NT
    %PATH%
    %PATHEXT%
    %PROCESSOR_ARCHITECTURE%
    %PROCESSOR_IDENTIFIER%
    %PROCESSOR_LEVEL%
    %PROCESSOR_REVISION%
    %ProgramData%C:\ProgramData
    %ProgramFiles%C:\Program Files
    %ProgramFiles(x86)%C:\Program Files (x86)
    %ProgramW6432%C:\Program Files
    %PROMPT%(command prompt only) Code for current command prompt format. Code is usually
    %PSModulePath%C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    %PUBLIC%C:\Users\Public
    %RANDOM%(command prompt only) 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\\AppData\Local\Temp
    %TIME%(command prompt only) Current time in format determined byTime command
    %TMP%C:\Users\\AppData\Local\Temp
    %USERDOMAIN%The network domain name associated with the current user.
    %USERDOMAIN_ROAMINGPROFILE%The network domain name associated with the current roaming profile.
    %USERNAME%
    %USERPROFILE%C:\Users\
    %WINDIR%C:\Windows


    That's it,
    Shawn Brink






  1. Posts :30
    Windows 10

    How we use this?
    For example tried
      My Computer
    Computer Type: Laptop
    OS: Windows 10


  2. Posts :76,309
    64-bit Windows 11 Pro for Workstations
    Thread Starter

    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 theWindows_NT string.

    I'm not sure what you could use it for though.
    Last edited by Brink; 07 Mar 2016 at11:17.
      My Computers
    Computer Type: PC/Desktop
    System Manufacturer/Model Number:Custom self built
    OS: 64-bit Windows 11 Pro for Workstations
    CPU: Intel i7-8700K 5 GHz
    Motherboard: ASUS ROG Maximus XI Formula Z390
    Memory: 64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card: ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card: Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays: 2 x Samsung Odyssey G75 27"
    Screen Resolution: 2560x1440
    Keyboard: Logitech wireless K800
    Mouse: Logitech MX Master 3
    PSU: Seasonic Prime Titanium 850W
    Case: Thermaltake Core P3 wall mounted
    Cooling: Corsair Hydro H115i
    Hard Drives: 1TB Samsung 990 PRO M.2,4TB Samsung 990 PRO PRO M.2,TerraMaster F8 SSD Plus NAS
    Internet Speed: 2 Gbps Download and 100 Mbps Upload
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium
    Other Info: Logitech Z625 speaker system,Logitech BRIO 4K Pro webcam,HP Color LaserJet Pro MFP M477fdn,CyberPower CP1500PFCLCD,Galaxy S23 Plus phone

    View my PC Album
    Computer Type: Laptop
    System Manufacturer/Model Number: HP Spectre x360 2in1
    OS: 64-bit Windows 10 Pro build 21390
    CPU: i7-1065G7 3.9 GHz
    Memory: 16 GB LPDDR4-3200
    Graphics Card: Intel Iris Plus
    Sound Card: Intel SST
    Monitor(s) Displays: 13.3" 4K UWVA AMOLED multitouch
    Screen Resolution: 3840 x 2160
    Hard Drives: 512 GB PCIe NVMe M.2 SSD
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium


  3. Posts :30
    Windows 10

    Ok understood.
    Thank you for answer :)
      My Computer
    Computer Type: Laptop
    OS: Windows 10


  4. Posts :76,309
    64-bit Windows 11 Pro for Workstations
    Thread Starter
      My Computers
    Computer Type: PC/Desktop
    System Manufacturer/Model Number:Custom self built
    OS: 64-bit Windows 11 Pro for Workstations
    CPU: Intel i7-8700K 5 GHz
    Motherboard: ASUS ROG Maximus XI Formula Z390
    Memory: 64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card: ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card: Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays: 2 x Samsung Odyssey G75 27"
    Screen Resolution: 2560x1440
    Keyboard: Logitech wireless K800
    Mouse: Logitech MX Master 3
    PSU: Seasonic Prime Titanium 850W
    Case: Thermaltake Core P3 wall mounted
    Cooling: Corsair Hydro H115i
    Hard Drives: 1TB Samsung 990 PRO M.2,4TB Samsung 990 PRO PRO M.2,TerraMaster F8 SSD Plus NAS
    Internet Speed: 2 Gbps Download and 100 Mbps Upload
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium
    Other Info: Logitech Z625 speaker system,Logitech BRIO 4K Pro webcam,HP Color LaserJet Pro MFP M477fdn,CyberPower CP1500PFCLCD,Galaxy S23 Plus phone

    View my PC Album
    Computer Type: Laptop
    System Manufacturer/Model Number: HP Spectre x360 2in1
    OS: 64-bit Windows 10 Pro build 21390
    CPU: i7-1065G7 3.9 GHz
    Memory: 16 GB LPDDR4-3200
    Graphics Card: Intel Iris Plus
    Sound Card: Intel SST
    Monitor(s) Displays: 13.3" 4K UWVA AMOLED multitouch
    Screen Resolution: 3840 x 2160
    Hard Drives: 512 GB PCIe NVMe M.2 SSD
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium


  5. Posts :14,905
    Windows 10 Pro

    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

    I also cannot get access to 'Change my environment variables' in User Account.
    Last edited by Brink; 16 Sep 2017 at21:06.Reason: removed broken image
      My Computers
    Computer Type: PC/Desktop
    System Manufacturer/Model Number:Custom build him
    OS: Windows 10 Pro
    CPU: i5-6500 @3.20GHz
    Motherboard: Gigabyte B150-HD3P-CF
    Memory: 16GB DDR4 2133 Crucial Ballistix Sport LT
    Graphics Card: MSI GeForce GTX 1060 GAMING X 6G
    Sound Card: Built-in
    Monitor(s) Displays: 24" Liyama ProLite XB2483HSU-B2 & 24" Dell Ultrasharp U2414H
    Screen Resolution: 1920 x 1080 * 2
    Keyboard: Func KB-460 (MX Red)
    Mouse: Corsair Gaming M65 RGB
    PSU: Corsair RM550x
    Case: Fractal Design Define S
    Cooling: Cooler Master TX3 i
    Hard Drives: Crucial MX200 500GB & Toshiba DT01ACA300 3TB * 2
    Browser: Google Chrome
    Antivirus: Bitdefender Total Security 2019 + MBAM Premium
    Other Info: Creative Sound Blaster Tactic3D Rage V2 headset
    Computer Type: Laptop
    System Manufacturer/Model Number: Dell Inspiron 15R 5521
    OS: Windows 10 Home
    CPU: i7-3537U @ 2.00GHz
    Motherboard: Dell Inc. 0C46Y8 (U3E1)
    Memory: 8GB 1600MHZ DDR3
    Graphics Card: Intel(R) HD Graphics 4000
    Sound Card: Built-in
    Monitor(s) Displays: Generic PnP Monitor
    Screen Resolution: 1366x768
    Mouse: Sharkoon FireGlider
    Hard Drives: MX200 250GB SATA III 6.0Gbps & ST1000LM024 HN-M101MBB 1TB SATA II 3.0Gbps
    Browser: Google Chrome
    Antivirus: Malwarebytes


  6. Posts :76,309
    64-bit Windows 11 Pro for Workstations
    Thread Starter

    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?

    Environment Variables in Windows 10-environment_variables.png
      My Computers
    Computer Type: PC/Desktop
    System Manufacturer/Model Number:Custom self built
    OS: 64-bit Windows 11 Pro for Workstations
    CPU: Intel i7-8700K 5 GHz
    Motherboard: ASUS ROG Maximus XI Formula Z390
    Memory: 64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card: ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card: Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays: 2 x Samsung Odyssey G75 27"
    Screen Resolution: 2560x1440
    Keyboard: Logitech wireless K800
    Mouse: Logitech MX Master 3
    PSU: Seasonic Prime Titanium 850W
    Case: Thermaltake Core P3 wall mounted
    Cooling: Corsair Hydro H115i
    Hard Drives: 1TB Samsung 990 PRO M.2,4TB Samsung 990 PRO PRO M.2,TerraMaster F8 SSD Plus NAS
    Internet Speed: 2 Gbps Download and 100 Mbps Upload
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium
    Other Info: Logitech Z625 speaker system,Logitech BRIO 4K Pro webcam,HP Color LaserJet Pro MFP M477fdn,CyberPower CP1500PFCLCD,Galaxy S23 Plus phone

    View my PC Album
    Computer Type: Laptop
    System Manufacturer/Model Number: HP Spectre x360 2in1
    OS: 64-bit Windows 10 Pro build 21390
    CPU: i7-1065G7 3.9 GHz
    Memory: 16 GB LPDDR4-3200
    Graphics Card: Intel Iris Plus
    Sound Card: Intel SST
    Monitor(s) Displays: 13.3" 4K UWVA AMOLED multitouch
    Screen Resolution: 3840 x 2160
    Hard Drives: 512 GB PCIe NVMe M.2 SSD
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium


  7. Posts :14,905
    Windows 10 Pro

    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 Computers
    Computer Type: PC/Desktop
    System Manufacturer/Model Number:Custom build him
    OS: Windows 10 Pro
    CPU: i5-6500 @3.20GHz
    Motherboard: Gigabyte B150-HD3P-CF
    Memory: 16GB DDR4 2133 Crucial Ballistix Sport LT
    Graphics Card: MSI GeForce GTX 1060 GAMING X 6G
    Sound Card: Built-in
    Monitor(s) Displays: 24" Liyama ProLite XB2483HSU-B2 & 24" Dell Ultrasharp U2414H
    Screen Resolution: 1920 x 1080 * 2
    Keyboard: Func KB-460 (MX Red)
    Mouse: Corsair Gaming M65 RGB
    PSU: Corsair RM550x
    Case: Fractal Design Define S
    Cooling: Cooler Master TX3 i
    Hard Drives: Crucial MX200 500GB & Toshiba DT01ACA300 3TB * 2
    Browser: Google Chrome
    Antivirus: Bitdefender Total Security 2019 + MBAM Premium
    Other Info: Creative Sound Blaster Tactic3D Rage V2 headset
    Computer Type: Laptop
    System Manufacturer/Model Number: Dell Inspiron 15R 5521
    OS: Windows 10 Home
    CPU: i7-3537U @ 2.00GHz
    Motherboard: Dell Inc. 0C46Y8 (U3E1)
    Memory: 8GB 1600MHZ DDR3
    Graphics Card: Intel(R) HD Graphics 4000
    Sound Card: Built-in
    Monitor(s) Displays: Generic PnP Monitor
    Screen Resolution: 1366x768
    Mouse: Sharkoon FireGlider
    Hard Drives: MX200 250GB SATA III 6.0Gbps & ST1000LM024 HN-M101MBB 1TB SATA II 3.0Gbps
    Browser: Google Chrome
    Antivirus: Malwarebytes


  8. Posts :76,309
    64-bit Windows 11 Pro for Workstations
    Thread Starter

    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 Computers
    Computer Type: PC/Desktop
    System Manufacturer/Model Number:Custom self built
    OS: 64-bit Windows 11 Pro for Workstations
    CPU: Intel i7-8700K 5 GHz
    Motherboard: ASUS ROG Maximus XI Formula Z390
    Memory: 64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card: ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card: Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays: 2 x Samsung Odyssey G75 27"
    Screen Resolution: 2560x1440
    Keyboard: Logitech wireless K800
    Mouse: Logitech MX Master 3
    PSU: Seasonic Prime Titanium 850W
    Case: Thermaltake Core P3 wall mounted
    Cooling: Corsair Hydro H115i
    Hard Drives: 1TB Samsung 990 PRO M.2,4TB Samsung 990 PRO PRO M.2,TerraMaster F8 SSD Plus NAS
    Internet Speed: 2 Gbps Download and 100 Mbps Upload
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium
    Other Info: Logitech Z625 speaker system,Logitech BRIO 4K Pro webcam,HP Color LaserJet Pro MFP M477fdn,CyberPower CP1500PFCLCD,Galaxy S23 Plus phone

    View my PC Album
    Computer Type: Laptop
    System Manufacturer/Model Number: HP Spectre x360 2in1
    OS: 64-bit Windows 10 Pro build 21390
    CPU: i7-1065G7 3.9 GHz
    Memory: 16 GB LPDDR4-3200
    Graphics Card: Intel Iris Plus
    Sound Card: Intel SST
    Monitor(s) Displays: 13.3" 4K UWVA AMOLED multitouch
    Screen Resolution: 3840 x 2160
    Hard Drives: 512 GB PCIe NVMe M.2 SSD
    Browser: Google Chrome
    Antivirus: Windows Defender and Malwarebytes Premium


  9. Posts :14,905
    Windows 10 Pro

    That opens the right path C:\Users\<user>\AppData\Roaming.
    Last edited by axe0; 07 Jul 2016 at04:43.Reason: removed name
      My Computers
    Computer Type: PC/Desktop
    System Manufacturer/Model Number:Custom build him
    OS: Windows 10 Pro
    CPU: i5-6500 @3.20GHz
    Motherboard: Gigabyte B150-HD3P-CF
    Memory: 16GB DDR4 2133 Crucial Ballistix Sport LT
    Graphics Card: MSI GeForce GTX 1060 GAMING X 6G
    Sound Card: Built-in
    Monitor(s) Displays: 24" Liyama ProLite XB2483HSU-B2 & 24" Dell Ultrasharp U2414H
    Screen Resolution: 1920 x 1080 * 2
    Keyboard: Func KB-460 (MX Red)
    Mouse: Corsair Gaming M65 RGB
    PSU: Corsair RM550x
    Case: Fractal Design Define S
    Cooling: Cooler Master TX3 i
    Hard Drives: Crucial MX200 500GB & Toshiba DT01ACA300 3TB * 2
    Browser: Google Chrome
    Antivirus: Bitdefender Total Security 2019 + MBAM Premium
    Other Info: Creative Sound Blaster Tactic3D Rage V2 headset
    Computer Type: Laptop
    System Manufacturer/Model Number: Dell Inspiron 15R 5521
    OS: Windows 10 Home
    CPU: i7-3537U @ 2.00GHz
    Motherboard: Dell Inc. 0C46Y8 (U3E1)
    Memory: 8GB 1600MHZ DDR3
    Graphics Card: Intel(R) HD Graphics 4000
    Sound Card: Built-in
    Monitor(s) Displays: Generic PnP Monitor
    Screen Resolution: 1366x768
    Mouse: Sharkoon FireGlider
    Hard Drives: MX200 250GB SATA III 6.0Gbps & ST1000LM024 HN-M101MBB 1TB SATA II 3.0Gbps
    Browser: Google Chrome
    Antivirus: Malwarebytes


 
Subscribe to Thread
Page 1 of 4123...LastLast

Tutorial Categories

Environment Variables in Windows 10


  Related Discussions
How to Set New User and System Environment Variables in Windows 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...
How to Add Environment Variables Context Menu in Windows 10 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...
How to Edit User and System Environment Variables in Windows 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...
How to Create Environment Variables Shortcut in Windows 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...
I think i accidentally deleted some system variables in my windows 10 OS. What are the defaults variables and their values. Need Help This is my variables33912 and i found a post in your forum Environment Variables in Windows 10 - Windows...
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 is09:22.
Find Us




Windows 10 Forums
 


[8]ページ先頭

©2009-2026 Movatter.jp