2

Is there anyway to inform a user as to why an install has rolledback? I could pop up a messagebox in a custom action and return ActionResult.Failure but is there a more elegant way than pop up boxes as sometimes they are hidden behind the main installer dialogue and the user is sitting there for ages before noticing.

knappster
  • 401
  • 9
  • 23

2 Answers2

2

Not really. You can only show a message box from your custom action in case it fails.

Windows Installer doesn't support action return value handling. So if something fails, there's not much you can do to inform the user. The standard dialogs and messages will be used.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
  • Don't forget logging. While this may not help the average user, it can help the advanced user or whoever ends up providing support. – Michael Urman Jul 21 '11 at 04:31
  • yeah I still log it's just that the typical user won't have a clue as to how to get logging so a pop up box is good for this – knappster Jul 21 '11 at 07:28
  • Hi MRNX, Thanks for your answer. Is there any WIX document to mention this (Windows Installer doesn't support action return value handling. So if something fails, there's not much you can do to inform the user. The standard dialogs and messages will be used.)? – mgr May 18 '15 at 12:58
1

The party line is you should log information so that when someone creates a verbose log, this information will be available to someone who can support them. With the exception of actions launched from a dialog's DoAction event, you can log information by calling MsiProcessMessage, or Session.Message or similar. If you do show a message, you should also use the same route for this, as it will respect the UI settings of the installer.

See also How do I show Error Message using Managed Custom Actions with Windows Installer for details.

Community
  • 1
  • 1
Michael Urman
  • 15,737
  • 2
  • 28
  • 44