【发布时间】:2016-11-07 11:12:40
【问题描述】:
我的 PATH 环境变量有问题。如果我在系统属性中查看环境变量中的 PATH,我会得到这个(添加换行符以提高可读性):
C:\app\User\product\11.2.0\dbhome_1\bin;C:\Python34\;C:\Python34\Scripts;
C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\Windows Live\Shared;C:\Program Files(x86)\CMake\bin;
C:\Program Files\Microsoft\Web PlatformInstaller\;
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;
C:\Program Files (x86)\Livestreamer;C:\Program Files (x86)\Git\cmd;
C:\MinGW\bin;C:\Program Files (x86)\Skype\Phone\;
C:\Program Files\Haskell Platform\7.10.3\mingw\bin;
C:\Program Files\Microsoft Network Monitor 3\;
C:\Program Files\Java\jdk1.8.0_20\bin;C:\Users\User\Anaconda3;
C:\Users\User\Anaconda3\Scripts;C:\Users\User\Anaconda3\Library\bin;
C:\Users\User\Anaconda\Lib\site-packages;C:\gradle\bin
但如果我用运行对话框打开 cmd 并写 PATH,我会得到:
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Haskell\bin;C:\Program
Files\Haskell Platform\7.10.3\lib\extralibs\bin;C:\Program Files\Haskell Platfo
rm\7.10.3\bin;C:\gurobi605\win64\bin;C:\Perl\site\bin;C:\Perl\bin;C:\app\User\pr
oduct\11.2.0\dbhome_1\bin;C:\Python34\;C:\Python34\Scripts;C:\Program Files\Comm
on Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Micro
soft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live
\Shared;C:\Program Files(x86)\CMake\bin;C:\Program Files\Microsoft\Web Platform
Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\P
rogram Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program File
s (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Microsoft SQL Serv
er\120\DTS\Binn\;C:\Program Files (x86)\Livestreamer;C:\Users\User\AppData\Roami
ng\npm;C:\Program Files (x86)\Git\cmd;C:\MinGW\bin;C:\Program Files\Microsoft SQ
L Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\1
10\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Fi
les (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files
(x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;
C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files\Haskell Platform\
7.10.3\mingw\bin;C:\Program Files\Microsoft Network Monitor 3\
我可以以某种方式使它们相同吗?我需要使用系统属性中的 PATH,而不是命令行中的。
我尝试使用set PATH="(new path)" 更改命令行中的路径,但这只是暂时更改它。如果我关闭并打开一个新的控制台窗口,它会返回。
我也试过setx PATH "(new path)",但也没有任何改变。
我使用的是 64 位 Windows 7 家庭高级版
【问题讨论】:
-
您是在问它们的内容是否不同,或者如何在 CMD 中的分号后添加换行符?
-
我想知道如何使它们相同。无法弄清楚如何永久更改 cmd PATH。帖子里有提到。反正已经解决了。
-
不明白为什么这个问题被标记为离题。系统变量经常涉及到编程。
标签: windows path environment-variables