I tested my XML search with the file Z:\Web.config, from which we derived installer-generated XML file "Web.config", and got all results perfectly - in the test as well as during a trial install on my PC.
But the XML file I want to read is "[APPDIR]\Web.config", which does not work because [APPDIR] is not filled (not even with the default value) when the search is performed.
How can I manage to read data from the XML file "[APPDIR]\Web.config" with XML search?
But next problem is that my Custom Action is not executed in time.
I made with WiX toolkit a custom action that takes session["CONN_STR"], a property which is filled in my XML Search, and splits it into three different properties. If the custom action is executed, session["SQLSERVER"], which is used in SQLConnectionDlg, is unconditionally set to a non-default value, so I am 100% sure that it is not executed
What I did: I made
-> a custom action: "Call function from attached native DLL"
-> with attached DLL set to "SetupParseConnStr.CA.dll"
-> with Function "CustomAction1"
-> with Execution Time "Immediately"
-> with Execution Options "Wait for custom action to finish" and "Fail installation if custom action returns an error"
-> with Execution Stage Condition "Install", "Uninstall, "Maintenance" with empty Condition field
Then I tried to go into the SqlConnectionDlg dialog, and add "Init event" => "New..." => "Execute custom action", but "Argument" drop down list does only contain my "TestODBCConnection" Custom Action.
Why is the other Custom Action not visible/selectable?
-> In "Custom Behaviour" => "Custom Actions" => "Installation Sequence", I moved the SetupParseConnStr.CA from "Execution Stage" to "Wizards Dialog Stage"
-> Afterwards, I found an Action "SetupParseConnStr.CA.dll" in "Custom Behaviour" => "Table Editor" => "InstallUISequence", and changed its Sequence to 1002 (AI_XmlLocator has 1001).
FOLLOW US
Get the latest news in Application Packaging