Robert's Virtual Networking

BIND DNS UbuntuClean and maintain your Windows PC

Some background

So, you just bought a new Dell, HP, Sony or whatever, preinstalled with Windows ...The display is beautiful and as you explore your latest acquisition your user experience is hampered by pop ups, notices of trial software, useless toolbars, and worthless shortcuts. Moreover, through routine use you find that your new bundle of joy's performance dims over time.

Let's fix all that right here and right now. First, let's take pause and categorize what causes these woes.

  1. You're running Windows - Not a slam on the OS, but because it makes every effort to be everything to everyone and be so user friendly, Windows is a resource hog.
  2. Trial software - It wants to constantly remind you of its presence, whether or not you use it. Bloatware, stuff that has an innate compulsion to contact, message, or otherwise insert itself between you and your computing experience is equally as annoying.
  3. Normal Usage - Disks become fragmented, file systems get corrupted, caches get to big and registry entries become orphaned.

We will address all of these issues and show you how to make the best of your new or current laptop or desktop and (re)introduce you to some tools to make things go swimmingly.

OK, lets get right to it. The first thing we want to learn / know is to know what kind of machine to own that will run Windows 7 effectively. Aside from the bells and whistles; memory card reader, light scribe, etc... we want to look at three main components:

  1. CPU - Netbooks excluded, you want to make sure you have a CPU (Intel or AMD) that has a clock speed of at least 2 GHz. You also want to avoid the Celeron (Intel) and the Sempron (AMD) varieties as these are the lower budget chips that tend to run slower, have less cache and have some features missing.

  2. Memory - At a minimum you'll want 2GB of memory. Keep in mind this is the minimum, not that recommended by Microsoft, but by usability; Boost it up to 4GB if possible.

  3. Graphics Card - You want a card that has its own memory of at least 64MB. If you're a gamer, graphics designer or prefer a more visual user experience crank it up a notch or two. 512MB or better for the gamer down to 128MB for the rest ...budget dependant.

Personally I am running an HP Pavilion dv6810us laptop that is a few years old (as of mid 2010) and am completely satisfied with its performance. You can review the specs here. There are some other factors such as bus speed, cache and motherboard chipset that come into play. However, in general if you stick to the above guidelines the rest will follow. If you'd like to get a detailed snapshot of your computer's hardware download Speccy, a great and free tool from Piriform.

Now lets get on to cleaning up our hard drive (HDD) by deleting cookies, clearing the cache, emptying the recycle bin along with a myriad of other junk and unneeded baggage. While we're aft it, we'll go ahead and clean up the registry. Fortunately, Piriform makes a tool that does it all and it's called CCleaner. It too is free and can be downloaded here. As a side note, all their other tools are of high quality and very useful.

After installation go ahead and launch the program. Upon opening, you'll be presented with the following screen ...
Ccleaner screen shot 1

You'll notice two tabs. The Windows tab has various checkboxes you can select as does the Applications tab. The difference is that the Windows items are centric to the OS and IE, whereas the Applications tab will inspect various applications and allow you to  remove items such as temp files and logs associated with them. Simply select the items you want inspected / removed in each and click the Analyze button. Once CCleaner has gone through the PC it will display a summary of the items it found and will let you know how much space will be freed by running the cleaner. To clean, click the Run Cleaner button. Easy breezy fast and easy :P.

Of note is the Wipe Free Space checkbox. Selecting this has three main aspects or implications.

  1. The cleaning process will take longer, because the application will perform a number of writes to the disk's so-called free space and remove files that were deleted but still occupy sector space (They are not actually deleted, but are marked as deleted and no longer visible in Windows Explorer). As far as the OS is concerned these sectors are free and available for placing data, but ...

  2. The OS will place data in actual free space first, then marked-as-deleted space once actual free space runs out. See the problem? Actual free space is generally located at the end of the HDD and real files and marked-as-deleted are intertwined with the rest of the HDD. The bottom line is that multiple deletes over time tend to accelerate fragmentation; we'll fix that later. And finally ...

  3. Privacy. There are several tools that can easily recover "deleted" files. By wiping free space you really get rid of files you don't want prying eyes to see.

