March 19, 2008
By Karen Kenworthy
IN THIS ISSUE
A funny thing happened to me the other day.
It started innocently enough. That morning I took my first ambulance ride, travelling to the Emergency Room of the local hospital. After I arrived, a nice doctor decided to draw some blood. As luck would have it, he drew the blood from me.
That's when my life changed.
To make a long story short, the doctor's tests showed the level of something called "glucose", floating around in my bloodstream, was off the charts. Literally. It couldn't be measured by the handheld glucose meters used by the hospital staff.
Now, as it turns out, too much glucose in the blood is a bad thing. It's a condition known as "diabetes" (in my case, Type 2 Diabetes). And it can cause a lot of symptoms, including all those that sent me to the emergency room in the first place.
Fortunately, there are some excellent treatments for diabetes. And it seems like I'm receiving most of them. <grin> As a result, my glucose level returned to normal within a week of my hospital vacation, and has remained there ever since.
True, my fingertips are sore from their thrice-daily poking. But I feel better than I have in years. And it sure feels good, sitting behind my keyboard, chatting with you after all these months apart!
Where Did I Put Those Settings?
Have you ever forgotten where you placed some common everyday object? Perhaps you lost your car keys. Or forgot where you left your glasses. Or your favorite pen has somehow disappeared.
I've done all of the above, and more. In fact, I may hold the record for the most items lost in a single hour, without leaving my office chair. :)
You may not have thought about it, but our binary buddies, computer programs, must keep track of where they store things too. "I know I recorded the size and location of my main window, the last time I ran. But where did I put that information?" "The list of Replicator jobs is around here somewhere. Give me another microsecond and I'm sure I'll find it."
These are just some of the secret thoughts flickering through their worried electronic minds.
Like humans, programs adopt strategies to help them remember where they store stuff. Programs can keep a few small dollops of data in the Registry, a special database found on computers running all recent versions of Microsoft's Windows. Like that old, cracked wooden bowl, resting unevenly on the rickety table near the drafty door to the garage, the Registry is a handy place to store a few frequently-needed items.
To help out, Windows sets aside two regions of the Registry just for use by programs. One (called "HKEY_CURRENT_USER") stores settings that belong to the user currently logged onto the computer. Here you might find a particular user's color preferences, the name of the last file they edited, or other bits of personal data.
The other area of the Registry used by programs (called "HKEY_LOCAL_MACHINE") holds information that applies to all users. This could include the program's serial number, the location of important shared files, and which program options are installed.
When it comes to storing and recalling small facts, the Registry is fast and handy. But some program memories are too large to efficiently store there. Where should a program store these bigger blocks of bits?
Along Came Vista
For years, many of my programs have recorded larger blocks of settings and preferences inside text files.
For example, my Directory Printer stores your most recent printing settings in a file named PrintJob.txt. If you used the program to save a folder's information to a disk file, the settings you selected are kept in another file, named SaveJob.txt. Each time the Directory Printer is launched, it retrieves your settings from those files, saving you the trouble of entering your choices again.
To keep everything tidy, my program's files were usually stored in a handy location -- the same folder where the program was installed. This prevented my settings files from getting confused with those of other programs. And it made un-installation easier, since the program and its files were all kept in the same place. Pretty cool plan, eh?
But those simple and innocent times ended with the release of the newest version of Windows, called "Vista".
If you've tried Windows Vista, you've probably noticed its strong emphasis on security. Some program practices that older versions of Windows permitted are simply not allowed when running Vista. And other software behaviors, previously deemed innocent, are now looked at with suspicion and made difficult.
And one of those heightened security rules prevents most programs from writing data any place within the "\Program Files\" folder hierarchy. That's the place where most programs (including mine) are installed. So much for my cool plan. :(
When I discovered this problem, my first reaction was to fight. I'd join the revolution, break through Vista's oppressive security wall, and emerge on the other side a champion of digital democracy and application liberation.
Then I took a nap. When my fever broke, I realized that Vista's protections had their place. Compromising security on my user's computers wasn't the great idea I once thought it was.
Fortunately, the last few versions of Windows have provided two special places for programs to store their settings. One folder is set aside for those options that are shared by all users (similar to the HKEY_LOCAL_MACHINE section of the Registry). Each of a computer's users also gets their own folder, where their personal preferences and settings can be stored (like the HKEY_CURRENT_USER area of the Registry).
Unfortunately, recent versions of Windows have chosen different places for these folders. Perhaps you'll find them beneath a folder logically named "\Documents and Settings". Or they could live somewhere within folders named "\Users" and "\ProgramData". Searching for the right place to store and edit settings files was a fun adventure at first. But it quickly became tedious and frustrating.
Still, I was determined to get along. If I had to use the various designated storage locations, how could I make life easier for users who might want to backup, replace, or delete those files?
I decided to make a subtle change to each of my programs. They've always sported an "About" window, where you can learn the version of the program installed on your PC, read my mesmerizing copyright message, and find links to my web site.
Now I've expanded that window. Across its middle, you'll see the name of the folder where a particular program stores its settings. Use the left button of your mouse to double-click that name, and Windows will magically open that folder, allowing you to easily access its contents!
This solution preserves Windows security measures, keeping the program's installation folder intact, while storing settings in their designated holding cells. But thanks to the new "About" window, users still have easy access to the place where settings are stored.
Wow! Look at the time! I've got go now, check my glucose level, and take some more meds.
But let's get together again real soon. We've got a lot of catching up to do.
Until we meet again, why not check out my updated collection of Power Tools? They are all ready to run under Vista, and older versions of Windows too. Links to all of them are on the Power Tools home page:
As always, each program is free for personal/home use. And you can download its complete Visual Basic source code too!
You can also get the latest version of every Power Tool on a shiny CD. These include three bonus Power Tools, not available anywhere else. The source code of every Power Tool, every issue of my newsletter, and some articles I wrote for Windows Magazine, are also on the CD. And owning the CD grants you a license to use all my Power Tools at work.
Best of all, buying a CD is the easiest way to support the KarenWare.com web site, Karen's Power Tools, and this newsletter. To find out more, visit:
Until next time, I'll keep pricking my fingers, watching my glucose level, and having fun with my computer. And if you see me on the 'net, be sure to wave and say "Hi!"
Power Tools Newsletter
- Please don't click SPAM.
- Windows-Key Searching
- Disabling Web Search
- Karen's Directory Printer v5.4.3 Released
33118 Verified Subscribers
Subscribe to receive new issues of the newsletter about Karen and her free Power Tools.Click here to Subscribe