dxdiag /t output.txt
FOR %%GeForce IN output.txt DO echo You have an NVIDIA GPU.
FOR %%Radeon IN output.txt DO echo You have an AMD GPU.
위의 내용은 제가 작성한 배치 파일의 일부입니다. 실행하면 아래 오류 메시지가 나타납니다.예기치 않은 명령 변수
%GeForce was unexpected at this time.
그리고 배치 파일이 종료됩니다. 나는 이미 다른 해답을 시도했지만 아무도 도움이되지 않는다. 내 구문에 문제가 있습니까? Dell Latitude E6400에서 Windows XP SP3을 실행 중입니다. 당신이 원하는 것은 명령 시도 "를"이
dxdiag /t output.txt
FOR /f %%a IN (output.txt) DO (
if %%a == GeForce echo You have an NVIDIA GPU.)
FOR /f %%a IN (output.txt) DO (
if %%a == Radeon echo You have an AMD GPU.)
이 함께이 일을 시도 할 경우, Herro
find "GeForce" output2.txt >nul && echo You have an NVIDIA GPU.
find "Radeon" output2.txt >nul && echo You have an AMD GPU.
감사합니다. – Anon10W1z