Was The Windows Registry a Good Idea?

Personally I think the windows registry is the weakest and most outdated aspect of the entire system.

But personal opinions aside, the registry should not be trusted with any autoloading of applciations ever.

I’m not a developer, but why are 3rd party apps even in there? I use mostly open source applications to do everything I can.

All I do is go download the zip, make the folder in program files, extract, make a shortcut to the desktop and run the main programs exe.

no installer, no registry, no garbage.

Does it have something to do with multiple users?

I mean to me, an application needs to do two things in the registry:

  1. establish any file associations.
  2. setup its checksum for authorization if its payware.

Aside from this, what the hell is any application doing in there?

And if they must be in there, WHY IS IT NOT ALL IN ONE FOLDER?

This is seriously pathetic that systems can be crippled so badly by malware/spyware from the abuse of the registry system and also the fact that no one reads any prompt windows.

The kernel should only load apps that appear in a SINGLE .ini file or SINGLE wherever if you want it more secure.

That’s it. One place, or else it doesn’t open.

msconfig is not enough.

It just irks me how well other operating systems can handle simple things like this, when windows can’t.

Windows does many other things so well but this one vital piece is left out.

Its a double edged sword.

my.02

I don’t get it. What’s wrong with storing application data in the app’s installation folder? More specifically… why are applications denied write access to their own installation folder?

I would like to second Andy (above) and say the new font is almost unreadable (in either Firefox or IE.) Can we please maybe have the old one back? I had to increase the font size just to read your post.

I was forced to search through the registry with Regedit a couple of times. It’s appalingly slow. Later, I had to do the same in Wine. I couldn’t believe how fast it was. Out of pure curiosity, I checked how Wine stores its (emulated) registry.

Can you guess?

In a bunch of .ini files!

I couldn’t help it - I just had to post my comment from earlier this month…

The registry fails us because it breaks the cardinal rule about localizing changes to known places.

However, program settings are not the problem. It’s the registration of the COM servers that prevents most apps from being able to be run off a USB key. I’m not sure if there’s a simple answer to that one though.

On an offtopic note, did something change in your font rendering? im using Firefox and its quite hard to read.

I love the Windows Registry!.. Just kidding. I guess it does its job, despite not being an optimal solution.

I’ve actually once managed to break .exe file association using regedit… fixing that was real fun.

I personally like XML and ini configuration files, but they should be kept in the dir with the rest of the application’s files IMO. Why does everyone want to put a memento of themselves to my Windows dir?

Looks like nobody here actually administers a network. XML files in the same directory as the EXE file - real smart when c:\program files is READ ONLY to the average user. (It’s for stupid programs like this that Vista introduces a virtualisation trick where programs can apparently write to such areas - they can’t in reality; it gets shunted into a per-user application compatability area.)

Or how exactly administrators are supposed to roll out an individual setting - you’re proposing they all learn XSLT and run an XSLT processor at logon? Heck, I’m also a dev and I have issues reading XSLT!

It’s really nice knowing that an app’s config is likely to be in hkcr\software\vendor\program; and that I know anything in hkcr will roam properly when the users logs onto another machine. (Which happens an AWFUL LOT in the corporate world.)

A bunch of silly files means that logon processing slows down with roaming profiles. Thats assuming the dev put the files in the correct place.

Honestly, I suspect too many devs don’t know the real world where supporting a hundred windows computers is considered small potatos.

“Honestly, I suspect too many devs don’t know the real world where supporting a hundred windows computers is considered small potatos.”

Of course I don’t administer 100 computers AT MY HOME. I have VERY different needs than do medium/large-sized companies. Convenience is more important for me than dummy-proof security - I understand it’s the other way around for you. So why should my OS contain all the same restrictions?

From the DUH department:

Mr. Atwood has apparently run out of things to blog about.

Yep, go with those ini files (or xml)!

Then deal with the performance hit of searching out keys or trying to update values. Don’t forget to implement proper locking logic to handle multiple users hitting the same ini file.

Doesn’t anyone remember why ini files were deprecated?

XML can have comments, blah blah. Sorry, there are lots of partial implementations of XML out there. You may just break your application by putting in comments.

Grow a brain and think it over.

I’m sorry, but your stance on the registry strikes me as that of a Luddite.

First of all, the registry materialized in 1993 with NT 3.1. Win95 had a scaled down version of the registry, sans security, sans decent file system, etc… That you mention Win95 at all seems to be a calculated way of making the registry look especially bad and unreliable.

Secondly, a bunch of ini files scattered around the drive is not the solution to any problem I know of. A bunch of ini files stored in the Windows directory is not the solution either.

Storing setup information hierarchically makes sense. Specially when you happen to install more than one app from some of the larger vendors. (MS Office stores stuff under HKLM\Software\Microsoft, all Adobe products presumably end up under HKLM\Software\Adobe – all very neat – per user storage ends up under HKCU)

Yeah… Where does your ini files go for the per-user settings? %userprofile% directory? Messy. That is the way Win 3.1 did things. That is exactly what most of us wanted to avoid.

“The registry has to be in sync with the filesystem. Delete an application without “uninstalling” it and you’re left with stale registry cruft”. Uhm, yeah? It has nothing to do with the filesystem. If the uninstaller doesn’t clean up after the application, then it does not matter where it stores its settings. You’re not going to find them any easier if they’re not stored in the registry. Au contraire. (on a side note: Do you really want to lose personal settings when re-installing an application, if you ever faced having to do such a thing? MSI has reduced the need for re-installations a lot, but not completely eliminated it when faced with broken install scripts)

