There is existing documentation on MSDN about How to: Install SQL Server 2008 R2 from the Command Prompt, but this post focuses on creating a silent unattended install of SQL Server 2008 R2 (Standard or Enterprise) using a configuration file. With the instructions below, you’ll be able to create a new customized SQL silent installation in minimal time. Note that the configuration below doesn’t work with the Express edition of SQL Server 2008 R2.
QUIET
True
QUIET="True"
SQLSYSADMINACCOUNTS
SQLSYSADMINACCOUNTS=”domain\YourUser”
SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"
PID
IACCEPTSQLSERVERLICENSETERMS
IACCEPTSQLSERVERLICENSETERMS="True"
ADDCURRENTUSERASSQLADMIN
UIMODE
QUITE
INSTALLSHAREDDIR
INSTALLSHAREDWOWDIR
INSTANCEDIR
FEATURES
FEATURES=SQLENGINE
SSMS
ADV_SSMS
After getting the configuration file ready, you’ll need to create a batch file that will run the silent unattended setup. Simply, create a new file ”InstallSQL2008R2.bat” with extension = “.bat” with the following content, and make sure you replace <path to SQL setup folder> and <path to config file> with the proper values.
<path to SQL setup folder>
<path to config file>
@ECHO off echo Installing SQL Server 2008 R2 date/t time /t "<path to SQL setup folder>\setup.exe" /ConfigurationFile="<path to config file>" date/t time /t
All we’re doing in the script above is running SQL setup.exe and passing the configuration file as an argument to it. You can download both the batch and config files here.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.