Install SQL Server through command line (for Inno Setup)

时间:2018-03-25 19:19:08

标签: sql sql-server sql-server-2012 inno-setup

I came here with a problem with were I am working for days, and drives me crazy ... I really appreciate if you guide me into solving this: I have an critical task. To create an Inno setup kit, which should install MS SQL Server, and an app created by us (nothing special). But I noticed that cannot install SQL Server by command line ... and I have tried in a lot of ways ... Here is the last attempt (with no success):

SQLEXPR_x86_ENU.exe /ACTION=Install /INSTANCENAME=SQLEXPRESS /INSTANCEID=SQLEXPRESS /QS /HIDECONSOLE /INDICATEPROGRESS='True' /IAcceptSQLServerLicenseTerms /SQLSVCACCOUNT='NT AUTHORITY\NETWORK SERVICE' /SQLSVCSTARTUPTYPE=Automatic /BROWSERSVCSTARTUPTYPE=Automatic /SQLSYSADMINACCOUNTS='BUILTIN\Administrators' /SKIPRULES='RebootRequiredCheck'

The installation is begin, but after few seconds, everything is stop, with apparently no reason, with no message ... and the last message box that I have see is the following:

enter image description here

I have done something wrong ? Can you help me ? I have tried this on Win10 64bit (I have tried this on Win7 32 bit too), and SQLEXPR_x86_ENU.exe is SQL Server 2012 32 bit, but 64 bit version behave the same ... no difference. If I pass trough this task, I guess I can put all in an Inno Setup kit ...

Thank you.

1 个答案:

答案 0 :(得分:2)

The documentation indicates that the /FEATURES parameter is required. This specifies what gets installed. So it looks like you aren't telling the installer to install anything.

Taken from the documentation:

Feature parameter examples:

/FEATURES=SQLEngine :Installs the Database Engine without replication and full-text.

/FEATURES=SQLEngine, FullText :Installs the Database Engine and full-text.

/FEATURES=SQL, Tools : Installs the complete Database Engine and all tools.

There are other options. See here for full description https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Feature