Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags
Tuesday, April 27th, 2010 01:37 pm

Once again, a question has come up on the Bacula users' list about restoring just the registry of a Windows box that has corrupted its SOFTWARE registry hive to the point that it won't boot.

I put it to you that of all the "innovative" ideas that Microsoft has built into Windows over the years, the Windows Registry is the worst.  It is opaque, it is fragile, it is difficult to back up, clean out or repair, you can pretty much only repair it from Windows itself which means that it's almost impossible to repair it when — not if — Windows corrupts it, and all kinds of noxious things can be buried inside it by malware.  Not only does Windows periodically outright corrupt the registry, but from the first time you boot a new Windows installation the registry starts accumulating cruft and droppings that gradually bog the machine down and introduce cryptic malfunctions with no readily determinable cause.  Things that worked yesterday just stop working for no apparent reason.

Combine with opaque hexadecimal-string registry key names created by various things, so that you can't even tell what some random leftover registry key belongs to or whether it's still in use, and it's a recipe for disaster.  That disaster has been ongoing for fifteen years now, and there's no end in sight.

The saddest part about the whole thing is that Microsoft actually believed that this massive, opaque, monolithic, unmaintainable monstrosity would be an improvement.

Tags:
Tuesday, April 27th, 2010 06:46 pm (UTC)
Windows isn't the only OS to have such a registry, but at least on AIX it's a database that can be manipulated (although doing so is not recommended, I've had to do so and been successful).
Tuesday, April 27th, 2010 08:06 pm (UTC)
I'm not arguing against the idea of a single unified registry per se, so much as opining that Microsoft's implementation of the idea seems to be consistently and unmitigatedly bad.
Wednesday, April 28th, 2010 05:45 am (UTC)
I found out the hard way, much to my disgust, that Windows Vista sucked -- no, that's not right, it sucks squared. And now they want me to "upgrade" to Windows 7? Yeah, right . . .
Wednesday, April 28th, 2010 03:16 pm (UTC)
Actually, from what I've heard, 7 actually is a lot better than Vista. You might think of Vista as Windows 7 service pack -1, or as a Windows 7 alpha release. Microsoft very literally released Vista unfinished to make their promised ship deadline. Over the last six months to a year, they dropped feature after feature that they simply couldn't finish in time.
Wednesday, April 28th, 2010 06:12 pm (UTC)
Well, I'm not surprised. That's right in line with the way they do their software -- and let's not even think about Windows 95! (About which many swear that when Bill Gates dies, he'll go there.) In the meantime, I'm sticking with Windows XP, which I have on my cheapie Overstock.com refurbished computer. It works very well, is very stable, and is like the Cadillac of platforms compared to its Microsoft predecessors. (Yes, yes, I know I should use Unix or one of those other long-tested, superbly performing platforms, but I'm very used to Windows XP after all these years, and learning how to use a completely different platform at my age, what with my also having to use a lot of time (when I'm not playing with Youtube and LiveJournal, anyway) on my fiction writing and related matters, is a bit more difficult than I really want to tackle right now. Maybe when my novels get bought by Quentin Tarantino to make movies and I've got my new mansion with hot and cold running servants and a secretary . . . ;-)
Wednesday, April 28th, 2010 06:26 am (UTC)
I don't know if you can still have regedit output a text copy of the file. It would at least allow it to be manipulated.
Wednesday, April 28th, 2010 03:20 pm (UTC)
As far as I know, you can still dump it to a file, but what is dumped isn't precisely plain ASCII text, and I'm given to understand that if you edit the text, you can't guarantee to be able to re-import it because when you save the editied version, what you save IS plain ASCII text. There's no way to save it as importable registry text.

Oh, and when you dump it, it still contains opaque hash keys.
Edited 2010-04-28 03:20 pm (UTC)
Wednesday, April 28th, 2010 10:35 pm (UTC)
That is odd since I've recently copied and pasted reg keys to a file and named it .reg I'll have to try that and see.

I would really prefer something that properly wrappers an install and will then gut all the crap the installed program spews on.
Thursday, April 29th, 2010 01:13 am (UTC)
I think you can get away with copy-and-paste, yes. I'm not sure what precisely the magic is that breaks if edited with a regular text editor. (And there's always the possibility I'm confusing that part with something else Microsoft ... I have the vague recollection it involves filesystem objects that become files when edited and saved, or sparse files that become non-sparse if edited and saved, or something like that.)
Wednesday, April 28th, 2010 07:08 am (UTC)
It's just a big key/value hash table with symlinks in it for current user/system. Its functionally the same tech that a lot of newer storage systems use (BigTable, memcached, etc.)

Utilities exist to back it up, restore it, and repair it. Heck, if I recall, there are command line utilities built into Windows to do a lot of that. The trick is that it's not common knowledge what they are or how to use them.

I haven't honestly had too many registry fragility issues, but ones introduced by applications can be rolled back as long as you install using any number of freeware configuration-change monitors.

One thing I will agree with is that Microsoft's use of UUIDs and similar for system keys gets overly arcane. OTOH, not sure I like Apple's plists all that much either, and Unix's use of rc/conf files is awesome, but often a little opaque and confusing too.

The one thing I'll give Unix is that changing a whole-system config usually has to be a proactive thing, so the SA knows what changes are there. Unless you're using SuSE's YaST, then it's a crapshoot. :)

Basically, every config system I've used is annoying in some way. But what I think you're really bumping up against isn't a bad config system as much as it is that Windows users generally aren't trained or inclined (or forced) to manage their system in the way that Unix admins do.
Wednesday, April 28th, 2010 03:27 pm (UTC)
Utilities exist to back it up, restore it, and repair it. Heck, if I recall, there are command line utilities built into Windows to do a lot of that.
Yes, they do. But the ones included with Windows are very limited in what they can do, and all the third-party ones I'm aware of are both non-free and require a working Windows to run on — as, to the best of my knowledge, do the included Windows tools. So either way, if Windows has managed to piss in its registry badly enough that it won't boot, you're screwed, because if you can't boot, you can't run the tools to repair the registry that's stopping you from booting.

Third-party registry cleaner tools exist, too. I've tried several. Some are fairly reliable. But all of them warn up front that beyond a certain point, they're guessing when it comes to repairing bitrot or removing keys that they don't think anything owns any more, and that if it hoses your registry, you're on your own.
Wednesday, April 28th, 2010 06:30 pm (UTC)
Ooh! I just got pointed at this:

http://www.larshederer.homepage.t-online.de/erunt/

Registry backup, restore, and optimization tools for Windows NT/2000/2003/XP. (Also works on Vista and 7, with some minor workarounds.)