I have an installer that uses <util:XmlFile/>. I looked at the
InstallExecuteSequence in the installer package using InstEdit and did *not*
find an action called "ExecuteAction". If this is a custom action you wrote
then you need to be aware where that custom action is scheduled.
I see "SchedXmlFile" in the InstallExecuteSequence in my installer where it is
located between "DuplicateFiles" and "WriteRegistryValues" according to
Sequence order. The "SchedXmlFile" action is responsible for scheduling the
<util:XmlFile/> changes so we want to schedule "CA_testSqlConnection" before
"SchedXmlFile".
<InstallExecuteSequence>
<Custom Action="CA_testSqlConnection" Before="SchedXmlFile" />
</InstallExecuteSequence>
You'll need to make sure that "CA_testSqlConnection" is an immediate custom
action because the value of [SQLCONNECTION] is needed during the immediate
sequence when "SchedXmlFile" does its work.
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: CoolBreeze [mailto:[email protected]]
> Sent: Wednesday, January 26, 2011 5:50 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Setting properties
>
> My TestSqlConnection custom action is called after "ExecuteAction" on my
> Product.wxs. Below is a snippet of my Product.wxs.
>
> <Feature Id="MainApplication" Title="MyApp Setup" Description="Required
> Software" Level="1">
> <ComonentGroupRef Id="ApplicationComponents" /> </Feature>
>
> <InstallUISequence>
> <Custom Action="CA_testSqlConnection" After="ExecuteAction" />
> </InstallUISequence>
>
> My Components.wxs snippet.
> <Wix ...>
> <Fragment>
> <ComponentGroup Id="ApplicationComponents">
> <Component Id="CMP_ConnString" Guid=".." Directory="AppDir">
> <File Id="FILE_App.config" Name="app.config" Vital="yes"
> KeyPath="yes" Source="app.config" />
> <util:XmlFile Id="AppConfigConnectionString"
> Action="setValue" Permanent="yes" File="[#FILE_App.config]"
> ElementPath="/configuration/connectionStrings/add[\[]@name='AppConfig
> ConnectionString'[\]]"
> Name="connString" Value="[SQLCONNECTION]" />
> </Component>
> </ComponentGroup>
> </Fragment>
> </Wix>
>
> Thanks
>
> On Wed, Jan 26, 2011 at 6:52 PM, Castro, Edwin G. (Hillsboro) <
> [email protected]> wrote:
>
> > Did you schedule the TestSqlConnection custom action before
> > <util:XmlFile/> gets scheduled?
> >
> > Edwin G. Castro
> > Software Developer - Staff
> > Electronic Banking Services
> > Fiserv
> > Office: 503-746-0643
> > Fax: 503-617-0291
> > www.fiserv.com
> > P Please consider the environment before printing this e-mail
> >
> >
> > > -----Original Message-----
> > > From: CoolBreeze [mailto:[email protected]]
> > > Sent: Wednesday, January 26, 2011 3:30 PM
> > > To: [email protected]
> > > Subject: Re: [WiX-users] Setting properties
> > >
> > > Hi Guys, I'm still trying to get this resolved. When I viewed the
> > > log
> > file I could
> > > see that my property contained the value I assigned to it from
> > > within my CustomAction; however, it doesn't contain anything when I
> > > try use it
> > within
> > > the <util:XmlFile element.
> > >
> > > Does anyone have any idea as to why Value does not contain the
> > > property value?
> > >
> > > Thanks.
> > >
> > > On Tue, Jan 25, 2011 at 11:50 AM, CoolBreeze
> > > <[email protected]>wrote:
> > >
> > > > I have a property I've set within a CustomAction that I need to
> > > > access within one of my Components. I'm not getting the property's
> > > > value. Is this even possible?
> > > >
> > > > Here is where I'm assigning a value to my property.
> > > >
> > > > [CustomAction]
> > > > public static ActionResult TestSqlConnection(Session testSession) {
> > > > // Code that tests the connection.
> > > > ...
> > > > ...
> > > >
> > > > // Assign the connection string to a property.
> > > > testSession["SQLCONNECTION"] = connStr; }
> > > >
> > > > Within my Components.wxs I have the following.
> > > > <Component Id="CMP_ConnString" Guid="Some Guid"
> > > Directory="AppDir">
> > > > <File Id="App.config" Name="app.config" Vital="yes" KeyPath="yes"
> > > > Source="..\MyApp\app.config" />
> > > > <util:XmlFile Id="AppConfigConnString" Action="setValue"
> > > Permanent="yes"
> > > > File="App.config"
> > > >
> > > >
> > >
> Element="/configuration/connectionStrings/add[\[]@name='MyAppConnStr
> > > ing'[\]]"
> > > > Name="connectionString" Value="[SQLCONNECTION]" />
> > > >
> > > >
> > >
> > ----------------------------------------------------------------------
> > --------
> > > 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
> > > [email protected]
> > > 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
> > [email protected]
> > 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users