A new idea for the windows registry and Longhorn

10-01-2002, 10:19 AM
|
|
Registered User
|
|
Join Date: Oct 2002
Posts: 2
|
|
A new idea for the windows registry and Longhorn
A good modification to a newer version of windows (Longhorn) would be to change the registry a bit. Instead of having all programs edit one main, central registry, and having tons and tons of values, never knowing for sure what pertains to what, you should break up the registry into separate files that then interact with a registry API. Each program would have its own registry file stored in the same directory where the program’s files are stored instead of just adding entries to a huge central registry.
For example, when a program is installed, all registry entries usually made in the windows registry for the settings of the program and any modifications it made to windows itself (like adding an entry into add/remove programs, adding a control panel icon, or adding a right click option like Winzip does, etc.) would instead be stored in a file. A file such as settings.reg would be created in the program’s directory.
One big advantage of this is that now you know exactly where to look for all the registry settings for a program. If the program is in C:\program files\prog, you know you can find all the possible registry entries the program uses in a registry file in that directory. In addition, you could actually entirely delete a program from just deleting the program’s directory, being sure that every program setting and all modifications made to windows were deleted, without the worry of affecting any other part of your system. The only thing that could be left is some old shortcuts, which windows could be triggered to search for automatically (just the job for an OFS). This would then be another way to uninstall programs in addition to the add/remove programs panel.
It is also great because if somehow, the registry for a program is corrupted and there are registry errors, it will be easy to pinpoint where the problem is. You will not have to worry about your whole registry breaking and possibly reinstalling windows. In addition, it would be very simple to copy a .reg file to make a quick backup and then make modifications to the programs .reg file. When editing one of these .reg files it would look very much similar to the present windows registry, except a mini version since it is only the entries for one program.
The way in which windows manages registry files can be very simple, windows would maintain a database of all the registry files on your computer and what programs and such they are for (perfect task for an OFS). You could actually check and uncheck from the database which registry files you want windows to load at startup! This would be excellent for troubleshooting purposes and determining if a piece of software is giving your computer trouble.
When the computer starts all the registry files that were selected to load would be loaded up into a “virtual main registry” in memory, if not memory then windows would just create a “virtual main registry” on the hard disk. If it were in memory, it would access much faster, but if it took up too much memory windows could just create one main registry on the hard disk. The point is that wherever this “virtual main registry” is, it would not be a standing one, meaning that it is perpetually rebuilt from many individual program .reg files, which the database says to load. This would happen every time your computer starts up and every time the “virtual main registry” is refreshed. It can be refreshed when a program installs, when the user does it manually, or when windows just does it on its own.
It is important for windows to have its own .reg file in the windows directory, say windows.reg. This registry file would contain only the basic settings the windows OS makes that pertain to the OS itself (i.e. appearance settings, maybe basic hardware settings too, etc). No other program’s settings would ever be allowed to be entered into this file. However, this does not mean that there could not be programs and power tools that tweak these windows settings to the user’s liking. It just means that all the settings for another program would be in its own .reg file in its directory.
Here is an example of how all this can work. Take the program Winzip. When you install it, along with all the files for the program, a .reg file, say settings.reg, would also be created in the program’s folder. In this settings.reg file, the necessary values would be present to tell the registry API to add an entry to the add\remove programs list, add a new option when you right click on a file to zip it up, etc. It would also contain all the settings for the program and when the program looked for any entries it needed, the API would direct it through the “virtual main registry”, either in memory or on the hard disk, to where it needs to look for its settings.reg entries. If you accessed the main database and unchecked this registry file, the next time your computer restarted or the “virtual main registry” was refreshed, none of the values from settings.reg would be loaded.
Of course, when modifying what registries to load in the database, and if you ever try to delete a registry file, windows will give all sorts of warnings and flashing red lights. For compatibility, the registry API could be programmed to deal with older programs attempting to make registry entries the old-fashioned way. It can make a .reg file for the program in the program’s directory on its own, with the proper entries the program needs. When the program tries to access entries the old way, the API can direct the program and trick it into thinking it is dealing with the traditional registry.
By default, registry files WOULD NOT automatically be loaded up into the “virtual main registry”. The database would know it was there but .reg files would have to be enabled, perhaps by right clicking on the .reg file to access the database and enable it. What this means is that just because you copied, created, or downloaded a .reg file, it will not automatically be loaded. If this were not the case, it is easy to see how this could be a problem. If a new program were being installed however, windows would be smart enough to enable the .reg file that is installed with the program.
This would much improve the way programs are stored and operate on your computer. This would also take advantage of the planned OFS. In addition, since a new file system is being developed, perhaps the C: drive letter idea should be taken out. That is kind of a legacy from MS-DOS and is not necessary. Just start drives with a root directory (i.e. main\...).
|

