新 SQL 服务器安装 - 试图执行未经授权的操作

New SQL Server Installation - Attempted to perform an unauthorized operation

我有一台新的 Windows 10 家用机,我想安装 SQL 服务器。我已经安装了 Visual Studio 2017 和 SSMS 2017(我最初虽然安装了 SQL)。

第一次尝试时我得到了这个错误:

VS Shell installation has failed with exit code 1638

发现我需要卸载 Microsoft Visual C++ 2017 Redistributable (x86) 和 (x64),安装 SQL 服务器,然后重新安装 Microsoft Visual C++ 2017 Redistributable (x86) 和 (x64)。 As seen here

然后我得到这个错误:

Attempted to perform an unauthorized operation

  1. 我尝试了注册表项权限from this link
  2. 我尝试编辑我的本地组策略,但 Win 10 没有。
  3. 我尝试退出所有防火墙和反恶意软件。

我已经尝试安装 SQL 服务器 4 周了

编辑:

我找到了日志,但错误似乎是一样的:

(1)如果VS问题没有解决

根据以下MSDN related answer

"The exit code 1638 means "已安装此程序的另一个版本”,此错误信息由Windows安装程序提供,请检查您是否安装了其他更高版本的VSShell 在你的机器上。"

他们还提到,如果您安装了 Visual studio 2017,这也会影响 SQL Server 2017 的安装。VS Shell 的版本在 [=38] 的某些版本中=] 2017比SQL服务器里面的VSShell晚,所以你会遇到这个问题,请查收。*

建议的解决方案是

卸载Visual Studio 2017,然后安装SQL Server 2017,然后再次安装Visual Studio 2017。

这也是您提供的 link 中第一个建议的解决方案 (Help installing SQL Server 2017 - VS Shell installation has failed with exit code 1638)

(2)如果解决VS问题

检查已安装的应用程序或 运行 阻止安装过程访问的服务

A security application installed on the server was preventing SQL Server setup to get access

经过数周的谷歌搜索后,我发现我的机器带有一些名为 Bull Guard 的软件,它与 SQL 服务器发生冲突。卸载此软件后问题解决。 (禁用服务无效)

就我而言,它与 Microsoft Edge 有关。找到答案 .

SQL Express 2014 安装在我安装 运行 Edge 安装程序(可在 https://www.microsoft.com/en-us/edge/business/download 获得)后运行,打开 Edge 并检查更新。