完成後,在同一個文件夾中打開package.xml
文件並對其進行修改以滿足您的需要。下面是我修改後的樣子。
<!-- Defines a new installation (x86) -->
<Command PackageFile="SQLEXPR32_x86_ENU.EXE"
Arguments='/q /hideconsole /action=Install /features=SQL /instancename=SQLEXPRESS /enableranu=1 /AddCurrentUserAsSqlAdmin /IAcceptSqlServerLicenseTerms /skiprules=RebootRequiredCheck'
EstimatedInstalledBytes="225000000"
EstimatedInstallSeconds="420">
<InstallConditions>
<FailIf Property="VersionNT" Compare="ValueNotExists" String="InvalidPlatformOS"/>
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.0.0" String="InvalidPlatformOS"/>
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.0.2" String="InvalidPlatformOSServicePack"/>
<FailIf Property="VersionNT" Compare="VersionEqualTo" Value="6.1.0" String="InvalidPlatformOSServicePack"/>
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-1" String="InvalidUpgradeNotExpress"/>
<FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-2" String="InvalidUpgradeNotExpressCore"/>
<FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-3" String="InvalidUpgradeLanguage"/>
<FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-4" String="InvalidUpgradeWoW"/>
<FailIf Property="SQLExpressChk" Compare="ValueLessThan" Value="-4" String="GeneralFailure"/>
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>
<BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="1"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<!-- 0x84BE0BC2 (1214,3010) -->
<ExitCode Value="-2067919934" Result="FailReboot"/>
<!-- 0x84C10BC2 (1217,3010) -->
<ExitCode Value="-2067723326" Result="FailReboot"/>
<!-- 0x84BE0007 (1214,7) -->
<ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/>
<!-- 0x84C4001F (1220,31) -->
<ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/>
<!-- 0x84BE0001 (1214,1)-->
<ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePack"/>
<!-- 0x84C4000E (1220,14) -->
<ExitCode Value="-2067529714" Result="Fail" String="InvalidPlatformOSLanguage"/>
<!-- 0x84C4000B (1220,11) -->
<ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/>
<!-- 0x84BE01F8 (1214,504) -->
<ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE01FA (1214,506) -->
<ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE0202 (1214,514) -->
<ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/>
<!-- 0x84BE0203 (1214,515) -->
<ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/>
<ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Defines an upgrade installation (x86) -->
<Command PackageFile="SQLEXPR32_x86_ENU.EXE"
Arguments="/q /hideconsole /action=Upgrade /instancename=SQLEXPRESS /IAcceptSqlServerLicenseTerms /skiprules=RebootRequiredCheck"
EstimatedInstalledBytes="225000000"
EstimatedInstallSeconds="420">
<InstallConditions>
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>
<BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="2"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<!-- 0x84BE0BC2 (1214,3010) -->
<ExitCode Value="-2067919934" Result="FailReboot"/>
<!-- 0x84C10BC2 (1217,3010) -->
<ExitCode Value="-2067723326" Result="FailReboot"/>
<!-- 0x84BE0007 (1214,7) -->
<ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/>
<!-- 0x84C4001F (1220,31) -->
<ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/>
<!-- 0x84BE0001 (1214,1)-->
<ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePack"/>
<!-- 0x84C4000E (1220,14) -->
<ExitCode Value="-2067529714" Result="Fail" String="InvalidPlatformOSLanguage"/>
<!-- 0x84C4000B (1220,11) -->
<ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/>
<!-- 0x84BE01F8 (1214,504) -->
<ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE01FA (1214,506) -->
<ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE0202 (1214,514) -->
<ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/>
<!-- 0x84BE0203 (1214,515) -->
<ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/>
<ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Defines a new installation (amd64) -->
<Command PackageFile="SQLEXPR_x64_ENU.EXE"
Arguments='/q /hideconsole /action=Install /features=SQL /instancename=SQLEXPRESS /enableranu=1 /AddCurrentUserAsSqlAdmin /IAcceptSqlServerLicenseTerms /skiprules=RebootRequiredCheck'
EstimatedInstalledBytes="225000000"
EstimatedInstallSeconds="420">
<InstallConditions>
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64"/>
<BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="1"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<!-- 0x84BE0BC2 (1214,3010) -->
<ExitCode Value="-2067919934" Result="FailReboot"/>
<!-- 0x84C10BC2 (1217,3010) -->
<ExitCode Value="-2067723326" Result="FailReboot"/>
<!-- 0x84BE0007 (1214,7) -->
<ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/>
<!-- 0x84C4001F (1220,31) -->
<ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/>
<!-- 0x84BE0001 (1214,1)-->
<ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePack"/>
<!-- 0x84C4000E (1220,14) -->
<ExitCode Value="-2067529714" Result="Fail" String="InvalidPlatformOSLanguage"/>
<!-- 0x84C4000B (1220,11) -->
<ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/>
<!-- 0x84BE01F8 (1214,504) -->
<ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE01FA (1214,506) -->
<ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE0202 (1214,514) -->
<ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/>
<!-- 0x84BE0203 (1214,515) -->
<ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/>
<ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<!-- Defines an upgrade installation (amd64) -->
<Command PackageFile="SQLEXPR_x64_ENU.EXE"
Arguments="/q /hideconsole /action=Upgrade /instancename=SQLEXPRESS /IAcceptSqlServerLicenseTerms /skiprules=RebootRequiredCheck"
EstimatedInstalledBytes="225000000"
EstimatedInstallSeconds="420">
<InstallConditions>
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64"/>
<BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="2"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<!-- 0x84BE0BC2 (1214,3010) -->
<ExitCode Value="-2067919934" Result="FailReboot"/>
<!-- 0x84C10BC2 (1217,3010) -->
<ExitCode Value="-2067723326" Result="FailReboot"/>
<!-- 0x84BE0007 (1214,7) -->
<ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/>
<!-- 0x84C4001F (1220,31) -->
<ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/>
<!-- 0x84BE0001 (1214,1)-->
<ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePack"/>
<!-- 0x84C4000E (1220,14) -->
<ExitCode Value="-2067529714" Result="Fail" String="InvalidPlatformOSLanguage"/>
<!-- 0x84C4000B (1220,11) -->
<ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/>
<!-- 0x84BE01F8 (1214,504) -->
<ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE01FA (1214,506) -->
<ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/>
<!-- 0x84BE0202 (1214,514) -->
<ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/>
<!-- 0x84BE0203 (1214,515) -->
<ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/>
<ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<Strings>
<String Name="DisplayName">SQL Server 2014 Express</String>
<String Name="Culture">en</String>
<String Name="SqlExpr32Exe">http://go.microsoft.com/fwlink/?LinkID=230852&clcid=0x409</String>
<String Name="SqlExpr64Exe">http://go.microsoft.com/fwlink/?LinkID=230853&clcid=0x409</String>
<String Name="AdminRequired">You do not have the permissions required to install SQL Server 2014 Express. Please contact your administrator.</String>
<String Name="GeneralFailure">An error occurred attempting to install SQL Server 2014 Express.</String>
<String Name="InvalidPlatformOS">The current operating system version does not support SQL Server 2014 Express.</String>
<String Name="InvalidPlatformOSServicePack">The current operating system does not meet Service Pack level requirements for SQL Server 2014 Express. Install the most recent Service Pack from the Microsoft download center at http://www.microsoft.com/downloads before continuing setup.</String>
<String Name="InvalidPlatformOSLanguage">The English version of SQL Server 2014 Express can only be installed on a Windows operating system of the same language.</String>
<String Name="AnotherInstanceRunning">Another instance of setup is already running. The running instance must complete before this setup can proceed.</String>
<String Name="BetaComponentsFailure">A beta version of the .NET Framework or SQL Server was detected on the computer. Uninstall any previous beta versions of SQL Server 2014 components, SQL Server Support Files, or .NET Framework before continuing.</String>
<String Name="InvalidPlatformArchitecture">This version of SQL Server 2014 Express is not supported for the current processor architecture.</String>
<String Name="InvalidUpgradeNotExpress">The instance of SQL Server named 'SQLEXPRESS' is a not an instance of SQL Server Express. It cannot be upgraded to SQL Server 2014 Express.</String>
<String Name="InvalidUpgradeNotExpressCore">The instance of SQL Server Express named 'SQLEXPRESS' contains components that are not included in SQL Server 2014 Express. SQL Server 2014 Express cannot upgrade this instance. Please use SQL Server 2014 Express with Advanced Services instead.</String>
<String Name="InvalidUpgradeLanguage">The instance of SQL Server Express named 'SQLEXPRESS' is a different language version than this SQL Server 2014 Express. SQL Server 2014 Express cannot upgrade this instance.</String>
<String Name="InvalidUpgradeWoW">SQL Server 2014 Express (x64) cannot upgrade the existing instance of SQL Server Express (x64 WoW) named 'SQLEXPRESS'. Uninstall this instance of SQL Server Express and retry installing SQL Server 2014 Express (x64).</String>
</Strings>