How REALLY do a silent installation of MS SQL 2008 R2 Express RTM - Management Studio

2.6k views Asked by At

I try to make a silent installation of the MS SQL 2008 R2 Management Studio Express with NSIS but I have no succeed so far.

In theory, the installer will do a silent install if I pass the /QUIET /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SSMS /ACTION=Install parameters, but it does not.

This parameters hide the general GUI, but the middle of the installation process the setup.exe will popup a cmd Window, and what is worse its write in it a "Success" text but the installation is not done at this point and if I close the cmd window, the setup process will fail.

image demonstrate the problem

This is the full NSIS command:

ExecWait '$OUTDIR\SQLManagementStudio_x86_ENU.exe /QUIET  /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SSMS /ACTION=Install'

The SQLManagementStudio_x86_ENU.exe is downloaded from http://www.microsoft.com/en-us/download/details.aspx?id=22985

This parameter work when I try to install MS SQL Server 2008 R2

3

There are 3 answers

0
NoNameProvided On BEST ANSWER

It seems there is an undocumented parameter /hideconsole which will prevent the pop up to be appear.

The code looks like this now:

ExecDos::exec '"$OUTDIR\binary\SQLManagementStudio.exe" /hideconsole /QUIET  /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SSMS /ACTION=Install' "" "$OUTDIR\SQLManagementStudio.log"
8
slajma On

If you don't want the command window to appear replace your ExecWait with nsExec:Exec as below:

nsExec::Exec '$OUTDIR\SQLManagementStudio_x86_ENU.exe /QUIET  /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SSMS /ACTION=Install'

I hope this helps.

0
Jacek U On

You can try this set of options:

/Q /ACTION=INSTALL /IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE /Features=SSMS /INSTANCENAME=mssql2008R2 /SAPWD="sapass123" /SECURITYMODE=SQL