0

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

NoNameProvided
  • 8,608
  • 9
  • 40
  • 68
  • Are you asking how to do a silent install or are you saying the NSIS command fails but typing it in the run box (Win+R) works? – Anders Jan 24 '14 at 15:25
  • I am asking how to do a silent install correctly. (I get the same result if I run that command from cmd.) The used parameters are the official, because this installer is the "same" as the MS SQL 2008 Server R2 installer. So I dont know why this parameters do not work. – NoNameProvided Jan 24 '14 at 15:36
  • If you cannot get it to work normally then you should remove the NSIS tag, it only adds confusion... – Anders Jan 24 '14 at 17:13

3 Answers3

0

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.

slajma
  • 1,609
  • 15
  • 17
  • I get errors on compile time: `Invalid command: nsExec:Exec` What I need to include to use this command? – NoNameProvided Jan 28 '14 at 12:03
  • Do you have `nsExec.dll` in your `NSIS/Plugins/x86-unicode` and `NSIS/Plugins/x86-ansi` folders? If not then you probably have an older version of NSIS in which case I would suggest you download the latest release from here - http://sourceforge.net/projects/nsis/files/NSIS%203%20Pre-release/3.0a2/nsis-3.0a2-setup.exe/download?use_mirror=heanet&download= then nsExec should be in place. – slajma Jan 28 '14 at 12:52
  • I have those dlls both in the `NSIS/Plugins/x86-unicode` and the `NSIS/Plugins/x86-ansi` folder. And my NSIS is up to date, I use the version 3.0a2 (I know it is alpha,but it does not matter now.) – NoNameProvided Jan 28 '14 at 14:14
  • Oh, just noticed - you've missed a colon! It should be `nsExec::Exec` - you need to double up the colon in your command. – slajma Jan 28 '14 at 14:43
  • the cmd is still pop up – NoNameProvided Jan 28 '14 at 15:32
  • Are you installing .NET before SQL Server? Maybe if you do you can avoid the pop-up. – slajma Jan 28 '14 at 15:56
  • Yes, .Net is installed before starting the Management Console installer. – NoNameProvided Jan 28 '14 at 17:23
  • Hmm then it must be the parameters you're passing to the installer. You might be better off with a config file - here is a quick guide, a way of approach: http://mycodelog.com/2010/09/28/sqlsilent/ – slajma Jan 29 '14 at 10:27
0

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"
NoNameProvided
  • 8,608
  • 9
  • 40
  • 68
0

You can try this set of options:

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

Jacek U
  • 53
  • 9