why use register table,I know many big software don't adopt it.

Started by
14 comments, last by GameDev.net 19 years ago
like warcraft,I just copy installed directory and file ,it just work.
Advertisement
Several reasons:
  • It allows you to have a nice uninstaller in the control pannel
  • You can store data in a way that doesn't require you having a settings file
  • It helps prevent people "just copying the directory" to pirate the game (I'm not implying you pirated it)
  • I am not entirely sure what you're asking.
    Quote:Original post by Ravuya
    I am not entirely sure what you're asking.
    I'm assuming he's asking "What's the point in using the registry?"
    I don't mind programs using the registry, but I REALLY hate it when they don't remove their settings on uninstal. MS should make windows track registry changes, and undo all of them a program has caused when you uninstall that program (or have an option of doing so at least).

    As far as I can tell, the only real bonus to the registry is that you can take the liberty of just picking a place to put it and you always know where it is (ie from updater programs that are not run from the game's directory), so you don't have to ask users stuff like 'where is the settings file?' or 'where is the game installed?'

    As a repository for OS settings, the registry makes sense, but it doesn't really work as a general ini replacement and I hate that everybody is treating it as such.
    "Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
    Quote:Original post by Extrarius
    I don't mind programs using the registry, but I REALLY hate it when they don't remove their settings on uninstal. MS should make windows track registry changes, and undo all of them a program has caused when you uninstall that program (or have an option of doing so at least).


    Yes yes YES! Personally, I don't think the registry was a bad idea, but I can't say the same about the implementation. I know some shareware companies wouldn't like it, but they can figure out a new copy protection trick. It would really help to remove the crap that tends to build up in the registry.

    It would be pretty simple to implement too, you could do it similarly to a source control system, just storing deltas.
    The original point of the registry, as far as I know, was mostly for administrators. It provides a central place that can be backed up and secured. It's format is more consistent then the randomness seen in config files. It also has a clear way to provide per-user configs which historically Windows didn't have.

    It gets abused and misused like everything else.
    -Mike
    Quote:Original post by Extrarius
    As a repository for OS settings, the registry makes sense, but it doesn't really work as a general ini replacement and I hate that everybody is treating it as such.


    Unfortunately MS seems to be pushing things that way.

    Quote from MSDN WritePrivateProfileString:
    Quote:The WritePrivateProfileString function copies a string into the specified section of an initialization file.

    Note This function is provided only for compatibility with 16-bit versions of Windows. Applications should store initialization information in the registry.


    Further, even if you do use an ini file, it might get moved by Windows into the registry:

    Quote:The system maps most .ini file references to the registry, using the mapping defined under the following registry key:

    HKEY_LOCAL_MACHINE
    SOFTWARE
    Microsoft
    Windows NT
    CurrentVersion
    IniFileMapping



    To avoid all of that, you have to stop using the MS-supplied functions and write your own. No big deal, but they hooked developers on the ini functions and then messed them up.
    or use xml.
    The programs still don't store your data in the registry though, so you still have to hunt down that when you format or something, so just having the settings there would be alot easier -- I've never seen a util for exporting all the registry entries pertaining to a given file.

    The C:\Documents and Settings folder would seem like a logical place for settings to me...

    This topic is closed to new replies.

    Advertisement