12

I would like to know the full list of variables that I can use in Windows Explorer or related relative paths that is accepted by Windows 10. Variables like %appdata%, %userprofile%, %windir%...etc.

In my search, most of them point to KNOWNFOLDERID or the older CSIDL, but I don't know how to exactly apply them in Windows paths or File Explorer, and most of them doesn't work in the File Explorer in my tests. If the above are correct lists, please give me examples on how to apply them in Windows paths or File Explorer. Thank you!

4 Answers 4

15

If you want to see the list of paths available such as %AppData% and similar then simply open a command prompt and type set. You will see something like

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\<your user profile>\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\<your user profile>
LOCALAPPDATA=C:\Users\<your user profile>\AppData\Local
OneDrive=C:\Users\<your user profile>\OneDrive
OneDriveConsumer=C:\Users\<your user profile>\OneDrive
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PUBLIC=C:\Users\Public
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\<your user profile>\AppData\Local\Temp
TMP=C:\Users\<your user profile>\AppData\Local\Temp
USERPROFILE=C:\Users\<your user profile>
windir=C:\WINDOWS

Anything that begins and ends with a % is an environment variable with a Name=Value pair.

If the likes of %appdata% (or a relative sub-path of it) is not working for you then you may need to put a \ between %appdata% and the rest of the path like so

%appdata%\Microsoft

Most %% environment variables do not have the trailing \ so you have to add it yourself.

1
  • Note that if you click on windows > "Modify environment variables for your account", you can find variables with same name that have not the same values has the one produced by this answer. Sep 6, 2023 at 15:21
7

From the program at https://winsourcecode.blogspot.com/2019/05/listenvironmentexe-list-system-user.html

--------
System
--------
ComSpec=%SystemRoot%\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\Program Files (x86)\Windows Resource Kits\Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files\dotnet\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.cpl
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 126 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=7e05
PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules
TEMP=%SystemRoot%\TEMP
TMP=%SystemRoot%\TEMP
USERNAME=SYSTEM
windir=%SystemRoot%
 
--------
Volatile - These are set at logon
--------
LOGONSERVER=\\LAPTOP
USERDOMAIN=LAPTOP
USERNAME=David Candy
USERPROFILE=C:\Users\David Candy
HOMEPATH=\Users\David Candy
HOMEDRIVE=C:
APPDATA=C:\Users\David Candy\AppData\Roaming
LOCALAPPDATA=C:\Users\David Candy\AppData\Local
USERDOMAIN_ROAMINGPROFILE=LAPTOP
 
--------
User - These override system variables, and in the case of PATH are added to the system PATH
--------
OneDrive=C:\Users\David Candy\OneDrive
Path=C:\Users\David Candy\AppData\Local\Microsoft\WindowsApps;;C:\Users\David Candy\AppData\Local\Programs\Fiddler
TEMP=%USERPROFILE%\AppData\Local\Temp
TMP=%USERPROFILE%\AppData\Local\Temp
 
--------
Process - This is the combined environment from the above for the program
          Variables starting with an equals sign, such as =C:=C:\Windows are internal CMD variables
          CMD simulates a default directory per drive like MSDos. This is how it keeps track
--------
=C:=C:\Windows\System32
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\David Candy\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=LAPTOP
ComSpec=C:\Windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\David Candy
LOCALAPPDATA=C:\Users\David Candy\AppData\Local
LOGONSERVER=\\LAPTOP
NUMBER_OF_PROCESSORS=4
OneDrive=C:\Users\David Candy\OneDrive
OS=Windows_NT
Path=C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Users\David Candy\AppData\Local\Microsoft\WindowsApps;C:\Users\David Candy\AppData\Local\Programs\Fiddler
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.cpl
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 126 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=7e05
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\DAVIDC~1\AppData\Local\Temp
TMP=C:\Users\DAVIDC~1\AppData\Local\Temp
USERDOMAIN=LAPTOP
USERDOMAIN_ROAMINGPROFILE=LAPTOP
USERNAME=David Candy
USERPROFILE=C:\Users\David Candy
windir=C:\Windows
 
