Hi,

I tried to install the major upgrade for my application. When its try
to uninstall the existing application its throw the error message like
"isallowing uninstallation of component:
{AA67D22F-62E9-4034-BD7D-7210A43050BD} since another client exists".

Then its try to install the changes, but this time not pass the
components ref value to the custom action

i have attached the code,

Can anybody to help me to fix the problem.

advance thanks.

-- 

Regards
Rajesh Krishnamoorthy
<?xml version="1.0" encoding="utf-8"?>
<!--http://blogs.msdn.com/b/dukek/archive/2009/10/19/implementing-a-wix-installer-that-calls-the-gdr-version-of-vsdbcmd-exe.aspx-->
<Include>
  <DirectoryRef Id="INSTALLLOCATION">
    <Component Id="DatabaseSqlcmd" Guid="45A30C59-37F5-4096-A937-92CA66D8F8F4">
      <File Id="Database.sqlcmdvars" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName)_Database.sqlcmdvars"
 KeyPath="yes"/>
    </Component>
    <Component Id="DatabaseSqldeployment" 
Guid="45A30C59-17F5-4096-A937-92CA66D8F8F4">
      <File Id="Database.sqldeployment" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName)_Database.sqldeployment"
 KeyPath="yes"/>
    </Component>
    <Component Id="DatabaseSqlsettings" 
Guid="45A30C59-27F5-4096-A937-92CA66D8F8F4">
      <File Id="Database.sqlsettings" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName)_Database.sqlsettings"
 KeyPath="yes"/>
    </Component>
    <Component Id="DATABASEDBSCHEMA" 
Guid="45A30C59-47F5-4096-A937-92CA66D8F8F4">
      <File Id="Database.dbschema" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\RBAC.dbschema" 
KeyPath="yes"/>
    </Component>
    <Component Id="DATABASEDBSCHEMA1" 
Guid="22B0FAE2-7460-4A90-88CD-06DBAB651128">
      <File Id="Database1.dbschema" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\WF_WorkflowDatabase.dbschema"
 KeyPath="yes"/>
    </Component>
    <Component Id="DATABASEDBSCHEMA2" 
Guid="A621C774-DEC9-43CE-B87A-434B4EEB96E8">
      <File Id="Database2.dbschema" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\GCI.dbschema" 
KeyPath="yes"/>
    </Component>
    <Component Id="DATABASEDBSCHEMA3" 
Guid="6511DA11-5DF5-40B8-9ED5-5B087790E9EF">
      <File Id="Database3.dbschema" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\BatchMonitor.dbschema" 
KeyPath="yes"/>
    </Component>
    <Component Id="DATABASEDBSCHEMA4" 
Guid="8A02001F-4E65-428F-96D0-FAF1B5776159">
      <File Id="Database4.dbschema" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName).dbschema"
 KeyPath="yes"/>
    </Component>
    <Component Id="DatabaseDeploymanifest" 
Guid="45A30C59-57F5-4096-A937-92CA66D8F8F4">
      <File Id="Database1.deploymanifest" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName).deploymanifest"
 KeyPath="yes"/>
    </Component>
    <!--<Component Id="MicrosoftSqlTypesDbschema" 
Guid="45A30C59-67F5-4096-A937-92CA66D8F8F4">
      <File Id="Microsoft.SqlTypes.dbschema" 
Source="$(var.MyDatabase.ProjectDir)\sql\debug\Microsoft.SqlTypes.dbschema" 
KeyPath="yes"/>
    </Component>-->
    <Component Id="PostDeploymentScript" 
Guid="45A30C59-77F5-4096-A937-92CA66D8F8F4">
      <File Id="Script.PostDeployment.sql" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName)_ScriptPostDeployment.sql"
 KeyPath="yes"/>
    </Component>
    <Component Id="PreDeploymentScript" 
Guid="45A30C59-87F5-4096-A937-92CA66D8F8F4">
      <File Id="Script.PreDeployment.sql" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName)_Script.PreDeployment.sql"
 KeyPath="yes"/>
    </Component>
    <Component Id="REFACTORLOG" Guid="8B2EAAB3-FBA5-4669-AD63-7F934A713DB6">
      <File Id="Database5.refactorlog" 
Source="$(var.Tenix.Nova.Database.ProjectDir)\sql\debug\$(var.Tenix.Nova.Database.ProjectName)_Transaction.refactorlog"
 KeyPath="yes"/>
    </Component>
    
  </DirectoryRef>
</Include>
<?xml version="1.0" encoding="utf-8"?>
<!--http://blogs.msdn.com/b/dukek/archive/2009/10/19/implementing-a-wix-installer-that-calls-the-gdr-version-of-vsdbcmd-exe.aspx-->
<Include>
  <!-- This ?define block wasn't working for me, the code paths were evaluating 
to C:\Program Files\Microsoft Visual Studio 10.0\VSTSDB\Deploy\ - which was 
wrong
          hence, commented out this part and have just set SrcArchPath 
explicitly
  <?if $(var.Platform)=x64 ?>
  <?define SrcArchPath = "C:\Program Files (x86)\Microsoft Visual Studio 
10.0\VSTSDB\Deploy\"?>
  <?else?>
  <?define SrcArchPath = "C:\Program Files\Microsoft Visual Studio 
10.0\VSTSDB\Deploy\"?>
  <?endif?>
  -->
  <?define SrcArchPath = "C:\Program Files (x86)\Microsoft Visual Studio 
10.0\VSTSDB\Deploy\"?>
  <!--
  Duke on checksum:
  This attribute tells the Windows Installer that the file has a checksum that 
may be used to validate that 
    the file hasn’t been tampered with. You should always set it to "yes" for 
executables (dll’s and exe’s). 
  -->
  <DirectoryRef Id="INSTALLLOCATION">
    <Component Id="MicrosoftDataSchema" 
Guid="AA67D22F-12E9-4034-BD7D-7210A43050BD">
      <File Id="Microsoft.Data.Schema.dll" 
Source="$(var.SrcArchPath)Microsoft.Data.Schema.dll" KeyPath="yes" 
Checksum="yes"/>
    </Component>
    <Component Id="MicrosoftDataSchemaScriptDom" 
Guid="AA17D22F-22E9-4034-BD7D-7210A43050BD">
      <File Id="Microsoft.Data.Schema.ScriptDom.dll" 
Source="$(var.SrcArchPath)Microsoft.Data.Schema.ScriptDom.dll" KeyPath="yes" 
Checksum="yes"/>
    </Component>
    <Component Id="MicrosoftDataSchemaScriptDomSql" 
Guid="AA67D22F-32E9-4034-BD7D-7210A43050BD">
      <File Id="Microsoft.Data.Schema.ScriptDom.Sql.dll" 
Source="$(var.SrcArchPath)Microsoft.Data.Schema.ScriptDom.Sql.dll" 
KeyPath="yes" Checksum="yes"/>
    </Component>
    <Component Id="MicrosoftDataSchemaSql" 
Guid="AA67D22F-42E9-4034-BD7D-7210A43050BD">
      <File Id="Microsoft.Data.Schema.Sql.dll" 
Source="$(var.SrcArchPath)Microsoft.Data.Schema.Sql.dll" KeyPath="yes" 
Checksum="yes"/>
    </Component>
    <Component Id="Vsdbcmd" Guid="AA67D22F-52E9-4034-BD7D-7210A43050BD">
      <File Id="vsdbcmd.exe" Source="$(var.SrcArchPath)vsdbcmd.exe" 
KeyPath="yes" Checksum="yes"/>
    </Component>
    <Component Id="VsdbcmdConfig" Guid="AA67D22F-52E9-4034-BD7D-7210A43050BA">
      <File Id="vsdbcmd.exe.config" 
Source="$(var.SrcArchPath)vsdbcmd.exe.config" KeyPath="yes" Checksum="yes"/>
    </Component>
  </DirectoryRef>

  <DirectoryRef Id="SqlServer">
    <Component Id="DatabaseSchemaProvidersExtensionsXml" 
Guid="AA67D22F-62E9-4034-BD7D-7210A43050BD">
      <File Id="DatabaseSchemaProviders.Extensions.Xml" 
Source="$(var.SrcArchPath)Extensions\SqlServer\DatabaseSchemaProviders.Extensions.xml"
 KeyPath="yes"/>
    </Component>
  </DirectoryRef>

  <!--<DirectoryRef Id="DbSchemas">
    <Component Id="MicrosoftSqlTypes" 
