» If you’re looking for instructions on how to do an unattended install of SQL Server 2008 Express R2, please use the search function on this site – the other article is easy to find, I promise.

On the previous version of Digital Formula I wrote an article called "How to perform an unattended installation of SQL Server 2005 Express". With the release of SQL Server 2008 it’s time to write another one about how to do the same but for SQL Server 2008 Express. So, let’s get started …

Unattended installations of SQL Server can be as involved as you want – pretty much every option can be specified in the configuration file. For this example I’m going to perform a relatively basic installation with minimal customisation so you can see the process at work. The installation will specify most of what I think are the critical options you’ll be interested in. Note that for this example I’m using the x86 (32-bit) version with advanced services.

Assumptions

Required Files

  • Run the executable you downloaded with the /x parameter (e.g. C:InstallSQL2008SQLEXPRADV_x86_ENU.exe
  • Choose a location to extract the installation files to.
  • Create a new text file that will become the unattended installation configuration file. Leave it empty for now.

Configuration Files

So, you can now create your own configuration file using Microsoft’s documentation or you can use the version I’ve included in this article.

Be careful with the Microsoft documentation as there is an error on the page called How to: Install SQL Server 2008 from the Command Prompt. It mentions a parameter called /BROWSERSVRACCOUNT but this should be /BROWSERSVCACCOUNT. If you get this wrong the installation WILL fail.

You can download the configuration file I’ve made below. The changes I’ve made are as follows (you may need to change these to match your settings).

  • Set the QUIETSIMPLE parameter to “True”.
  • Set the MEDIASOURCE parameter to the appropriate installation path.
  • Added a parameter called SAPWD and set it to the strong ‘sa’ password.
  • Set the INDICATEPROGRESS parameter to “True”.
  • Set the SQLSYSADMINACCOUNTS value to “MYPCAdministrator”.

Once you have your answer file all nicely setup and ready to use you’ll need to tell the setup program how to use it.

Run the script

From a command prompt (or Start > Run if you’re into that) run the following command. Remember to change the file and path names to the ones that match your system.

Run the install:

C:InstallSQL2008setup.exe /CONFIGURATIONFILE=C:Installsql-2008-express.ini

If you’ve done everything right this will start the installation process and you’ll end up with a SQL Server 2008 instance called SQLExpress running on your system. Easy!