The WiX toolset "wcautil.lib" has helper functions that ensure that user cancel 
isn't "swallowed" by a CustomAction.  You might be surprised at some of the 
functions that can return user cancel.

-----Original Message-----
From: Richard [mailto:legal...@xmission.com] 
Sent: Monday, January 05, 2009 12:22
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Disable cancel button on ProgressDlg during 
CustomAction execution


In article <bay105-w3905902fd0a20f28ffd12e84...@phx.gbl>,
    sujanakar reddy <sujanakar_re...@hotmail.com>  writes:

> When the user clicks Cancel button during CustomAction execution, the insta=
> llation is not getting rollback and the product is installed successfully.

Wouldn't you rather that the Cancel button worked properly instead of
disabling it?

Chances are, the reason your cancel button is not cancelling your
installation is that your custom action is calling MsiProcessMessage
somewhere, probably because you're writing something to the log file.

However, one aspect of MsiProcessMessage that eludes most people's
awareness is that the return value of this function may indicate that
the user clicked Cancel and your custom action should return a return
value indicating cancel.  (If your CA modifies the system, you will
want a rollback action that undoes your custom action's changes to the
system.)

If you don't return cancel from your CA when the result of
MsiProcessMessage indicates that the user clicked cancel, then the
cancel action of the user is lost.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
      <http://www.xmission.com/~legalize/book/download/index.html>

        Legalize Adulthood! <http://blogs.xmission.com/legalize/>

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to