Quick way to create a SQL Server 2008 R2 installer with integrated SP1 (Slipstream)
2011/10/25 1 Comment
- SQLServer2008R2SP1-KB2528583-IA64-ENU.exe
- SQLServer2008R2SP1-KB2528583-x64-ENU.exe
- SQLServer2008R2SP1-KB2528583-x86-ENU.exe
@ECHO OFF ::File Verification IF NOT EXIST "C:\SQLServer2008R2_SP1\" GOTO ERROR IF NOT EXIST "C:\SQLServer2008R2SP1-KB2528583-x86-ENU.exe" GOTO ERROR IF NOT EXIST "C:\SQLServer2008R2SP1-KB2528583-x64-ENU.exe" GOTO ERROR IF NOT EXIST "C:\SQLServer2008R2SP1-KB2528583-IA64-ENU.exe" GOTO ERROR ::Extract each of the SQL Server 2008 R2 SP1 packages to C:\SQLServer2008R2_SP1\SP ECHO Extracting SP files to C:\SQLServer2008R2_SP1\SP... start /wait C:\SQLServer2008R2SP1-KB2528583-x86-ENU.exe /x:C:\SQLServer2008R2_SP1\SP ECHO Extract of SQLServer2008R2SP1-KB2528583-x86-ENU.exe Completed start /wait C:\SQLServer2008R2SP1-KB2528583-x64-ENU.exe /x:C:\SQLServer2008R2_SP1\SP ECHO Extract of SQLServer2008R2SP1-KB2528583-x64-ENU.exe Completed start /wait C:\SQLServer2008R2SP1-KB2528583-IA64-ENU.exe /x:C:\SQLServer2008R2_SP1\SP ECHO Extract of SQLServer2008R2SP1-KB2528583-IA64-ENU.exe Completed ECHO. ::Copy Setup.exe from the SP extracted location to the original source media location ECHO Copying Setup.exe to C:\SQLServer2008R2_SP1 start /wait robocopy C:\SQLServer2008R2_SP1\SP C:\SQLServer2008R2_SP1 Setup.exe ECHO Setup.exe copied ECHO. ::Copy all files, not the folders, except the Microsoft.SQL.Chainer.PackageData.dll, in C:\SQLServer2008R2_SP1\SP\<architecture> to C:\SQLServer2008R2_SP1\<architecture> to update the original files ECHO Copying files to C:\SQLServer2008R2_SP1\ start /wait robocopy C:\SQLServer2008R2_SP1\SP\x86 C:\SQLServer2008R2_SP1\x86 /XF Microsoft.SQL.Chainer.PackageData.dll ECHO Files from C:\SQLServer2008R2_SP1\SP\x86 copied start /wait robocopy C:\SQLServer2008R2_SP1\SP\x64 C:\SQLServer2008R2_SP1\x64 /XF Microsoft.SQL.Chainer.PackageData.dll ECHO Files from C:\SQLServer2008R2_SP1\SP\x64 copied start /wait robocopy C:\SQLServer2008R2_SP1\SP\ia64 C:\SQLServer2008R2_SP1\ia64 /XF Microsoft.SQL.Chainer.PackageData.dll ECHO Files from C:\SQLServer2008R2_SP1\SP\ia64 copied ECHO. ::Create or modify DefaultSetup.ini IF NOT EXIST "C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini" GOTO CREATEINI ECHO Modifying DefaultSetup.ini TYPE C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini > C:\SQLServer2008R2_SP1\x86\Temp_DefaultSetup.ini ECHO PCUSOURCE=".\SP" >> C:\SQLServer2008R2_SP1\x86\Temp_DefaultSetup.ini DEL C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini REN C:\SQLServer2008R2_SP1\x86\Temp_DefaultSetup.ini DefaultSetup.ini ECHO. GOTO COPYINI :CREATEINI ECHO Creating or modifying DefaultSetup.ini ECHO ;SQLSERVER2008 R2 Configuration File > C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini ECHO [SQLSERVER2008] >> C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini ECHO PCUSOURCE=".\SP" >> C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini ECHO. :COPYINI ::Copy DefaultSetup.ini from x86 to x64 and ia64 folders ECHO Copying DefaultSetup.ini from x86 to x64 and ia64 folders start /wait robocopy C:\SQLServer2008R2_SP1\x86 C:\SQLServer2008R2_SP1\x64 DefaultSetup.ini start /wait robocopy C:\SQLServer2008R2_SP1\x86 C:\SQLServer2008R2_SP1\ia64 DefaultSetup.ini ECHO. ECHO ============================================================================== ECHO OPERATION COMPLETED ECHO Use C:\SQLServer2008R2_SP1\Setup.exe to install SQL Server 2008 R2 + SP1 ECHO ============================================================================== ECHO. GOTO FIN :ERROR ECHO ============================================================================== ECHO FILE VERIFICATION FAIL, PLEASE CHECK THE FOLLOWING: ECHO THE DIRECTORY C:\SQLServer2008R2_SP1\ EXISTS ECHO SQLServer2008R2SP1-KB2528583-x86-ENU.exe FILE IS LOCATED IN C:\ ECHO SQLServer2008R2SP1-KB2528583-x64-ENU.exe FILE IS LOCATED IN C:\ ECHO SQLServer2008R2SP1-KB2528583-IA64-ENU.exe FILE IS LOCATED IN C:\ ECHO ============================================================================== ECHO. :FIN PAUSE4. Run the .bat file as administrator. 5. Use C:\SQLServer2008R2_SP1\Setup.exe to start the installation. 6. You can check that the installation contains SlipStream in the Ready to Install screen:

Advertisements
Pingback: How to create a SQL Server 2012 installer with integrated CU1 (Product Updates – Slipstream) « LenSQL