User Tools

Site Tools


configuration

Work in Progress.

ToDoList can store configuration data in either a common .INI file, or in the Registry. This is determined by a user prompt at installation time.

The .INI File

The basics of the .ini configuration file

The .ini file consists of sections and name/value pairs (also called key/values). The following is an example of the beginning of such a file:

[KeyboardShortcuts]
NumItems=67
ShowCommandIDs=0

[Tools]
ToolCount=7

[Preferences]
AddFilesToMRU=1
AddLoggedTimeToTimeSpent=1
AddLoggedTimeUnits=72

INI file location

Most users don't care about the contents of the file, only its location. For a new installation, the default configuration file is ToDoList.ini, in the root folder along with the .exe and .dll files. At startup, the ToDoList.exe tests to see if its folder location is writable by trying to create a temporary file. If the folder is not writable then the .ini file will be saved to
C:\Users\<user>\Application Data\Abstractspoon\ToDoList

Some users save ToDoList into the Program Files folder, but this is not recommended. Depending on how the application is being run and system-specific permissions settings, Windows may transparently save the file to a different folder:
C:\Users\<user>\AppData\Local\VirtualStore\Program Files (x86)\ToDoList

That can be confusing. The reason for this is that Windows is a multi-user environment, and most configuration data is unique per-user. So apps should never write configuration data to the one and only “Program Files” path because that's shared by all users. However, installing ToDoList under Program Files is a choice made by individuals (and completely understood) but as seen here there are technical consequences for that decision. To help with this common problem, Microsoft made it so that when an individual user runs an app that tries to save configuration data in the Program Files path, it may (depending on permissions) transparently save the file under the AppData VirtualStore folder. That avoids a collision of different user settings, and while useful, it's also confusing to those of us who just have one person per system.

Using a non-default configuration file

After the first execution of the application, the file can be moved to any location. To use a config file from a non-default location, you need to specify where your file is in the command-line using the -i switch. For example:

  C:\SpecialApps\ToDoList\ToDoList.exe -i "C:\Users\me\Documents\Tasks\ToDoListLive.ini"

That command line would usually be set as the Target in a desktop shortcut. Some users simultaneously run different versions of ToDoList (different executable path) with different .tdl files (as defined by .ini files), simply by clicking different shortcuts.

Config file details

Some sections are broken up simply for convenience. For example, there are sections for [Preferences], [Preferences\AttribUse], [Preferences\Colors], etc. And there are other sections which are based on a template, where each section is like the others but unique in its own way. For example“

[KeyboardShortcuts\Item00]
CmdID=57670
Shortcut=112

[KeyboardShortcuts\Item01]
CmdID=32934
Shortcut=131142

Those sections both define shortcuts. All KeyboardShortcuts sections look the same.

Notice that the [KeyboardShortcuts] section above defines NumItems=67. Looking into a .ini file you might see the sections listed like this:

[KeyboardShortcuts\Item55]
[KeyboardShortcuts\Item56]
[KeyboardShortcuts\Item57]
[Pos]
[Version]
[Settings]
[FindTasks]
[FindTasks\Searches]
[Updates]
[KeyboardShortcuts\Item58]
[KeyboardShortcuts\Item59]

The order of the sections and the name/value pairs is not important. And sections do not need to be grouped together. This information may be helpful as you look in this file for sections and keys.

configuration.txt · Last modified: 2020/11/21 02:21 (external edit)