2019-05-11-装CTeX被坑,我的系统环境变量PATH全没了

2019-05-11-装CTeX被坑,我的系统环境变量PATH全没了

CTeX作者报复社会,不知道我哪里下的野版本,安装完PATH全没了。全盘备份的wim嫌旧怎么办,于是左右借来恢复PATH。

1.尝试用wimkit阅读我之前的wim文件里的C:\windows\system32\config\system覆盖(当然有备份)真机文件,重启错误,只好又拷贝回去。

2.借舍友的PATH

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
%SYSTEMROOT%\System32\OpenSSH\;
D:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;
%JAVA_HOME%\bin;
%JAVA_HOME%\jre\bin;
D:\Program Files (x86)\SMLNJ\bin\;
D:\Program Files\CMake\bin;
D:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;
D:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;
D:\Program Files\Microsoft SQL Server\140\Tools\Binn\;
D:\Program Files\Microsoft SQL Server\140\DTS\Binn\;
D:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;
D:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;
D:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;
D:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\

3.开启我在机房全盘拷贝的win7系统,PATH有这些变量

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
C:\NOIP\MinGWNOIP\bin;
C:\PROGRA~1\IMAGIN~1\TOOLCH~1\mips-mti-linux-gnu\2015.06-05\bin;
C:\PROGRA~1\IMAGIN~1\TOOLCH~1\mips-mti-elf\2015.01-7\bin;
C:\PROGRA~1\IMAGIN~1\Internals\msys\bin;
C:\Program Files\MATLAB\R2010b\bin;
C:\Program Files\MATLAB\R2010b\bin\win64;
C:\Perl64\site\bin;
C:\Perl64\bin;
C:\Program Files\Sybase\Jaguar CTS 3.5\bin;
C:\Program Files\Sybase\Jaguar CTS 3.5\dll;
C:\Program Files\Sybase\Jaguar CTS 3.5\client\dll;
C:\Program Files (x86)\Sybase\Shared\Sun\JDK118\bin;
C:\Program Files (x86)\Sybase\Shared\PowerBuilder;
C:\PROGRA~2\Borland\CBUILD~1\Bin;
C:\PROGRA~2\Borland\CBUILD~1\Projects\Bpl;
C:\Program Files (x86)\Intel\iCLS Client\;
C:\Program Files\Intel\iCLS Client\;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files\MATLAB\R2010b\runtime\win64;
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;
C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files (x86)\Sybase\SQL Anywhere 7\win32;
C:\Program Files (x86)\Sybase\PowerDynamo\win32;
C:\Program Files (x86)\Sybase\Shared\Web Targets;
C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools\WinNT;
C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin;
C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools;
C:\Program Files (x86)\Microsoft Visual Studio\VC98\bin;
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;
C:\Program Files\Git\cmd;
c:\iverilog\bin;
c:\iverilog\gtkwave\bin;
C:\Program Files (x86)\Digilent\AdeptUtilities

我是一个个用everything和资源管理器对比真实路径的,然后手动恢复的,恢复完还是没法操作,有一个注意点,就是每一行行尾不要加分号。其实你看
计算机\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment里面就知道了,改完就好了。

image.png

最终配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
C:\Program Files\Imagination Technologies\Internals\msys\bin
C:\Program Files\Imagination Technologies\Toolchains\mips-mti-elf\2015.01-7\bin
C:\PROGRA~1\IMAGIN~1\Internals\msys\bin
C:\PROGRA~1\IMAGIN~1\TOOLCH~1\mips-mti-linux-gnu\2015.06-05\bin
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
%JAVA_HOME%\bin
%SYSTEMROOT%\System32\OpenSSH\
%JAVA_HOME%\jre\bin
%GOROOT%\bin
C:\Program Files (x86)\SMLNJ\bin\
C:\Program Files\CMake\bin
C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\
C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\
C:\Program Files\Microsoft SQL Server\140\Tools\Binn\
C:\Program Files\Microsoft SQL Server\140\DTS\Binn\
C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\
C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\
C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\
C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio
C:\CTEX\UserData\miktex\bin
C:\CTEX\MiKTeX\miktex\bin
C:\CTEX\CTeX\ctex\bin
C:\CTEX\CTeX\cct\bin
C:\CTEX\CTeX\ty\bin
C:\CTEX\Ghostscript\gs9.00\bin
C:\CTEX\GSview\gsview
C:\CTEX\WinEdt
C:\MinGW\bin
C:\Users\Administrator\AppData\Local\Programs\Python\Python36

嘴臭一下,CTeX NM$L。