Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why have a registry?

Why have a registry?

Scheduled Pinned Locked Moved The Lounge
windows-adminquestiondiscussion
14 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DarrollWalsh
    wrote on last edited by
    #1

    Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.

    D S T C S 5 Replies Last reply
    0
    • D DarrollWalsh

      Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.

      D Offline
      D Offline
      David Stone
      wrote on last edited by
      #2

      Darroll wrote: Everything I can store in the registry I can store in an ini file Noooooo! Not ini files! Use .config XML files! Or do you not do C#? Or even MC++ for that matter... Norm Almond: I seen some GUI's in my life but WTF is this mess ;-) Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough:) Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children:laugh: Leppie:My sister is 25:eek: -Norm on the MailMagic GUI

      D 1 Reply Last reply
      0
      • D David Stone

        Darroll wrote: Everything I can store in the registry I can store in an ini file Noooooo! Not ini files! Use .config XML files! Or do you not do C#? Or even MC++ for that matter... Norm Almond: I seen some GUI's in my life but WTF is this mess ;-) Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough:) Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children:laugh: Leppie:My sister is 25:eek: -Norm on the MailMagic GUI

        D Offline
        D Offline
        DarrollWalsh
        wrote on last edited by
        #3

        Didn't think of using XML, is there a tutorial on this? A guide? I think that this would be a good idea. Better than an ini. Darroll Not one person lives in the present. Only the past. I can prove it.

        S J 2 Replies Last reply
        0
        • D DarrollWalsh

          Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          Well, there are several reasons i can think of, including Speed, Security, and Consistency. INI files, especially if they are accessed via the standard Windows API routines, are quite slow. This doesn't matter much for a few app settings read on startup, but there is a *lot* of data in the registry that Windows accesses very frequently. Registry keys can have access rights and permissions applied to them. INI files can be protected as a whole on WinNT and up, but that's the best that can be done. Having all app settings in one place, ideally under a consistent layout, makes it easier to manipulate/save/restore/delete them when necessary. That said, there's certainly nothing wrong with putting *your* app's settings in an INI file, or XML file, or CFG file, or whatever the hell you want, so long as you keep it in your own installation folder & don't clutter up the system folders. This, sadly, was another big problem with INI files back in the Win3.1 days, as it was often the only location an app could be sure of finding on startup.

          Shog9 ------

          And on the pedestal, these words appear: "My name is Ozymandias, King of Kings, Look on my Works, ye Mighty, and despair!" Nothing beside remains.

          1 Reply Last reply
          0
          • D DarrollWalsh

            Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.

            T Offline
            T Offline
            Tim Smith
            wrote on last edited by
            #5

            Because the registry is setup to allow for roaming users in network domains. Your INI and XML files won't do that automatically. It also provides a central configuration location. Which in theory should be easier to backup. The alternative is 100000000000 different bloated ini/xml files everywhere. Pick your hell... Tim Smith "Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution." Hoare - 1980 ACM Turing Award Lecture

            C 1 Reply Last reply
            0
            • D DarrollWalsh

              Didn't think of using XML, is there a tutorial on this? A guide? I think that this would be a good idea. Better than an ini. Darroll Not one person lives in the present. Only the past. I can prove it.

              S Offline
              S Offline
              Steven Hicks n 1
              wrote on last edited by
              #6

              I have one, http://www.ltpb.8m.com/tutorial/XMLOptions.html[^] -Steven

              Visit Ltpb.8m.com
              3D Image Library: Ltpb.8m.com/Image

              T 1 Reply Last reply
              0
              • T Tim Smith

                Because the registry is setup to allow for roaming users in network domains. Your INI and XML files won't do that automatically. It also provides a central configuration location. Which in theory should be easier to backup. The alternative is 100000000000 different bloated ini/xml files everywhere. Pick your hell... Tim Smith "Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution." Hoare - 1980 ACM Turing Award Lecture

                C Offline
                C Offline
                ColinDavies
                wrote on last edited by
                #7

                Tim Smith wrote: Which in theory should be easier to backup. Exactly !! Regardz Colin J Davies

                Sonork ID 100.9197:Colin

                You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining. Said by Roger Wright about me.

                1 Reply Last reply
                0
                • D DarrollWalsh

                  Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  COM. Can you imagine how slow the system would be if it looked up GUIDs in a non indexed ini file ? The registry is a tree structure, and therefore much faster than an ini file. ini files are evil. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                  D 1 Reply Last reply
                  0
                  • C Christian Graus

                    COM. Can you imagine how slow the system would be if it looked up GUIDs in a non indexed ini file ? The registry is a tree structure, and therefore much faster than an ini file. ini files are evil. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                    D Offline
                    D Offline
                    DarrollWalsh
                    wrote on last edited by
                    #9

                    Why are ini files slow? All you have to do is read in the file, find the key, then find the data in the value you need. CString str = GetFile(); // ok sloppy shorthand int index = str.Find("Value", str.Find("Key",0)); str.Mid(index + 5,str.Find("\n",index)); It is my understanding that String functions in memory are very fast. So Why are INI files evil? Darroll Not one person lives in the present. Only the past. I can prove it.

                    C 1 Reply Last reply
                    0
                    • D DarrollWalsh

                      Why are ini files slow? All you have to do is read in the file, find the key, then find the data in the value you need. CString str = GetFile(); // ok sloppy shorthand int index = str.Find("Value", str.Find("Key",0)); str.Mid(index + 5,str.Find("\n",index)); It is my understanding that String functions in memory are very fast. So Why are INI files evil? Darroll Not one person lives in the present. Only the past. I can prove it.

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #10

                      Darroll wrote: It is my understanding that String functions in memory are very fast. So Why are INI files evil? Because your ini file does not live in memory, it lives on disk. Why do people like Oracle and Microsoft with SQL Server not store their databases as flat 'ini' type files ? Because if they did, you'd need to search the entire file to find a record. It's like a CArray or vector, you start at the top and work to the bottom. A CMap or map, on the other hand, is a sorted tree, and so you never have to search the entire file, each search halves the number of records you need to search. That's just one way of storing data more efficiently than a flat file. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                      1 Reply Last reply
                      0
                      • D DarrollWalsh

                        Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.

                        S Offline
                        S Offline
                        Stuart van Weele
                        wrote on last edited by
                        #11

                        The registry was created to get away from .ini files and the pain they caused. Like most of MS's technologies they started out with a good idea, then created a half assed implementaion that allows bloat and doesn't provide an easy way to purge old keys, track changes, etc. One of the main uses of the registry is to hold COM GUIDs that the system needs to know about. All that being said, do use the registry for storing configuration info and personal settings. You are just asking for pain if you attempt to use .ini files or come up with a home brew solution.

                        1 Reply Last reply
                        0
                        • S Steven Hicks n 1

                          I have one, http://www.ltpb.8m.com/tutorial/XMLOptions.html[^] -Steven

                          Visit Ltpb.8m.com
                          3D Image Library: Ltpb.8m.com/Image

                          T Offline
                          T Offline
                          Tom Welch
                          wrote on last edited by
                          #12

                          Why would an example for XML config files not use the XMLDOM parser? It might be overkill so I'll grant some lee-way. You have any thoughts on this? -- If it starts to make sense, you're in a cult.

                          S 1 Reply Last reply
                          0
                          • D DarrollWalsh

                            Didn't think of using XML, is there a tutorial on this? A guide? I think that this would be a good idea. Better than an ini. Darroll Not one person lives in the present. Only the past. I can prove it.

                            J Offline
                            J Offline
                            Jason Henderson
                            wrote on last edited by
                            #13

                            Try my article here: http://www.codeproject.com/useritems/XMLSettings.asp[^]

                            Jason Henderson
                            start page
                            articles
                            "If you are going through hell, keep going." - Sir Winston Churchill

                            1 Reply Last reply
                            0
                            • T Tom Welch

                              Why would an example for XML config files not use the XMLDOM parser? It might be overkill so I'll grant some lee-way. You have any thoughts on this? -- If it starts to make sense, you're in a cult.

                              S Offline
                              S Offline
                              Steven Hicks n 1
                              wrote on last edited by
                              #14

                              I just prefer to use the code that I already wrote, an XMLEditor and a CMS. Also the function that is listed on the tuturial recieves the contents within the specified tag (which you should know the tag if you are using the XML file for the options.). I just haven't found a need for the XMLDOM, nor any information about it. -Steven

                              Visit Ltpb.8m.com
                              3D Image Library: Ltpb.8m.com/Image

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups