While trying to find out why Visual Studio 2005 Setup and Deployment Project fails to compile when I added MS SQL Server 2005 Express as the prerequisite, I came across
. In the former article, Mike, developer for the SQL Server 2005 Express, said that his team is going to release a bootstrapper for SQL Server 2005 Express SP2 (so that it can be included in the prerequisite) in mid-March, but till now, nothing has been released. In the latter article, Adam Grocholski rolled out his own bootstrapper, but his SqlExpressSP2Chk.exe requires .NET Framework 2 to be installed, so it fails on a clean installation of Windows.
Given these circumstances, I rolled out my own bootstrapper.
What it does:
1) Checks that the
. If not, flags an error.
2) Installs SQL Express SP2 if it is not installed.
3) Upgrades SQL Express to SP2 if a CTP, RTM or SP1 version is installed.
Tested to be working on:
1) Clean installation of Windows XP SP2.
If you want the bootstrapper too, just follow the following procedure.
1) Create the folder C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\SqlExpressSP2
2)
and place it in the above folder.
3) Create a product.xml in the above folder with the following content. This is where the installation logic resides.
<?xml version="1.0" encoding="utf-8"?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.Sql.Server.Express.SP2">
<RelatedProducts>
<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
<DependsOnProduct Code="Microsoft.Windows.Installer.3.1" />
</RelatedProducts>
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="sqlexpr.exe" HomeSite="SqlExprExe" PublicKey="3082010A0282010100CD819638AE5CA2F2C1DFDED0AB958DD63C9D1F8BC35D862E5DF0B172F5ABAC886AB5DAB1227B0BC8C8A54B915E2213E9F9F5239DB5F46E76AEEFEEA43CC7C4C0595C3FABB3733326A662816179A162F46E8895D06EDDC79FD2A451117661BA708A65A1961689A75D81D04466E5DB569E40CAFCDC76242E443000E5D67D7B9511D5581DA3E84F0BC988DCA2D653996CCA63CA996A9A925E4C4D11E82FD35B5B5E5F52A3732DA5BB84450D8C191576CB08DA9AA67015E84DEC69FD5DB26B8FED295137388BC6464915945098B0F468A4D7DE097167749E778C1D856B97EAE75F45CCE0E6710DD16300937B31988E0BB413BDB3D0EEF1DF21EEA96061EE37433DC30203010001" />
</PackageFiles>
<InstallChecks>
<RegistryCheck Property="SQLExpressVersion" Key="HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion" Value="CurrentVersion" />
<!-- Values: -->
<!-- June CTP 9.00.1187.07 -->
<!-- RTM 9.00.1399.06 -->
<!-- SP1 9.00.2047.00 -->
<!-- SP2 9.00.3042.00 -->
</InstallChecks>
<!-- Supported Operating Systems: Windows 2000 Service Pack 4; Windows Server 2003 Service Pack 1; Windows XP Service Pack 2 -->
<Commands Reboot="Defer">
<!-- Windows 2000 SP4 -->
<!-- No SQL Express 2005 -->
<!-- x86 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if SQL 2005 Express CTP, RTM, SP1, SP2 or higher -->
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value="9.00" />
<!-- Skip if Windows XP, 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.1" />
<!-- Skip if x64 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="AMD64" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2000 SP4 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.0.4" String="InvalidPlatform2K" />
<!-- Block install if NOT x86 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows 2000 SP4 -->
<!-- No SQL Express 2005 -->
<!-- x64 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if SQL 2005 Express CTP, RTM, SP1, SP2 or higher -->
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value="9.00" />
<!-- Skip if Windows XP, 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.1" />
<!-- Skip if x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="Intel" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2000 SP4 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.0.4" String="InvalidPlatform2K" />
<!-- Block install if NOT x64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows XP SP2 -->
<!-- No SQL Express 2005 -->
<!-- x86 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if SQL 2005 Express CTP, RTM, SP1, SP2 or higher -->
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value="9.00" />
<!-- Skip if OS less than Windows XP -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.1" />
<!-- Skip if Windows 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.2" />
<!-- Skip if x64 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="AMD64" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows XP SP2 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.1.2" String="InvalidPlatformXP" />
<!-- Block install if NOT x86 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows XP SP2 -->
<!-- No SQL Express 2005 -->
<!-- x64 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if SQL 2005 Express CTP, RTM, SP1, SP2 or higher -->
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value="9.00" />
<!-- Skip if OS less than Windows XP -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.1" />
<!-- Skip if Windows 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.2" />
<!-- Skip if x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="Intel" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows XP SP2 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.1.2" String="InvalidPlatformXP" />
<!-- Block install if NOT x64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows 2003 SP1 -->
<!-- No SQL Express 2005 -->
<!-- x86 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if SQL 2005 Express CTP, RTM, SP1, SP2 or higher -->
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value="9.00" />
<!-- Skip if OS less than Windows 2003 -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.2" />
<!-- Skip if x64 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="AMD64" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2003 SP1 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.2.1" String="InvalidPlatformXP" />
<!-- Block install if NOT x86 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows 2003 SP1 -->
<!-- No SQL Express 2005 -->
<!-- x64 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if SQL 2005 Express CTP, RTM, SP1, SP2 or higher -->
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value="9.00" />
<!-- Skip if OS less than Windows 2003 -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.2" />
<!-- Skip if x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="Intel" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2003 SP1 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.2.1" String="InvalidPlatformXP" />
<!-- Block install if NOT x64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows 2000 SP4 -->
<!-- SQL Express 2005 CTP, RTM, SP1 -->
<!-- x86 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress reinstall=all reinstallmode=omus instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if no SQL Express -->
<BypassIf Property="SQLExpressVersion" Compare="ValueNotExists" />
<!-- Skip if NOT SQL 2005 Express CTP, RTM, SP1 -->
<BypassIf Property="SQLExpressVersion" Compare="VersionLessThan" Value="9.00" />
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value ="9.00.3042" />
<!-- Skip if Windows XP, 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.1" />
<!-- Skip if x64 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="AMD64" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2000 SP4 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.0.4" String="InvalidPlatform2K" />
<!-- Block install if NOT x86 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows 2000 SP4 -->
<!-- SQL Express 2005 CTP, RTM, SP1 -->
<!-- x64 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress reinstall=all reinstallmode=omus instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if no SQL Express -->
<BypassIf Property="SQLExpressVersion" Compare="ValueNotExists" />
<!-- Skip if NOT SQL 2005 Express CTP, RTM, SP1 -->
<BypassIf Property="SQLExpressVersion" Compare="VersionLessThan" Value="9.00" />
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value ="9.00.3042" />
<!-- Skip if Windows XP, 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.1" />
<!-- Skip if x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="Intel" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2000 SP4 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.0.4" String="InvalidPlatform2K" />
<!-- Block install if NOT x64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows XP SP2 -->
<!-- SQL Express 2005 CTP, RTM, SP1 -->
<!-- x86 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress reinstall=all reinstallmode=omus instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if no SQL Express -->
<BypassIf Property="SQLExpressVersion" Compare="ValueNotExists" />
<!-- Skip if NOT SQL 2005 Express CTP, RTM, SP1 -->
<BypassIf Property="SQLExpressVersion" Compare="VersionLessThan" Value="9.00" />
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value ="9.00.3042" />
<!-- Skip if OS less than Windows XP -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.1" />
<!-- Skip if Windows 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.2" />
<!-- Skip if x64 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="AMD64" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows XP SP2 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.1.2" String="InvalidPlatformXP" />
<!-- Block install if NOT x86 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows XP SP2 -->
<!-- SQL Express 2005 CTP, RTM, SP1 -->
<!-- x64 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress reinstall=all reinstallmode=omus instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if no SQL Express -->
<BypassIf Property="SQLExpressVersion" Compare="ValueNotExists" />
<!-- Skip if NOT SQL 2005 Express CTP, RTM, SP1 -->
<BypassIf Property="SQLExpressVersion" Compare="VersionLessThan" Value="9.00" />
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value ="9.00.3042" />
<!-- Skip if OS less than Windows XP -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.1" />
<!-- Skip if Windows 2003 or higher -->
<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="5.2" />
<!-- Skip if x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="Intel" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows XP SP2 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.1.2" String="InvalidPlatformXP" />
<!-- Block install if NOT x64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows 2003 SP1 -->
<!-- SQL Express 2005 CTP, RTM, SP1 -->
<!-- x86 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress reinstall=all reinstallmode=omus instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if no SQL Express -->
<BypassIf Property="SQLExpressVersion" Compare="ValueNotExists" />
<!-- Skip if NOT SQL 2005 Express CTP, RTM, SP1 -->
<BypassIf Property="SQLExpressVersion" Compare="VersionLessThan" Value="9.00" />
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value ="9.00.3042" />
<!-- Skip if OS less than Windows 2003 -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.2" />
<!-- Skip if x64 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="AMD64" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2003 SP1 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.2.1" String="InvalidPlatformXP" />
<!-- Block install if NOT x86 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Windows 2003 SP1 -->
<!-- SQL Express 2005 CTP, RTM, SP1 -->
<!-- x64 -->
<Command PackageFile="sqlexpr.exe" Arguments="-q /norebootchk /qn reboot=ReallySuppress reinstall=all reinstallmode=omus instancename=SQLEXPRESS SQLAUTOSTART=1"
EstimatedInstalledBytes="225000000" EstimatedTempBytes="225000000" EstimatedInstallSeconds="420">
<InstallConditions>
<!-- Skip if no SQL Express -->
<BypassIf Property="SQLExpressVersion" Compare="ValueNotExists" />
<!-- Skip if NOT SQL 2005 Express CTP, RTM, SP1 -->
<BypassIf Property="SQLExpressVersion" Compare="VersionLessThan" Value="9.00" />
<BypassIf Property="SQLExpressVersion" Compare="VersionGreaterThanOrEqualTo" Value ="9.00.3042" />
<!-- Skip if OS less than Windows 2003 -->
<BypassIf Property="VersionNT" Compare="VersionLessThan" Value="5.2" />
<!-- Skip if x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="Intel" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<!-- Block install on Windows 9x -->
<FailIf Property="Version9x" Compare="ValueExists" String="InvalidPlatform" />
<!-- Block install on OS less than Windows 2003 SP1 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.2.1" String="InvalidPlatformXP" />
<!-- Block install if NOT x64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="1706" Result="Fail" String="AnotherSqlServerInstalled"/>
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="50037" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50251" Result="Fail" String="MissingMSXml" />
<ExitCode Value="50198" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50236" Result="Fail" String="InsufficientHardware" />
<ExitCode Value="50222" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="70003" Result="Fail" String="InvalidPlatformOSServicePacks" />
<ExitCode Value="50247" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="50248" Result="Fail" String="InvalidPaltformIE" />
<ExitCode Value="70004" Result="Fail" String="AnotherInstanceRunning" />
<ExitCode Value="70032" Result="Fail" String="BetaComponentsFailure" />
<ExitCode Value="70033" Result="Fail" String="InvalidPlatformArchitecture" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
<Strings>
<!-- <String Name="SqlExprExe32">http://go.microsoft.com/fwlink/?LinkId=65212&clcid=0x409</String> -->
<String Name="SqlExprExe">http://go.microsoft.com/fwlink/?LinkID=83387&clcid=0x409</String>
</Strings>
</Product>
4) Create the folder C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\SqlExpressSP2\en. I'll call this the en folder.
5) Copy eula.txt from C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\SqlExpress\en to the en folder.
6) Create a package.xml in the en folder with the following content. This is where the localized text resides.
The bootstrapper creation is now complete.
To use the bootstrapper follow the steps said by Adam Grocholski (copied here for your convenience):
1. Fire up Visual Studio 2005.
2. Create a Setup and Deployment project.
3. Go to the Projects menu and click Properties.
4. Click the Prerequisites button.
5. You should see an entry in the prerequisites list for SQL Server 2005 Express Edition SP2.
6. Select the prerequisite(s) you want and select the "Download prerequisites from the same locations as my application" option.
7. Click OK.
8. Click Apply and OK.
9. Build you Setup and Deployment project.
10. SQL Server Express 2005 SP2 will now be deployed with your application.
Edit: I've just realised that sqlexpr.exe should be instead placed in the en folder, and the related install logic should go there too, as sqlexpr.exe is a localized program. The Japanese version is another program by itself.