The thing is that I get this error now matter which program is using or accesing the shell. Lets say I am running a python script that outputs the shell. The first line of the execution is this message than Python prints out the result of the script.
So it is not an isolated application that is refusing to play nice with the windows shell. It looks like my environment variables are intact. I cannot find any trace of "program files" in the environment variables. Searching for c:\program brings hit loads of results in the regedit so that is not a feasible method.
When I hit win+r and type cmd.exe, this is the message I get. When i run cmd.exe from within the Windows directory, this is the message I get. So the cmd.exe has this message embedded somewhere, since many other apps use cmd.exe, they print out the very similar message.