"Once in a great while it will finally boot to the desktop" sounds like the old BAD CAPS problem. More at link:
http://www.badcaps.net/ has pictures of what to look for and the history of the issue. If you read their forums you discover the symptoms. Your post has the symptom in it but you forgot to post the age, make, model of the machine.
Hello, I'm having a problem with Windows XP home edition. It will not go past the splash screen on a normal start up, when I try to go to the repair console I get to the blue screen that says " Windows Setup Setup is starting windows " and then it hangs here and lastly when I try to boot to safe mode it hangs at agp440.sys service. From what I can tell that is a video driver that I think is causing all of my problems. Once in a great while it will finally boot to the desktop but my video display is locked at 640 x 480 4bit color. I've removed all unnecessary pci cards and even tried a different video card but the result is still the same. If anyone has any ideas I would be grateful. Thanks....