My application Requires MS SQL Server as one of its Prerequisite.Now i want to upgrade the client machine to MS SQL Server 2008 R2 express edition if they have MS SQL Server 2005 express edition. i am unable to implement it. below is the Wix code i am using for downloading and installing MS SQL server 2008 R2 express edition when no SQL server is installed on client machine.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\MyInstanceName"
Variable="Instance"
Result="exists"
/>
<PackageGroup Id="SqlServer2008R2">
<ExePackage InstallCommand='/q /action=INSTALL /HIDECONSOLE /IACCEPTSQLSERVERLICENSETERMS=1 /FEATURES=SQLEngine /INSTANCENAME=MyInstanceName /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /SECURITYMODE=SQL /SAPWD=abc#Wd1234 /ADDCURRENTUSERASSQLADMIN=TRUE /SQLSYSADMINACCOUNTS="NT AUTHORITY\SYSTEM" /TCPENABLED=1 /NPENABLED=1'
InstallCondition="NOT VersionNT64"
DetectCondition="Instance"
Compressed="no"
Vital="yes"
PerMachine="yes"
Name="SQLEXPR32_x86_ENU.exe"
Permanent="yes"
Cache="no"
DownloadUrl="http://download.microsoft.com/download/5/1/A/51A153F6-6B08- 4F94-A7B2-BA1AD482BC75/SQLEXPR32_x86_ENU.exe"
>
<RemotePayload
Size="60995936"
ProductName="Microsoft SQL Server 2008 R2 Express"
Description="Microsoft SQL Server 2008 R2 Express"
Version="10.50.1600.1"
CertificatePublicKey="672605E36DD71EC6B8325B91C5FE6971390CB6B6"
CertificateThumbprint="9617094A1CFB59AE7C1F7DFDB6739E4E7C40508F"
Hash="ACF5494D18EDF117A2683D66A96FB8954F98D86D"
/>
</ExePackage>
</PackageGroup>
</Fragment>
</Wix>
You cannot use the /action=INSTALL parameter for upgrading an instance only installing a new one. You will have to create another ExePackage with the /action=UPGRADE and setup the InstallCondition to choose the correct one based on the registry searches you do:
<ExePackage Id="SqlExpress2008R2_UpgradeNamedInstance"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="no"
Vital="yes"
InstallCommand="/QS /ACTION=Upgrade /IACCEPTSQLSERVERLICENSETERMS /BROWSERSVCSTARTUPTYPE=Automatic /INSTANCENAME="[SqlInstance]""
Name="redist\SQLEXPR_x86_ENU.exe"
DownloadUrl="http://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7-0F37455F35EA/SQLEXPR_x86_ENU.exe"
InstallCondition="SqlInstance AND SqlServerInstalled AND NOT SQLServer2008R2Installed">
<RemotePayload ProductName="SQL Server 2008 R2 Express SP1"
Description="SQL Server 2008 R2 Express SP1"
CertificatePublicKey="5C499B10F7EF186DC729991A262AB52066423909"
CertificateThumbprint="93859EBF98AFDEB488CCFA263899640E81BC49F1"
Hash="6F399D641F322A3E47E3DD605F2A2EDF21074375"
Size="111274848"
Version="10.50.2500.0" />
</ExePackage>
Related
I am new to wix and I am working on a bootstrapper application which installs prerequisites which are required to install my software. Sql Server 2014 is one of the prerequisites. When the bootstrapper runs it fails with an error 0x851a0012. Can someone point out what am I doing wrong.
<?define SqlInstanceName=MySqlInstance?>
<?define SqlInstallCommand=/ACTION=Install /Q /IACCEPTSQLSERVERLICENSETERMS /SkipRules=RebootRequiredCheck /FEATURES=SQLEngine /INSTANCENAME=$(var.SqlInstanceName) /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /SECURITYMODE=SQL ?>
<?define SqlUninstallCommand=/ACTION=Uninstall /Q /FEATURES=SQLEngine /INSTANCENAME=$(var.SqlInstanceName) ?>
<Fragment>
<!-- TODO: Put your code here.-->
<util:RegistrySearch Id="regsearchSqlInstanceFound"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="$(var.SqlInstanceName)"
Result="exists"
Variable="SqlInstanceFound"/>
<PackageGroup Id="SqlServerPackageGroup">
<ExePackage SourceFile="SQLEXPR_x64_ENU.exe"
DetectCondition="SqlInstanceFound"
InstallCommand="$(var.SqlInstallCommand)"
UninstallCommand="$(var.SqlUninstallCommand)"
RepairCommand="$(var.SqlRepairCommand)" />
</PackageGroup>
</Fragment>
This is a test Project wanted to implement Sql Server First get it running and then include my msi package in the bootstrapper.
I am trying to set up an installation, with sql express 2014 as a prerequisite. The installation itself works fine, but when uninstalling, the instance is not removed. I can still access it through my sql manager and find it in the registry.
This is my Chain:
<Chain>
<ExePackage
Id="Netfx4Full"
Name="dotNetFx40_Full_x86_x64.exe"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="packages\dotNetFx40_Full_x86_x64.exe"
DownloadUrl="https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
DetectCondition="Net4FullVersion AND (NOT VersionNT64 OR Net4x64FullVersion)"
InstallCondition="(VersionNT < v6.0 OR VersionNT64 < v6.0) AND (NOT (Net4FullVersion OR Net4x64FullVersion))">
</ExePackage>
<PackageGroupRef Id="Sql2014Express"/>
<RollbackBoundary />
<MsiPackage Id="MainPackage" SourceFile="MyApplication.msi" DisplayInternalUI="yes" Compressed="yes" Vital="yes" />
</Chain>
This is my ExePackage:
<PackageGroup Id="Sql2014Express">
<ExePackage Id="SQL2014Expressx64"
InstallCondition="VersionNT64 AND NOT SQL2014x64InstanceInstalled"
SourceFile="packages\SQLEXPR_x64_ENU.exe"
DownloadUrl="$(var.SqlWebLink64)"
DisplayName="Installing Microsoft SQL Express 2014"
InstallCommand="/ACTION=Install /INSTANCENAME=$(var.InstanceName) /FEATURES=SQLENGINE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ASSYSADMINACCOUNTS=BUILTIN\Administrators /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /BROWSERSVCSTARTUPTYPE=Disabled /ADDCURRENTUSERASSQLADMIN=true /TCPENABLED=1"
UninstallCommand="/Action=Uninstall /INSTANCENAME=$(var.InstanceName) /FEATURES=SQLENGINE /Q /HIDECONSOLE"
Cache="yes"
Vital="yes"
Compressed="no"
PerMachine="yes"
Permanent="no"/>
...
</PackageGroup>
From what i understand, the Permanent="no", should take care of removing the package on uninstall. I have even included and UninstallCommand, but this does not remove the instance either.
What am I missing here?
Let me know if any other info is required to solve this. - Thx!
Exe packages require a DetectCondition to be able to verify whether or not the package is installed. If you notice in your .net exepackage you have
DetectCondition="Net4FullVersion AND (NOT VersionNT64 OR Net4x64FullVersion)"
This tells the installer that this package is installed iff the condition is true. You have to do the same thing in your SQL exe package.
DetectCondition is
A condition that determines if the package is present on the target system. This condition can use built-in variables and variables returned by searches. This condition is necessary because Windows doesn't provide a method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this package during a bundle action; for example, if this condition is false or omitted and the bundle is being installed, Burn will install this package.
You can do this by creating some registry searches which set some variables. Try this registry search
<util:RegistrySearch
Id='MicrosoftSQLInstalledCheck'
Root='HKLM'
Key='SOFTWARE\Microsoft\Microsoft SQL Server\$(var.InstanceName)\Setup'
Win64='yes'
Value='SQLPath'
Result='exists'
Variable='MicrosoftSQLInstalled'/>
Then in your ExePackage for SQL you can put DetectCondition="MicrosoftSQLInstalled" and that will be true if the registry search found the SQLPath registry entry in the key specified.
I'm able to install SQL Server 2005 Express with the bootstrapper, but I can't seem to be able to install the default instance.
I have tried
<Property Id="SQLInstance" Value="MSSQLSERVER" />
<ExePackage Id="SQL2005Express" DisplayName="SQL Server 2005 EXPRESS" Cache="yes" Compressed="yes"
InstallCondition="not SqlInstanceKeyFound"
DetectCondition="SqlInstanceKeyFound"
PerMachine="yes" Permanent="yes" Vital="yes" Name="SQLEXPR.EXE" SourceFile="$(var.ThirdToolsSrc)\SQLEXPR.EXE"
InstallCommand="/qn ADDLOCAL=All SECURITYMODE=SQL [SqlVariable] DISABLENETWORKPROTOCOLS=0 INSTANCENAME=[SQLInstance]">
<ExitCode Value ="3010" Behavior="forceReboot" />
</ExePackage>
This will create an instance [MACHINENAME]\SQLEXPRESS, I tried without specifying the InstanceName parameter but got the same result.
Looking at this page, I don't see what I can change to be able to add the default instance.
I want to have the DefaultInstance to be [MachineName] only
Thanks.
Finally, I figured what was causing the problem, event though it seems a bit weird to me, but I was able to get the required result.
ORIGINAL CODE
<ExePackage Id="SQL2005Express" DisplayName="SQL Server 2005 EXPRESS" Cache="yes" Compressed="yes"
InstallCondition="not SqlInstanceKeyFound"
DetectCondition="SqlInstanceKeyFound"
PerMachine="yes" Permanent="yes" Vital="yes" Name="SQLEXPR.EXE" SourceFile="$(var.ThirdToolsSrc)\SQLEXPR.EXE"
InstallCommand="/qn ADDLOCAL=All SECURITYMODE=SQL [SqlVariable] DISABLENETWORKPROTOCOLS=0 INSTANCENAME=[SQLInstance]">
MODIFIED CODE (Working)
I didnèt think that the order of the parameters were important , but it seems that they are.
I'm trying to determine is it LocalDb installed and i tried to go the way from this link Determine if SqlLocalDB is installed
But i've got an error on my log file that: Registry key not found. Key = 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12E.LOCALDB\MSSQLServer\CurrentVersion'
My code is:
<util:RegistrySearch Id="SearchForLocalDB"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12E.LOCALDB\MSSQLServer\CurrentVersion"
Value="CurrentVersion"
Variable="LocalDBVersion"
Result="value"/>
<PackageGroup Id="LOCALDB">
<MsiPackage Id="LOCALDB"
DisplayName="Microsoft SQL Server 2014"
Permanent="yes"
Visible="yes"
DisplayInternalUI="yes"
SourceFile=".\SqlLocalDB.msi"
InstallCondition="(LocalDBVersion <= "12.0")"
/>
</PackageGroup>
Use Result='exists' rather than pulling the actual value. You already have the version in the key value so you don't need to check for it in the InstallCondition.
I have this bootstrap project that needs to detect if SQL Server is installed or not. If it is installed, then it skips the installing. If it is not, it should then installs SQL Express 2012. The exe installer was compiled fine, however, when I was testing the installer, I always got this error and I can't find any reason that is wrong. The machine I was testing on had the SQL server installed but it still detects no SQL installed. It then continue to install but it gets the Error 0x858c0014: Process returned error:
Failed to execute EXE package. Failed to configure per-machine EXE package.
Here is my wxs file:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
<?define InstanceName = "SQLEXPRESS" ?>
<Bundle Name="EasyLobby11 Database Setup" Version="1.0.0.0" Manufacturer="Microsoft" UpgradeCode="4f09f7d9-f894-42b2-a865-6ae460a09c7e">
<BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<PackageGroupRef Id="Sql2012Express"/>
</Chain>
</Bundle>
<Fragment>
<util:RegistrySearch
Id="SqlInstanceKeyFound"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="InstanceName"
Result="exists"
Variable="SqlInstanceKeyFound" />
<util:RegistrySearch
Id="SqlInstanceKey"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="InstanceName"
Variable="SqlInstanceKey"
After="SqlInstanceKeyFound"
Condition="SqlInstanceKeyFound" />
<util:RegistrySearch
Id="SqlInstanceFound"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SqlInstanceKey]"
Result="exists"
Variable="SqlInstanceFound"
After="SqlInstanceKey"
Condition="SqlInstanceKeyFound" />
<util:RegistrySearch
Id="SqlVersion"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SqlInstanceKey]\Setup"
Value="Version"
Variable="SqlVersion"
After="SqlInstanceKey"
Condition="SqlInstanceFound" />
<PackageGroup Id="Sql2012Express">
<ExePackage
Id="Sql2012Express"
DisplayName="Installing SQL Server Express 2012"
SourceFile="SQLEXPR_x86_ENU.exe"
Name="SQLEXPR_x86_ENU.exe"
DownloadUrl="http://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1- A1533227CD69/SQLEXPR_x86_ENU.exe "
Compressed="no"
PerMachine="yes"
Cache ="yes"
InstallCondition="(Not SqlInstanceKeyFound) AND (NOT SqlInstanceFound)"
DetectCondition= "SqlInstanceFound"
Vital="yes"
Permanent="yes"
InstallCommand="/ACTION=Install /INSTANCENAME=$(var.InstanceName) /FEATURES=SQL /SECURITYMODE=SQL [SqlVariable] /TCPENABLED=1 /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE'" /SQLSVCSTARTUPTYPE=Manual /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /ADDCURRENTUSERASSQLADMIN=FALSE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms"
UninstallCommand="/Action=Uninstall /INSTANCENAME=InstanceName /FEATURES=SQL /Q /HIDECONSOLE"
RepairCommand="/ACTION=Repair /INSTANCENAME=InstanceName /Q /HIDECONSOLE">
<ExitCode Value ="3010" Behavior="forceReboot" />
<dep:Provides DisplayName="Net2 SQL Server 2012 Express" Key="SQLServer2012Express,$(var.InstanceName)" Version="11.0.3000.0" />
</ExePackage>
<ExePackage Id="Sql2012ExpressUpgrade"
DisplayName="SQL Server 2012 Express Upgrade"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
Name="SQLEXPR_x86_ENU.exe"
SourceFile="SQLEXPR_x86_ENU.exe"
DownloadUrl="http://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPR_x86_ENU.exe "
InstallCondition="(Not SqlInstanceKeyFound) AND (NOT SqlInstanceFound)"
InstallCommand="/ACTION=Upgrade /INSTANCENAME=InstanceName /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms"
DetectCondition="NOT (SqlInstanceFound AND (SqlVersion < v11.0.0.0))">
<ExitCode Value ="3010" Behavior="forceReboot" />
</ExePackage>
<ExePackage Id="Sql2012ExpressEditionUpgrade"
DisplayName="SQL Server 2012 SP1 Express Patch"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
Name="SQLEXPR_x86_ENU.exe"
SourceFile="SQLEXPR_x86_ENU.exe"
DownloadUrl="http://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPR_x86_ENU.exe "
InstallCondition="(Not SqlInstanceKeyFound) AND (NOT SqlInstanceFound)"
InstallCommand="/ACTION=Patch /INSTANCENAME=$(var.InstanceName) /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms"
DetectCondition="NOT (SqlInstanceFound AND (SqlVersion > v11.0.0.0) AND (SqlVersion < v11.0.3000.0))">
<ExitCode Value ="3010" Behavior="forceReboot" />
</ExePackage>
</PackageGroup>
</Fragment>
</Wix>
Configuring SQL is quite a complicated job.
I just started working on Wix Packaging recently for my project.
I actually took your configuration to start with and done a few tweaks to the configuration.
I am also handling x86 and x64 packaging based on system type.
You can omit any of them if they are not relevant to you.
Hence, I am publishing a working copy of my configuration, so that it might help you.
<Fragment>
<?define InstanceName = "SQLEXPRESS" ?>
<util:RegistrySearch Id="SQL2012x64InstanceExists"
Variable="SQL2012x64InstanceExists"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="$(var.InstanceName)"
Win64="yes"
Result="exists"/>
<util:RegistrySearch Id="SQL2012x64InstanceKey"
Variable="SQL2012x64InstanceKey"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="$(var.InstanceName)"
Win64="yes"
After="SQL2012x64InstanceExists"
Condition="SQL2012x64InstanceExists" />
<util:RegistrySearch Id="SQL2012x64InstanceInstalled"
Variable="SQL2012x64InstanceInstalled"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SQL2012x64InstanceKey]"
Result="exists"
Win64="yes"
After="SQL2012x64InstanceKey"
Condition="SQL2012x64InstanceExists" />
<util:RegistrySearch Id="SQLx64Version"
Variable="SQLx64Version"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SQL2012x64InstanceKey]\Setup"
Value="Version"
Win64="yes"
After="SQL2012x64InstanceKey"
Condition="SQL2012x64InstanceInstalled" />
<util:RegistrySearch Id="SQL2012x86InstanceExists"
Variable="SQL2012x86InstanceExists"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="$(var.InstanceName)"
Win64="no"
Result="exists"/>
<util:RegistrySearch Id="SQL2012x86InstanceKey"
Variable="SQL2012x86InstanceKey"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="$(var.InstanceName)"
Win64="no"
After="SQL2012x86InstanceExists"
Condition="SQL2012x86InstanceExists" />
<util:RegistrySearch Id="SQL2012x86InstanceInstalled"
Variable="SQL2012x86InstanceInstalled"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SQL2012x86InstanceKey]"
Result="exists"
Win64="no"
After="SQL2012x86InstanceKey"
Condition="SQL2012x86InstanceExists" />
<util:RegistrySearch Id="SQLx86Version"
Variable="SQLx86Version"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SQL2012x86InstanceKey]\Setup"
Value="Version"
Win64="no"
After="SQL2012x86InstanceKey"
Condition="SQL2012x86InstanceInstalled" />
<PackageGroup Id="SQLServer2012Express">
<ExePackage Id="SQL2012Expressx64"
InstallCondition="VersionNT64 AND NOT SQL2012x64InstanceInstalled"
SourceFile="$(var.MyDir)\SQLEXPR_x64_ENU.exe"
DisplayName="Installing Microsoft® SQL Server® 2012 - Express Edition..."
InstallCommand="/ACTION=Install /INSTANCENAME=SQLEXPRESS /FEATURES=SQLENGINE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ASSYSADMINACCOUNTS=BUILTIN\Administrators /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /BROWSERSVCSTARTUPTYPE=Disabled /ADDCURRENTUSERASSQLADMIN=true /TCPENABLED=1"
Permanent="yes"/>
<ExePackage Id="SQL2012Updatex64"
InstallCondition="VersionNT64 AND (SQL2012x64InstanceInstalled AND SQLx64Version < v11.0.0.0)"
DisplayName="Upgrading SQL Server to SQL Server Express 2012..."
InstallCommand='/IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE /ACTION=Upgrade /QUIET=True /INSTANCENAME=SQLEXPRESS /SkipRules=RebootRequiredCheck'
SourceFile="$(var.MyDir)\SQLEXPR_x64_ENU.exe"
Permanent="yes"/>
<ExePackage Id="SQL2012Expressx86"
InstallCondition="NOT VersionNT64 AND NOT SQL2012x86InstanceInstalled"
SourceFile="$(var.MyDir)\SQLEXPR_x86_ENU.exe"
DisplayName="Installing Microsoft® SQL Server® 2012 - Express Edition..."
InstallCommand="/ACTION=Install /INSTANCENAME=SQLEXPRESS /FEATURES=SQLENGINE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ASSYSADMINACCOUNTS=BUILTIN\Administrators /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /BROWSERSVCSTARTUPTYPE=Disabled /ADDCURRENTUSERASSQLADMIN=true /TCPENABLED=1"
Permanent="yes"/>
<ExePackage Id="SQL2012Updatex86"
InstallCondition="NOT VersionNT64 AND (SQL2012x86InstanceInstalled AND SQLx86Version < v11.0.0.0)"
DisplayName="Upgrading SQL Server to SQL Server Express 2012..."
InstallCommand='/IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE /ACTION=Upgrade /QUIET=True /INSTANCENAME=SQLEXPRESS /SkipRules=RebootRequiredCheck'
SourceFile="$(var.MyDir)\SQLEXPR_x86_ENU.exe"
Permanent="yes"/>
</PackageGroup>
Hope it helps you.
-- Naga Sreenivas Gupta V