Settings and Directories

Top  Previous  Next

Options and Configuration > Settings and Directories

For many years, we followed Microsoft's recommendation and simply stored all settings in the registry, under "HKEY_CURRENT_USER".  But with the increasing popularity of USB sticks and other users wanting to move and share settings, a more flexible solution is needed.  Taking into account the strict directory structure imposed by U3, and the strict security enforced by Vista and other "locked-down" computers, we now have the following hierarchy of places that ClipMate will look for settings, before resorting to the default registry location.

Here are the options, from highest to lowest priority.

1.ClipMate_Settings.ini in U3 "application data" directory (IF running as U3)
ex: M:\System\Apps\E21B62F2-4CFA-4913-9B79-4F955F4F202D\Data\ClipMate_Settings.ini
2.Command Line Parameter - if you specify INIDIR as a command-line parameter.
ex: ClipMate.Exe INIDIR="{PORTABLEDRIVE}:\data\ClipMate\"
3.ClipMate_Settings.ini found here: Directory containing ClipMate.Exe
ex: C:\Program Files\ClipMate7\ClipMate_Settings.ini
4.ClipMate_Settings.ini found here: "application data" + "\Thornsoft Development\ClipMate7", where "application data" is determined by the Windows registry.
ex: C:\Documents and Settings\<username>\Application Data\Thornsoft Development\ClipMate7\ClipMate_Settings.ini
5.Windows Registry, just like all versions of ClipMate 5,6,7 prior to 7.2.
ex: HKEY_CURRENT_USER\Software\Thornsoft\ClipMate7

It doesn't do any good to hard-code a drive letter such as "M:\"  or a username such as "Fred's PC" in a path, when you want the application to be portable on a USB thumb drive.  So all of the paths specified in the .ini files or registry (log, temp, data, template, export, etc..) can be "tokenized" with variables that will be evaluated when the program runs.  Some are "U3-only", while others can be used outside of the U3 runtime environment.

Directories

You can edit the "Directories" section of the registry or .ini file, or use command-line parameters, to override these settings.  Shutdown ClipMate prior to editing.

ex:

[Directories]

Log="C:\Documents and Settings\JoeUser\Application Data\Thornsoft Development\ClipMate7\log\"

Temp="D:\Temp\CipMate7_temp\"

Templates="{COMMON_APPDATA}\ClipMateTemplates\"

Substitution Tokens

{EXE_DRIVE} - Drive letter of the drive that ClipMate is running from.
ex: ExportDir={EXE_DRIVE}\Data
{EXE_PATH} - Complete path to the directory where ClipMate is running from.
{APPDATA} - Your "application data" directory, as directed by the windows registry.
{COMMON_APPDATA} - Common "application data" directory for all users, as directed by the windows registry.
{LOCAL_APPDATA} - Like AppData, but local to the current machine. Useful in managed environments where the regular AppData profile is stored on the server, and you want to prevent files from being sent to the server.
{MYDOCUMENTS} - Your "My Documents" directory, as directed by the windows registry.
{SYSTEM_TEMP} - System TEMP directory.
{DB1DIR} - Directory of database, passed on command line (CAUTION).
{PORTABLE_DOCUMENTS} - U3 or PortableApps "Documents" folder, defaults to regular "My Documents" if not running on U3 or PortableApps.
U3  - these are only in effect when ClipMate is run within the U3 environment
{U3_DEVICE_PATH} - Drive letter of U3 device.
{U3_DEVICE_DOCUMENT_PATH} - The "Documents" directory of U3 drive
{U3_APP_DATA_PATH} - Directory in the "hidden" area of U3 drive, where ClipMate's settings reside.
{U3_DEVICE_EXEC_PATH} - Directory in "hidden" area of U3 drive, where ClipMate's other files reside, such as the help, language files, etc..
{U3_HOST_EXEC_PATH} - Directory on your hard drive, where ClipMate has been temporarily copied to, for execution within the U3 environment.

Tip: Examine the log file for the directory assignments, which show the tokenized and expanded paths, and indicate whether the directory exists or not. Look for the ** Directory Assignments ** section.

Tip: .ini directories will be skipped if they do not exist.

Tip: Directory information can be easily copied with the "clipboard" button in the About box.

Tip: You can create a .ini file from the current (registry) settings by switching the storage type in the Tools | Options | Path dialog.

NOTE: Command-line parameters take precedence over registry or .ini settings, and in the case of U3 or PortableApps, command-line parameters ARE being sent to ClipMate by the launcher. You can override the PortableApps parameters with the ClipMatePortable.ini file.