Many large organizations use Network Licensing to manage their pools of software licenses. It’s pretty painless to set up, easy to leverage and can be a smart move for groups of users. A small application sits on a server and end users PCs point to that license server to “check out” licenses as they need them.
But, as we all know, sometimes a server dies or it’s time to upgrade it. Reinstalling the license software on a new server is about just as easy as it was on the first server. But a question often comes up: how do the end user PCs find the new license server now?
Where a PC Keeps Its License Server Information
Typically when you install an application like Revit or AutoCAD, you tell the software what kind of license it uses. And if you tell it to use a network license, you then have to tell the software what the computer name or IP address of the license server is. That server name gets baked into some files on the PC, and there isn’t always a straightforward way to point to the new server.
Once you know where to look, it’s not bad, but there are a couple of places that old server name could be stored. I’m going to quickly run through the places it can be kept, and then let you know my favorite way to tell a PC where to find a license server and why.
LICPATH.lic File – Not My Favorite
The licpath.lic file is just a text file that sits either in the program folder, or in one or more subfolders under C:\ProgramData\Autodesk\CLM\LGS. There is one per application. When you open it up it looks like this:
SERVER LICENSE-SERVER-NAME 000000000000 USE_SERVER
So updating it is just a matter of changing “LICENSE-SERVER-NAME” to the name of the new server. Pretty easy, but tracking down the licpath.lic file for each piece of Autodesk software installed on your PC can be a time sink.
Autodesk License Server Registry Setting – DEFINITELY Not My Favorite
In what feels like a very antiquated way to store data, there also is a registry key you can update. In the Windows registry under [HKEY_CURRENT_USER\SOFTWARE\FLEXlm License Manager] look for the ADSKFLEX_LICENSE_FILE key. The value in this key can either be the licpath.lic file or a server name.
I’m not a fan of poking around the registry when I really don’t need to. Combine that with having either or both of the lic path and the server name makes this method one to avoid.
Environment Variables – My Favorite Way
I’m certainly not alone in this, this is the preferred method of identifying license servers for many users. You can create a Windows environment variable called ADSKFLEX_LICENSE_FILE and the value of that variable can point to the server name or IP address.
Formatting is simple. It should look like this:
A really nice feature is that if you have redundant servers, you can just string them along in an easy pecking order:
Why is this especially good when you are moving to a new license server? Because even before you shut down the old server and have the new one up and running, you can set up Windows to look for both servers. If Windows doesn’t find one license server, it will simply try the other one. The transition will be invisible to your end users:
Some other reasons this is my favorite method:
- The environment variable trumps the other methods of license finding (registry, and licpath.lic), so if I have it set here correctly, it doesn’t matter if it’s wrong in the other places.
- I can easily update this without uninstalling, reinstalling, reconfiguring, re-whatevering software and deployments.
- In a typical Windows Active Directory network, I can easily push these settings to workstations.
- I don’t even need to have Autodesk software installed on a PC before I set the environment variable, so setting up a PC out of the box can be a little less rigid.
Some More Resources
If you need some help setting up an environment variable in Windows, check out this link to open up the environment variable dialog box and then hop over here and start at step 3 once you have it open.
If you want some more details on syntax for ADSKFLEX_LICENSE_FILE, check out this link.
Want to read about another useful license server environment variable? Take a look at FLEXLM_TIMEOUT.