Saturday, February 11, 2017

windows 7 - Using SETX to configure a pc's LM_LICENSE_FILE environment variable

Various Windows applications such as Matlab, Altair, Nastran etc use license servers, which require a system environment variable - LM_LICENSE_FILE, to be updated which would take a value along the lines of: %MSC_LICENSE_FILE%;%MATLAB_LICENSE_FILE%;%ALTAIR_LM_LICENSE_FILE% (if these 3 apps were installed).


Setting the variable for the individual apps using SETX is easy:


SETX MATLAB_LICENSE_FILE PORT@SERVER /M


But how would I set the LM_LICENSE_FILE variable to reflect the apps installed on a pc that reference this variable using a .cmd file? Ideally it would query the pc to see what apps (apps that use LM_LICENSE_FILE environment variables) are installed, set the individual app system environment variable and then set the correct LM_LICENSE_VARIABLE value.


Regards and thanks in advance

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...