Location to put user configuration files in windows Location to put user configuration files in windows windows windows

Location to put user configuration files in windows


The python appdirs package does a nice job of finding the standard place for application data on various platforms. E.g. for Windows it uses the English XP location:

C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName>

and on Linux it follows the XDG standard:

 ~/.config/<appname>


%APPDATA% is the right place for these (probably in a subdirectory for your library). Unfortunately a fair number of *nix apps ported to Windows don't respect that and I end up with .gem, .ssh, .VirtualBox, etc., folders cluttering up my home directory and not hidden by default as on *nix.

You can make it easy even for users that don't know much about the layout of the Windows directory structure by having a menu item (or similar) that opens the configuration file in an editor for them.

If possible, do provide a GUI front-end to the file, though, even if it's quite a simple one. Windows users will expect a Tools | Options menu item that brings up a dialog box allowing them to set options and will be non-plussed by not having one.


On windows the user is not expected to configure an application using editable config files so there is no standard.
The standard for configuration which is editable using a GUI is the registry.

If you're using QT (or PyQT?) then you can use QSettings which provide an abstraction layer. On Linux it uses a config file and on windows is writes to the registry.