I am currently developing an application which should be portable or non-portable (like many apps here).
I am now thinking about a best practice for "configuration management", e.g. how the app handles its configuration on startup.
Since I read the "what is a portable app" link and I don't want to mess up with windows annoyances like registry etc., my approach is currently the following:
* read the configuration file xyz.cfg in the program's directory.
* if it is not found, try to read config file from user's %APPDATA% or %LOCALAPPDATA% and act according to it.
* if it is found, first handle the options here. If a security option in there says "no normal user is allowed to have an own configuration", break. if it is allowed, read user specified config file from %APPDATA% or %LOCALAPPDATA% (btw., what's the difference and what should when be used? :)) and add additional configuration from there.
Is there anything I am missing? Are there some tutorials/best practices/howtos regarding elemental software design like this?