Situation
In our setup we read an config xml file, which we have added by the import XML command to the Files and Folders table.
The Xml file contains an element RestAddress which looks like
Code: Select all
<setting name="RestAddress">
<value>http://+:11003</value>
</setting>The RestAddress is parsed in a Custom Action and the port number (the number behind the last colon) is stored in [REST_PORT] public property.
A hidden edit field is used for the port number property.
The [REST_PORT] is then used in the Windows Firewall page to set an inbound rule.
That works perfect in a normal Installation setup where the UI Wizard Dialogs are shown.
Problem
When doing an unattended setup. The extraction of the port, or better the saving in the property AI_SetMsiProperty does not work.
My current knowledge
The following bullet points reflect my current knowledge and may be wrong. So please confirm or correct it.
- Unattended Setup means that the setup is started with /passive which only shows a progress bar
- /qn completely hides the UI
- the Wizard Dialog Stage is skipped
- the table InstallUISequence is skipped
- properties cannot be read or written with AI_SetMsiProperty and AI_GetMsiProperty
- I can use the Install Execution Stage with Advanced execution scenario and the option Skip action in Install Execution Stage if executed in Dialog Stage, in order to run the Custom Action for parsing the RestAddress (where/how to store the port).
How can I store the port number from the RestAddress into a variable, so that I can use it in the Firewall page.
If I would store RestAddress and RestPort as two elements inside the config, that would work, but I don't like having redundant information in the config file.
Thank you very much for any hint in advance,
Best regards,
Stefan
FOLLOW US
Get the latest news in Application Packaging