I have found that using a search I can check whether a file exists: viewtopic.php?t=11221
However, I have to do the actions in the following order:
- Check whether an XML file exists
- If it exists, call custom actions to modify XML file.
- Do XML search on file.
How can I achieve this?
(Before you tell me that I should just do the XML search in my custom action: The custom action is "Launch file" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -pd connectionStrings" to decrypt the passwords in the XML file before doing XML search to auto-fill the corresponding dialogs windows. This may only be executed if the Web.config exists, because otherwise an XML file stub is created during decryption, and then the XML element order is wrong and the IIS won't work after install.)