Cleaning up the registry is just as easy. Simply click on the Registry button on the left and run the registry cleaner. CCleaner gives you the option of saving the registry settings in case you have to or want to restore the previous registry entries. Lastly, the tools button gives you an interface to remove unwanted applications. Control Panel does the same thing. Be careful here; If you don't know exactly what something is, do some research before you uninstall it. You want to ensure you don't delete a needed utility or driver.

Next, we will prevent unwanted applications from starting automatically when Windows starts to do so we'll use yet another free utility called autoruns. What this nifty little tool does is inspect a number of things that start when Windows does. Everything from applications, to services, to dlls, to ...well, you name it! Download Autoruns here.

It's from Microsoft? Yes and no. Microsoft bought out systernals who developed this gem. The real genius behind Autoruns and a ton of other (all free) utilities are Mark Russinovich and Bryce Cogswell. Be sure to explore the site to find other great tools.

OK, back on topic. simply extract the contents and run Autoruns.exe. No installation required. you'll be presented with a screen similar to the one below:
autoruns intitial screen 

Wow, that's pretty overwhelming! For our purposes we are only interested in one of the 18,000 or so tabs. and that tab is the .... Logon tab. Click on it and you'll see all the programs that start when you logon, both in the statup folder and from registry entries. When looking at what starts up autmatically, you can surmise that most, if not all of this stuff, can be called upon on an as-needed basis and not hanging in the background eating up resources like so many pac-man dots. here is what mine looks like:
Autoruns logon tab

I've really gotta clean that up! To prevent something from starting up automatically uncheck the box to the left. If you want to change it later, just run autoruns again and recheck the box.

Finally, we'll perform some basic Windows maintenance. To begin, we'll run a command to verify the integrity of the file structure and repair it if necessary. A short explanation is in order. At the beginning of the hard drive is the Master File Table (MFT). It is hidden and is used exclusively by the OS to find files. In other words the MFT contains metadata about what sectors files can be found and what their attributes are; things such as read only, hidden, shared, etc. The MFT and/or the files themselves may get corrupted which causes performance issues. We want to make sure the MFT reflects reality and files are good to go.

To accomplish the above we'll run chkdsk. Chkdsk also marks bad sectors; in other words it finds portions of the HDD that are physically damaged and tells the OS not to place data there. to run the command open up a command prompt and type the following command.

chkdsk /f

The /f parameter tells Windows to fix any errors it finds.

Note: If you are running Vista or W7 and have UAC enabled you must run the command prompt using elevated privileges. To do so go to Start >> All Programs >> Accessories and right click command prompt. Select  Run as Administrator.

After running the above command you will most likely get the following message ...

The type of the file system is NTFS.
Cannot lock current drive.

Chkdsk cannot run because the volume is in use by another
process. Would you like to schedule this volume to be
checked the next time the system restarts? (Y/N)

No worries. The next time you restart the machine chkdsk will run and do its job.

Next, we need to defragment the HDD. Why do we need to do this? Well, as data is read from and then written to the HDD it may not be written to the same sector as before. As such, files tend to become fragmented, that is spread out across the HDD, which causes the OS to search all over high heaven to put a file together. Ergo things run slower. Defraging a disk puts files in sectors that are contiguous. Windows has a built in tool to accomplish this, but I prefer the free defrag tool offered by Auslogics. It can be found at this link. After installation running the program is pretty straight forward and needs no explanation.

You should run both tasks about every week. Be sure to run chkdsk after an improper shutdown such as what happens in the event of power loss.

That's it. By using the tools and methods we've explored you can keep your PC running smoothly and won't have to pay one of those hacks that advertise on TV.