Custom Action Feature Installed or Not Installed

Add-in Express™ Support Service
That's what is more important than anything else

Custom Action Feature Installed or Not Installed
 
Darren Dickerson




Posts: 17
Joined: 2014-09-24
How do I get a Custom Action to remember if it is installed or not? I have two features that remember the state of the install but the DatabaseFeature and MaintenancePlanFeature don't remember the state.


<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="80C1C36B-4E4C-403D-B192-9EB96430A63A" Name="Floor Plan Server Setup" Language="1033" Version="1.0.0.0" Manufacturer="First Baird Bancshares, Inc." UpgradeCode="8CCFCCF1-5FFA-459D-A563-4B01E7FFAE5B">
    <Package Id="DD1E8B23-7999-483B-866C-46C69DE8994B" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <CustomAction Id="DIRCA_TARGETDIR" Property="TARGETDIR" Value="[ProgramFilesFolder][Manufacturer][ProductName]" Execute="firstSequence" />
    <Binary Id="FloorPlanServerCustomAction.CA.dll" src="..FloorPlanServerCustomActionin$(var.Configuration)FloorPlanServerCustomAction.CA.dll" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
    <Property Id="DB_USER" Value="sa" />
    <Property Id="DB_PASSWORD" Value="password" />
    <Property Id="DB_SERVER" Value="localhost" />
    <Property Id="DB_DATABASE" Value="FloorPlanSetupTest" />
    <Property Id="TITLE_ARCHIVE_FOLDER_PATH" Value="c:	empTitleArchiveFolder" />
    <Property Id="ZONE_FILE_FOLDER_PATH" Value="c:	empTitleArchiveFolderZoneFiles" />
    <Property Id="USER_GROUP_NAME" Value="FBTDomain Users" />
    <Property Id="UseWindowsAuth" />
    <Feature Id="DatabasesFeature" Title="Databases" Level="2" Description="Floor Plan and NADA Databases.">
    </Feature>
    <Feature Id="MaintenancePlanFeature" Title="Maintenance Plans" Level="2" Description="Full Recovery Model Maintenence Plans for Floor Plan and NADA Databases.">
      <ComponentGroupRef Id="FloorPlanServerCustomActions.Binaries" />
      <ComponentRef Id="comp_E7E51EC9_5F95_4576_9476_1D3EEC5C0A1B" />
      <ComponentGroupRef Id="FloorPlanServerCustomActions.Content" />
    </Feature>
    <Feature Id="TitleArchiveFolderFeature" Title="Title Archive Folder" Level="2" Description="Title Archive Folder for storing Floor Item documents.">
    </Feature>
    <Feature Id="ServiceFeature" Title="Service" Level="2" Description="Floor Plan Service for calculating interest on Floor Items and periodic refresh of NADA value.">
      <ComponentRef Id="comp_95032AC1_918A_413A_BD4A_3AAB0BA0FE8A" />
      <ComponentRef Id="FloorPlanService" />
    </Feature>
    <UI Id="UIScheme">
      <UIRef Id="WixUI_Mondo" />
      <!--Insert the SQL Credential Dialog-->
      <DialogRef Id="SQLCredDlg" />
      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="SQLCredDlg">1</Publish>
      <Publish Dialog="SQLCredDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
      <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="SQLCredDlg">1</Publish>
      <Publish Dialog="SQLCredDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
      <!---->
    </UI>
    <CustomAction Id="InstallMaintenancePlanCA" Execute="immediate" BinaryKey="FloorPlanServerCustomAction.CA.dll" DllEntry="InstallMaintenancePlan" />
    <CustomAction Id="InstallDatabasesCA" Execute="immediate" BinaryKey="FloorPlanServerCustomAction.CA.dll" DllEntry="InstallDatabases" />
    <CustomAction Id="CreateFoldersCA" Execute="immediate" BinaryKey="FloorPlanServerCustomAction.CA.dll" DllEntry="CreateFolders" />
    <InstallExecuteSequence>
      <Custom Action="InstallDatabasesCA" After="InstallFinalize"><![CDATA[&MaintenancePlanFeature=3]]></Custom>
      <Custom Action="InstallMaintenancePlanCA" After="InstallFinalize"><![CDATA[&DatabasesFeature=3]]></Custom>
      <Custom Action="CreateFoldersCA" After="InstallFinalize"><![CDATA[&TitleArchiveFolderFeature=3]]></Custom>
      <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR=""]]></Custom>
    </InstallExecuteSequence>
    <InstallUISequence>
      <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR=""]]></Custom>
    </InstallUISequence>
    <AdminUISequence>
      <Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR=""]]></Custom>
    </AdminUISequence>
  </Product>
  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="TempFolder" Name="TempFolder">
        <Directory Id="FloorPlanServerCustomActions.Content" />
      </Directory>
      <Directory Id="SystemFolder">
        <Directory Id="FloorPlanServerCustomActions.Binaries" />
        <Component Id="comp_E7E51EC9_5F95_4576_9476_1D3EEC5C0A1B" Guid="F760143F-8614-4E0E-A57E-F0707B0A1439" Permanent="no" SharedDllRefCount="no" Transitive="no">
          <File Id="_67E9F7E1_6F58_4ECB_89E1_D893E6D4BA19" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.Deployment.WindowsInstaller.dll" Source="......Program Files (x86)WiX Toolset v3.8SDKMicrosoft.Deployment.WindowsInstaller.dll" KeyPath="yes" />
          <File Id="_242E6B51_415A_446B_926F_76272C132D67" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.ConnectionInfo.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.ConnectionInfo.dll" />
          <File Id="_BBC2476D_6882_4381_B20B_660F7EFA93BD" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Dts.Design.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.Dts.Design.dll" />
          <File Id="_0E1CA1F5_9DFB_4D9F_83B1_9794C53A61A2" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SQLServer.ManagedDTS.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SQLServer.ManagedDTS.dll" />
          <File Id="_E7A9ADB3_C1DA_4822_A85F_8992E3E57553" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Management.Sdk.Sfc.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.Management.Sdk.Sfc.dll" />
          <File Id="_A5CD4F31_BBDC_4529_84E2_DE086B641703" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Smo.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.Smo.dll" />
          <File Id="_7CF6B3B2_E3F7_4FD2_9A4D_FB0C8BB41219" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.SmoExtended.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.SmoExtended.dll" />
          <File Id="_AE264DD3_50B5_451C_AB6D_535FAAB3CDAC" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.SqlClrProvider.dll" Source="......WindowsssemblyGAC_MSILMicrosoft.SqlServer.SqlClrProvider	.0.0.0__89845dcd8080cc91Microsoft.SqlServer.SqlClrProvider.dll" />
          <File Id="_B8DBEA0D_670F_48E4_BF56_45DD51E32190" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.DTSPipelineWrap.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.DTSPipelineWrap.dll" />
          <File Id="_B71BFB06_EEB3_4C25_8FFA_2C4886009609" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Diagnostics.STrace.dll" Source="......WindowsssemblyGAC_MSILMicrosoft.SqlServer.Diagnostics.STrace	.0.0.0__89845dcd8080cc91Microsoft.SqlServer.Diagnostics.STrace.dll" />
          <File Id="_FEECDBD6_74F8_42D2_8F7C_580DA35B33AF" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Msxml6_interop.dll" Source="......WindowsMicrosoft.NetssemblyGAC_32Microsoft.SqlServer.Msxml6_interop4.0_11.0.0.0__89845dcd8080cc91Microsoft.SqlServer.Msxml6_interop.dll" />
          <File Id="_CA5F4044_3412_45E6_B2FC_8AB82F421950" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.SqlTDiagM.dll" Source="......WindowsssemblyGAC_MSILMicrosoft.SqlServer.SqlTDiagM	.0.0.0__89845dcd8080cc91Microsoft.SqlServer.SqlTDiagM.dll" />
          <File Id="_DD46CDD8_7661_433C_A637_E574A83F411B" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.PipelineHost.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.PipelineHost.dll" />
          <File Id="_828B9C3A_6AE1_4A18_BB5E_75F69F0158ED" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.DtsMsg.dll" Source="......WindowsMicrosoft.NetssemblyGAC_MSILMicrosoft.SqlServer.DtsMsg4.0_11.0.0.0__89845dcd8080cc91Microsoft.SqlServer.DtsMsg.dll" />
          <File Id="_76FB9459_1271_4508_8ED4_B2AB6D060B7E" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.SqlEnum.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.SqlEnum.dll" />
          <File Id="_DE40EF4C_9B67_40FB_B1C0_4EAB89EA73CA" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Dmf.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.Dmf.dll" />
          <File Id="_68067C19_040F_4A95_8000_6F46A2823A4E" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.ServiceBrokerEnum.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.ServiceBrokerEnum.dll" />
          <File Id="_3A52E4B6_EC39_4026_9F21_01E6579D58C5" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Management.SmoMetadataProvider.dll" Source="......WindowsssemblyGAC_MSILMicrosoft.SqlServer.Management.SmoMetadataProvider	.0.0.0__89845dcd8080cc91Microsoft.SqlServer.Management.SmoMetadataProvider.dll" />
          <File Id="_1CC3AA67_9591_42C2_86DE_BBA72CC9D1A5" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.Management.SqlParser.dll" Source="......WindowsssemblyGAC_MSILMicrosoft.SqlServer.Management.SqlParser	.0.0.0__89845dcd8080cc91Microsoft.SqlServer.Management.SqlParser.dll" />
          <File Id="_59076DDB_3A4D_4203_8BE8_C64B1E7007F9" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Microsoft.SqlServer.RegSvrEnum.dll" Source="c:Program Files (x86)Microsoft SQL ServerHSDKAssembliesMicrosoft.SqlServer.RegSvrEnum.dll" />
        </Component>
      </Directory>
      <Component Id="comp_95032AC1_918A_413A_BD4A_3AAB0BA0FE8A" Guid="C23E6B16-C757-41EB-B8EF-2CEC1F6ACD40" Permanent="no" SharedDllRefCount="no" Transitive="no">
        <File Id="_407A782C_1EAA_4798_812B_9CFE785D66C4" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="DataLayer.dll" Source="..DataLayerinDebugDataLayer.dll" KeyPath="yes" />
        <File Id="_8F4E8E24_81E9_4659_AB40_A05147885D73" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="NADA.dll" Source="..DataLayerinDebugNADA.dll" />
        <File Id="_E71CEDBB_8B8D_4431_AC3C_FC926506B28D" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="HelperClasses.dll" Source="..DataLayerinDebugHelperClasses.dll" />
      </Component>
      <Component Id="FloorPlanService" Guid="B25206BD-0FF5-4003-B365-C375FCE4ACF8">
        <File Id="FloorPlanService.exe.config" Name="FloorPlanService.exe.config" Source="..FloorPlanServicein$(var.Configuration)FloorPlanService.exe.config" Vital="yes" KeyPath="no" DiskId="1" />
        <File Id="EntityFramework.dll" Name="EntityFramework.dll" Source="..FloorPlanServicein$(var.Configuration)EntityFramework.dll" KeyPath="no" DiskId="1" />
        <File Id="EntityFramework.SqlServer.dll" Name="EntityFramework.SqlServer.dll" Source="..FloorPlanServicein$(var.Configuration)EntityFramework.SqlServer.dll" KeyPath="no" DiskId="1" />
        <File Id="FloorPlanService.exe" Name="FloorPlanService.exe" Source="..FloorPlanServicein$(var.Configuration)FloorPlanService.exe" Vital="yes" KeyPath="yes" DiskId="1" />
        <ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes" Name="FloorPlanService" DisplayName="Floor Plan Service" Description="Calculate Floor Item Interest Daily and Refresh NADA Value Monthly" Start="auto" Account="NT AUTHORITYLOCAL SERVICE" ErrorControl="ignore" Interactive="no" />
        <ServiceControl Id="ServiceControl" Start="install" Stop="both" Remove="uninstall" Name="FloorPlanService" Wait="yes" />
      </Component>
    </Directory>
  </Fragment>
</Wix>
Posted 27 Oct, 2014 14:20:13 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Darren,

I have just found the following note related to the WiXUI_Mondo dialog set:

Note: WixUI_Mondo uses SetInstallLevel control events to set the install level when the user chooses Typical or Complete. For Typical, the install level is set to 3; for Complete, 1000. For details about feature levels and install levels, see INSTALLLEVEL Property.


Please have a look at http://wixtoolset.org/documentation/manual/v3/wixui/dialog_reference/wixui_mondo.html, hopefully this will be useful.
Posted 28 Oct, 2014 07:56:12 Top