Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to automate the SQL Server 2016 but SQL 2016 gets installed but SQL server management studio doesn't get installed.

What I have tried:

I tried by power shell it works and when i convert power shell to static batch file it works but by dynamic batch file it doesn't. This is my code
start "" "%~dp0sql3\setup.exe" /SAPWD="Sqladmin1234" /ConfigurationFile="ConfigurationFile.ini" /quiet

@ECHO OFF
SET LookForFile="C:\Setup\ssms\Ssms-Setup-ENU.exe"

:CheckForFile
IF EXIST %LookForFile% GOTO FoundIt

REM If we get here, the file is not found.

REM Wait 5 seconds and then recheck.
REM If no delay is needed, comment/remove the timeout line.
TIMEOUT /T 5 >null

GOTO CheckForFile

:FoundIt
ECHO Found: %LookForFile%

start "C:\Setup\ssms\Ssms-Setup-ENU.exe /quiet /install /norestart"
run:
C:\Setup\ssms\Ssms-Setup-ENU.exe /quiet /install /norestart
Posted
Updated 18-Jul-18 4:42am
v2
Comments
RedDk 27-Jun-18 14:15pm    
Automate ... in conjunction with what? Using an MSDOS batch to install SQLServer (package) because you want to "ship" (bad choice of words perhaps) your app with the package and install it on a user's machine because your app requires database functionality found in that package?

I don't want to suggest any scenario which might catch you up so I can only guess at the reason why "automate" is being tossed around here.

Tell your app user to download SQLServer Express with Advanced blah blah (the version you've used to develop the app) and install it before trying to use your app.

"App" is a poor choice of a word also.
Member 13889322 27-Jun-18 14:17pm    
Automate means to silently install (without the user interaction)
Keviniano Gayo 18-Jul-18 11:06am    
In SQL Server 2016, management studio is not included in the installer. You need to download management studio and do a separate silent install.
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-2016#Install

1 solution

Install SQL server management studio separatly and install.it will work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900