When - and why - should you store data in the Windows Registry?

后端 未结 14 2697
礼貌的吻别
礼貌的吻别 2020-12-02 05:28

As a developer, tools that store configuration/options in the registry are the bane of my life. I can\'t easily track changes to those options, can\'t easily port them from

14条回答
  •  北海茫月
    2020-12-02 06:15

    Usually, if you don't put settings in registry, you use it mostly to get current Windows settings, change file associations, etc.
    Now, if you need to detect if your software is already installed, you can make a minimal entry in registry, that's a location you can find back in any config. Or search a folder of given name in Application Data.

    If I look at my Document and Settings folder, I see lot of softwares using the Unix dot notation for setting folders: .p4qt .sqlworkbench .squirrel-sql .SunDownloadManager .xngr .antexplorer .assistant .CodeBlocks .dbvis .gimp-2.4 .jdictionary .jindent .jogl_ext (etc.)

    and in Application Data, various folders with editor names or software names. Looks like being the current trend, at least among portable applications...
    WinMerge uses a slightly different approach, storing data in registry, but offering Import and Export of options in the config dialog.

提交回复
热议问题