You can't "just check for Cancel". You need to send a message and if a 
cancel occurred then you'll get that in the return code from 
::MsiProcessMessage(). wcautil.lib also has wrappers around many of the 
MSI functions since more functions than you'd expect can return cancel.

Curtis Jewell wrote:
>>> In article <1243447694545-2982772.p...@n2.nabble.com>,
>>>     achandrapano <achan...@panologic.com>  writes:
>>>
>>>       
>>>> I have a custom action that occurs right before InstallFinalize. Pressing
>>>> cancel and selecting 'yes' doesn't seem to cause a rollback. Is this a
>>>> timing issue since no rollbacks are allowed after InstallFinalize? The
>>>> MSI
>>>> log shows the cancel dlg was created but nothing else (I did a diff of 2
>>>> msi
>>>> logs, one with cancel and one without)
>>>>         
>>> It is up to the custom action to return ERROR_INSTALL_USEREXIT if you
>>> want your custom action to cause a rollback.
>>>
>>> Are you calling MsiProcessMessage in your custom action?  You need to
>>> check the return value of this function and look for indications that
>>> the user clicked cancel (return value IDCANCEL) and then bubble out
>>> the cancel from your custom action back to the install engine.  If you
>>> don't do this, the cancel action will be lost.
>>>       
>
> I'm not the person who originally asked the question, but the
> documentation on MSDN is looking a little bit opaque on this issue.
>
> I have a custom action that takes about 2-3 minutes to do, (the main
> routine is recursive through the directory structure, see
> http://svn.ali.as/cpan/trunk/Perl-Dist-WiX/src/ClearFolderCA/ClearFolderCA/ClearFolderCA.cpp
> for the up-to-date source) and I'd like to be able to detect when the
> Cancel button has been hit.
>
> I know MsiProcessMessage is what I want to do to check for that cancel
> button... (I'd make the call each time I recurse into AddDirectory) but
> what's opaque is what parameters do I use if checking for a Cancel
> button press is the only thing I want to do?
>
> --Curtis
>
> --
> Curtis Jewell
> swords...@csjewell.fastmail.us
>
> %DCL-E-MEM-BAD, bad memory
> -VMS-F-PDGERS, pudding between the ears
>
> [I use PC-Alpine, which deliberately does not display colors and
> pictures in HTML mail]
> --
> Curtis Jewell
> swords...@csjewell.fastmail.us
>
> %DCL-E-MEM-BAD, bad memory
> -VMS-F-PDGERS, pudding between the ears
>
> [I use PC-Alpine, which deliberately does not display colors and pictures in 
> HTML mail]
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>   

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to