Click for SpamPal's Homepage
Contents > Configuring SpamPal > Command Line Options

SpamPal is very configurable but the default settings should suit most user's needs. If however you need to change the default settings, you can tune SpamPal using the Options panel, in many different ways.

Command Line Options: Index

11. Command Line options
11.1 Command Line options: Configuration Directories
11.2 Command Line options: Multiple Instances
11.3 Command Line options: Tray Icon
11.4 Command Line options: Service Related

11. Command Line options
Although SpamPal has a graphical user interface, it does have a few useful command line options and this section describes how they can be used.

::Top::
11.1 Command Line options: Configuration Directories

SpamPal stores its configuration files in the user profile, or failing that in it's own installation directory.

Advanced users who wish to alter this can do so by specifying an alternative directory on the command-line, using the -configdir switch.

For example:

SpamPal.exe -configdir c:\my_spampal_configdir (If the specified directory does not exist, it will be created)

This will mean that all SpamPal and Plugin data will now be stored in the c:\my_spampal_configdir directory, which has two advantages:

a) It's easy to backup (see here)

b) as this can be a common directory, it means that more that one user can share the SpamPal settings, for
example, on a windows XP system, that is using it's multi-user logon feature. This common directory can also be placed on a network drive, so that all your network users can access the same whitelist/blacklist settings etc.

Note 1: Moving SpamPal's configuration directory
If you decide to change this directory, then you must remember to change the following directories as well:
a) SpamPal's
log file path (eg. d:\spampal\log.txt) which is in SpamPal's options, Logging section
b) SpamPal's startup directory command line (eg. -configdir d:\spampal)

::Top::
11.2 Command Line options: Multiple Instances
Normally, you can only run one copy SpamPal at a time. If for some reason you want to run multiple copies of SpamPal on the same machine (for e.g., if you want to listen on two different ports with a different configuration on each), you should add -allow_multiple_instances yes, to the command-line

e.g.:

SpamPal.exe -allow_multiple_instances yes

If you only want to run one version of SpamPal, but don't want to see an error message if you should try to run a second (e.g. if you're starting it from a batch file that may get run multiple times), you can use the option -suppress_multiple_instances_warning yes,

ie:

SpamPal.exe -suppress_multiple_instances_warning yes

Obviously, combining these two command-line options would make no sense at all.

-suppress_multiple_instances_warning has been deprecated (but if used, prevents the status window from opening).


::Top::
11.3 Command Line options: Tray Icon

SpamPal will put a small icon in the system tray to allow you to access its configuration options.

If you don't often use this icon and you don't want it cluttering up your tray, use the command-line option -trayicon none,

e.g.:

SpamPal.exe -trayicon none

Of course, if you do this then to access SpamPal's configuration, you will have to:

exit it from the task manager and restart it, without this option on the command-line.


::Top::
11.4 Command Line options: Service Related

There's some new command-line arguments available for you to use with the SpamPal executable, that allow you to control the SpamPal service in various ways:

-start_service will start the SpamPal service, provided it has been installed and is not currently running.

-stop_service will stop a currently-running SpamPal service.

-remove_service removes SpamPal from the list of services to run on your machine - it does the same as the Uninstall SpamPal Service shortcut in the Programs menu.

-install_service adds SpamPal to the list of services to run on your machine, and prompts the user to start the service and the GUI client.

-account_name <name> and -account_password <pass> can be used at the same time as -install_service to specify the username under which the service should run - if unspecified, it will run under the LocalSystem username. If the username you choose doesn't have a password, just don't include the -account_password directive.

-start_client, if specified at the same time as -start_service, will cause the SpamPal GUI client to start up along with the service.

-start_or_install_service does the same as -start_service if the SpamPal service has already been installed, or the same as -install_service otherwise.

-run_spampal_from_installer causes the SpamPal service & GUI client to start up if it's installed and configured to auto-start. Or if the user doesn't have administration rights, or is running Windows 95, 98 or ME, the SpamPal application will start up. If neither of those cases is true, the user will be prompted whether to run SpamPal as an application or as a service.

-serviceServer <hostname> allows you to specify to the GUI client the name of the machine on which the SpamPal service is running. (This uses named pipes, so it'll probably only work between two machines on your local network.) If you do this, I strongly advise you to use the password protection feature too!

-open_options_window automatically opens the SpamPal options window on start-up

-password <pass> allows specification of a password when the GUI client starts up; see below.

Password Protection

You can password-protect your service to prevent users without the password from connecting to it with a SpamPal GUI client; you could do this, for example, to allow only administrators to modify SpamPal's configuration.

When you start SpamPal as a client or a service, it looks for a password in the following places (listed in order of decreasing priority):

1. The -password command-line argument
2. The registry key HKEY_CURRENT_USER\Software\SpamPal for Windows\SpamPal\Password
3. The registry key HKEY_LOCAL_MACHINE\Software\SpamPal for Windows\SpamPal\Password

If the SpamPal GUI client doesn't find the same password as the SpamPal Service, the client won't be allowed to start up. (Note that the service only searches for the password when it starts up - so if you change the password, you'll need to restart the service before the change will take effect.)


::Top::