Software // Enterprise Applications
Commentary
1/7/2004
02:56 PM
Fred Langa
Fred Langa
Commentary
Connect Directly
RSS
E-Mail
50%
50%

The Explorer: Resource Leaks, Part Four: Final Fixes

Once you've plugged the leaks, take the time to fine-tune your setup.

I also used the Add Scheduled Task option to perform an intense virus scan of very file on all my hard drives, every night; in addition to my normal precautions during the day, this deep scan ensures that I'm safe from even subtle viri, Trojans and worms that may have crept past my main defenses.

I've adjusted the timing of each maintenance step to ensure that each tool has plenty of time to finish before the next one starts (to prevent, say, contention for the hard drive). Each night while I sleep, my PC does the following: First, my antivirus app runs (this takes a while because I have many, many files). Later, Disk Doctor (Scandisk) kick in and automatically repairs any disk or file system errors it finds. Disk Cleanup runs next, tossing out unneeded "Temporary Internet Files," and "Temp Files," emptying the Recycle Bin, and so on. Then, once the disk is clean, virus-free and error-free, Speed Disk (Defrag) does its thing, moving my most-used files to the front of my drive for fastest access, and making all files smoothly contiguous.

Once a week, very early each Monday morning, I also have a custom batch file run just after the standard Disk Cleanup runs. The custom batch file more aggressively cleans out any, er, garbage that accumulated during the previous week. Here are the contents of the batch file:

deltree /y c:\windows\temp
del c:\windows\tempor~1\*.zip
del c:\windows\tempor~1\*.exe
del c:\windows\tempor~1\*.gif
del c:\windows\tempor~1\*.jpg
del c:\windows\tempor~1\*.png
del c:\windows\tempor~1\*.bmp

I placed the batch file in my C:\ drive, and used the Add Scheduled Task function to insert it into the scheduled task list. I've also scheduled WMalign (mentioned in Part Three of this Resource Leaks series) to run once a month; WMalign, is a better version of Walign.

And when I reboot (such as after making a full, daily system backup using DriveImage), my autoexec.bat file also does a little extra cleanup. It includes lines that help weed out miscellaneous junk that accumulates in the Windows folder, and trims a cache that can eat some resources unnecessarily:

del c:\windows\ff*.tmp
if exist C:\WINDOWS\SHELLICO C:\WINDOWS\COMMAND\ATTRIB C:\WINDOWS\SHELLICO -r -h -s
if exist C:\WINDOWS\SHELLICO del C:\WINDOWS\SHELLICO

Note that all this takes place unattended and completely automatically, with zero effort on my part: Each day, I start with a system that's virus free, error-free, defragged and that's had all its garbage collected and thrown out.

Along with all the resource/memory optimizations mentioned in Parts One-Three, my system starts each day as solid as I can make it. This helps prevent small problems from accumulating over time, and contributes to overall stability.

Previous
2 of 3
Next
Comment  | 
Print  | 
More Insights
Building A Mobile Business Mindset
Building A Mobile Business Mindset
Among 688 respondents, 46% have deployed mobile apps, with an additional 24% planning to in the next year. Soon all apps will look like mobile apps and it's past time for those with no plans to get cracking.
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Government Tech Digest Oct. 27, 2014
To meet obligations -- and avoid accusations of cover-up and incompetence -- federal agencies must get serious about digitizing records.
Video
Slideshows
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
A roundup of the top stories and community news at InformationWeek.com.
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.