Hi,
Basically I want to read say for example an environment variable ALLUSERSPROFILE and get its value in some dialog, so that when that dialog is shown during installation it initializes the control's value to that, which user can always change by selecting a different location.How can I refer to that variable? .
This can be achieved very easy with Advanced Installer. After you create the control in the "Dialogs" page switch to "Custom Actions" page and add a "Property set with Formatted" custom action under "InstallUISequence->CostFinalize". Use following options for the custom action:
1. Property Name: MY_PROP
2. Formatted Text: [%ALLUSERSPROFILE]
3. Execution condition: Not Installed
This custom action initialize the control property (MY_PROP) with the expanded value of the ALLUSERSPROFILE environment variable.
In installer page I want to add a property say p1 whose value is [%somevariable].
No, the default value for a property defined in the "Install Parameters" page is plain text only (it is not resolved as environment variable or as msi formatted). You need to create a custom action to set its value with a formatted text.
If it's something that you don't understand please let me know.
Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
FOLLOW US
Get the latest news in Application Packaging