For a permanent and hassle-free solution, insert your copy of the O.S. disk in your CD/DVD reader drive and when the main setup window shows up, select "Repair Current Installation of Windows".
Wait until it tells you that the O.S.'s installation is, now, fully recovered.
Go to Microsoft.com's Download page and, Download + Install Service Pack 2. Do a thorough Clean Disk + Defrag Disk of your main C: Hard Drive. Use the new Windows Update feature for downloading and auto-install all the new updates/upgrades offered by the Microsoft Update's database.
Now, from here, check if your system can handle the very hefty Service Pack 3 from 2008's time. If yes, download and install at your leisure. Clean Disk + Defrag Disk again. Continue the windows update's procedure until your system will be fully up-to-date.
Purchasing a Tune-up program is highly advisable. It will keep your system in a constant stable status.
I know, it seems like a lot of work and wasted time in front of your Monitor screen but, in the end, you will feel the confidence that you will not have these issues again. Less, having to buy a complete new machine, all over, again.