用GUI的方法可能添加环境变量可能会比较麻烦,为此可采用命令行操作的方式。

步骤

  1. 以管理员身份运行 cmd 输入 setx /M "%path%" "%path%[new_path];"。其中 \M开关表示添加系统变量,由于%path%` 本身是系统变量和用户变量拼起来的,不能用此方法添加用户变量。
    详见https://superuser.com/questions/601015/how-to-update-the-path-user-environment-variable-from-command-line
  2. 设置在新的命令行窗口生效。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-10
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2022-02-09
  • 2021-07-17
  • 2021-09-10
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案