How to automate activation and deactivation of local BricsCAD licenses using the LicTool application?
About
The LicTool is a Command Line application that can be used by System or Network Administrators to automate routine operations with BricsCAD licenses, such as deactivation or activation.
The tool allows you to automate the deactivation of standalone licenses to improve the user experience for a license re-hosting scenario. It also allows you to automate supplementary operations that might be handy for BricsCAD license users, such as saving the address of a network license server, saving a local license file, etc.
You can use the LicTool in combination with Microsoft System Center Configuration Manager (SCCM) scripts. For example, one can deactivate a local license and connect to a network license server in one script.
Requirements
LicenseManager.dll needs to be available in the same folder as lictool.exe, along with all further dependencies of Bricsys License Manager, such as curl.dll, libcrypto.dll, libssl.dll, zlib.dll, etc.
The program also needs the Microsoft Visual C++ 2015 - 2022 Redistributable (64-bit). If it is not installed on your system, it can be downloaded from here.
Usage
.\lictool {action} {options}
- {action}
- Determines the action and can be one of the following:
activate
deactivate
hostid
store
- {options}
- Determines one of the possible options and depends on the action chosen.
If any option value contains spaces or dots, it needs to be wrapped in quotes:
-f="C:\A folder somewhere\BricsCAD.lic"
. If there are no spaces or dots, quotes are optional.Note: Parameters mentioned below between square brackets are optional. For example,[-p={port}]
means that you may omit the parameter. If you do want to pass the parameter, do not include the square brackets.
- activate license
-
.\lictool activate -p={product} -k={activationKey} [-f="{saveAsFileName}"]
Activates the license.
Tip:-p
must be eitherbricscad
orcommunicator
(not case-sensitive).Note: The default location for the license files is in C:\ProgramData\Bricsys. If you omit the-f
option, the file will automatically be written to that default location.- With
-f
included, the LIC file will be saved as{saveAsFileName}
. - If
{saveAsFileName}
is only a name without path, the LIC file will be saved in the default location. - Without
-f
, the LIC file will be saved in the default location, with a name of{product}.lic
.
- With
- deactivate license
-
.\lictool deactivate -p={product}
Deactivates the license for that product.
-p
must be eitherbricscad
orcommunicator
(not case-sensitive)
- get hostid
-
.\lictool hostid
Prints the current machine's host ID, so it can be copied and pasted on the Bricsys website (
) to activate a network license manually (offline).See also the Network license: offline (manual) activation article.
- store server
-
.\lictool store -s="{server}" [-p={port}] -f="{saveAsFileName}"
Stores the server address in a license file using the following format:
HOST {server} ANY {port}
: if the-p
argument was given.HOST {server}
: if no-p
argument was given.
Note:- If
{saveAsFileName}
is a full path, the file will be saved there. - If
{saveAsFileName}
is only a name without path, the file will be saved in the default location (C:\ProgramData\Bricsys). - If the provided file name has no extension,
.lic
will be added to the name. - If the file already exists, it will be overwritten.
- store license file
-
.\lictool store -l="{licenseFile}" -f="{saveAsFileName}"
Copies the license file from
{licenseFile}
to the location at{saveAsFileName}
.Note:- Like in the store server action,
{saveAsFileName}
can be either a full path or only the short file name. - If the file already exists, it will be overwritten.
- Like in the store server action,