Hi,
By default, properties referenced by PseudoFormatted ("[|propertyname]") field are resolved at build time. During installation only properties used in
Formatted data fields are resolved.
To achieve what you want, you can create a
"Property-Based Folder". Please follow these steps:
1. Go to the
"Properties" page and add 2 new properties:
- Name: TIMESTAMPFOLDER
- Value: C:\
- Name: TIMESTAMP
- Value: Your Value
2. From the "
Files and Folders" page, add a new
"Property Based" folder and select "TIMESTAMPFOLDER" property. I also created the following folder structure:
- PropertyFolder.png (35.77 KiB) Viewed 12472 times
3. Go to the
"Custom Actions" page. Add two
"Process data" custom action with sequence, and move them on
"Install Execution Stage" after
"Searches" action. We need this custom actions to format the date property because folders do not allow ":" and "/" in their names.
Configure the custom actions like this:
- processData1.png (41.56 KiB) Viewed 12472 times
- processData2.png (43.12 KiB) Viewed 12472 times
4. Now add a
"Set installer property" custom action with sequence after the second "Process data" custom action.
- setProperty.png (45.19 KiB) Viewed 12472 times
As you can see, in the value field you can add the path where you want to install your property based folder.
This is the result after the installation. The time and date are added based on the Regional format used on the machine. For example, if I change my computer date format to "01-Sep-21", now the folder will be "data_01-Sep-21_105329"
- result.png (6.19 KiB) Viewed 12472 times
Attached is the .aip (project setup) file which implements this.
Hope this helps!
Best regards,
Liviu