OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 3:48 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: The Windows registry
PostPosted: Fri Jan 14, 2005 1:36 am 
Offline
Member
Member

Joined: Sat Nov 25, 2006 12:50 am
Posts: 454
..


Last edited by Perica on Tue Dec 05, 2006 9:36 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re:The Windows registry
PostPosted: Fri Jan 14, 2005 2:38 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 6:06 pm
Posts: 1437
Location: Vancouver, BC, Canada
It's like a big database with a hierarchy of keys that contain values. These values are configuration information for... everything. Drivers, installed software, user preferences, registered COM objects, etc. It's also a maintenance/administration nightmare and its use is being phased out slowly over time.

_________________
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!


Top
 Profile  
 
 Post subject: Re:The Windows registry
PostPosted: Fri Jan 14, 2005 5:27 am 
The Windows' Registry is accurately designed so that over time the computer becomes slower and slower.
So there are two choices:
A) Reinstall
B) Buy a new computer

( installing a different OS is something much more of a rarity :P )

Axel


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Fri Jan 14, 2005 5:54 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7614
Location: Germany
From an OS designer's perspective, the Registry is a place where the OS or its applications can store tidbits of administrative data.

Which application to open for *.txt files.

Where to open the window of application X on startup.

What icon to display for *.doc files.

Which desktop background picture to load.

Every OS needs a place like that. For Linux, it's either /etc or any of the ~/.* files / directories. For Windows, it's the Registry.

And everytime a Linux user has to hunt down which configuration file he has to edit now, the Windows user has to look into the Registry. Which is why it has such a bad rep.

Linux users don't tend to see /etc and ~/.kde and ~/.gnupg and ~/.ssh and ~/.fetchmailrc and ~/.procmailrc and ~/.muttrc and ~/.whateverrc as a "design entity" and continue pointing fingers at the Windows registry while both are simply a bad solution for the same design problem.

Sorry, couldn't resist.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:The Windows registry
PostPosted: Fri Jan 14, 2005 11:55 am 
Solar's description is correct. The registry is basically just a place to store configuration data, and no matter what operating system you are using that information has to be stored somewhere.

The biggest flaws of the Windows registry are the apparent inability to document the information where it appears and the tendency to spread related configuration options out across unrelated portions of the registry. Also the fact that it is stored in binary format ain't the greatest thing in the world, either.

By the way, if you're going to use the registry, then you should use it properly. That means options having to do with user preferences go into the user portion of the registry (HKEY_CURRENT_USER) and options having to do with the system go into the system portion of the registry (HKEY_LOCAL_MACHINE).

Specifically, don't write user options to the system registry. If the user is not an administrator, then your program will most likely be denied access to the system portion of the registry, and the fault will be your program's, not the registry's.


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Fri Jan 14, 2005 11:58 am 
Also, if you write a program that uses the registry, it should be able to handle the case where a value it expects to find in the registry is not there and revert to an appropriate default.

It should not do as many (poorly written) Windows programs do and refuse to run.


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Mon Jan 24, 2005 7:27 am 
Offline
Member
Member

Joined: Sat Nov 25, 2006 12:50 am
Posts: 454
..


Last edited by Perica on Tue Dec 05, 2006 9:37 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re:The Windows registry
PostPosted: Mon Jan 24, 2005 11:30 pm 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7614
Location: Germany
Perica wrote:
Solar wrote:
Linux users don't tend to see /etc and ~/.kde and ~/.gnupg and ~/.ssh and ~/.fetchmailrc and ~/.procmailrc and ~/.muttrc and ~/.whateverrc as a "design entity" and continue pointing fingers at the Windows registry while both are simply a bad solution for the same design problem.

What do you propose would be a better solution?


One central point where configurations are stored, one global format in which to store them, one global API of functions with which to store them, in a format that allows making a backup without special mojo (i.e., copy / zip / tar / whatever).

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:The Windows registry
PostPosted: Tue Jan 25, 2005 12:35 am 
I guess the alternatives to registry/config-files is an OSDev topic so I'll comment on that in a new thread there.

edit: the thread is here


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Tue Jan 25, 2005 8:41 am 
I use the registry for VB programming. In short, it's another patented Microsoft piece of ....... It is kinda usefull for the fact that all sorts of data is located in one place (and thus easy to edit) but this makes it prone to crackers who go in, destroy it and be on their way. While I've never personally heard of this, it is very possible and ms claims it is required for windows to run so it could be a target sooner or later.


Cheers, DH.


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Tue Jan 25, 2005 10:41 pm 
It is definitely needed for windows to run. In fact, Windows is pretty intolerant about problem in register, and the smallest modifications there (when done to the right place) can prevent the whole thing from booting.

IIRC you could even make your "Windows 2003 Server" act as a "Windows XP Profession" and such by toggling a few bits in the register (ofcourse you can't get any missing files this way but..)


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Wed Jan 26, 2005 9:47 am 
One can always count on MS to put in some stupid little "feature" in as well.

Aprently there is a small bug in XP home that allows tge user to access XP Pro features. Simply reboot into safe mode and voila. This extra stuff is accessed by right clicking on the my computer icon and looking for a new entry...


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Wed Jan 26, 2005 7:59 pm 
Quote:
Aprently there is a small bug in XP home that allows tge user to access XP Pro features. Simply reboot into safe mode and voila. This extra stuff is accessed by right clicking on the my computer icon and looking for a new entry...

That 'extra stuff' would be the security tab? It being there in safemode isnt a bug, it's by design.
Also, if you need that functionality, there's a commandline tool (cacls.exe) that does almost all of that, without needing to go into safemode.


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Thu Jan 27, 2005 9:44 am 
Nope, not security. I think it's "management" or something along thoes lines.


Top
  
 
 Post subject: Re:The Windows registry
PostPosted: Fri Jan 28, 2005 3:19 pm 
AxelDominatoR wrote:
The Windows' Registry is accurately designed so that over time the computer becomes slower and slower.
So there are two choices:
A) Reinstall
B) Buy a new computer


There are any number of tools to 'optimize' the registry, which work with varying degrees of effectiveness. However, anything that edits the registry involves some risk of corrupting it, and even the most effective optimizers can only do some much. They can put off the need for a re-install for several months, but they can't forestall it indefinitely.

Mind you, there are plenty of things that will make a poorly secured and maintained Windows box (or is that redundant?) grind to a halt long before registry bloat can become a factor. I'm still hearing from tech support customers who don't have anti-virus and anti-spyware scanners on their system, which with a broadband connection is simply asking for trouble.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: SemrushBot [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group