구체적으로 시도했지만 attrib
System32의 모든 명령이 작동하지 않는다고 생각합니다. 경로 변수에 문제가 있었는데, 이 문제 C:\Windows\System32
는 내 변수 끝에 표시되므로 지금은 해결되었다고 생각합니다 %path%
. 하지만 attrib
여전히 작동하지 않습니다.
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft
Corporation. All rights reserved.
C:\Users\tri-eng>echo %path%
C:\oracle\x86;C:\oracle\iqms\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program
Files (x86)\NVIDIA Corporation\PhysX\Common;c:\Program Files (x86)\AMD
APP\bin\x 86_64;c:\Program Files (x86)\AMD
APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;
%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Prog
ram Files (x86)\Intel\Services\IPT\;c:\Program Files (x86)\ATI
Technologies\ATI. ACE\Core-Static;C:\Program Files\Dell\Dell Data
Protection\Access\Advanced\Wave\ Gemalto\Access Client\v5\;C:\Program
Files (x86)\NTRU Cryptosystems\NTRU TCG Sof tware
Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software
Stack\bin " ;C:\Users\tri-eng\Documents\nodejs\;C:\Windows\System32;
C:\Users\tri-eng>attrib
// DOESN'T WORK!
'attrib' is not recognized as an internal or
external command, operable program or batch file.
C:\Users\tri-eng>C:\Windows\System32\attrib A
// WORKS!
// ...(output of attrib command)...
C:\Users\tri-eng>
어쩌면 레지스트리에 뭔가가 있는 것일까요?
답변1
문제는 %PATH%
환경 변수가 자동으로 확장되지 않았다는 것, 즉 %systemroot%
값이 C:\Windows\System32
.
%PATH%
이는 소프트웨어 설치 중에 환경 변수를 잘못 다시 작성했기 때문에 발생했습니다 .
%PATH%
이 문제를 해결하기 위해 레지스트리 항목을 다음과 같이 교체했습니다 .
윈도우 7의 경우:
검색해서
regedit.exe
실행해보세요. GUI가 열립니다.아래로 이동
HKEY_LOCAL_MACHINE > SYSTEM > ControlSet > Control > Session Manager > Environment
PATH 변수의 유형을 확인하세요. REG_SZ인 경우 이 수정 사항이 작동할 수 있습니다.
보관을 위해 PATH 변수의 내용을 메모장에 복사합니다.
PATH 변수 삭제
마우스 오른쪽 버튼 클릭 > 새로 만들기 > 확장 가능한 문자열 변수
이름을 PATH로 설정
내용을 4단계에서 복사한 값으로 설정
적용하려면 재부팅이 필요합니다.