How can I tell the installation type when it's running ?



1 comment

  • Avatar

    One option is to set an installer's hidden parameter at build time. For example setting up a hidden parameter to store the value:

        <stringParameter name="buildFlavor" value="regular" ask="0"/>

    And then specify it to be cdrom or regular at build time when invoking the CLI:

    $ builder build project.xml cdrom --setvars buildFlavor=cdrom
    $ builder build project.xml windows --setvars buildFlavor=regular

    Then the buildFlavor variable is accessible at runtime as well and the check is as simple as:


    This approach is described in more details in Creating Custom Builds section of InstallBuilder user guide.

    Another option is to compare installer filename. For CDROM mode it will be setup-windows.exe or in general setup-*.???. So the following check can be used:


    This checks that last element of ${installer_pathname} variable matches the pattern.

Please sign in to leave a comment.