10-01-2002, 03:34 PM
|
 |
Temporary Ban
|
|
Join Date: Sep 2002
Location: In a plasma conduit
Posts: 1,625
|
|
|
Hmmm.. Seperate config files for every prog. Isn't that how other "better" operating systems do it, and have done for years.
I have an Amiga that uses this method, which, with some exceptions, all Prefs/ config files are stored in a central location.
Whereever they are stored though, only the program that needs them accesses them.
Microsoft can't do that... A legacy registry, oh no no no no!
__________________
Where there's a will, There's a way.
Pay developers, not Rapidshare!
I know nowt, but at least I'm trying. 
Quality, not quantity.
Prevention is better than cure.
|

09-29-2005, 03:24 PM
|
 |
Registered User
|
|
Join Date: Apr 2005
Posts: 34
|
|
|
lol
Quote:
|
Originally Posted by Disk_Contented
Hmmm.. Seperate config files for every prog. Isn't that how other "better" operating systems do it, and have done for years.
I have an Amiga that uses this method, which, with some exceptions, all Prefs/ config files are stored in a central location.
Whereever they are stored though, only the program that needs them accesses them.
Microsoft can't do that... A legacy registry, oh no no no no!
|
hahaha i think you have got microsoft pretty much figured out. What doesn't make sense to everyone else makes sense to them.
__________________
You are either a one or a zero alive or dead.
|

09-29-2005, 05:54 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 41
|
|
Thanks Blitz
Thanks Blitz,
Quite great stuff you provided. Thanks for the enlightenment.
Lovely day!
__________________
Those who do not surrender their minds have the burden
|

09-29-2005, 09:09 PM
|
 |
Registered User
|
|
Join Date: Sep 2005
Location: England
Posts: 490
|
|
|
I wonder if Blitz is still around...this was 3 years ago.
__________________
F A B Scott
|

10-01-2005, 01:29 PM
|
|
Registered User
|
|
Join Date: Oct 2002
Posts: 2
|
|
|
Hey! Still alive! Actually I had all but forgot about this post until I got an email the other day. Hope all is well.
|

11-25-2005, 07:57 PM
|
|
Registered User
|
|
Join Date: Nov 2005
Posts: 74
|
|
Delete the whole central registry like Linux and other OSes 
|

12-20-2005, 09:08 AM
|
|
Registered User
|
|
Join Date: Nov 2005
Posts: 5
|
|
|
It is really up to the developer where to save the settings. Many people have been storing values in files for years, generally .ini or something to that effect. Now xml has replaced it. I even encrypt the xml to store settings so no one can look at it and screw it up.
The majority of settings in the registry are needed for Windows so you will still need some sort of central db to query, especially for something like a right click or displaying which icon and which program opens a certain file, you don't want to query a central db just to find where the 3rd party db is then go query that.
I really think the key is promoting good development techniques, like removing your registry settings on a program uninstall, etc. Keep the registry clean and it really isn't all that bad.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT -5. The time now is 08:41 AM. |
|
|
|