--------
Dynamic - These are updated each time they are used
--------
CD
DATE
TIME
RANDOM
ERRORLEVEL
CMDEXTVERSION
CMDCMDLINE
HIGHESTNUMANODENUMBER

This command lists shell folders. Use with the shell: command in Run dialog.

EG

shell:appsfolder

@For /f "tokens=1* delims=" %%A in ('reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions /f name /v name /s ^| findstr /c:"Name" ^| Sort') Do @Echo %%A
pause

And gives output like

Name    REG_SZ    3D Objects
Name    REG_SZ    AccountPictures
Name    REG_SZ    AddNewProgramsFolder
Name    REG_SZ    Administrative Tools
Name    REG_SZ    AppData
Name    REG_SZ    AppDataDesktop
Name    REG_SZ    AppDataDocuments
Name    REG_SZ    AppDataFavorites
Name    REG_SZ    AppDataProgramData
Name    REG_SZ    Application Shortcuts
Name    REG_SZ    AppMods
Name    REG_SZ    AppsFolder
Name    REG_SZ    AppUpdatesFolder
Name    REG_SZ    Cache
Name    REG_SZ    Camera Roll
Name    REG_SZ    CameraRollLibrary
Name    REG_SZ    Captures
Name    REG_SZ    CD Burning
Name    REG_SZ    ChangeRemoveProgramsFolder
Name    REG_SZ    Common Administrative Tools
Name    REG_SZ    Common AppData
Name    REG_SZ    Common Desktop
Name    REG_SZ    Common Documents
Name    REG_SZ    Common Programs
Name    REG_SZ    Common Start Menu
Name    REG_SZ    Common Start Menu Places
Name    REG_SZ    Common Startup
Name    REG_SZ    Common Templates
Name    REG_SZ    CommonDownloads
Name    REG_SZ    CommonMusic
Name    REG_SZ    CommonPictures
Name    REG_SZ    CommonRingtones
Name    REG_SZ    CommonVideo
Name    REG_SZ    ConflictFolder
Name    REG_SZ    ConnectionsFolder
Name    REG_SZ    Contacts
Name    REG_SZ    ControlPanelFolder
Name    REG_SZ    Cookies
Name    REG_SZ    CredentialManager
Name    REG_SZ    CryptoKeys
Name    REG_SZ    CSCFolder
Name    REG_SZ    Desktop
Name    REG_SZ    Development Files
Name    REG_SZ    Device Metadata Store
Name    REG_SZ    DocumentsLibrary
Name    REG_SZ    Downloads
Name    REG_SZ    DpapiKeys
Name    REG_SZ    Favorites
Name    REG_SZ    Fonts
Name    REG_SZ    GameTasks
Name    REG_SZ    History
Name    REG_SZ    HomeGroupCurrentUserFolder
Name    REG_SZ    HomeGroupFolder
Name    REG_SZ    ImplicitAppShortcuts
Name    REG_SZ    InternetFolder
Name    REG_SZ    Libraries
Name    REG_SZ    Links
Name    REG_SZ    Local AppData
Name    REG_SZ    Local Documents
Name    REG_SZ    Local Downloads
Name    REG_SZ    Local Music
Name    REG_SZ    Local Pictures
Name    REG_SZ    Local Videos
Name    REG_SZ    LocalAppDataLow
Name    REG_SZ    LocalizedResourcesDir
Name    REG_SZ    MAPIFolder
Name    REG_SZ    MusicLibrary
Name    REG_SZ    My Music
Name    REG_SZ    My Pictures
Name    REG_SZ    My Video
Name    REG_SZ    MyComputerFolder
Name    REG_SZ    NetHood
Name    REG_SZ    NetworkPlacesFolder
Name    REG_SZ    OEM Links
Name    REG_SZ    OneDrive
Name    REG_SZ    OneDriveCameraRoll
Name    REG_SZ    OneDriveDocuments
Name    REG_SZ    OneDriveMusic
Name    REG_SZ    OneDrivePictures
Name    REG_SZ    Original Images
Name    REG_SZ    Personal
Name    REG_SZ    PhotoAlbums
Name    REG_SZ    PicturesLibrary
Name    REG_SZ    Playlists
Name    REG_SZ    PrintersFolder
Name    REG_SZ    PrintHood
Name    REG_SZ    Profile
Name    REG_SZ    ProgramFiles
Name    REG_SZ    ProgramFilesCommon
Name    REG_SZ    ProgramFilesCommonX64
Name    REG_SZ    ProgramFilesCommonX86
Name    REG_SZ    ProgramFilesX64
Name    REG_SZ    ProgramFilesX86
Name    REG_SZ    Programs
Name    REG_SZ    Public
Name    REG_SZ    PublicAccountPictures
Name    REG_SZ    PublicGameTasks
Name    REG_SZ    PublicLibraries
Name    REG_SZ    Quick Launch
Name    REG_SZ    Recent
Name    REG_SZ    Recorded Calls
Name    REG_SZ    RecordedTVLibrary
Name    REG_SZ    RecycleBinFolder
Name    REG_SZ    ResourceDir
Name    REG_SZ    Retail Demo
Name    REG_SZ    Ringtones
Name    REG_SZ    Roamed Tile Images
Name    REG_SZ    Roaming Tiles
Name    REG_SZ    SavedGames
Name    REG_SZ    SavedPictures
Name    REG_SZ    SavedPicturesLibrary
Name    REG_SZ    Screenshots
Name    REG_SZ    Searches
Name    REG_SZ    SearchHistoryFolder
Name    REG_SZ    SearchHomeFolder
Name    REG_SZ    SearchTemplatesFolder
Name    REG_SZ    SendTo
Name    REG_SZ    Start Menu
Name    REG_SZ    Startup
Name    REG_SZ    SyncCenterFolder
Name    REG_SZ    SyncResultsFolder
Name    REG_SZ    SyncSetupFolder
Name    REG_SZ    System
Name    REG_SZ    SystemCertificates
Name    REG_SZ    SystemX86
Name    REG_SZ    Templates
Name    REG_SZ    ThisDeviceFolder
Name    REG_SZ    ThisPCDesktopFolder
Name    REG_SZ    User Pinned
Name    REG_SZ    UserProfiles
Name    REG_SZ    UserProgramFiles
Name    REG_SZ    UserProgramFilesCommon
Name    REG_SZ    UsersFilesFolder
Name    REG_SZ    UsersLibrariesFolder
Name    REG_SZ    VideosLibrary
Name    REG_SZ    Windows

