Multi-user compatibility (e.g. under Windows Vista)

The latest Spamihilator versions are multi-user compatible, that means settings (incl. Recycle Bin, Training Area etc.) will be saved in the users application data directory and not in the program folder. This ensures, changed settings can always be saved correctly, even though the user has no write-access to the program folder, just like under Windows Vista. But also Windows 2000 and XP protect the program folder if the user has a non-privileged account.

Hence, plugins have to save their own settings in the correct directory too. You can discover the correct one by following these steps:

  1. Use the service SERV_GETCONFIGPATH (Section 3.1.2.11 in the Plugin SDK 2.6). This is the recommended way for plugins.
  1. External Add-Ons my use the registry key HKLM\SOFTWARE\Spamihilator\ConfigDir:
    1. If this key has the value 1, the configuration directory is the same as the program directory, which you can get through the registry key HKLM\SOFTWARE\Spamihilator\InstallDir.
    2. If the key has the value 0, the configuration files are saved under the application data directory. In this case, you may use the following C++ function:
void GetConfigPath(std::string &result)
{
  char appdata[MAX_PATH];
  SHGetSpecialFolderPath(NULL, appdata, CSIDL_APPDATA, TRUE);
  PathAddBackslash(appdata);
  result = appdata;
  result.append("Spamihilator");
}

Examples

  1. If Spamihilator has been installed with the option “Separate settings per user account” (recommended, default method):
    1. Windows 2000/XP:
      C:\Documents and Settings\Username\Application Data\Spamihilator
    2. Windows Vista:
      C:\Users\Username\AppData\Roaming\Spamihilator
  2. If Spamihilator has been installed with the option “Shared settings for all users” (old method):
    C:\Program Files\Spamihilator
 
en/tips/plugins/multiuser.txt · Last modified: 2008/03/22 15:07 by michel