Sorry for being really ignorant here, I just want to learn, why is the registry needed for programs? What’s it for and why can’t software just write variables to their own local files? Does it do something I’m not aware of?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
IMHO, the Windows Registry is an invention almost as practical and useful as the pet rock.
By putting application configuration data in the same place with operating system configuration data, it makes any attempt to update an app carry the danger of screwing up the operating system. It’s like making a single remote control that controls both your television and your pacemaker. Sure, you could argue that it’s convenient to have all the controls in one place, but it also creates the danger that any attempt to change the channel will kill you.
The old INI files were easy to read and update by both computers and humans. For the truly lazy programmer who couldn’t figure out how to manipulate a simple text file, there were library functions to do it simply and easily. The registry is mildly difficult to update with a program, and extremely difficult for any human being to read, especially a non-programmer.
In the bad old days when each program had a directory and stored all its data in that directory, you could delete a program by simply deleting the directory, and you could confidently back up a program by simply copying this directory. With the registry, you need a special uninstall program for each program, and it is common to have obsolete or junk entries float around in the registry indefinately.
Is there anyone out there who can say with a straight face that the registry is easy to manage, or that it increases the reliability of the system?
What I think Microsoft should have done was create a central file that recorded the directory where each app is installed and the extensions of files that it knows how to open. That should be the only information the OS needs to know about an app. Everything else should be stored in the app’s own directory.
Update: Reply to Mick
I disagree with most of the points in the referenced article. Like, “You can’t store binary data in an INI file” and “INI files only have two levels of structure”. If the system INI file stored only the info the OS needs to know about apps, that’s just a few text strings each, there’s no need for binary data or a hierarchical structure. An application INI should just hold config and preference information, and thus, again, no need for binary data and hierarchies. The advantage of the INI format was that it was a simple, readable, text file. That made it easy to parse, easy to update, and easy to manage. The whole point of my original post was that by adding the registry, with all sorts of complex features, Microsoft replaced something that was easy to manage with something that was hard to manage.
There’s some validity to the points about security and concurrency. But surely we could have solved those problems within the existing framework.
Sure, an INI file does not make a good database. But so what? That isn’t what it was for. This is like complaining that a pair of shoes doesn’t help you swim or enable you to fly or cook your breakfast, and therefore we should replace all shoes with jet-powered flippers with radio controls and built-in microwave ovens. The result would surely be an overly-complicated, awkward monstrosity. It would cease to be comfortable to walk in, and would probably not be very good for swimming or making breakfast. Instead of being very good for one thing — walking — it would be barely usable for a dozen things. Things that, by the way, we already had perfectly good tools to accomplish. Oh, kind of like the registry.