Guid="AA67D22F-12E9-4034-BD7D-7250A43050BD">
      <File Id="MicrosoftSqlTypesDbschema" 
Source="$(var.SrcArchPath)Extensions\SqlServer\2008\DBSchemas\Microsoft.SqlTypes.dbschema"
 KeyPath="yes"/>
    </Component>
  </DirectoryRef>-->
  <!--Install the Visual Studio 10.0 registry key if it doesn't exist. -->
  <!--This <Component> defines the registry key that will be 
        created assuming the <RegistrySearch> came back empty.-->
  <!--<Feature Id="RegistryPreReqs" Title="Registry Prerequisites" Level="1">
    <ComponentRef Id="RegistryEntries"/>
    <Condition Level="0">NOT VISUALSTUDIOREGISTRY</Condition>
  </Feature>-->

  <!--VSDBCMD requires this REGKEY to be installed. Note that this will NOT be 
true for the Visual Studio 2010 version-->
  <!--HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0-->

  <!-- Define the search for the Visual Studio 9.0 registry key -->
  <!--VISUALSTUDIOREGISTRY is a property that represents the results of the 
<RegistrySearch>. The 
          attributes of the element define the particular registry key to 
search for.-->
  <!--<Property Id="VISUALSTUDIOREGISTRY">
    <RegistrySearch Id="VisualStudio100Registry"
                    Root="HKCU"
                    Key="Software\Microsoft\VisualStudio\10.0"
                    Name="(Default)"
                    Type="raw" />
  </Property>-->

  <!-- Define the Visual Studio 9.0 Registry entry-->
  <!--<DirectoryRef Id="TARGETDIR">
    <Component Id="RegistryEntries" Guid="AA67D22F-12E9-4034-BD7D-7212A43050BD">
      <RegistryKey Root="HKCU"
                   Key="Software\Microsoft\VisualStudio\9.0"
                   Action="create"
                     >
        <RegistryValue Type="string" Name="(Default)" Value="Default Value" 
KeyPath="no"/>
      </RegistryKey>
    </Component>
  </DirectoryRef>-->
</Include>
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <!--
  Major upgrade : Change the product id, and version number details. Major 
upgrade will remove the existing installation and installed newly.
  Minor upgrade : Change the version number only. So it will run existing 
installed msi and update the changes components only.
  -->
        <Product Id="CB9E23FA-A661-4BDA-B3D8-8021691E1D4D" Name="WixRandD" 
Language="1033" Version="4.1.0" Manufacturer="WixRandD" 
UpgradeCode="1087D7E6-4ADD-427D-91A3-92323A2B4330">
    <!--<Product Id="0311021F-D47A-46BA-B047-0C09C4708C3E" Name="WixRandD" 
Language="1033" Version="1.1.0" Manufacturer="WixRandD" 
UpgradeCode="1087D7E6-4ADD-427D-91A3-92323A2B4330">-->
                <Package Keywords='Installer' InstallerVersion="200" 
Compressed="yes" />
    <!--Package Id="6F1AF4D4-8055-4A4D-8221-5F0DF18F9749" 
InstallerVersion="200" Compressed="yes" /-->
    <Upgrade Id="1087D7E6-4ADD-427D-91A3-92323A2B4330">
      <UpgradeVersion Minimum="4.1.0" IncludeMinimum="no" OnlyDetect="yes" 
Language="1033" Property="NEWPRODUCTFOUND" />
      <UpgradeVersion Minimum="4.1.0" IncludeMinimum="yes" Maximum="4.1.0" 
IncludeMaximum="yes" Language="1033" Property="UPGRADEFOUND" />
    </Upgrade>

    <MajorUpgrade AllowDowngrades="no" DowngradeErrorMessage="later version of 
[ProductName] is already installed. Setup will now exit." />
                <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

                <!--<?include $(var.SolutionDir)WixRandD\DatabaseArtifacts.wxi 
