Hi,
If you include in your installation some IIS configuration then WIX
framework adds ConfigureIIS action to the sequence. You can do the
following:
1. You specify "after ConfigureIIS" in your action.
2. You can add ConfigureIIS action to your InstallExecuteSequence in any
place after InstallFiles standard action. Also you can define any condition
on ConfigureIIS action (we set condition NOT PATCH because during patch WEB
site exists already).
3. In general you can add Web.config configuration after InstallFiles
action because the file configuration depends on file existence only and
not on presence of Web Site or Virtual Folder.
4. You can use WIX Utils extension to configure XML files unless you doing
something that is out of scope of XML standards.

Regards

>
> ---------- Forwarded message ----------
> From: Brian Enderle <bria...@gmail.com>
> To: WiX Users <wix-users@lists.sourceforge.net>
> Cc:
> Date: Tue, 21 Oct 2014 13:23:33 -0400
> Subject: [WiX-users] When to call CustomAction
> I am trying to run a CA after setting up a website to modify the web.config
> file based on the IIS version being used.
>
> What should I use for the "After" value (in the InstallExecuteSequence) to
> make sure the CustomAction executes after the website is installed?
>
> Here is the code I am using:
>
>
> <Product>
> ...
>     <InstallExecuteSequence>
>       <!-- Only execute on install (not repair or uninstall) -->
>       <Custom Action='WebConfigProperties' After='InstallServices'>NOT
> Installed AND NOT REMOVE</Custom>
>       <Custom Action='UpdateWebConfig' After='WebConfigProperties'>NOT
> Installed AND NOT REMOVE</Custom>
>     </InstallExecuteSequence>
>
> </Product>
>
>
>   <!-- Includes setup info for installing IIS information -->
>   <Fragment>
>
>     <!-- Create a component group so we only have to make one reference in
> Product.wxs -->
>     <ComponentGroup Id="IISConfiguration">
>       <ComponentRef Id="InstallWebsite" />
>       <ComponentRef Id="InstallAppPool" />
>     </ComponentGroup>
>
>     <!-- Get username / password from AcctInfoDlg.wxs -->
>     <!--<util:User Id="WebAppPoolUser" Name="[IISSERVICEACCOUNT]"
> Password="[IISPASSWORD]" ></util:User>-->
>
>     <DirectoryRef Id="INSTALLFOLDER_FOXPROCONNECTWS">
>
>       <!-- Setup application pool information using IISSERVICEACCOUNT from
> AcctInfoDlg.wxs -->
>       <Component Id="InstallAppPool" Guid="$(var.AppPoolGUID)"
> KeyPath="yes">
>         <iis:WebAppPool Id="FoxProConnectWS"
>                         Name="FoxProConnectWS"
>                         Identity="applicationPoolIdentity"
>                         ManagedPipelineMode="Integrated"
>                         ManagedRuntimeVersion="v4.0" />
>
>       </Component>
>
>       <!-- Create the website in IIS -->
>       <Component Id="InstallWebsite" Guid="$(var.WebsiteGUID)"
> KeyPath="yes">
>         <iis:WebVirtualDir Id="WebSiteVirtualDir" Alias="FoxProConnectWS"
> Directory="INSTALLFOLDER_FOXPROCONNECTWS" WebSite="FoxProWebsite" >
>           <iis:WebApplication Id="WebSiteApp" Name="FoxProConnectWS"
> Isolation="medium" WebAppPool="FoxProConnectWS" />
>         </iis:WebVirtualDir>
>       </Component>
>
>     </DirectoryRef>
>
>     <!-- These 'website's are defined outside of the 'DirectoryRef' so as
> to create the websites under the 'Default Web Site' entry in IIS -->
>     <iis:WebSite Id="FoxProWebsite" Description="FoxProConnectWS"
> Directory="INSTALLFOLDER_FOXPROCONNECTWS"  >
>       <iis:WebAddress Id="AllUnassigned" Port="80" />
>     </iis:WebSite>
>
>
>     <Binary Id="CustomAction.CA"
>
> SourceFile="$(var.SolutionDir)CustomActions\bin\$(var.Configuration)\CustomActions.CA.dll"
> />
>     <CustomAction Id="WebConfigProperties"
>               Return="check"
>               Property="UpdateWebConfig"
>
>
> Value="FoxProConnectWSPath=[INSTALLFOLDER_FOXPROCONNECTWS];FoxProPath=[FOXPROPATH]"
> />
>
>     <CustomAction Id="UpdateWebConfig"
>                   BinaryKey="CustomAction.CA"
>                   DllEntry="UpdateWebConfigCustomAction"
>                   Execute="deferred"
>                   Impersonate="no"
>                   Return="check" />
>
>   </Fragment>
> Brian
>
> If you can't explain it simply, you don't understand it well enough.  -
> Albert Einstein
>
>
>
>
>


-- 
Regards,
Fyodor Koryazhkin..
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to