flcdrg / au-packages

David's Chocolatey Automatic Packages
MIT License
18 stars 53 forks source link

[sql-server-2017-cumulative-update] Detect previously installed #87

Open flcdrg opened 4 years ago

flcdrg commented 4 years ago

Got an error installing CU21. As it seems the update is already installed on my system. "" Exit code was '-2042429437' ""

Can you manage this exit code and mark the installation as successful so it can be added to my packages for later or automated upgrades? TIA

START LOG

PS C:\Windows\system32> choco install sql-server-2017-cumulative-update -y
Chocolatey v0.10.15
Installing the following packages:
sql-server-2017-cumulative-update
By installing you accept licenses for the packages.
Progress: Downloading sql-server-2017-cumulative-update 14.0.3335.7... 100%
sql-server-2017-cumulative-update v14.0.3335.7 [Approved]
sql-server-2017-cumulative-update package files install completed. Performing other installation steps.
Downloading sql-server-2017-cumulative-update
from 'https://download.microsoft....
Progress: 100% - Completed download of C:\Users\MYUSER\AppData\Local\Temp\chocolatey\sql-server-2017-cumulative-update\14.0.3335.7\sql-server-2017-cumulative-updateInstall. (533.27 MB).
Download of sql-server-2017-cumulative-updateInstall. (533.27 MB) completed.
Hashes match.
Installing sql-server-2017-cumulative-update...
ERROR: Running ["C:\ProgramData\chocolatey\lib\sql-server-2017-cumulative-update\tools\SQLServer2017-KB4557397-x64.exe" /q /IAcceptSQLServerLicenseTerms /Action=Patch /AllInstances ] was not successful. Exit code was '-2042429437'. See log for possible error messages.
The install of sql-server-2017-cumulative-update was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\sql-server-2017-cumulative-update\tools\chocolateyinstall.ps1'.
See log for details.
Chocolatey installed 0/1 packages. 1 packages failed.See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).Failures- sql-server-2017-cumulative-update (exited -2042429437) - Error while running 'C:\ProgramData\chocolatey\lib\sql-server-2017-cumulative-update\tools\chocolateyinstall.ps1'.
See log for details.