Windows Registry Variables vs. Environment Variables?
environment-variables, registry
Solution
Use environment variables when you intend to be configured by other applications (or by a technical user) and that this configuration could be different (i.e. you have 2 instances running at the same time, with different settings). Cluttering a user's environment isn't usually necessary. In most cases, use the registry, or a config file stored in $HOME\AppData\Roaming\YourApp.
Problem
At first glance this seems like a purely subjective/aesthetic issue, but I'd be interested to hear opinions (especially any technical ones) on whether environment variables or the registry is the preferred place for storing configuration data in a Windows environment. I can currently only think of the following differences: - Registry settings are persistent across sessions, though I believe that environment variables can also have this property. - It's easier to set environment variables from the command-line vs. using `regedit` - (Counter-argument: `regedit` easier for non-command-line apps?) - Environment variables are more common across platforms (?). I'm also aware that environment variables can be interrogated, modified and set from the registry.