4 ms·
>The Registry cannot be documented. >Configuration files can be individually versioned and managed. So can registry files - just write them as .reg files (whic
by Arainach 4y ago
>The Registry cannot be documented.
>Configuration files can be individually versioned and managed.
So can registry files - just write them as .reg files (which can be automatically exported or trivially handwritten in standard ASCII syntax). Anything that starts with a semicolon is a comment.
If you want in-place documentation just go create a string value wherever you want with whatever content you want.
>Configuration files can exist in multiple instances, be swapped out or referenced for a specific invocation.
Again, use .reg files and the tooling for this is trivial.
https://support.microsoft.com/en-us/topic/how-to-add-modify-or-delete-registry-subkeys-and-values-by-using-a-reg-file-9c7f37cf-a5e9-e1cd-c4fa-2a26218a1a23 https://support.microsoft.com/en-us/topic/how-to-add-modify-...
This works well and is deployed at scale in all sorts of organizations for all sorts of projects.
https://support.google.com/chrome/a/answer/9131254?hl=en#zippy=%2Cconfigure-settings-on-windows-computers https://support.google.com/chrome/a/answer/9131254?hl=en#zip...
- dredmorbius 4y agoA .reg file is to the Registry as a diff or release point is to an initialisation file. .reg files aren't the Registry, they're ways to save or set Registry values. There remains only one registry. Much software reflects present values. It's not possible to have multiple simultaneous Registry keys, and swapping in or out additional keys may very well produce unwanted or unintended consequences for running service instances. If I want to fire up some specific version of a process or server on, say, Linux, I can generally (specifics vary, but these are typical): - Pass along arguments as command-line parameters. - Set environment variables with desired values. - Specify both global (system-wide) and user-specific configurations. - Enable or disable specific configuration files using invocation flags. - And if all else fails, jail the process and launch within a filesystem context in which the desired configuration file(s) exist. Again: the Registry affords none of this. Let alone comments, as previously noted.
- Arainach 4y agoSwapping out config files can have unintended consequences for running service instances. Reg files are functionally equivalent to config files. Instead of `cp foo.conf.bak foo.conf`, just `reg import foo.bak.reg` Windows processes take command-line parameters and environment variables. None of your points are specific to configuration files - or to Linux. There are even third party jail equivalents for Windows that include registry jailing.
- dredmorbius 4y agoHow are you going to point multiple services at multiple different registries at the same time? Because absent full system virtualisation, you cannot. I don't have to copy config.001 to config. I can simply point the process to config.001. There might be many such of those configs. (This can of course become ... too much of a good thing. But that's simply because it's so easy to do and get carried away with.) The remainer are far more difficult or error prone under Registry.