We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Antarctica
Posts: 110
Joined: Tue Jul 08, 2014 9:24 am

XML search in [APPDIR]

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?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML search in [APPDIR]

Hi,

You can take a look on the Problem with Search XML: backup some installed file tags thread which debates a similar problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Antarctica
Posts: 110
Joined: Tue Jul 08, 2014 9:24 am

Re: XML search in [APPDIR]

I got it working, thank you!

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?
Antarctica
Posts: 110
Joined: Tue Jul 08, 2014 9:24 am

Re: XML search in [APPDIR]

Solved it myself:

-> 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).
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML search in [APPDIR]

You're welcome. I'm glad you resolved the problems.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”