Whinkent
Posts: 1
Joined: Tue Nov 07, 2023 2:29 am

Get message box result for deferred custom action

Scenario is that we need to do some migration of files during installation and possibly show message box if some error occurs.

Issue is that we should do migration during system modification so we set custom action as deferred, and so message box custom action also need to be deferred, but issue is that how can we get message box result when we're running it deferred? because we cannot set installer property on deferred custom action.

We can show message box on the custom action code itself, this runs separate exe for migration, but issue is that message box will not be modal against the installer UI so it shows on top of the installer dialog but can go behind it

Please advise on how to proceed
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Get message box result for deferred custom action

Hello and welcome to our forums,

I'm afraid that what you want to achieve might not be possible, or at least not through the classic approach.

As you mentioned, during the deferred stage, it is not possible to set properties. You can only retrieve properties through the CustomActionData special property.

What I'm thinking of is the following:

- in your custom action, write the results into Registry, for instance (or to a file, that works too)

- in your other custom action, read the results from the Registry

Hope this helps!

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

Return to “Building Installers”