|
<< Click to Display Table of Contents >> Navigation: Licensing > Per User Licensing in Enterprise Environments |
If you are using a managed environment such as Active Directory or Azure AD, then it is possible to activate a Pro license in user mode instead of machine mode.
This is mainly provided to support the case where users are logging into a virtual environment, where they may end up using a different physical machine each time.
A Pro license can be activated in one of these modes.
User mode |
A single license allows a single user to use CopyFilenames on any machine. |
Machine mode |
A single license allows any users to use CopyFilenames on a single machine. This is the only mode supported by the normal license app. |
Once a license has been activated, its mode cannot be changed.
To activate a Pro license in user mode you need to use LicenseTool.exe. This is a command line utility that is installed with CopyFilenames. It is usually found here:
C:\Program Files\CopyFilenames 4\LicenseTool.exe
This tool is intended to be run from scripts that initialize roaming users in a virtual environment.
LicenseTool [options] [token...]
-h, --help |
Shows help text which describes how to use the command. |
-c, --check |
Checks the installed license for the current user. When this option is specified, no token should be specified. |
-i, --install-only |
If this option is specified, then the license will only be installed if an activated license can be found using the given token for the current user/machine. This can be used to avoid unintended license activations. |
-m, --machine |
If this option is specified, then the license will be activated in machine mode, rather than the default of user mode when using this tool. |
Whenever LicenseTool is run, the first line output is a status token that indicates the state of the current license, or the result of the options selected. The status token will be one of the value in the table below. In addition, LicenseTool will return the exit code shown in the table to indicate the result of the operation.
Token string |
Exit code |
Description |
LICENSE_OK |
0 |
The current user/machine has a valid license installed. |
BAD_ARGS |
1 |
Invalid arguments were specified on the command line. |
NO_LICENSE |
2 |
The current user/machine does not have a valid license installed. |
NOT_A_DOMAIN_USER |
3 |
An attempt was made to download or activate a user mode license, but the current user is not a domain user. |
FAILED_TO_GET_DOMAIN_USER |
4 |
The current user appears to be a domain user, but there was a problem getting the user information. |
LICENSE_SERVER_NOT_CONTACTABLE |
5 |
Could not contact the license server. This is hosted on port 443 (HTTPS) at www.extrabit.com. Check your firewall or internet connection. |
LICENSE_SERVER_ERROR |
6 |
The license server returned an error. |
LICENSE_FILE_WRITE_FAILED |
7 |
Failed to write to the license file. |
TOKEN_INVALID |
10 |
A token specified on the command line is not valid. |
TOKEN_HAS_NO_ACTIVATIONS |
11 |
An attempt was made to activate a license, but none of the tokens specified on the command line have any activations remaining. |
The second line output after the token string will normally contain further information about the status.
Note that when requesting a license activation, LicenseTool will always first check if the current user or machine already has a valid license, and not use up an activation if they do. In addition, if the token specified already has an activation for the current user or machine, then that will be downloaded which will also not use up an activation.
As described above, it is possible to specify multiple tokens on the command line.
The reason for doing this, is so the same script can be used for all users, even if more users are added later.
The way LicenseTool works is that whenever a license is requested, it first checks each token specified to see if there is already an activated license for the current user or machine. If there is, then that license can simply be downloaded and no new activation is required. Only if no activated license is found (and provided --install-only isn't specified), then the first token that has unused activations will be used to activate a new license.
For example, if you buy a 10 license pack, you will receive a token that has 10 activations available on it. When these have all been used up, you might buy another 10 license pack and receive a second token. By specifying both tokens on the command line, then if any of the 10 users who used an activation from the first token need a license for a new machine, that can be downloaded without needing to activate another license. A new user would have a license activated from the second token.
To see the status of your tokens, such as how many activations are left, log in to the license dashboard here:
www.extrabit.com/dashboard