Looks like registry keys are some how altered.
Open registry editor (search in start menu) and go to the path HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7, and see if following entries exist or not.
JavaHome C:\Program Files\Java\jre7
Microversion 0
RuntimeLib C:\Program Files\Java\jre7\bin\client\jvm.dll
Also, go to HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.7, and look for following key.
JavaHome C:\Program Files\Java\jdk1.7.0
Microversion 0
If above keys do not exist, instead of creating them manually, I would recommend you to remove currently installed JDK 7 and make a fresh installation of the same.
Once done, add following paths to their respective environment variables.
classpath C:\Program Files\Java\<jdk folder>\lib ;
path C:\Program Files\Java\<jdk folder>\bin
And than try running java and javac.
Hope this helps.