Hi,
First of all thanks Christophe for your quick response!
After a few hours checking again I figured out what was happening. The problem was indeed related to MPICH, although it was a bit confusing at first because I was able to run the example that calculates pi (included with MPICH) normally.
What I did was running the command that failed (included in my first screenshot) but directly into the command prompt and adding the -verbose flag, which showed some message with "access denied" so I did again the whole MPICH registration from a command prompt running as administrator (smpd -install, mpiexec -remove, mpiexec -register, mpiexec -validate) and now it works.
Thank you!