0

Since Windows Vista, our friends from Redmond are putting an end to the habit of storing configuration files in C:\Program Files\<AppName>\config.ini. Ok, they introduced Registry Virtualisation, but it's always better to fix your stuff, right?

I'm planning to fix a pre-Vista app which runs as a service, and which needs to maintain a machine-wide configuration file.

Where do I store the config file? And what would be the most portable/future-proof way of obtaining the path to that location?

doppelfish
  • 113
  • 5

2 Answers2

1

After improving my Google-fu starting from a related question, I think I've found the definitive answer in this microsoft blog post which actually describes much more than what I originally wanted to know.

doppelfish
  • 113
  • 5
0

You could store the values in the registry in something inheriting from \HKLM\ directly, which would give portability.

If there are a large number of values, or a complex structure to them, then you could store a file location in the registry, and store your configuration at that destination.

Dragonthoughts
  • 2,180
  • 8
  • 25
  • 28