Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the point of a system registry?

Tags:

registry

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?

like image 352
Tom Gullen Avatar asked Jul 25 '10 00:07

Tom Gullen


People also ask

What is the purpose of the system registry?

The Registry contains information that Windows continually references during operation, such as profiles for each user, the applications installed on the computer and the types of documents that each can create, property sheet settings for folders and application icons, what hardware exists on the system, and the ports ...

Should you use Windows registry?

It's not necessary for all Windows applications to use the Windows Registry. Some programs store their configurations in XML or other types of files instead of the registry, and others are entirely portable and store their data in an executable file.

How do I use system registry?

There are two ways to open Registry Editor in Windows 10: In the search box on the taskbar, type regedit, then select Registry Editor (Desktop app) from the results. Right-click Start , then select Run. Type regedit in the Open: box, and then select OK.


1 Answers

IMHO, the Windows Registry is an invention almost as practical and useful as the pet rock.

  1. 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.

  2. 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.

  3. 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.

like image 188
Jay Avatar answered Jan 10 '23 22:01

Jay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!