ima-aa
Posts: 22
Joined: Mon Feb 03, 2014 2:37 pm

Custom actions and installation progress

Wed Nov 02, 2016 11:19 am

Hello,

I've got a question about installation state and custom actions.

If I look at the installer gui there are messages during the installation like removing old files, extracting new files etc.
Is it possible to execute a custom action when the installer displays a new message?

regards
Andreas

Daniel
Posts: 8187
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom actions and installation progress

Fri Nov 04, 2016 5:34 pm

Hello Andreas,

If you are asking about how to update the action text when a custom action runs, then please check our "Update action text and progressbar with C#/DTF custom action" forum post.

Let us know if this helped, otherwise please give us more details (maybe a small exmaple) of what you are looking for.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ima-aa
Posts: 22
Joined: Mon Feb 03, 2014 2:37 pm

Re: Custom actions and installation progress

Mon Nov 07, 2016 9:48 am

Hello Daniel,

i'd like to do it the other way round.

For example I have my advanced installer installation. On this Gui I see progress messages like extracting, removing etc. I would like to grab this messages. Maybe a event when the message is changing that I can grab the newest message and do something with the massage, like logging, sending to another program etc.

best regards
Andreas

Daniel
Posts: 8187
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom actions and installation progress

Tue Nov 08, 2016 12:32 pm

Hello Andreas,

To achieve what you want you can use an edit box control to subscribe to the "Display action text during install" event. This event will set the current action data in the property of the above edit box. Then, you can simply access within your own custom action the edit box property whenever you want during installation progress. Please take a look on our "Access installer property using custom actions" article.

Here is how you can proceed:
1. go to "Dialogs" page and add an edit box control (EDIT_PROP) on "ProgressDlg" dialog
2. in its "Subscribed Events" tab add an event like this:
  • Subscribe to: Display action text during install
    Attribute to set: PropertyValue
3. set the "Visible" attribute of the above edit bix to "False"
4. create and use your own custom action to access the "EDIT_PROP" property value during the installation progress

If you have anyq uestions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ima-aa
Posts: 22
Joined: Mon Feb 03, 2014 2:37 pm

Re: Custom actions and installation progress

Tue Nov 08, 2016 5:27 pm

Hello Daniel,

I've tried your suggestions. They are working good but I'm stuck with the next step. I have the right text in the property. But how do I call a custom action as soon as the property updates? I haven't found a published event text changed etc. for the textedit I could use for this scenario.


regards
Andreas

Daniel
Posts: 8187
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom actions and installation progress

Thu Nov 10, 2016 9:21 am

Hello Andreas,

I'm afraid there is no Windows Installer support to call a custom action every time a property value changes. Also, I'm not aware of any other workaround you can use to achieve what you want.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ima-aa
Posts: 22
Joined: Mon Feb 03, 2014 2:37 pm

Re: Custom actions and installation progress

Thu Nov 10, 2016 7:23 pm

Hello Daniel,

thanks for your reply.
I played around a while with ai and found a feature that looks very promising to me.
What about the custom action installation sequence. I inserted every standard action and between them I execute my notification function. It seems to work very well.

But it's very exhausting to insert them. And if I close ai and open the project again they are gone in the installation sequence list. If I click on move I see that the right order was saved. Can you change the behavior and make them visible If I have choosen them one time?
Attachments
ai setup - progress notifications.jpg
ai setup - progress notifications.jpg (312.73 KiB) Viewed 4341 times

Daniel
Posts: 8187
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom actions and installation progress

Tue Nov 15, 2016 11:01 am

Hello Andreas,

Indeed, creating a sibling custom action after each one of the predefined ones should work, but as you already found this will be a hard work and quite difficult to maintain the project custom actions section.

In what regards the predefined custom action you reveal using the "Show standard action" option, they will be indeed hidden every time you reopen the project in Advanced Installer. This is our current implementation. I've forwarded your request to our development team and hopefully they will consider this improvement in the future. We will notify you when the improvement will be available.

Unfortunately, for the moment the only workaround will be to manage this from our "Table Editor" page. Just go to "Table Editor" page and select the "Install Execute Sequence" table. In this table you can see all the actions ordered by sequence.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”