|
Dave Methvin is chief technology officer of PC Pitstop, a free site that automatically diagnoses and fixes common PC problems. Contact Dave at dave@pctoday.com Computers are supposed to be great at automating any kind of boring or repetitive task. Theyre also good at doing things on a regular schedule. This month Ill show you how to harness that ability to make your PC tune itself. Once youve done the first-time setup, all youll need to do is leave the computer to itself for a while. When you come back, it will be finely tuned and ready for business.
We Never Close If there is a great unanswered question in the world of computers it is this one: Is it better to leave the computer on or turn it off when you're not using it? Like many other things, there's no single right answer. Just the stress of starting up and stopping the drives, combined with temperature changes in components, can cause extra wear. Leaving the computer on, however, might use up more power. Heres my take on the debate: If your computer is on for more than 8 hours a day, you might as well keep it turned on all the time. If its only on occasionally, you may make out better by turning it on only when its needed. One advantage of leaving the computer on is that you can have it do planned maintenance, such as disk cleanup and defragmentation. Even if you turn off your computer while youre away, it might be a good idea to leave it on overnight at least once a week so that maintenance chores do not interrupt your work. By the way, turning off a computer in an electrical storm does almost no good. The incoming wires are still connected—power cords, modem lines, and network cables—and any one of them could carry a high-voltage surge. If you live in a lightning-prone area such as Florida, unplug everything from the PC during thunderstorms.
Keeping Busy Has this ever happened to you? After being away from your computer for a while, you come back to discover that the disk is rattling wildly. Because your screen saver has kicked in, you cant see whats happening. You move the mouse or press a key to turn off the screen saver and see the Desktop. As soon as you do, though, the activity stops. There doesnt seem to be any reason for all that disk activity! Worried about what could be happening, you check for viruses and spyware but nothing seems to be amiss. Its a little-known thing about Windows XP, but there are certain activities that it only performs when the system is idle. Normally that isnt too much of a problem, because a PC is often doing nothing while youre in a meeting, out to lunch, or just at your desk but not using the computer. Sometimes, though, the PC will look busy to Windows because of a poorly behaved screen saver or because of background programs such as Folding@Home. When WinXP sees the PC as constantly busy, the idle-time work doesnt happen. But what are these idle-time tasks? One of them is System Restore; Windows creates a restore point after 24 hours of operation or after three calendar days. Another is the boot-time disk optimization that makes startup faster; Windows launches Disk Defragmenter to do this work, but does it no more than every three days. You can also create custom idle-time tasks using Control Panel, Scheduled Tasks; just create a task and tell the scheduler to run When Idle. One other notable idle-time task is the Content Indexing Service which Windows uses to build indexes for the built-in anemic search function in Explorer. If you like this months Utility Of The Month—Agent Ransack—I recommend that you go into Control Panel, Administrative Tools, Services and set the Indexing Service to Disabled. That will get rid of one idle-time activity because you wont need it anymore. Remember that scary disk activity? Because a lot of the idle-time tasks involve banging on the disk, its possible that you were seeing or hearing the results of this Windows process. When you start using the computer by touching the mouse or keyboard, Windows immediately stops the work. Thats why its so hard to tell when idle-time processing is going on; its like trying to figure out whether the refrigerator light goes off when you close the door.
Automation Solution Instead of letting Windows try to guess when this maintenance work is done, we can create some scheduled tasks so that it will happen at a convenient time. This is also useful to do when the computer is usually not idle—or at least appears that way to Windows. The order I suggest is to first clean up any junk files, defrag, and then do the idle-time processing. To clean up junk files, you need to first do some setup. Click Start and then Run and type the following command line into the Open field : Cleanmgr /sageset:6 Youll get a dialog that lets you select which files will be cleaned in the future. Generally it is fine to select all of these options except for Compress Old Files. Do not check that box. This process can take a long time and doesnt actually delete the files, so its not a big win. Next, create this file as robotune.cmd using an editor like Notepad; it can go in any location you would like. Ill put it in the root of the C: drive for simplicity: %windir%\cleanmgr.exe /sagerun:6 %comspec% /c %windir%\system32\defrag.exe c: -v >c:\defraglog.txt %windir%\system32\Rundll32.exe advapi32.dll,ProcessIdleTasks The first line starts Disk Cleanup and uses the settings you chose in the one-time setup above; more information can be found at the Microsoft site (support.microsoft.com/?kbid=315246). The second line starts the disk defragmenter and tells it to write its report to defraglog.txt; details on that command are also available from Microsoft (support.microsoft .com/?kbid=283080). If you have multiple drives, you can add more command lines here to defrag them as well. The final line runs those elusive idle-time tasks such as boot-time defragmentation. Its not very well documented, but you can see some discussion of this command on the Microsoft site (www.microsoft.com/whdc/system/sysperf/benchmark .mspx). The final step is to set up the maintenance job. Be sure you are running as an administrator and go to Start, Control Panel, and then Scheduled Tasks. Click Add Scheduled Task and fill out the dialog as shown on the screenshot. Then click the Schedule tab and select Weekly. Choose a day and time that you can leave your computer on but are not going to be at the computer. If you leave your computer on overnight, an early-morning time like 4 a.m. is perfect. When you click OK youll be prompted for the password on the SYSTEM account. Just leave the boxes empty and click OK. Your maintenance job is done. You could just wait until the scheduled time arrives, but its a good idea to test it manually first. To do that, first make sure youre in detailed view in Scheduled Tasks by clicking View and then Details. Next, right-click the maintenance job and select Run. If you got everything right, you will see the job change to Running and stay that way for several minutes as it does its work. If the job doesnt run, go to a command prompt and try running Maintain.cmd from there so you can see the output, which will probably include an error message. Now that you have all your disk maintenance automated, be sure to leave your computer running during the time you chose to run the job. Thats all you need to do; your PC will handle the rest! by Dave Methvin
Utility Of The Month: Agent Ransack Windows XP has a search feature—a really bad search feature. It uses a cute animated cartoon dog character to distract you from the fact that it does not work well. Mythicsofts (www.mythicsoft.com) free search program, Agent Ransack, works much better. Not only does it give you much better flexibility with the names of the files and types of content you can search, but it is fast. Unlike the built-in search it does not require the Content Indexing Service as a crutch to make it work faster. I liked Agent Ransack so much I upgraded to Mythicsofts FileLocator Pro ($24.95). |
|