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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Opinion: Registry vs. Config file

Opinion: Registry vs. Config file

Scheduled Pinned Locked Moved IT & Infrastructure
visual-studiowindows-adminxml
10 Posts 5 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.
  • Steve EcholsS Offline
    Steve EcholsS Offline
    Steve Echols
    wrote on last edited by
    #1

    Where do you store things like user preferences - in the registry, config file, or somewhere else. In the Win3x days, I stored them in a config.ini file. Then Win95 came along with the almighty registry, so then I stored them there, because it was cool (now, with all the registry bloat, maybe it's not so cool). Then XML came along and now I'm torn between using a config.xml file or still putting them in the registry. I like the config.xml file option, because then it can be copied around. But then it defeats the purpose of the registry, so I'm teetering on the fence. Can anyone sway me one way or another (this fence is getting painful! :))


    - S 50 cups of coffee and you know it's on!

    • S
      50 cups of coffee and you know it's on!
      Code, follow, or get out of the way.
    D M H M 4 Replies Last reply
    0
    • Steve EcholsS Steve Echols

      Where do you store things like user preferences - in the registry, config file, or somewhere else. In the Win3x days, I stored them in a config.ini file. Then Win95 came along with the almighty registry, so then I stored them there, because it was cool (now, with all the registry bloat, maybe it's not so cool). Then XML came along and now I'm torn between using a config.xml file or still putting them in the registry. I like the config.xml file option, because then it can be copied around. But then it defeats the purpose of the registry, so I'm teetering on the fence. Can anyone sway me one way or another (this fence is getting painful! :))


      - S 50 cups of coffee and you know it's on!

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

      Steve Echols wrote:

      . But then it defeats the purpose of the registry...

      Which is? One of the features that the registry has over a .ini file is hierarchy. That feature, however, exists with a .xml file, too.


      "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

      "Judge not by the eye but by the heart." - Native American Proverb

      Steve EcholsS 1 Reply Last reply
      0
      • D David Crow

        Steve Echols wrote:

        . But then it defeats the purpose of the registry...

        Which is? One of the features that the registry has over a .ini file is hierarchy. That feature, however, exists with a .xml file, too.


        "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

        "Judge not by the eye but by the heart." - Native American Proverb

        Steve EcholsS Offline
        Steve EcholsS Offline
        Steve Echols
        wrote on last edited by
        #3

        To store all the user's and system settings in one convenient place, that's organized and easy to manage. :laugh::laugh: I'm tilting heavily toward the xml file side of the fence now.


        - S 50 cups of coffee and you know it's on!

        • S
          50 cups of coffee and you know it's on!
          Code, follow, or get out of the way.
        1 Reply Last reply
        0
        • Steve EcholsS Steve Echols

          Where do you store things like user preferences - in the registry, config file, or somewhere else. In the Win3x days, I stored them in a config.ini file. Then Win95 came along with the almighty registry, so then I stored them there, because it was cool (now, with all the registry bloat, maybe it's not so cool). Then XML came along and now I'm torn between using a config.xml file or still putting them in the registry. I like the config.xml file option, because then it can be copied around. But then it defeats the purpose of the registry, so I'm teetering on the fence. Can anyone sway me one way or another (this fence is getting painful! :))


          - S 50 cups of coffee and you know it's on!

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          HKCU\Software\[company name]\[app name] That way, the settings will roam with the user, and the stuff is not in a place where Joe Q. User will stumble across it and start mucking with the settings.

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          Steve EcholsS 1 Reply Last reply
          0
          • M Michael Dunn

            HKCU\Software\[company name]\[app name] That way, the settings will roam with the user, and the stuff is not in a place where Joe Q. User will stumble across it and start mucking with the settings.

            --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

            Steve EcholsS Offline
            Steve EcholsS Offline
            Steve Echols
            wrote on last edited by
            #5

            Not sure what you mean by "roam". How does the registry roam with the user? I find it easier to roam, when the .exe doesn't register any activex controls, and doesn't save stuff in the registry. If you can just copy the app folder and all it's contents to another computer and it runs hunky dory, then that's what I would consider roaming with the user. Joe Q knows about regedit, and the ones who don't probably won't find my config files. If they do and muck with them, well, that's there problem. I only see it being a problem, if a lot of different users are logging on to the same computer, and like to mess with other people (highly unlikely :laugh:), like a high school/college computer lab, public libraries, etc.


            - S 50 cups of coffee and you know it's on!

            • S
              50 cups of coffee and you know it's on!
              Code, follow, or get out of the way.
            M 1 Reply Last reply
            0
            • Steve EcholsS Steve Echols

              Not sure what you mean by "roam". How does the registry roam with the user? I find it easier to roam, when the .exe doesn't register any activex controls, and doesn't save stuff in the registry. If you can just copy the app folder and all it's contents to another computer and it runs hunky dory, then that's what I would consider roaming with the user. Joe Q knows about regedit, and the ones who don't probably won't find my config files. If they do and muck with them, well, that's there problem. I only see it being a problem, if a lot of different users are logging on to the same computer, and like to mess with other people (highly unlikely :laugh:), like a high school/college computer lab, public libraries, etc.


              - S 50 cups of coffee and you know it's on!

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              Steve Echols wrote:

              If you can just copy the app folder and all it's contents to another computer and it runs hunky dory, then that's what I would consider roaming with the user.

              Ah, I see. The term for that is "portable app". That's a good goal for apps that need no install. I still prefer HKCU since I know that's always a writable location; with a file, you have to worry about whether the user has write privs to the dir, and then have a fallback to something like All Users\Application Data (and then on Vista that might even be restricted/virtualized). In a domain environment, you can log in to any machine using your domain account/password. When you log in to a machine that's not the one on your desk, some of your per-user settings are also applied to that new machine - that's what roaming means. So if my app is installed on both computers, the user will see his settings on the second computer as well. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

              Steve EcholsS 1 Reply Last reply
              0
              • M Michael Dunn

                Steve Echols wrote:

                If you can just copy the app folder and all it's contents to another computer and it runs hunky dory, then that's what I would consider roaming with the user.

                Ah, I see. The term for that is "portable app". That's a good goal for apps that need no install. I still prefer HKCU since I know that's always a writable location; with a file, you have to worry about whether the user has write privs to the dir, and then have a fallback to something like All Users\Application Data (and then on Vista that might even be restricted/virtualized). In a domain environment, you can log in to any machine using your domain account/password. When you log in to a machine that's not the one on your desk, some of your per-user settings are also applied to that new machine - that's what roaming means. So if my app is installed on both computers, the user will see his settings on the second computer as well. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

                Steve EcholsS Offline
                Steve EcholsS Offline
                Steve Echols
                wrote on last edited by
                #7

                Michael Dunn wrote:

                That's a good goal for apps that need no install. I still prefer HKCU since I know that's always a writable location; with a file, you have to worry about whether the user has write privs to the dir, and then have a fallback to something like All Users\Application Data (and then on Vista that might even be restricted/virtualized).

                Yeah, I'm thinking more about simple apps, that are on a single user pc, and then once you get it setup on your desktop, you can just copy it to your laptop for convenience. I wasn't even thinking about domains or networking at all. Good to know, but overkill for my apps.


                - S 50 cups of coffee and you know it's on!

                • S
                  50 cups of coffee and you know it's on!
                  Code, follow, or get out of the way.
                1 Reply Last reply
                0
                • Steve EcholsS Steve Echols

                  Where do you store things like user preferences - in the registry, config file, or somewhere else. In the Win3x days, I stored them in a config.ini file. Then Win95 came along with the almighty registry, so then I stored them there, because it was cool (now, with all the registry bloat, maybe it's not so cool). Then XML came along and now I'm torn between using a config.xml file or still putting them in the registry. I like the config.xml file option, because then it can be copied around. But then it defeats the purpose of the registry, so I'm teetering on the fence. Can anyone sway me one way or another (this fence is getting painful! :))


                  - S 50 cups of coffee and you know it's on!

                  H Offline
                  H Offline
                  Heinz_
                  wrote on last edited by
                  #8

                  Now days i use xml to store configuration data, also i use a lot of binary files to store private and encripted data.

                  Steve EcholsS 1 Reply Last reply
                  0
                  • H Heinz_

                    Now days i use xml to store configuration data, also i use a lot of binary files to store private and encripted data.

                    Steve EcholsS Offline
                    Steve EcholsS Offline
                    Steve Echols
                    wrote on last edited by
                    #9

                    Heinz_ wrote:

                    Now days i use xml to store configuration data

                    This is the way I decided to go, mainly for the xcopy factor, which I find very convenient (when it's needed - granted it's not that often). Not that installation programs are bad or anything, but once I get a program configured and working the way I like, it's much easier to just copy the program folder to another computer, and I'd like to give people using my software, the same convenience.


                    - S 50 cups of coffee and you know it's on!

                    • S
                      50 cups of coffee and you know it's on!
                      Code, follow, or get out of the way.
                    1 Reply Last reply
                    0
                    • Steve EcholsS Steve Echols

                      Where do you store things like user preferences - in the registry, config file, or somewhere else. In the Win3x days, I stored them in a config.ini file. Then Win95 came along with the almighty registry, so then I stored them there, because it was cool (now, with all the registry bloat, maybe it's not so cool). Then XML came along and now I'm torn between using a config.xml file or still putting them in the registry. I like the config.xml file option, because then it can be copied around. But then it defeats the purpose of the registry, so I'm teetering on the fence. Can anyone sway me one way or another (this fence is getting painful! :))


                      - S 50 cups of coffee and you know it's on!

                      M Offline
                      M Offline
                      Mridang Agarwalla
                      wrote on last edited by
                      #10

                      XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML Hope That helps!

                      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