Hello and welcome to our forums,
What you want to achieve can be done through a
custom action.
First of all, the path from the "Data to export" field is saved into an installer property. Properties are global variables used by Windows Installer during an installation process. Properties can be used inside Formatted Type fields with the format [PROPERTY] and they will be replaced at install time with the value associated with the property's name.
For instance, to check the name of the property which stores your path, you can simply open your project (.aip file) --> travel to
"Dialogs" page --> click on the dialog which contains the
"Data to export" field --> click on the
"Path Edit" field as in your sent screenshot and, on the right pane, under
"Properties" you can check the
"Property Name" associated with that field.
Now that we know the property which stores the path, all we have to do is to output it into a text file. To do so, please proceed as it follows:
- Go to
"Custom Actions" page and add a
"PowerShellScriptInline" custom action
with sequence. To add a custom action with sequence, all you have to do is to press the
"Add custom action with sequence" button which is place on the right side of the custom action's name.
- After doing so, under "#Your code goes here" comment, please add the following lines:
Code: Select all
$prop = AI_GetMsiProperty YOUR_PROPERTY
Out-File -FilePath C:\out.txt -InputObject $prop
Important: Replace "YOUR_PROPERTY" with the name of the property which is associated with the "Path Edit" field. You can also change the file path of the output text file.
Under
"Execution Stage Condition", you can uncheck the
"Uninstall" and
"Maintenance" options, so your custom action will only be run during the install process.
Please let me know if this helps.
All the best,
Catalin