我默默安装了SQL Server 2016,但管理工作室没有安装在批处理文件中 [英] I installed SQL server 2016 silently but management studio doesn't get installed in batch file

查看:91
本文介绍了我默默安装了SQL Server 2016,但管理工作室没有安装在批处理文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自动化SQL Server 2016,但SQL 2016已安装但SQL服务器管理工​​作室未安装。



我有什么尝试过:



我试过电源外壳它的工作原理当我将电源外壳转换为静态批处理文件时它可以工作,但是通过动态批处理文件它没有。这是我的代码

start%~dp0sql3 \ setup.exe/ SAPWD =Sqladmin1234/ConfigurationFile=\"ConfigurationFile.ini/ quiet



@ECHO OFF

SET LookForFile =C:\ Setup \ssms \ Ssms-Setup-ENU.exe



:CheckForFile

如果EXIST%LookForFile%GOTO FoundIt



REM如果我们到达此处,则找不到该文件。



REM等待5秒然后重新检查。

REM如果不需要延迟,请注释/删除超时行。

TIMEOUT / T 5> null



GOTO CheckForFile



:FoundIt

ECHO发现:%LookForFile%



startC:\Setup \ssms \Ssms-Setup-ENU.exe / quiet / install / norestart

运行:

C:\ Setup \ssms \Ssms-Setup-ENU.exe / quiet / install / norestart

解决方案

分开安装SQL Server管理工作室,install.it将工作

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

解决方案

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


这篇关于我默默安装了SQL Server 2016,但管理工作室没有安装在批处理文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