cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Flexera beginner

Updating a file-based license for a running application

Hello,

We are licensing a Windows Service used by our application.
We would like to update the license file while the service has checked out a license and that the service loads it automatically without requiring a restart.
How can we update the cached license ?

Best regards,

Olivier

0 Kudos
3 Replies
Highlighted
Flexera
Flexera

Re: Updating a file-based license for a running application

@overaguth , the "lmreread" utility can be of help in this scenario.

The lmreread utility causes the license server manager to reread the license file and start any new vendor daemons that have been added. In addition, all currently running vendor daemons are signaled to reread the license file and their options files for changes. If report logging is enabled, any report log data still in the vendor daemon’s internal data buffer is flushed.


lmreread recognizes changes to system host names, but cannot be used to change server TCP/IP port numbers. If the optional vendor daemon name is specified, only the named daemon rereads the license file and its options file (in this case, lmgrd does not reread the license file).

 

Syntax: lmreread [-c license_file_list] [-vendor vendor] [-all]

Note • If you use the -c license_file_list option, the license files specified are read by lmreread, not by lmgrd; lmgrd rereads the file it read originally.

(If my response assists with your questions , then please click "ACCEPT AS SOLUTION" or 'Kudos' so that it help others.)
0 Kudos
Highlighted
Flexera beginner

Re: Updating a file-based license for a running application

Thank you for your response, but let me clarify my question.

The license is file-based node-locked. We would like our own windows service to reload the read license file, in case the user would have changed it (for an updated version).

Thanks.


Olivier Veraguth
Software Developer


Office : +44 (0) 1224347070
Email: olivier.veraguth@hrhgeology.com
Web: www.hrhgeology.com
HRH Limited is a company registered in Scotland. Registration number: SC117311. Registered office: 100 Union Street, Aberdeen, AB10 1QR, UK

​Business Address: HRH Limited, 19 Silverburn Place, Bridge of Don, Aberdeen, AB23 8EG, UK

HRH Ltd accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing.
​Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
0 Kudos
Highlighted
Flexera
Flexera

Re: Updating a file-based license for a running application

@overaguth , unfortunately there is no such API provided that automatically detects any change in the license file.

However, here is what you can do.

- Create a batch file and host it as a windows service that can be run at will - OR at regular intervals.

- The batch file should simply include the command to "reread" the license server.

Would that be something that might help you?

(If my response assists with your questions , then please click "ACCEPT AS SOLUTION" or 'Kudos' so that it help others.)
0 Kudos