[wix-users] Generate Error 1602 from Deferred Custom Action

Rob Mensching rob at firegiant.com
Fri Nov 2 15:13:03 PDT 2018


 Short replies here. Complete answers over there: http://www.firegiant.com/

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Justin Cox via wix-users
Sent: Friday, November 2, 2018 2:37 PM
To: WiX Toolset Users Mailing List (wix-users at lists.wixtoolset.org) <wix-users at lists.wixtoolset.org>
Cc: Justin Cox <cox.justin.a at gmail.com>
Subject: [wix-users] Generate Error 1602 from Deferred Custom Action

I have a deferred custom action written in C# that sets some folder names.
If it encounters an errors, like access permissions, an error is displayed with Ok/Cancel.  It should terminate and rollback if the user clicks cancel, but it continues on.

I've tried a few different way including,

return ActionResult.Failure


                using (Record record = new Record(0))
                    record.SetString(0, "foo");
                    ses.Message(InstallMessage.FatalExit, record);
                return ActionResult.UserExit;

However everything just drives it on.  I want click the cancel button on the dialog to have the same effect as clicking cancel on the dialog screen.  Is this possible from a deferred custom action C# dialog?

More information about the wix-users mailing list