Try this 1
1) When you switch ON your computer, start tapping the "F8" key to get
"Windows Advanced Options Menu" options ( if boot menu appears, press "Esc"
key and keep tapping the F8 key)
2) Select the option "Last Known Good Configuration".
If the problem still exists then follow the step 1 and check if you are able to
boot into "Safe Mode" or Safe Mode with Command Prompt.
There is no need to install Windows 7. You can also fix this issue by repairing
your Windows XP OS and for this you need Windows XP CD.