Updating a file-based license for a running application
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 ?
@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.
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).
Office : +44 (0) 1224347070
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.
@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?