We encourage our clients to use the distributed license server model for Autodesk license management. With the distributed model, you can distribute licenses to servers in different WAN locations. For example, let’s say that you have ten AutoCAD licenses and three offices: San Francisco, New York, and Cincinnati. You could setup license servers with four, three, and three licenses assigned to SF, NY, and CIN respectively. The advantage of the distributed model is that if the WAN link ever goes down between SF and NY, a user can still access the licenses from the server on their own LAN.
If you distribute those 10 licenses, can you still share them? Absolutely. If the 4 licenses in NY are being used, a user in NY can get a license from SF. How do you do that? Use the ADSKFLEX_LICENSE_FILE environment variable. And that’s what I would like to expand on in this post.
Often times, you need to change your distributed environment. You may replace a license server, redistribute licenses, or open a new office. Each time a change like this is made, the ADSKFLEX_LICENSE_FILE environment variable must be updated. What if you have to do this on 100 computers? How can you automate this process?
First create a notepad document entitled adsk_lm.vbs. You can name it whatever you like as long as it has the vbs extension (VBScript). We’ll be creating a VBScript to set the ADSKFLEX_LICENSE_FILE environment variable:
These names should correspond to the server names in each of the three offices. We are setting a system environment variable which may require local administrator privileges. Alternatively, on line 2, you could set a user environment variable which doesn’t require local administrator privileges.
If you want to copy and paste the script text above, here it is:
Set WshShell = WScript.CreateObject("Wscript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
WshSysEnv("ADSKFLEX_LICENSE_FILE") = "@SFSERVER;@NYSERVER;@CINSERVER"
Set WshShell = Nothing
Set WshSysEnv = Nothing
Once the VBScript file is created, how do you run it when a user logs on to his machine? I’ll talk about this in part 2.