Dredgewood
Posts: 10
Joined: Wed Sep 12, 2018 8:54 am

Launch updates check from application start

I must be having a case of "Can't see the forest for the trees" because I cannot find an example of how to launch the updates.exe from an application start event. I am not looking to start it from a shortcut, but from the event itself (if possible). The situation being I am writing an installer for a windows Addin, and I want to check for addin updates on the launch of the windows application.

So far I have in "Updater" set the execution to Automatic and configured the task:
Command Line: -silentall -nocheckfreq
Schedule: On an Event

Query (which I know is incomplete but i can't find a working example to see where I@m going wrong):

<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[EventData[Data and (Data='WHAT YOU SEE IN THE GENERAL TAB')]]</Select>
</Query>
</QueryList>


Can anyone point me in the right direction or provide/link to an example of what I'm trying to do?

Cheers
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: Launch updates check from application start

Hello and welcome to our forums,

To achieve what you need, you should make sure that you escape both square bracket characters ([,]) inside the query content you add in Advanced Installer as it follows:

Code: Select all

<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[\[]EventData[\[]Data and (Data='WHAT YOU SEE IN THE GENERAL TAB')[\]][\]]</Select>
</Query>
</QueryList>
This is happening because the query field is of formatted type, which means that any string with the following format: [string] will be treated according to our "Windows Installer Formatted Type" article.

Hope this helps!

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”