That makes perfect sense. Thank you for the clarification. I had already started to implement a solution where I simply read the value directly from a property between sending my original question and your reply. Now I understand why that should have been my original solution. Thanks again!
Edwin G. Castro Software Developer - Staff Electronic Banking Services Fiserv Office: 503-746-0643 Fax: 503-617-0291 www.fiserv.com Please consider the environment before printing this e-mail > -----Original Message----- > From: Michael Urman [mailto:mur...@gmail.com] > Sent: Monday, January 24, 2011 6:45 PM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] DTF: Proper CustomActionData Usage > > Only deferred, rollback, and commit actions use CustomActionData set from > the matching property's value. Immediate actions (all UI actions are > immediate) have full access to properties so this is unnecessary and unused. > > On Mon, Jan 24, 2011 at 13:49, Castro, Edwin G. (Hillsboro) > <edwin.cas...@fiserv.com> wrote: > > I'm trying to set CustomActionData for a managed custom action I've > written using a simple <SetProperty/>. > > > > <Property Id="CustomAction1" Hidden="yes" /> <SetProperty > > Id="CustomAction1" Value="Key1=[Value1];Key2=[Value2];Key3=Value3" > > Before="CustomAction1" Sequence="execute"> > > <![CDATA[NOT CustomAction1]]> > > </SetProperty> > > <CustomAction Id="CustomAction1" BinaryKey="CABinary" > > DllEntry="CustomActionEntryPoint" Execute="firstSequence" > > HideTarget="yes" /> <InstallExecuteSequence> > > <Custom Action="CustomAction1" After="InstallValidate" /> > > </InstallExecuteSequence> > > > > In addition, I'm trying to call this managed custom action as a result of > clicking a PushButton on a Dialog: > > > > <Dialog ... > > > ... > > <Control Type="PushButton" ... > > > ... > > <Publish Property="CustomAction1" > > Value="Key1=[Value1];Key2=[Value2];Key3=Value4" > Order="1">1</Publish> > > <Publish Event="DoAction" Value="CustomAction1" > > Order="2">1</Publish> > > <Publish Property="CustomActionEntryPointResult" > > Value="[CustomActionEntryPointResult]" Order="3">1</Publish> > > </Control> > > </Dialog> > > > > I've set MMsiBreak=CustomAction1 in my environment and I've been able > to break into my managed custom action to debug it when I click the > PushButton in the UI. The very first thing I do in the managed custom action > is to retrieve the first key-value pair from CustomActionData: > > > > string value1 = session.CustomActionData["Key1"]; > > > > This line results in a KeyNotFoundException. It appears that > session.CustomActionData is completely empty. > > > > I see that session["CustomAction1"] == > "Key1=[Value1];Key2=[Value2];Key3=Value4" as expected. > > > > Am I missing something about how CustomActionData is supposed to work > in managed custom actions? > > > > Edwin G. Castro > > Software Developer - Staff > > Electronic Banking Services > > Fiserv > > Office: 503-746-0643 > > Fax: 503-617-0291 > > www.fiserv.com<http://www.fiserv.com/> > > P Please consider the environment before printing this e-mail > > > > ---------------------------------------------------------------------- > > -------- Special Offer-- Download ArcSight Logger for FREE (a $49 USD > > value)! > > Finally, a world-class log management solution at an even better price-free! > > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > > February 28th, so secure your free ArcSight Logger TODAY! > > http://p.sf.net/sfu/arcsight-sfd2d > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users