most likely its a problem with the software in your computer, not any of the equipment. an easy way to tell is to boot from a LiveCD like Ubuntu or Fedora. you can even install a small app while the liveCD is running to see it installing a program works okay.
Once you've verified your equipment is functioning normally its time for a fresh install of your operating system so remember to backup your data first