Finally, it is not the fault of the registry that YOU install “every rinky-dink application on the planet”. Clue: Don’t install every rinky-dink app. At least not when you are running as administrator. Because then you will require every rinky-dink anti-spyware, anti-virus and personal firewall application there is, which will further molest your registry.


Rune

That’s why we have /etc

Geez you make me feel old.

I remember back in the day when applications scattered ini files (and other config files) randomly about my hard drive. From applications that required their ini be in c:\windows (not d:\windows, or bob forbid, d:\apps\SomeApp) to ones that liked to have c:\SomeApp for the application, c:\SomeData for the data and c:\config for their .cnq files (hello Canon)). Oh, and the inevitable editing of system.ini and so on, which often had humorous results (if you weren’t the one trying to make it work).

The registry was a distinct step up from that mess.

But it just proves the old adage: there’s always a better fool.

I once saw a program on one of the odd high-number channels, where they interviewed this guy at Microsoft. Turns out he was on the team that originally invented the registry. They showed him giving a powerpoint demo and the first slide was something like

About the registry:

sorry, sorry, sorry, sorry, sorry, sorry, sorry, sorry!

I’m sorry, I left off this gem:
“The registry is a single point of failure.”

If you have a bunch of configuration files in a directory somewhere, and you delete those files… Isn’t that a single point of failure?

The registry OTOH is automatically backed up. In every version of NT, it has always been possible to boot using the “Last good known” configuration.

Yes, there is a warning in most KB articles. This is because regular users (who have no business editing e.g. .ini files, let alone the registry or God forbid xml files!) sometimes stumble across these articles.

“Let’s say you wanted to move an application to a different path on your machine, or even to a different machine altogether.” I have done this several times. Not an issue if you know what you’re doing. (You can load another registry hive temporarily, or you can connect to a remote machine’s registry)

Your point about the lacking comments is valid.


Rune

at first i thought that windows registry is a good idea. That was before my pc is cracked by spywares.

ok… enough of that… The only good thing i see at the registry is the managements of defaults… default is good, i think…

other than that it’s plain crap…

The biggest problem are all those broken apps that scatter their settings across the whole system but change the storage mechanism for configuration settings will not automagically any broken application. So in reality it’s not the registry that is broken -you are complaining about broken Windows application. A brain dead programmer will make any storage system a “trash heap of miscellaneous junk settings”.

“Manipulating the filesystem is utterly obvious, completely intuitive”

Only for us experts/computer gods. For the average user manipulating the file system is very difficult, the biggest problem are folders. These are neither obvious nor intuitive.

“You have to reconcile almost everything you do in the file system with that opaque, unforgiving binary blob of data known as the Windows Registry.”

Look at Unix: You have to reconcile almost everything you do in various files scattered across various folders (/etc/…, /usr/…, /var/…, /opt/…, /home/…) in various different formats. sendmail.cf vs tnsnames.ora vs smb.conf vs httpd.conf – such fun!!

“For instance, when I upgrade and reinstall Windows, most of the games I have installed on my secondary drive are instantly broken because they store cd-key…”

Plus filter drivers for their copy protection, and PunkBuster, and more. Most modern games generate unique machine ids during install and there you will never be able to simply copy them – this is by design and independent form the storage mechanism

“the new, much saner Windows Vista conventions”

These conventions are the same as the Windows NT 4.0 conventions, btw :slight_smile:

“can’t find any new Windows filesystem convention for system level, non-user-specific settings”

% ALLUSERSPROFILE% ?

“single point of failure”

INI files are a “single point of failure” (at least for the application, editing system wide plain text config files can break your computer in a similar way) so you should make backup copies of those files as well. There is a German saying:
Beginne Deine Arbeit nie
Ohne Sicherheitskopie”

„Never start your work without a backup copy”

“XML config files are reasonably human-readable, and they allow as many comments as you see fit”

Only for us experts/computer gods. The average user will have no clue and it’s very easy to break an xml file – a missing / and the whole file is useless. INI files are much more robust.

“in sync with the filesystem”
This is true for any mechanism. Only settings stored in the program folder are deleted but what about start menu entries, shell extension registration (file type handlers for double clicking), etc ? You will need an uninstaller to remove these settings and a poorly written uninstaller will stay a poorly written uninstaller no matter where the settings are stored.

“The registry is monolithic … Good luck extracting the relevant settings for that one particular application”

Look at Unix: Good luck extracting the relevant settings for that one particular application from various config files scattered across the whole file system with various formats (some plain text some not)

“What’s depressing about all of this is how prescient the UNIX conventions are in retrospect”

Unix is even more broken than Windows but there are less broken public Unix applications.

It’s not Windows or the Registry that are broken. The main problem are the great many broken Windows application done by brain dead programmers. And there is no technical solution for this.

As others have pointed out, .INI files have their issues to (inconsistent format, can be scattered around, multi-threaded access), but *nix has made it work relatively well. That said, I pity the fool who has to look at sendmail.cf for the first time.

But why not replace the registry with the obvious? A database. MSDE is small and light, provides central access, is way faster than any of the other technologies, has great APIs and has plenty of tools for management.

I’m always amazed that Microsoft fails to use one of its best technologies (SQL engine) for other products (registry, desktop search index, Exchange information store, …)