How to set a license server address without using the Tekla Structures user interface

Note! There is a known issue that prevents a feature described on this page from working correctly: The XS_LICENSE_SERVER_HOST setting from bypass.ini is currently ignored in Tekla Structures versions 2020 and 2021. We have fixed this issue in Tekla Structures 2020 SP13 and Tekla Structures 2021 SP8.

Tekla Structures
Not version-specific
Tekla Structures
license server address
batch file
environment variable
Environment
Not environment-specific

You can easily define or change the license server address of host computers in the Tekla Structures user interface. But in some cases, you might need to do it without starting Tekla Structures, like when you distribute Tekla Structures on a lot of new computers. Here are some alternative ways:

  • Windows Registry

    You can set the Server registry string value to the license server address, for example 27007@my_company_server. The value is located in the following registry key:

    Tekla Structures 21.1 or older - HKEY_CURRENT_USER\Software\Tekla\License
    Tekla Structures 2016-2018i - HKEY_CURRENT_USER\Software\Trimble\TeklaStructures\License
    Tekla Structures 2019-2021 - HKEY_CURRENT_USER\Software\Trimble\Tekla Structures\License
     
  • Windows Environment Variables

    You can create a new XS_LICENSE_SERVER_HOST variable either in the user variables section (will affect current Windows user) or in the system variables section (will affect all users of the computer) in Windows Environment Variables:
     
    Image
    2017_01_31_14_34_061.png

    Set the value of the variable to the license server address, for example 27007@my_company_server.
     
  • Batch File

    You can run a batch file (a text file that has .bat or .cmd file extension) with the following content:

    set XS_LICENSE_SERVER_HOST=27007@my_company_server
    start /D "C:\Program Files\Tekla Structures\21.1\nt\bin\" TeklaStructures.exe
    exit /B 0


    This will start Tekla Structures 21.1 installed in the default folder, and set 27007@my_company_server as the license server address.
    You can replace the path in the example (C:\Program Files\Tekla Structures\21.1\nt\bin\) with another path to start other Tekla Structures versions.
     
  • Bypass.ini File

    You can add the following line to the bypass.ini file:

    set XS_LICENSE_SERVER_HOST=27007@my_company_server

    Then you can create a shortcut for the TeklaStructures.exe and point to the bypass.ini file in the Target field:
    Image
    Shortcut properties

    The full text in the Target field would look like this: 

    "C:\Program Files\Tekla Structures\21.0\nt\bin\TeklaStructures.exe" -I "C:\ProgramData\Tekla Structures\21.0\Environments\middle_east\bypass.ini"

    You need to adjust the paths in the example to match your Tekla Structures version, the installation location, and the bypass.ini file location.

    Using the shortcut will launch Tekla Structures 21.0, and set 27007@my_company_server as the license server address. You may also have other settings set in the bypass.ini file.


Check the four alternative procedures above and pick the easiest one for you to use.

All of these procedures can be centralized, for example, using Group Policy in an Active Directory environment in Windows.

Note: when Tekla Structures starts up, it checks the Windows environment until the setting is found. The order of precedence is the following:

 

  1. Bypass.ini File (affects only the single Tekla Structures version that is defined in the shortcut Target field which also points to the bypass.ini).
  2. Batch File (affects only the single Tekla Structures version that is defined in the batch file).
  3. Windows User Environment Variable (affects all Tekla Structures versions installed on the computer, applied only to the currently logged-in Windows user account).
  4. Windows System Environment Variable (affects all Tekla Structures versions installed on the computer, applied to all Windows user accounts).
  5. Windows Registry Value (depending on the value location in Windows Registry, it can affect some/all of Tekla Structures versions installed on the computer).
  6. License server address defined in Tekla Structures user interface (depending on the Tekla Structures version, it can affect some/all of Tekla Structures versions installed on the computer).

For example, you could set the license server address to 27007@server1 in Tekla Structures user interface, and set the Windows system environment variable to 27007@server2, and, in addition to that, start Tekla Structures with a batch file that sets the license server address to 27007@server3. When you run your batch file in this case, Tekla Structures uses 27007@server3 as the license server address.

 

Was this helpful?