Sql server 如何在没有桌面的Vagrant中安装SQL Server Express 2014?

Sql server 如何在没有桌面的Vagrant中安装SQL Server Express 2014?,sql-server,vagrant,windows-server-2012-r2,chocolatey,Sql Server,Vagrant,Windows Server 2012 R2,Chocolatey,我想让Vagrant启动一台Windows Server 2012 R2计算机,并作为资源调配的一部分进行安装。我在机器上安装了Chocolate,让vagrant运行一个powershell文件,如下所示: config.vm.provision "shell", path: "./dev-tools.ps1" 还有一个简单的choco在powershell脚本中安装mssqlserver2014express-y。它运行脚本,看起来SQL安装程序不喜欢在没有显示的情况下运行: ==>

我想让Vagrant启动一台Windows Server 2012 R2计算机,并作为资源调配的一部分进行安装。我在机器上安装了Chocolate,让vagrant运行一个powershell文件,如下所示:

config.vm.provision "shell", path: "./dev-tools.ps1"
还有一个简单的
choco在powershell脚本中安装mssqlserver2014express-y
。它运行脚本,看起来SQL安装程序不喜欢在没有显示的情况下运行:

==> default: The following error occurred:
==> default:
==> default: Showing a modal dialog box or form when the application is 
not running in UserInteractive mode is not a valid operation. Specify 
the ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
==> default:
==> default: Error result: -2146233079
==> default: Result facility code: 19
==> default: Result error code: 5385    

有人在配置windows box时处理过类似的事情吗

听起来您可能想回到包的维护人员那里,询问他们是否可以使sql server安装程序完全静音。与他们共享此堆栈溢出帖子。

同时,您可以尝试打开GUI。默认情况下,WindowsServer2012 R2仍然有一个GUI,对吗?我假设您正在使用VirtualBox提供程序,因为您没有另外指定

将此添加到您的文件中

config.vm.provider "virtualbox" do |v|
  v.gui = true
end

您可以尝试适应(或仅使用)

对软件包作者的请求:我已经在维护人员的评论中提到,软件包应该使用/Q而不是/QS运行安装程序。希望他们能考虑一下。这就是我最后所做的。我认为Anthony Matsrean的回答是一个很好的解决方法,但从长远来看,我认为修复软件包是正确的做法。