Cascading Portable INI files

From TED Notepad
Revision as of 11:38, 3 April 2007 by Jsimlo (talk | contribs)
You see work in progress here; this section already reflects future TED Notepad version 5.3.0.2.
This section may contain incomplete, premature, or mistaken information, prone to change without notice.

TED Notepad is able to store its settings also portably in an INI file, so it can be easilly moved from one computer to another on a USB flash disk or a Floppy disk, carrying its settings along.

The INI file must be placed in the same directory, where the executable file is. It must be named TedNPad.ini (the name is usually case insensitive).

When TED Notepad is starting, it searches for that INI file. When successful, it loads its settings from the INI file. Then, upon exit, all settings are always saved back to the INI file, even if it is deleted or modified in the meantime.

When the TedNPad.ini file is not found, TED Notepad loads its settings from the user registry.

While saving the settings (e.g. upon exit), TED Notepad searches for the TedNPad.ini file again. If the file is found, it stores the settings into it regardless of whether they were loaded from the registry or from the INI file before. This can be useful to convert your current settings from the registry to the portable INI file.

Note: There is currently no way to convert the settings from the INI file back to the registry. Once TED Notepad finds the TedNPad.ini file, all settings are stored there in that session.

Note: Because the INI file must be stored in the same directory, where the executable is, it is not recommended to install TED Notepad with this portable INI file to a Program files folder or as a default notepad replacement, because end users would be probably completely restricted from writing their settings.

Note: By setting a read-only attribute to the TedNPad.ini file, you will prevent TED Notepad from saving new settings. When you set this attribute on an empty file, you can ensure the default settings forever.