Command Line Reference

The lic command line allows you to execute various commands and options to perform license-related tasks using the Lic CLI Tool. Here is an explanation of the lic command line usage:

lic <assembly|licensefile> [<other assemblies>...] [options]

In the lic command line syntax follow a convention where mandatory parameters are enclosed within angle brackets <...>, while optional parameters are enclosed within square brackets [...]. This convention helps to differentiate between the required parameters that must be provided for the command to execute correctly and the optional parameters that can be omitted or customized based on specific needs.

The lic command line usage consists of the command followed by either an assembly or a license file, along with any additional assemblies that need to be processed. There are also various options that can be used to customize the execution of the command.

Here is a breakdown of the command line usage components:

  1. Input files:

    • <assembly>: Specifies the path to the assembly for which a license needs to be generated.

    • <licensefile>: Specifies the path to an existing license file that needs to be updated or modified.

    • [<other assemblies>...] You can include one or more additional assemblies that will be added to the license file along with the main assembly. These assemblies may be required for licensing purposes.

  2. License Information Options:

    • --id [licid]: Sets the unique identifier for the license.

    • --type <type>: Specifies the license type.

    • --sites <number>: Sets the number of licensed sites.

    • --issuedate [date]: Sets the creation date of the license.

    • --expiredate <date>: Sets the expiration date of the license.

    • --supportexpiredate <date>: Sets the date when product support expires.

    • --assembly <file|name>: Adds an assembly name to the license file.

    • --licensee <[key=]value>: Sets information about the licensee.

  3. Product and Component Options:

    • --product <[key=]value>: Embeds product information into the license.

    • --component <name>: Licenses specific software components within an assembly.

  4. License Restriction Options:

    • --trial <key=value>: Creates a trial license with specified restrictions.

    • --hardware <key=value>: Binds the license to a specific hardware or device.

    • --domain <key=value>: Restricts the license to a specific network domain.

    • --usage <key=value>: Limits the usage context of the license.

    • --beta <key=value>: Tags the license for limited usage of a beta product.

    • --restriction <name:key=value>: Adds or updates custom restrictions.

  5. Output and Input Options:

    • --output <file>: Sets the output file path for the license file.

    • --logfile <file>: Sends output messages to a log file.

    • --makeproject [file]: Creates an MSBuild project file from the command line.

    • --keyfile <file>: Sets the strong name file used for signing the license file.

    • --keyname <container>: Signs the license file using a key container.

    • --keypwd <password>: Specifies the password for signing the license file.

    • --project <file>: Starts Lic.exe using settings from a project file.

By using different combinations of input files and options, you can tailor the behaviour of the tool to suit your specific licensing requirements and automate license generation and management tasks effectively.

Long and Short Options

When using the lic command line tool, there are two types of options available: short options and long options. Short options are represented by a single hyphen followed by a single letter (e.g., -c), while long options are denoted by two hyphens followed by multiple letters (e.g., --component). Each option has a long format, and in some cases, it may also have an alias or a shorter form for convenience. The long format is typically used in examples for clarity, but when describing options, both the long and short forms are provided to improve understanding and aid in memorization. Users can choose to use either the long or short form based on their preference and familiarity.

In addition, some options may have aliases, which serve as shortcuts for their corresponding long options. For example, the --keyfile option has the alias --kf. When parsing long option names, Lic automatically abbreviates the option to its shortest unambiguous form, making it easier and quicker to specify options in the command.

For instance, the --component option can be shortened to --comp, allowing users to save typing effort without sacrificing clarity. Furthermore, certain options can be negated, acting as switches that can be turned on or off using the prefix "no" or "no-" respectively. This allows for fine-grained control over the behaviour of specific options.

Last updated