In article <bay122-ds449eed411daf09a4ab577cd...@phx.gbl>,
    "Blair" <os...@live.com>  writes:

> To keep your own sanity and make sure that repairs, etc. don't mess things
> up, it is best to do what the built-in standard actions effectively do and
> have an immediate CA or two (the only one(s) you ever then explicitly
> schedule in the InstallExecuteSequence table) that generate your custom
> action data for you and "schedule" your deferred action and rollback actions
> by calling MsiDoAction() only as needed based on component/feature install
> states and/or properties they examine, along with possibly checking the
> system to see if the action has already been performed.

I have a slightly different take on this.  I don't like to put
deferred CAs anywhere but in my InstallExecuteSequence tables.  If I
don't have them in the tables, then ICEs can't validate their
requirements and I have to manually debug my logic.

I use an identifier convention with rollback actions and then have an
ICE that validates the sequencing using the conventions.  If I have a
deferred action named "X", then its rollback action is named
"X_Rollback".  I then have an ICE that looks for all actions ending in
"_Rollback" and validates that they are deferred rollback custom
actions and that they are sequenced before a deferred action with the
name before the "_Rollback".  That let's me guarantee that I never
sequence them improperly.  The ICE also checks that the conditions on
the deferred and rollback actions are the same so that they always
execute in tandem.

If you have complex needs for determining when the deferred action
should run, then have an immediate action that evaluates the condition
and sets a property that indicates the deferred/rollback pair should
run.  Your repair/UI/feature state checks just evaluate conditions and set
properties for use in the execution sequence.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to