Actions

Settings and Ini Files

From XnView Wiki

Revision as of 13:56, 28 August 2009 by WikiSysop (talk | contribs) (Created page with 'The following is intended for programmers and other technical personnel. XnView settings are for example position and size at startup, recent file lists, or the options which yo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The following is intended for programmers and other technical personnel.

XnView settings are for example position and size at startup, recent file lists, or the options which you set in the options dialog. All these settings have to be stored when exiting the program and restored when starting. Normally, you use XnView and change settings in the options, and you do not have to worry how they are stored and where they are stored.

In some cases, it's still good to know and understand, where XnView stores its settings. Below you will find various info on XnView's settings.

The place where your settings are stored depends on the option "Use registry to save options", which you can find by selecting menu "Tools > Options", category "Install".


Settings stored in .ini files
By default this setting is deactivated and all your XnView settings/options are stored in two files:
  • bookmark.ini: contains the bookmarks that you can set using the toolbar in the browser ("New bookmark")
  • xnview.ini: contains all the rest, i.e. setting of options, recent file and directory list, ...


Location of .ini files
The two .ini files are located in the program directory of XnView, typically C:\Program Files\XnView.
So if you want to have the same settings on another PC or want to make a backup of your settings, it's sufficient to copy these two files.


Settings stored in Windows Registry
If you have activated the option "Use registry to save options", all the XnView settings will be stored in your registry under the key "HKEY_CURRENT_USER\Software\XnView" and you can use "regedit" to export and import the settings. But this is for advanced PC users, only.


Settings and XnView update
When updating XnView, you typically uninstall your current version and then install the new version.
The two .ini files 'xnview.ini' and 'bookmark.ini' which are used to store the settings and the bookmarks of XnView, are not part of the installation and uninstallation and will not be changed or deleted. So when updating, the settings will be untouched and won't be lost.
For those who want to remove all XnView files, this is a bit of extra work, since the two .ini files have to be deleted manually. Sure enough, the uninstallation routine could be smarter and ask the user whether he/she wants to uninstall the .ini files, too, but this has not been done, yet. Sorry.


Editing settings manually
The .ini files are normal text files which can be opened using any text editor. All settings stored in the .ini file can be changed using XnView's option dialog ("Tools > Options"), so normally there should be no need to edit and change the settings manually.
Editing .ini files can be done, but when doing so each user should know what he/she does and it's at own risk: Normally XnView is forgiving, but in rare cases wrong entries might even cause GPFs at start-up.