Install and Use the Windows CLI Agent Executable on LicenseMonitor (Admin Only)

The lmagent-win64-cli.exe allows a Windows service to be created and controlled entirely from the command line. This is beneficial because it enables you to easily manage agents from the CLI environment. 


For these instructions to work, the lm_agent_cli.exe file must be downloaded from the website and you must be an administrator for the machine, on which the agent is installed.

We recommend that you save the executable in a safe location where it won't be deleted. We also highly recommended that you save the executable file on the local disk rather than on a network.

Note: Once the service is installed, it will point to the SFD in-place, so if you have it stored in C:\rtda and run it, the service will point to it in C:\rtda. If you move the binary from that location after installing the service, you must delete the previous installation and rerun it from the new location.

Install and Use the Windows CLI Agent Executable 

To install the Windows service, which allows you to manage and install agents from the CLI, perform the following steps:

  1. Open a command prompt by right-clicking on the Start menu and choosing "Command Prompt (Admin)".
  2. Then, cd to the directory where the executable was placed.

    To get the help menu for the file, run the following:
    % C:\>.\path\to\lmagent-win64-cli.exe -h
    To run the file solely to install the service, run the following:
    % C:\>.\path\to\lmagent-win64-cli.exe -host <hostname> -instance <licmon_project> -port <LM-Port> -account <service_account_name> -password <account_password> -install-service
    The following should be output:
    Service installed.
  3. To install the service and start it, run the following:
    % C:\>.\path\to\lmagent-win64-cli.exe -host <hostname> -instance <licmon_project> -port <LM-Port> -account <service_account_name> -password <account_password> -install-service -start-service
  4. Set up passwords, as needed. The user/password combination can be the SYSTEM user credentials for the Windows system user (recommended), or if you desire to use a specific user, an actual user/password combination can be passed. Keep in mind that if users' credentials change, they will also need to be changed using the Windows Service Manager.If a user other than the SYSTEM user will be used, that user will need the "Log on as a service" privilege on that machine. To set that up, perform the following steps:
  5. In the Windows Service Manager, double-click on the "RTDA LicenseMonitor Agent" service.  
    1. Be sure the service isn't running. If it is running, stop it.
    2. Go to the "Log On" tab.
    3. Choose the Local System Account Option, and then click Apply.
    4. Choose the original user account, and click Apply again.
    5. Restart the service.

    Note. When using special characters for passwords, before each character that is sensitive to the shell, such as ; and %, place a ^. For example: my;pass% = my^;pass^%

    If this is not done, you will receive the following error:

    Error 1069: The service did not start due to a logon failure
  6. At this point, the agent should connect to LM without a problem, and LM should be able to see this agent as well. If not, double-check that the parameters were properly set and try again.