Do not rely on folder names. Check HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full to see the actual version installed.
"Maybe," Elena replied, "but 'maybe' is how breaches start." microsoft net framework 4.0 v 30319 vulnerabilities
Many apps still use BinaryFormatter or LOSFormatter — both are on unpatched 4.0. Do not rely on folder names