?>
                <?include $(var.SolutionDir)WixRandD\VsdbcmdArtifacts.wxi?>-->
                <?include $(var.ProjectDir)\DatabaseArtifacts.wxi ?>
                <?include $(var.ProjectDir)\VsdbcmdArtifacts.wxi?>
                
                <Feature Id="ProductFeature" Title="WixRandD" Level="1">
                        <ComponentRef Id="DatabaseSqlcmd"/>
                        <ComponentRef Id="DatabaseSqldeployment"/>
                        <ComponentRef Id="DatabaseSqlsettings"/>
                        <ComponentRef Id="DATABASEDBSCHEMA"/>
      <ComponentRef Id="DATABASEDBSCHEMA1"/>
      <ComponentRef Id="DATABASEDBSCHEMA2"/>
      <ComponentRef Id="DATABASEDBSCHEMA3"/>
      <ComponentRef Id="DATABASEDBSCHEMA4"/>
      <ComponentRef Id="REFACTORLOG"/>
                        <ComponentRef Id="DatabaseDeploymanifest"/>
                        <ComponentRef Id="PostDeploymentScript"/>
                        <ComponentRef Id="PreDeploymentScript"/>
                        <ComponentRef Id="MicrosoftDataSchema"/>
                        <ComponentRef Id="MicrosoftDataSchemaScriptDom"/>
                        <ComponentRef Id="MicrosoftDataSchemaScriptDomSql"/>
                        <ComponentRef Id="MicrosoftDataSchemaSql"/>
                        <ComponentRef Id="Vsdbcmd"/>
                        <ComponentRef Id="VsdbcmdConfig"/>
                        <ComponentRef 
Id="DatabaseSchemaProvidersExtensionsXml"/>
                        
                </Feature>

    <Property Id="USEINTEGRATEDSECURITY" Value="1" />
    
    <!--Property Id="UPGRADEFOUNDS" Value="true"/-->
                <!--Define the dialog to get the Server and Database name 
information from the user-->
                <UI>
                        <Dialog Id="DatabaseInformationDialog" Width="370" 
Height="270" Title="[ProductName] [Setup]" NoMinimize="yes">
                                <Control Id="ServerNameLabel" Type="Text" 
X="45" Y="73" Width="100" Height="15" TabSkip="no" Text="SQL Instance Name:" />
                                <Control Id="ServerNameEdit" Type="Edit" X="45" 
Y="85" Width="220" Height="18" Property="SERVERNAME" Text="{80}" />
                                <Control Id="DatabaseNameLabel" Type="Text" 
X="45" Y="110" Width="100" Height="15" TabSkip="no" Text="Database Name:" />
                                <Control Id="DatabaseNameEdit" Type="Edit" 
X="45" Y="122" Width="220" Height="18" Property="DATABASENAME" Text="{80}" />
        <Control Id="IntegratedSecurityCheckBox" Type="CheckBox"  X="45" 
Y="148" Text="Use Integrated Security" Property="USEINTEGRATEDSECURITY" 
Width="200" Height="15" CheckBoxValue="1" />
        <Control Id="UserNameLabel" Type="Text" X="45" Y="168" Width="100" 
Height="18" TabSkip="no" Text="&amp;User Name:" />
        <Control Id="UserNameEdit" Type="Edit" X="115" Y="168" Width="110" 
Height="18" Property="DBUSERNAME" Text="{50}">
          <Condition Action="disable" >USEINTEGRATEDSECURITY = 1</Condition>
          <Condition Action="enable"><![CDATA[USEINTEGRATEDSECURITY 
<>1]]></Condition>
        </Control>
        <Control Id="PasswordLabel" Type="Text" X="45" Y="188" Width="100" 
Height="18" TabSkip="no" Text="&amp;Password:" />
        <Control Id="PasswordEdit" Type="Edit" X="115" Y="188" Width="110" 
Height="18" Property="PASSWORD" Password="no" Text="{50}">
          <Condition Action="disable" >USEINTEGRATEDSECURITY = 1</Condition>
          <Condition Action="enable"><![CDATA[USEINTEGRATEDSECURITY 
<>1]]></Condition>
        </Control>
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" 
Height="17" Text="&amp;Back"/>
                                <Control Id="Next" Type="PushButton" X="236" 
Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next"/>
                                <Control Id="Cancel" Type="PushButton" X="304" 
Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
                                        <Publish Event="SpawnDialog" 
Value="CancelDlg">1</Publish>
                                </Control>
                                <Control Id="BannerBitmap" Type="Bitmap" X="0" 
Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
                                <Control Id="Description" Type="Text" X="25" 
Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
                                        <Text>”Please enter a SQL instance and 
database name.”</Text>
                                </Control>
                                <Control Id="BottomLine" Type="Line" X="0" 
