'C:\Program' is not recognized as an internal or external command

Continuation of Developer cmd: 'C;\Program' is not recognized as an internal or external command - #19

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

I’ve tried all possible solutions in the thread above.
I’ve tried reinstalling VS Community 2019 and UE 4.25 in locations where “Program Files” wouldn’t be needed as per C:/Program not recognized as an internal or external command - UE4 AnswerHub

Still no luck. Please advise.

EDIT:

I am trying to compile ToonTanks in VS Code with ToonTanksEditor win64 Development Build.

Also, I suppose this isn’t super urgent. I’ll just compile from the editor.

Could you go to the file location and right click the shortcut and open the properties

(disregard the specific VS version in the screenshot)
image

What do you have as the target? It should be something like

%comspec% /k "C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat"

%comspec% /k "C:\MSVC\Common7\Tools\VsDevCmd.bat"

And where are you getting that output? When you run the task? What’s the full output?

Sorry, I don’t follow.

That is the target in the properties as shown in your post before.

Sorry I meant the error from the original post.

I get that from VS Code’s terminal.


> Executing task in folder ToonTanks: Engine\Build\BatchFiles\Build.bat ToonTanksEditor Win64 Development C:\UnrealProjects\ToonTanks\ToonTanks.uproject -waitmutex <

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

The only other thing that I thought might be a problem was that my ‘cl’ path is
C:\MSVC\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\cl.exe
whereas the unreal compiler path is x64.

That shouldn’t be an issue, cl just invokes something else IIRC. Tough not sure what you mean by “Unreal compiler path”

Are you able to try installing MSVC to the default path?

I’m currently looking into the UnrealBuildTool to see why it’s not finding the correct path.

I see. I was referring to the compiler path in the .vscode c_cpp_properties:
"compilerPath": "C:\\MSVC\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\cl.exe",

Also, I had installed Visual Studio Community 2019 in the default path initially and had the same problem. I can try again as needed.

That’s only for IntelliSense.

Please do.

Visual Studio Community 2019 reinstalled to default path.
%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"

Error persists.

> Executing task in folder ToonTanks: Engine\Build\BatchFiles\Build.bat ToonTanksEditor Win64 Development C:\Users\kevin\Desktop\UnrealProjects\ToonTanks\ToonTanks.uproject -waitmutex <

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Could you describe the steps you took in the thread you posted? Did you put quotes around paths in the Path environment variable? Could you show both system and user Path values?

Path in User Variables copied into vscode, quotes added, then copied back.
"C:\Users\kevin\AppData\Local\Programs\Python\Python38-32\Scripts\";"C:\Users\kevin\AppData\Local\Programs\Python\Python38-32\";"C:\NVPACK\android-sdk-windows\extras\android\support";"C:\NVPACK\android-sdk-windows\build-tools";"C:\NVPACK\android-sdk-windows\platform-tools";"C:\NVPACK\android-sdk-windows\tools";"C:\NVPACK\gradle-4.1\bin";"C:\NVPACK\apache-ant-1.8.2\bin";"C:\NVPACK\jdk1.8.0_77\bin";"C:\NVPACK\android-ndk-r14b";"C:\Users\kevin\AppData\Local\Microsoft\WindowsApps";

System Variables as is.
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\Git\cmd;C:\Program Files\MongoDB\Server\4.4\bin;C:\xampp\php;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files (x86)\Yarn\bin\;C:\Gradle\gradle-6.9\bin;C:\msys64\mingw64\bin;C:\Program Files\CMake\bin;C:\Program Files\Microsoft VS Code\bin;

Still getting the same error.

Really not sure what’s going on. Could you try doing the same with the system one as well as verifying your UE4 engine installation?
verify

After adding quotes to System Paths and verifying UE4.

> Executing task in folder ToonTanks: Engine\Build\BatchFiles\Build.bat ToonTanksEditor Win64 Development C:\Users\kevin\Desktop\UnrealProjects\ToonTanks\ToonTanks.uproject -waitmutex <

The terminal process failed to launch: Path to shell executable "cmd.exe" does not exist.

Terminal will be reused by tasks, press any key to close it.

Well that is probably worse. If you undo all the quotation you did, does it magically fix itself?

All quotes removed and now it’s back to the program error.

Well that is unfortunate as I’m now all out of ideas. I think you should contact Epic support.

Epic Games Technical Support & Customer Service | Epic Games

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms