How to automate activation and deactivation of local BricsCAD licenses using the LicTool application
About
LicTool is a Command Line application that System or Network Administrators can use to automate routine operations with BricsCAD licenses, including deactivation or activation.
LicTool can automate the deactivation of standalone licenses to improve the user experience in a license re-hosting scenario, or to automate supplementary operations for BricsCAD license users, including saving the address of a network license server or a local license file. The tool can be used 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
- Windows
- LicenseManager.dll needs to be available in the same folder as lictool.exe, along with all further dependencies of 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.
- MacOS
- libLicenseManager.dylib needs to be available in the same folder as lictool, along with all further dependencies of License Manager, such as libcurl.dylib, liblibcrypto.dylib, liblibssl.dylib, etc.
- Linux
- libLicenseManager.so needs to be available in the same folder as lictool, along with all further dependencies of License Manager, such as libcurl.so, liblibcrypto.so, liblibssl.so, etc.
Usage
LicTool can be found in the BricsCAD installation folder. Run the tool using the following format:
./lictool {action} {options}
cmd.exe on Windows, the executable needs to be called with .\lictool.{action}can be:activatedeactivatehostidstore
{options}can be:-por--product(must be eitherbricscadorcommunicator, this option is not case-sensitive)-kor--key-for--filename-ptor--port-lor--license-sor--server
- Only parameters that are enclosed in square brackets are optional and can be omitted. If you want to pass the parameter, do not include the square brackets.
- If any option value contains spaces or dots, it needs to be wrapped in quotes (for example
-f="C:\ProgramData\Bricsys\BricsCAD.lic"). If there are no spaces or dots, quotes are optional.
| Action | Syntax |
|---|---|
| Activate the license | ./lictool activate -p={product} -k={activationKey} [-f="{saveAsFileName}"]Note: When activating,
-f is an optional parameter.
|
| Deactivate the license | ./lictool deactivate -p={product} |
| Get the host id | ./lictool hostidNote: The current machine's host ID is printed and copied to the clipboard.
|
| Store the server | ./lictool store -s="{server}" [-pt={port}] -f="{saveAsFileName}"Note: When storing the server address in the LIC file,
-pt is an optional parameter.
|
| Store the license file | ./lictool store -l="{licenseFile}" -f="{saveAsFileName}"Note: The license file is copied to the location.
|
- For
-f="{saveAsFileName}:- If
{saveAsFileName}is a full path, the file is saved there. - If
{saveAsFileName}is only a name without path, the LIC file will be saved in the default location (C:\ProgramData\Bricsys). - If the provided file name has no extension,
.licwill be added to the name. - If the file already exists, it will be overwritten.
- If
- If a failure occurs, an error code is returned. See the Error codes articles.
