List all environment variables from the command line

前端 未结 8 1421
星月不相逢
星月不相逢 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:44

    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.

提交回复
热议问题