List all environment variables from the command line
Is it possible to list all environment variables from a Windows' command prompt?
Something equivalent to PowerShell's
gci env: (or
ls env: or
You can also do
SET prefix to see all variables with names starting with
For example, if you want to read only derbydb from the environment variables, do the following:
...and you will get the following:
Read more… Read less…
Jon has the right answer, but to elaborate a little more with some syntactic sugar..
SET | more
enables you to see the variables one page at a time, rather than the whole lot, or
SET > output.txt
sends the output to a file output.txt which you can open in Notepad or whatever...
You can use
SET in cmd
To show the current variable, just
SET is enough
To show certain variable such as 'PATH', use
For help, type
Don't lose time. Search for it in the registry:
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
returns less than the SET command.