NumXL SDK - Licensing API
SFLMGR Tool

sflmgr.exe is a command line tool that interacts with NumXL license system. The tool is included with the NumXL sdk package, and automatically copied to your project output folder. To run the tool, use the command line prompt or PowerShell.

At the command prompt, type the following

Syntax

<NumXL SDK Path>\sflmgr.exe [options] -x [commands]

Parameters

Argument Description
options An option that modifies a command. In addition to the global /q and /v options, each command supports a unique set of options.
commands One or more of the eleven commands (hostid, activate, deactivate, verify, status,lookup, request, update, restore, store, or remove) that specifies an operation. For a description of each command, see the next table.

action

The following commands are supported by sflmgr. Each command is used with distinct sets of options, which are listed in their respective sections.

command Description
hostid Retrieve the unique identifier for current user. No options is required.
activate Activate the given license key for the current user. Require license key, email and product code.
deactivate Deactivate the given license key, and free key to be used elsewhere.
verify
status
lookup Query the remote server for a license key associated with a given email address.
request Request a free 14-day license key
update
restore
store
remove

options

option Description
-h [ --help ] produce help message
-l [ --key ] arg license key value
-p [ --product ] arg product code
-e [ --email ] arg email address
-n [ --first ] arg end-user first name
-t [ --last ] arg end-user last name
-m [ --phone ] arg end-user last name
-y [ --company ] arg end-user company name
-g [ --language ] arg end-user language
-c [ --code ] arg activation code
--registry arg Registry path
--file arg flat file

Examples

The following command displays the full list of supported command and options.

<NumXL SDK Path>\sflmgr.exe --help
Allowed options:
-h [ --help ] produce help message
-l [ --key ] arg license key value
-p [ --product ] arg product code
-e [ --email ] arg email address
-n [ --first ] arg end-user first name
-t [ --last ] arg end-user last name
-m [ --phone ] arg end-user last name
-y [ --company ] arg end-user company name
-g [ --language ] arg end-user language
-c [ --code ] arg activation code
-x [ --actions ] arg action: hostid, activate, deactivate, verify, status,lookup, request, update, restore, store, remove

The following command displays the unique identifier for current user:

>sflmgr.exe hostid
{"hostid":"1896943579"}

he following command queries the remote license server for a license key that is associated with the given email adress.

<NumXL SDK Path>\sflmgr.exe --email="[email protected]" --product="31223-200-169" lookup
{"product":"31223-200-169","email":"[email protected]","actions":{"lookup":{"status":"SUCCESS"}},"hostid":"1896943579","key":"79F7-C8-A6-01-7890"}

The NumXL includes a useful command line tool (sflmgr.exe) to interact with the NumXL license system:

  • Lookup an existing license key associated with a given email address
  • Request a trial license key
  • Activate a given license key and generate an activation code.
  • Verify the activation code for a given license key.
  • Read/Store license information into a registry.
  • Read/Store license information into a flat file (ini).

The main motivation for the sflmgr utility is for supporting automated software deployment in enterprise environment, but it can be very useful for sdk-related development.

First, let's examine all supported command line arguments and switches:

<NumXL SDK Path>\sflmgr.exe --help
Allowed options:
-h [ --help ] produce help message
-l [ --key ] arg license key value
-p [ --product ] arg product code
-e [ --email ] arg email address
-n [ --first ] arg end-user first name
-t [ --last ] arg end-user last name
-m [ --phone ] arg end-user last name
-y [ --company ] arg end-user company name
-g [ --language ] arg end-user language
-c [ --code ] arg activation code
-x [ --actions ] arg action: hostid, activate, deactivate, verify, status,
lookup, request, update, restore, store, remove

1. Lookup a license key by email

If you misplaced your license key or, simply wish to query our system for license key, use the sflmgr.exe tool, as follow:

<NumXL SDK Path>\sflmgr.exe --email="[email protected]" --product="31223-200-169" lookup
{"product":"31223-200-169","email":"[email protected]","actions":{"lookup":{"status":"SUCCESS"}},"hostid":"1896943579","key":"79F7-C8-A6-01-7890"}

NumXL license system associate each license key with a user (via his email), so the sflmgr.exe make an RestAPI call to our remote server to lookup the license key. The utility display a JSON-format response for the request.

Furthermore, if a license key can be found, the server will email the license key to the email address on record.

2. Request a trial license key

To request a free 14-day trial license key, use the command line utility (sflmgr.exe) included in the redistribution.

<NumXL SDK Path>\sflmgr.exe –first=John –last=Doe –[email protected] –product=”31223-200-169” -x request
{"product":"31223-200-169","email":"[email protected]","first":"John","last":"Doe","actions":{"request":{"status":"SUCCESS"}},"hostid":"1896943579"}

3. Activate a license key

Before you can use the License key with the SDK, you’d need to activate it on your target machine.

<NumXL SDK Path>\sflmgr.exe --license="79F7-C8-A6-02-73AA" --email="[email protected]" --product="31223-200-169" --first="John" --last="Doe" --company="Acme, Inc." --registry="Software\\Spider Financial\\NumXL" activate store