Y="234" Width="370" Height="0" />
                                <Control Id="Title" Type="Text" X="15" Y="6" 
Width="200" Height="15" Transparent="yes" NoPrefix="yes">
                                        <Text>{\WixUI_Font_Title}”SQL instance 
and database information.”</Text>
                                </Control>
                                <Control Id="BannerLine" Type="Line" X="0" 
Y="44" Width="370" Height="0" />
                        </Dialog>
                </UI>

                <!--Define the overall user interface - this is based on the 
WixUI_Mondo dialog set-->
                <UI Id="MyWixUI">
                        <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" 
Size="8" />
                        <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" 
Size="12" />
                        <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" 
Size="9" Bold="yes" />
                        <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" 
/>
                        <Property Id="WixUI_Mode" Value="Mondo" />
                        <DialogRef Id="ErrorDlg" />
                        <DialogRef Id="FatalError" />
                        <DialogRef Id="FilesInUse" />
                        <DialogRef Id="MsiRMFilesInUse" />
                        <DialogRef Id="PrepareDlg" />
                        <DialogRef Id="ProgressDlg" />
                        <DialogRef Id="ResumeDlg" />
                        <DialogRef Id="UserExit" />
                        <Publish Dialog="ExitDialog" Control="Finish" 
Event="EndDialog" Value="Return" Order="999">1</Publish>
                        <Publish Dialog="WelcomeDlg" Control="Next" 
Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
                        <Publish Dialog="LicenseAgreementDlg" Control="Back" 
Event="NewDialog" Value="WelcomeDlg">1</Publish>
                        <Publish Dialog="LicenseAgreementDlg" Control="Next" 
Event="NewDialog" Value="DatabaseInformationDialog" Order="2">LicenseAccepted = 
"1"</Publish>
                        <Publish Dialog="DatabaseInformationDialog" 
Control="Next" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
                        <Publish Dialog="DatabaseInformationDialog" 
Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
                        <Publish Dialog="SetupTypeDlg" Control="Back" 
Event="NewDialog" Value="DatabaseInformationDialog">1</Publish>
                        <Publish Dialog="SetupTypeDlg" Control="Back" 
Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
                        <Publish Dialog="SetupTypeDlg" Control="TypicalButton" 
Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
                        <Publish Dialog="SetupTypeDlg" Control="CustomButton" 
Event="NewDialog" Value="CustomizeDlg">1</Publish>
                        <Publish Dialog="SetupTypeDlg" Control="CompleteButton" 
Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
                        <Publish Dialog="CustomizeDlg" Control="Back" 
Event="NewDialog" Value="UI2MaintenanceTypeDlg" Order="1">WixUI_InstallMode = 
"Change"</Publish>
                        <Publish Dialog="CustomizeDlg" Control="Back" 
Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = 
"InstallCustom"</Publish>
                        <Publish Dialog="CustomizeDlg" Control="Next" 
Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
                        <Publish Dialog="VerifyReadyDlg" Control="Back" 
Event="NewDialog" Value="CustomizeDlg" Order="1">WixUI_InstallMode = 
"InstallCustom"</Publish>
                        <Publish Dialog="VerifyReadyDlg" Control="Back" 
Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = 
"InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
                        <Publish Dialog="VerifyReadyDlg" Control="Back" 
Event="NewDialog" Value="CustomizeDlg" Order="3">WixUI_InstallMode = 
"Change"</Publish>
                        <Publish Dialog="VerifyReadyDlg" Control="Back" 
Event="NewDialog" Value="UI2MaintenanceTypeDlg" Order="4">WixUI_InstallMode = 
"Repair" OR WixUI_InstallMode = "Remove" </Publish>
                        <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" 
Event="NewDialog" Value="UI2MaintenanceTypeDlg">1</Publish>
                        <Publish Dialog="UI2MaintenanceTypeDlg" 
Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
                        <Publish Dialog="UI2MaintenanceTypeDlg" 
Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
                        <Publish Dialog="UI2MaintenanceTypeDlg" 
Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
                        <Publish Dialog="UI2MaintenanceTypeDlg" Control="Back" 
Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
                </UI>
                <UIRef Id="WixUI_Common" />

    <Property Id="CONNECTIONSTRING"/>
   
    
    <!--Define the custom action to build the vsdbcmd.exe command line string-->

    <CustomAction Id="Set_ConnectionString" Property="CONNECTIONSTRING" 
