Using Environment Variables on product details. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Using Environment Variables on product details.

Hi

I'm trying to use an Environment variable to set my "Product Version" on my application, but it keeps saying that "The version format is incorrect". How can I use a variable to control the product version?

Also, how can I use an environment variable on other situations like: files source path, or a custom form default text or label value.

Thanks,
Marcelo
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

You cannot use an environment variable to set the product version because the version is not formatted (you can use only a real numerical value).

In order to create a folder using an environment variable you create a "Property set with formatted" custom action and you set the "Formatted Text" field to [%VARIABLE] where VARIABLE is the environment variable you need. Now you can create a property-based folder using the resulted property.

For a text or label value you can use [%VARIABLE] in the "Text" field.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Hi It doesn't seems that the environment variable are being evaluated at build time. Instead they are being passed to the installation as environment variables.

Is there a way for a environment variable gets evaluated at build time?
Like: %DefaultInstallPath on the application installation folder. I have a script that sets these variables as environment variables, and need to pass that on to the installation script.

Can advanced Installer do that?


Thanks,
Marcelo
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This currently cannot be done, but we may include it in a future release.
As an alternative you can use the command line to set the application folder to the value you need:
http://www.advancedinstaller.com/user-g ... -line.html

Please note that in order to set the application folder you can use the following command:

Code: Select all

AdvancedInstaller.com /edit MyProject.aip /SetProperty APPDIR=[path]
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”