When I try to run my C++ project in Code::Blocks IDE, it'll run the program in Windows CMD without any problem. If I try to run the program via Explorer it'll also run in CMD without any problem.
However, if I try to run the exactly SAME program via CLion, it'll run fine in CLion itself (CLion has a builtin terminal, while Code::Blocks uses Windows CMD). But if I try to run the program via Explorer I get this weird error: 

If I press OK:

Anyone knows what the problem is? How do I fix this?
More information:
Code::Blocks comes as a package with MinGW. With CLion I had to manually download a Toolchain. I downloaded and installed MinGW-w64, because I didn't know anything else and that's what Code::Blocks also used.
The weird part about this is that MinGW-w64 is installed in "Program Files (x86)" and not in "Program Files".