Value="Data Source=[SERVERNAME];Initial Catalog=[DATABASENAME];User 
ID=[DBUSERNAME];Password=[PASSWORD];Integrated Security=False;Pooling=False"/>

    <CustomAction Id="Set_ConnectionString1" Property="CONNECTIONSTRING" 
Value="Server=[SERVERNAME];Integrated Security=true;"/>
    
                <CustomAction Id="LaunchVsdbcmdCommandLine"
                                                                        
Property="LaunchVsdbcmd"
                                                                        
Value="&quot;[#vsdbcmd.exe]&quot; /a:Deploy /P:PerformDatabaseBackup=True 
/p:DeployDatabaseProperties=False /p:AlwaysCreateNewDatabase=False 
/cs:&quot;Server=[SERVERNAME];Integrated Security=true;&quot; /dsp:Sql /dd+ 
/script:C:\tenix.nova.Database.RBAC.sql /Model:&quot;[#Database.dbschema]&quot; 
/manifest:&quot;[#Database1.deploymanifest]&quot; 
/p:TargetDatabase=&quot;[DATABASENAME]&quot;"
                                                                        
Execute="immediate"/>
   
                <!--Define the custom action to execute vsdbcmd.exe-->
                <CustomAction Id="LaunchVsdbcmd" BinaryKey="WixCA" 
DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="yes"/>

    <CustomAction Id="LaunchWorkflow"
                  Property="WorkflowSchema"
                  Value="&quot;[#vsdbcmd.exe]&quot; /a:Deploy 
/P:PerformDatabaseBackup=True /p:DeployDatabaseProperties=False 
/p:AlwaysCreateNewDatabase=False /cs:&quot;Server=[SERVERNAME];Integrated 
Security=true;&quot; /dsp:Sql /dd+ /script:C:\tenix.nova.Database.Workflow.sql 
/Model:&quot;[#Database1.dbschema]&quot; 
/manifest:&quot;[#Database1.deploymanifest]&quot; 
/p:TargetDatabase=&quot;[DATABASENAME]&quot;"
                                                                        
Execute="immediate"/>
     
    <CustomAction Id="WorkflowSchema" BinaryKey="WixCA" DllEntry="CAQuietExec" 
Execute="deferred" Return="check" Impersonate="yes"/>

    <CustomAction Id="LaunchGCI"
                  Property="GCISchema"
                  Value="&quot;[#vsdbcmd.exe]&quot; /a:Deploy 
/P:PerformDatabaseBackup=True /p:DeployDatabaseProperties=False 
/p:AlwaysCreateNewDatabase=False /cs:&quot;Server=[SERVERNAME];Integrated 
Security=true;&quot; /dsp:Sql /dd+ /script:C:\tenix.nova.Database.GCI.sql 
/Model:&quot;[#Database2.dbschema]&quot; 
/manifest:&quot;[#Database1.deploymanifest]&quot; 
/p:TargetDatabase=&quot;[DATABASENAME]&quot;"
                                                                        
Execute="immediate"/>
    <CustomAction Id="GCISchema" BinaryKey="WixCA" DllEntry="CAQuietExec" 
Execute="deferred" Return="check" Impersonate="yes"/>

    <CustomAction Id="LaunchBatch"
                  Property="BatchSchema"
                  Value="&quot;[#vsdbcmd.exe]&quot; /a:Deploy 
/P:PerformDatabaseBackup=True /p:DeployDatabaseProperties=False 
/p:AlwaysCreateNewDatabase=False /cs:&quot;Server=[SERVERNAME];Integrated 
Security=true;&quot; /dsp:Sql /dd+ /script:C:\tenix.nova.Database.Batch.sql 
/Model:&quot;[#Database3.dbschema]&quot; 
/manifest:&quot;[#Database1.deploymanifest]&quot; 
/p:TargetDatabase=&quot;[DATABASENAME]&quot;"
                                                                        
Execute="immediate"/>
    <CustomAction Id="BatchSchema" BinaryKey="WixCA" DllEntry="CAQuietExec" 
Execute="deferred" Return="check" Impersonate="yes"/>

    <CustomAction Id="LaunchNova"
                                                                        
Property="NovaSchema"
                                                                        
Value="&quot;[#vsdbcmd.exe]&quot; /a:Deploy /P:PerformDatabaseBackup=True 
/p:DeployDatabaseProperties=False /p:AlwaysCreateNewDatabase=False 
/cs:&quot;Server=[SERVERNAME];Integrated Security=true;&quot; /dsp:Sql /dd+ 
/manifest:&quot;[#Database1.deploymanifest]&quot; 
/p:TargetDatabase=&quot;[DATABASENAME]&quot; /script:C:\tenix.nova.Database.sql"
                                                                        
Execute="immediate"/>
    <CustomAction Id="NovaSchema" BinaryKey="WixCA" DllEntry="CAQuietExec" 
Execute="deferred" Return="check" Impersonate="yes"/>

    <!--Define custom actions excution sequence. For example before deploying 
the nova schema, it should deploy all pre-request schema. The below code will 
    explain the sequence of Vsdbcmd command.
    Implement the condition for excute the custom action, it will execute first 
time installation or minor upgrade or major upgrade.
    -->
                <InstallExecuteSequence>
      <Custom Action="Set_ConnectionString1" Before="InstallInitialize">
        <![CDATA[USEINTEGRATEDSECURITY = 1]]>
      </Custom>
      <Custom Action="Set_ConnectionString" Before="InstallInitialize">
        <![CDATA[USEINTEGRATEDSECURITY <> 1]]>
      </Custom>
                        <Custom Action="LaunchVsdbcmdCommandLine" 
Before="InstallFiles"/>
                        <Custom Action="LaunchVsdbcmd" After="InstallFiles">
                                <!--Only run this custom action if a certain 
feature is being installed-->
        <![CDATA[NOT Installed OR NOT UPGRADEFOUNDS OR UPGRADINGPRODUCTCODE OR  
&ProductFeature=3]]>
        <!--<![CDATA[UPGRADEFOUNDS]]>-->
                        </Custom>
      <Custom Action="LaunchWorkflow" Before="InstallFiles"/>
      <Custom Action="WorkflowSchema" After="LaunchVsdbcmd">
        <!--Only run this custom action if a certain feature is being 
installed-->
        <![CDATA[NOT Installed OR NOT UPGRADEFOUNDS OR UPGRADINGPRODUCTCODE OR  
&ProductFeature=3]]>
        <!--<![CDATA[UPGRADEFOUNDS]]>-->
      </Custom>
      <Custom Action="LaunchGCI" Before="InstallFiles"/>
      <Custom Action="GCISchema" After="WorkflowSchema">
        <!--Only run this custom action if a certain feature is being 
installed-->
        <![CDATA[NOT Installed OR NOT UPGRADEFOUNDS OR UPGRADINGPRODUCTCODE OR  
&ProductFeature=3]]>
        <!--<![CDATA[UPGRADEFOUNDS]]>-->
      </Custom>
      <Custom Action="LaunchBatch" Before="InstallFiles"/>
      <Custom Action="BatchSchema" After="GCISchema">
        <!--Only run this custom action if a certain feature is being 
installed-->
        <![CDATA[NOT Installed OR NOT UPGRADEFOUNDS OR UPGRADINGPRODUCTCODE OR  
&ProductFeature=3]]>
        <!--<![CDATA[UPGRADEFOUNDS]]>-->
      </Custom>
      <Custom Action="LaunchNova" Before="InstallFiles"/>
      <Custom Action="NovaSchema" After="BatchSchema">
        <!--Only run this custom action if a certain feature is being 
installed-->
        <![CDATA[NOT Installed OR NOT UPGRADEFOUNDS OR UPGRADINGPRODUCTCODE OR  
&ProductFeature=3]]>
      </Custom>

     
                </InstallExecuteSequence>

    <Directory Id="TARGETDIR" Name="SourceDir">
                        <Directory Id="ProgramFilesFolder">
                                <Directory Id="INSTALLLOCATION" Name="WixRandD">
                                        <Directory Id="Extensions" 
Name="Extensions">
                                                <Directory Id="SqlServer" 
Name="SqlServer">
                                                        <Directory Id="__2008" 
Name="2008">
                                                                <Directory 
Id="DbSchemas" Name="DbSchemas">
                                                                </Directory>
                                                        </Directory>
                                                </Directory>
                                        </Directory>
                                </Directory>
                        </Directory>
                </Directory>
        </Product>
</Wix>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to