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
------------------------------------------------------------------------------
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