List all environment variables from the command line

前端 未结 8 1399
星月不相逢
星月不相逢 2020-11-28 17:01

Is it possible to list all environment variables from a Windows\' command prompt?

Something equivalent to PowerShell\'s gci env: (or ls e

8条回答
  •  执笔经年
    2020-11-28 17:37

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

提交回复
热议问题