HedleyPhillips
Contributor
Contributor

How to dynamically display GUI pages based on env vars?

Hi,

my installer is running a Powershell script that detects if an application is present or not by querying the environment variable path. What I need to do is if it is present, not prompt for an install path but if it isn't present, display a prompt for the user to enter an install location.

Is this possible? I can't see any way of querying the Env vars from within the InstallBuilder actions.

Thanks.

0 Kudos
1 Reply
michieldhont_
Hot Shot
Hot Shot

Hi @HedleyPhillips,

You can use the ${env(variable_name)} notation to read and use environment variables in your project:

<compareText>
    <text>${env(MYPRODUCT_VERSION)}</text>
    <logic>does_not_equal</logic>
    <value>1.3</value>
</compareText>

 

You can read more about environment variables in the following section of the userguide:

https://clients.bitrock.com/installbuilder/docs/installbuilder-userguide.html#_accessing_environment...

Regards,

Michiel

0 Kudos