I hope you don't mind. But I just have to brag it little. Daniel, my oldest nephew, graduates from high school this spring. I recently heard he's been granted a full academic scholarship to our local state university. It not only covers tuition, but also books, room and board! I'm so proud of him, and not just because of the scholarship. He's one of the finest young men I know, a wonderful credit to his Mom and Dad.
And speaking of impressive young men, I recently received good news from my friend, young Jeff. You might remember Jeff. He visits the secluded Power Tools workshop every couple of weeks for some personal tutoring. His college major is Finance, but he's taking computer classes to broaden his horizons.
Getting back to work, reader Paul Schindler recently wrote: "I have a desktop machine and a portable. Each has Outlook Express on it. At first, I simply exported the rules from the desktop Registry and imported them to the laptop Registry. It didn't work; the laptop Registry placed the rules under a new branch with the desktop ID number. So now my procedure is: change the desktop ID number to the laptop ID number. Export the branch of the Registry, change the desktop number back, import into the laptop Registry. I am wondering if other people would like a 'Registry to Registry' transfer."
Now you know, I've heard some dumb ideas in my time. But this one takes the cake. Why should I change my perfectly good program just to solve some peculiar problem of yours? Do you think I have nothing better to do? What nerve!
Wait a minute ... that name ... Paul Schindler ... I'm sure I've heard it before. Probably a repeat trouble-maker. Hmmm. Oh, now I know! Paul's the Editor-in-Chief of both Winmag.com and Byte.com. That makes him my boss. No, it makes him my boss's boss! Gulp.
Ahem, <cough>. I hope everyone enjoyed my little joke. Of course, Paul's suggestion is brilliant. A wonderful idea I should have thought of in the first place. My only regret is that I didn't implement it sooner.
Though they seem to be random text with a few punctuation marks thrown in for good measure, GUIDs are actually large, random numbers. In fact, they're 128-bit binary numbers, represented using the hexadecimal number system so popular among programmers. The punctuation marks are added to keep you and I from getting dizzy trying to scan such long strings.
Within 128 bits, a computer can store very large numbers. The number 100,000,000,000,000,000,000,000,000,000,000,000,000, for example, fits nicely with lots of room to spare. Looking at it another way, there are lots of different 128-bit numbers. Using the notation popular among scientists and engineers, there are over 3e38 different 128-bit numbers. That's three, followed by 38 zeros!
Why does Windows need so many different numbers? Suppose you need to assign a unique name to each computer on the planet. You also must assign a unique name to each computer user, program, printer, disk file, and network connection throughout the world. There are two ways you can do it.
First, you can create some sort of naming authority. Each time a computer is built, a computer user is born, or a disk file is created, you'd have to contact the authority to obtain a name. It would maintain a list of names already issued, and give you a name not previously used.
This model has been used before. Each computer network, for example, attached to the Internet must have a unique "domain" name, such as "Winmag.com." Domain names are issued by an authority known as the Internic.
The system works pretty well but it does have a few flaws. For starters, it takes time to obtain a domain name from the Internic. The delay isn't important when creating a new Internet site, since other steps usually take much longer. But the same delay would be unacceptable, if you had to wait before naming a disk file, or installing a program. What's worse, the folks who work for the Internic need to eat. That means they don't work for free. Currently, it costs about $35 per year to register a domain name, to cover the costs of administering the master domain name list.
One way to avoid the delays and costs of a central naming authority is to allow each person, or computer, to assign their own names. That's certainly fast, and cheap. But how can you guarantee that millions of names, invented by millions of different computers, are always unique?
The short answer is: You can't. Once naming is taken out of the hands of a central authority, there's always a chance a name will be assigned more than once. Programmers call it a "name collision," when two different entities assume the same name.
The solution is to make name collisions so unlikely, that in practice they never happen. Windows does this by picking names that are very large, random numbers - - the GUIDs we saw a moment ago. In theory, it's possible the same GUID value could be generated more than once, sometime, somewhere in the world. But in practice, it's more likely you'll be hit by a meteor. While cashing your winning lottery ticket. That you unknowingly bought from your long-lost twin brother. Just before he was struck by lightening.
GUIDs normally work well, allowing computers to reliably tell each of us (and the other objects they manipulate) apart. But sometimes the GUID system breaks down. There's only one Paul Schindler, Editor-in-Chief of Winmag.com, for example. But he's been assigned two different GUIDs, one by his desktop computer, the other by his laptop. As a result, when he tries to move his e-mail sorting rules from one computer to another, the second computer thinks the rules (tagged with the GUID given him by the first computer) belong to someone else.
The solution is to change the Registry entries, while moving them from one computer to another. And that's what the new Registry Ripper version 1.2 can do. The program now sports two new text boxes. In one, you type the text want the Ripper to change. Paul might enter, for example, the GUID assigned to him by his desktop computer. In the other, you enter what you'd like the old text changed to. In Paul's case, he'd enter the GUID assigned to him by his laptop computer.
Next, Paul asks the Ripper to save his desktop's Registry entries containing his e-mail rules. The GUIDs in the .REG file the Ripper creates are changed to the one assigned him by his laptop computer. Paul then copies the new .REG file to his laptop, and double-click's the file's icon. The modified Registry entries will automatically be added to his laptop's Registry! The original entries, stored on his desktop computer, are unchanged.
If you think Paul's clever idea might help you too, you can download a copy of the new Registry Ripper from https://www.karenware.com/powertools/ptregrip. As always, the program is free, and so is its Visual Basic source code. If you like what you see, be sure to thank Paul for the idea (and tell him what a great programmer I am <grin>). Either way, look for me on the 'net this week. And if you see me, be sure to wave and say "Hi!"