Finally list protocol handlers. This is how UWP apps are started. Also new control panel applets.

EG

calculator://

@For /f "tokens=1* delims=" %%A in ('reg query HKCR /f "URL:*" /s /d ^| findstr /c:"URL:" ^| findstr /v /c:"URL: " ^| Sort') Do @Echo %%A %%B
pause

And the output is

(Default)    REG_SZ    URL:armodelviewing 
(Default)    REG_SZ    URL:Available Networks Protocol 
(Default)    REG_SZ    URL:bingweather 
(Default)    REG_SZ    URL:calculator 
(Default)    REG_SZ    URL:com.gotrust.cdfapp 
(Default)    REG_SZ    URL:com.microsoft.3dviewer 
(Default)    REG_SZ    URL:Devices Flow Connectable Devices Protocol 
(Default)    REG_SZ    URL:Devices Flow Display Topology Protocol 
(Default)    REG_SZ    URL:dlna-playsingle Protocol 
(Default)    REG_SZ    URL:dropbox-oem 
(Default)    REG_SZ    URL:evernote 
(Default)    REG_SZ    URL:fb-events-share 
(Default)    REG_SZ    URL:fb-messenger 
(Default)    REG_SZ    URL:fb-messenger-api 
(Default)    REG_SZ    URL:fb-messenger-api20131028 
(Default)    REG_SZ    URL:fb-messenger-api20140131 
(Default)    REG_SZ    URL:fb-messenger-api20140301 
(Default)    REG_SZ    URL:fb-messenger-api20140430 
(Default)    REG_SZ    URL:fb-messenger-diode 
(Default)    REG_SZ    URL:fb-messenger-group-thread 
(Default)    REG_SZ    URL:fb-messenger-neue 
(Default)    REG_SZ    URL:fb-messenger-platform 
(Default)    REG_SZ    URL:fb-messenger-platform-20150128 
(Default)    REG_SZ    URL:fb-messenger-platform-20150218 
(Default)    REG_SZ    URL:fb-messenger-platform-20150305 
(Default)    REG_SZ    URL:fb-messenger-platform-20150714 
(Default)    REG_SZ    URL:fb-messenger-public 
(Default)    REG_SZ    URL:fb-messenger-share 
(Default)    REG_SZ    URL:fb-messenger-share-api 
(Default)    REG_SZ    URL:fb-messenger-voip 
(Default)    REG_SZ    URL:fb-page-messages 
(Default)    REG_SZ    URL:fbmessenger 
(Default)    REG_SZ    URL:feedback-hub 
(Default)    REG_SZ    URL:fiddlerapp 
(Default)    REG_SZ    URL:File Protocol 
(Default)    REG_SZ    URL:File Transfer Protocol 
(Default)    REG_SZ    URL:File Transfer Protocol 
(Default)    REG_SZ    URL:http 
(Default)    REG_SZ    URL:https 
(Default)    REG_SZ    URL:HyperText Transfer Protocol 
(Default)    REG_SZ    URL:HyperText Transfer Protocol with Privacy 
(Default)    REG_SZ    URL:insiderhub 
(Default)    REG_SZ    URL:LDAP Protocol 
(Default)    REG_SZ    URL:LDAP Protocol 
(Default)    REG_SZ    URL:mailto 
(Default)    REG_SZ    URL:messenger 
(Default)    REG_SZ    URL:microsoft-edge 
(Default)    REG_SZ    URL:microsoft.windows.camera 
(Default)    REG_SZ    URL:microsoft.windows.camera.picker 
(Default)    REG_SZ    URL:microsoft.windows.photos.crop 
(Default)    REG_SZ    URL:microsoft.windows.photos.picker 
(Default)    REG_SZ    URL:microsoft.windows.photos.videoedit 
(Default)    REG_SZ    URL:microsoftmusic 
(Default)    REG_SZ    URL:microsoftvideo 
(Default)    REG_SZ    URL:MK Protocol 
(Default)    REG_SZ    URL:mms Protocol 
(Default)    REG_SZ    URL:mms Protocol 
(Default)    REG_SZ    URL:ms-aad-brokerplugin 
(Default)    REG_SZ    URL:ms-actioncenter 
(Default)    REG_SZ    URL:ms-appinstaller 
(Default)    REG_SZ    URL:ms-apprep 
(Default)    REG_SZ    URL:ms-calculator 
(Default)    REG_SZ    URL:ms-clock 
(Default)    REG_SZ    URL:ms-contact-support 
(Default)    REG_SZ    URL:ms-cortana2 
(Default)    REG_SZ    URL:ms-cxh 
(Default)    REG_SZ    URL:ms-default-location 
(Default)    REG_SZ    URL:ms-device-enrollment 
(Default)    REG_SZ    URL:ms-drive-to 
(Default)    REG_SZ    URL:ms-eyecontrolspeech 
(Default)    REG_SZ    URL:ms-gamebarservices 
(Default)    REG_SZ    URL:ms-gamingoverlay 
(Default)    REG_SZ    URL:ms-get-started 
(Default)    REG_SZ    URL:ms-getoffice 
(Default)    REG_SZ    URL:ms-holographicfirstrun 
(Default)    REG_SZ    URL:ms-inputapp 
(Default)    REG_SZ    URL:ms-insights 
(Default)    REG_SZ    URL:ms-ipmessaging 
(Default)    REG_SZ    URL:ms-meetnowflyout 
(Default)    REG_SZ    URL:ms-msdt 
(Default)    REG_SZ    URL:ms-officeapp 
(Default)    REG_SZ    URL:ms-officecmd 
(Default)    REG_SZ    URL:ms-oobenetwork 
(Default)    REG_SZ    URL:ms-paint 
(Default)    REG_SZ    URL:ms-penworkspace 
(Default)    REG_SZ    URL:ms-people 
(Default)    REG_SZ    URL:ms-phone 
(Default)    REG_SZ    URL:ms-photos 
(Default)    REG_SZ    URL:ms-print-addprinter 
(Default)    REG_SZ    URL:ms-print-printjobs 
(Default)    REG_SZ    URL:ms-quick-assist 
(Default)    REG_SZ    URL:ms-retaildemo-launchbioenrollment 
(Default)    REG_SZ    URL:ms-retaildemo-launchstart 
(Default)    REG_SZ    URL:ms-screenclip 
(Default)    REG_SZ    URL:ms-screensketch 
(Default)    REG_SZ    URL:ms-search 
(Default)    REG_SZ    URL:ms-settings 
(Default)    REG_SZ    URL:ms-settings-airplanemode 
(Default)    REG_SZ    URL:ms-settings-bluetooth 
(Default)    REG_SZ    URL:ms-settings-cellular 
(Default)    REG_SZ    URL:ms-settings-emailandaccounts 
(Default)    REG_SZ    URL:ms-settings-language 
(Default)    REG_SZ    URL:ms-settings-location 
(Default)    REG_SZ    URL:ms-settings-lock 
(Default)    REG_SZ    URL:ms-settings-mobilehotspot 
(Default)    REG_SZ    URL:ms-settings-notifications 
(Default)    REG_SZ    URL:ms-settings-power 
(Default)    REG_SZ    URL:ms-settings-privacy 
(Default)    REG_SZ    URL:ms-settings-proximity 
(Default)    REG_SZ    URL:ms-settings-screenrotation 
(Default)    REG_SZ    URL:ms-settings-wifi 
(Default)    REG_SZ    URL:ms-settings-workplace 
(Default)    REG_SZ    URL:ms-sttoverlay 
(Default)    REG_SZ    URL:ms-taskswitcher 
(Default)    REG_SZ    URL:ms-unistore-email 
(Default)    REG_SZ    URL:ms-voip-call 
(Default)    REG_SZ    URL:ms-voip-video 
(Default)    REG_SZ    URL:ms-walk-to 
(Default)    REG_SZ    URL:ms-wcrv 
(Default)    REG_SZ    URL:ms-windows-search 
(Default)    REG_SZ    URL:ms-windows-store 
(Default)    REG_SZ    URL:ms-windows-store2 
(Default)    REG_SZ    URL:ms-wpc 
(Default)    REG_SZ    URL:ms-wpdrmv 
(Default)    REG_SZ    URL:ms-xgpueject 
(Default)    REG_SZ    URL:msnweather 
(Default)    REG_SZ    URL:om.facebook.317180b0bb486 
(Default)    REG_SZ    URL:onenote 
(Default)    REG_SZ    URL:onenote-cmd 
(Default)    REG_SZ    URL:outlookaccounts 
(Default)    REG_SZ    URL:outlookcal 
(Default)    REG_SZ    URL:outlookmail 
(Default)    REG_SZ    URL:Play Single DLNA Item Protocol 
(Default)    REG_SZ    URL:pw.gregoauth2 
(Default)    REG_SZ    URL:read 
(Default)    REG_SZ    URL:RES Protocol 
(Default)    REG_SZ    URL:RLogin Protocol 
(Default)    REG_SZ    URL:rsgcribbagedeluxe 
(Default)    REG_SZ    URL:rsgheartsdeluxe 
(Default)    REG_SZ    URL:rsgsimplemahjong 
(Default)    REG_SZ    URL:rsgsimplesolitaire 
(Default)    REG_SZ    URL:rsgsimplespider 
(Default)    REG_SZ    URL:rtkuwp 
(Default)    REG_SZ    URL:skype 
(Default)    REG_SZ    URL:skypewin 
(Default)    REG_SZ    URL:spotify 
(Default)    REG_SZ    URL:tbauth 
(Default)    REG_SZ    URL:tel 
(Default)    REG_SZ    URL:Telnet Protocol 
(Default)    REG_SZ    URL:TN3270 Protocol 
(Default)    REG_SZ    URL:Virtual Touchpad 
(Default)    REG_SZ    URL:vscode 
(Default)    REG_SZ    URL:windows-feedback 
(Default)    REG_SZ    URL:windows.tbauth 
(Default)    REG_SZ    URL:windowsdefender 
(Default)    REG_SZ    URL:xbls 
(Default)    REG_SZ    URL:xbox 
(Default)    REG_SZ    URL:xbox-arena 
(Default)    REG_SZ    URL:xbox-captures 
(Default)    REG_SZ    URL:xbox-friendfinder 
(Default)    REG_SZ    URL:xbox-gamehub 
(Default)    REG_SZ    URL:xbox-lfg 
(Default)    REG_SZ    URL:xbox-network 
(Default)    REG_SZ    URL:xbox-profile 
(Default)    REG_SZ    URL:xbox-settings 
(Default)    REG_SZ    URL:xbox-store 
(Default)    REG_SZ    URL:xbox-tcui 
(Default)    REG_SZ    URL:xboxgames 
(Default)    REG_SZ    URL:xboxliveapp-1297287741 
(Default)    REG_SZ    URL:xboxmusic 
(Default)    REG_SZ    URL:zune 
2
  • My questions is centered on how can one utilize the variables to be used in Windows Explorer on your local drive. I don't feel this answer is a direct answer to that.
    – AlienBoy
    Jun 8, 2021 at 18:04
  • That's because Windows' Explorer doesn't need them. It uses Known Folders not variables. Variables can be changed by programs or users and are unreliable. Jun 10, 2021 at 6:37
4

I would like to know the full list of variables that I can use in Windows Explorer or related relative paths that is accepted by Windows 10. Variables like %appdata%, %userprofile%, %windir%...etc.

You can list the system's environmental variables by running the following PowerShell command:

Get-ChildItem Env: | Sort Name

enter image description here

Any variable that contains a path, can be viewed with File Explorer, by using the %NAME% (i.e. %ALLUSERSPROFILE%) syntax.

2
  • The answer is the PowerShell command that lists the environmental variables, not the list of environmental variables, as the values will differ from system to system. Which is the reason the output of the command is an image instead of text.
    – Ramhound
    Jun 7, 2021 at 16:04
  • Thank you! Both @mokubai and your answers achieved the same thing, but I can only pick one best answer.
    – AlienBoy
    Jun 7, 2021 at 18:43
0

Both answers from @mokubai and @ramhound are useful and basically they are the same just one use command prompt and the other uses PowerShell.

I just want to add a list to default environment variables of Windows 10, so others can have more resources to learn. This answer was inspired by both of their answers, so kudos to them.

https://pureinfotech.com/list-environment-variables-windows-10/

Note: some of them only work in command prompt

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .