SQL Express 2005 Silent Installation using Command Prompt


In my previous article we discuss about how to install Microsoft SQL Express 2012 in silent mode. Today we discuss about how we can do silent mode installation of SQL Express 2005 through command prompt or through batch file.

First download SQL Express 2005 from Microsoft site at http://www.microsoft.com/en-in/download/details.aspx?id=21844. We cannot generate configuration file for SQL Express 2005 as we did for Microsoft SQL Express 2012. Instead of generating config file from exe we have to write our template file which consists all settings. Even we can do silent installation of SQL Express 2005 without having separate config file. In this article we discuss about both ways.

Open notepad and write below code.

echo SQL Server 2005 Express silent installation.....

“SQLEXPR 2005.exe” /qb INSTANCENAME=SQL2005 ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication SECURITYMODE=SQL SAPWD=test@Abc SQLAUTOSTART=1 SQLBROWSERAUTOSTART=1 ENABLERANU=0

echo Finished

Save it as install.bat. As shown above /qb displays UI mode, we provided the instance name as SQL2005 for INSTANCENAME. ADDLOCAL property takes features we required to install. If we want install all SQL Express 2005 features just provide ADDLOCAL value as ALL like ADDLOCAL=ALL. Use SECUTITYMODE property to install SQL Express in both Windows and SQL Authentication mode and SAPWD takes password for SQL Authentication. If we want only Windows authentication just remove SECURITYMODE and SAPWD properties.

If we opens install.bat file it installs SQL Express 2005 in silent mode means without any user action. We can place all the above properties in separate file for our convenience as shown below.

Open notepad write below code and save it as template.ini.

template.ini

[options]

INSTANCENAME=SQL2005

ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication

SECURITYMODE=SQL

SAPWD=StrongPasswordGoesHere

DISABLENETWORKPROTOCOLS=0

Now refer this template.ini file in install.bat file as shown below.

install.bat

echo SQL Server 2005 Express silent installation.....

“SQLEXPR 2005.exe” /qb /settings "E:\template.ini"

echo Finished

Here we saved template.ini file in E: drive. In this way we can maintain options in separate file for our convenience.