Well, you can use some sofwares instead of trying doing this manually.
Today I`m gonna show you the best sofware for this.
After a lot of testing I found the conclusion that ADVANCED SYSTEMCARE product from IOBIT is the best. It isn`t only a good OPTIMIZER is a great ANTIVIRUS!
This is the list of all its features:
-It has antivirus incorporated so it PROTECTS your COMPUTER from VIRUSES
-It optimizes your internet speed and connection
-It repairs your registry
-It defragments your computer(your hard drive)
-It repairs many vulnerabilities including security and windows ones
-It is clearing your computer junk(for e.g. cache from internet browsers/from windows, cookies, your recycle bin e.t.c.)
-It fixes the shortcuts that have incorrect path to their original file.
This product comes in 3 version: FREE, PRO, and ULTIMATE
You can see yourself the comparasion beetween these product here:
http://imageshack.com/a/img538/4711/zKzbOB.png