Community Forums
Results 1 to 5 of 5

Thread: Custom code to display license agreement in console mode

  1. #1
    Join Date
    Dec 2012
    Location
    Lexington, MA
    Posts
    9

    Custom code: access to license agreement in console mode?

    My company's license agreement is very large. Someone installing in console mode has to hit carriage return 54 times before being allowed to agree. In GUI mode, there's a button to just accept the agreement without scrolling to the bottom. Customers have complained. So I've written a custom code pager that allows the user to agree at any point in the display.

    All that remains is access to the license agreement file itself. I've examined the zip file in the installer temp directory, and the license agreement file is at the top. But I don't know how to access that, as the temp file directory is different each time I install.

    I'm thinking that the only way to do this is to bundle the license in the same directory as the class files in my custom code jar, and access it via the .com path. It seems redundant to have the license agreement file packaged twice in the installer, that may be my only option.

    Does anyone know another way, or is there a standard way of referencing the existing agreement?

    - Scott
    Last edited by PassinThru; 09-29-2014 at 11:17 AM. Reason: The original title implied I had something, not wanted something

  2. #2
    Join Date
    Apr 2014
    Posts
    10

    Use the installer variable INSTALLER_TEMP_DIR

    Quote Originally Posted by PassinThru View Post
    My company's license agreement is very large. Someone installing in console mode has to hit carriage return 54 times before being allowed to agree. In GUI mode, there's a button to just accept the agreement without scrolling to the bottom. Customers have complained. So I've written a custom code pager that allows the user to agree at any point in the display.

    All that remains is access to the license agreement file itself. I've examined the zip file in the installer temp directory, and the license agreement file is at the top. But I don't know how to access that, as the temp file directory is different each time I install.

    I'm thinking that the only way to do this is to bundle the license in the same directory as the class files in my custom code jar, and access it via the .com path. It seems redundant to have the license agreement file packaged twice in the installer, that may be my only option.

    Does anyone know another way, or is there a standard way of referencing the existing agreement?

    - Scott
    The location of the temp directory is made available to custom code through an install time variable, INSTALLER_TEMP_DIR. You can access that through the proxy object passed to the custom code.

  3. #3
    Join Date
    Dec 2012
    Location
    Lexington, MA
    Posts
    9
    Quote Originally Posted by NigelM View Post
    The location of the temp directory is made available to custom code through an install time variable, INSTALLER_TEMP_DIR. You can access that through the proxy object passed to the custom code.
    Yes! I actually discovered this independently while scanning the Variables section of the Project tab. I was scanning the list for anything that might have been of use in solving my problem. With the installer temp directory, I can access the installer.zip file, and stream our license file directly.

    Thanks for the response.

  4. #4
    Join Date
    Jul 2015
    Posts
    12

    Use $prop.java.class.path$

    Hi;

    With IA 2015, INSTALLER_TEMP_DIR does exist, but I couldn't find our license agreement file in there. Either IA 2015 uses this INSTALLER_TEMP_DIR for some other purpose, or the way we package our stuff is not "standard" for IA.

    So I use $prop.java.class.path$, with consoleProxy.substitute... It returns a String, a semi-colon-delimited list of installer resources, some 4 or 5 paths. I just open every zip among these paths, until I find a file with a name that matches the expected license agreement.

    Enjoy;

    Isabelle

  5. #5
    Join Date
    Jul 2015
    Posts
    12

    Windows and linux

    One more amusing fact :

    On windows, the installer's resources, such as the license agreement, are in Execute.zip. On linux, it's installer.zip (as previously mentioned by PassinThru). Yes, for the same version of IA.

    Enjoy !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •