How do I exclude an STK license?


QuestionHow do I exclude an STK license?

The main benefit of excluding a Network License is to provide other users access to a module that you are not currently using. Several exclusion methods are available:

1. LicenseUsage.htm UTILITY
     License Type: Network

This is the preferred method due to its easy user interface and its ability to report current license status as well as other information. The utility is included with the STK/AGI License Manager - LicenseUsage.htm. This utility searches the feature availability on the license server and allows the user to select modules for exclusion. Upon saving your edits, this program creates an 'exclude' file that STK then reads upon startup. The exclusion takes effect for all future sessions of STK or until you make new changes and save again. A side effect of the the exclude file is that it will also exclude the chosen modules from nodelocked and dongle licenses if present as well.
    License Type: Network, Nodelock, Dongle

If preferred, you can perform the exclude actions that the LicenseUsage.htm utility offers by creating the exclude file manually.
  • The file must be ASCII and named  'exclude.agilicex'.
  • The file must be located in /config. This path cannot be changed. The full path can be found in the License Viewer inside of STK.    
  • Names of the excluded modules should conform with those found in the License Manager.
  • A comment symbol,'#', may precede the module name to disable its exclusion.
The syntax in the exclude file is as follows:
# This file contains a list of STK Licenses to exclude.


     License Type: Network, Nodelock, Dongle
You can start STK via a command prompt or via a windows batch file (*.bat) and exclude modules using the -licex flag. This exclusion method will take effect for the current session of STK only, i.e., you must use this option every time you want to exclude a module. 

C:\Program Files (x86)\AGI\STK 11\bin\aguiapplication.exe" /pers STK -licex CAT,COMM,SatPro

-licex specifies the license exclusion. Modules should be separated with commas without spaces in between.

HINT: Place the command line into your desktop STK Shortcut (Properties -> Shortcut -> Target) if you wish to avoid having to re-type them every time.

     License Type: Network

Enables the license administrator to:
  • Allow the use of features
  • Deny the use of features
  • Reserve licenses
  • Restrict the # of licenses available
  • Control the amount of licenses available
  • Enable license usage logging
     License Type: Nodelock, Dongle

You can edit the license file directly. This is not recommended due to potential corruption. To be safe, make a copy of the license file and store it somewhere else. Open the *.lic file with a text editor. By adding a comment symbol, '#', in front of a given module, STK will skip over it. Save the file and ensure the format is ASCII only. Make sure the file extension is *.lic (and not *.lic.txt).
EXAMPLE # Permanent License file STK_000000000000 HOSTID=000000000000

#FEATURE ASTG STKD 10.0 permanent uncounted 000000000000 \
VENDOR_STRING=desc=Nodelock&licType=node&acct=AGI&acctype=corp \
FEATURE STK STKD 10.0 permanent uncounted 000000000000 \
&acctype=corp&count=2 \

6. Shortcut Method
License Type: Network, Nodelock, Dongle

Make a copy of your Desktop Shortcut and call it STK_No_Comm_Pro
Right-click and open the properties
Copy the contents of the "Target:" field and paste it into a text editor so you can see entire string.  Edit the string as follows:
"C:\Program Files\AGI\STK 11\bin\AgUiApplication.exe" /pers "STK"
"C:\Program Files\AGI\STK 11\bin\AgUiApplication.exe" /pers "STK" /LicEx Comm,STKProfessional
Paste the After into the Target: field, in this example we excluded Comm and STKProfessional.
Click OK to close the Properties
Double click STK_No_Comm_Pro to launch STK 
Open Help > License Viewer and verify you excluded Comm and Professional
Resource File 1 
Resource File 2