Search code examples
windows-installeradvanced-installer

Read packaged file during Dialogs stage in Advanced installer


I have an installer and would like to read a configuration file packaged with the installer to populate some dialog data during the dialog stage. Is it possible? I have not been able to find a way to achieve this.


Solution

  • An XML search is performed before the file to be copied on the machine. Any search is supposed to read values or files that are already present on the machine.

    However, if you want to read from an XML file that you install on the machine, you can use the following workaround:

    • add the XML file in the "Temporary" folder, using the [Temporary File] toolbar button
    • go in the Table Editor page, "InstallUISequence" table and modify the "Sequence" value of the "AI_XmlLocator" row from 101 to 1010. In this case, the XML search will be performed after the temporary file was copied on the machine
    • in the Search page, the file path of the XML search will be set using the property of the temporary file (e.g. [AI_MY_FILE.XML], this property is displayed when you double-click on the XML file that you added as temporary file)
    • build and test the project

    For more information you can check the Advanced Installer forums.