getLicense function

The getLicense function will connect to the server and try to obtain a license for the specified company and product, then save it to the local machine.

Syntax


 Usage: getLicense -e email -w password -p product-code -t license-type [-c company-code] [-v version] [-d number-of-days] [-q]

-e email            user's email address
-w password         user's password
-p product-code     code for the license required
-t license-type     type of license to get
                    Valid license-types are demo, checkout, floating
-c company-code     code for the company that owns the license
                    Required if the type is checkout or floating
-v version          software version for validation
-d number-of-days   number of days for the license
                    Required for checkout, optional for demo, ignored for floating
-q                  automatically use license queue if available.



(Note that the above command line is a set of arguments that must be passed to the LicenseCommand class as explained in the parent document.)

Output

This will display a single line on the command line showing the response from the server.  If the license was acquired successfully then it will display

Response:Ok

If some error occurred then it will display that -- for example:

Response:No free licenses available



If your machine uses a Proxy server to get out to the internet, you will need to call the setProxy function first to set the proxy information.

Comments