flcdrg / au-packages

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

Proposed fix for IGNOREPENDINGREBOOT for SQL Server 2019 installer #80

Closed mcdurdin closed 4 years ago

mcdurdin commented 4 years ago

If you use the IGNOREPENDINGREBOOT flag, it is currently passed through to the SQL Server installer, which causes it to fail with error -2068578301.

Per https://support.microsoft.com/en-au/help/2008982/you-are-repeatedly-prompted-to-restart-the-computer-when-installing-sq and https://speverything.wordpress.com/2014/02/04/sql-install-bypass-the-restart-computer-setup-support-rule/comment-page-1/, the following alternative flags should passed into setup: /ACTION=Install /SkipRules=RebootRequiredCheck.

mcdurdin commented 4 years ago

Ref also: https://chocolatey.org/packages/sql-server-2019#comment-4902996996

flcdrg commented 4 years ago

LGTM @mcdurdin you've tested this out and it's working ok for you now?

mcdurdin commented 4 years ago

you've tested this out and it's working ok for you now?

Yes, just run a few more tests here to be certain (with additional --params for SQL Server) and it looks like it's all running well.

mcdurdin commented 4 years ago

We're using it for GitHub Action runs, e.g. at https://github.com/keymanapp/api.keyman.com/pull/54/checks?check_run_id=729661953

Sample log (using my local clone of the repo to test):

Chocolatey v0.10.15
Installing the following packages:
sql-server-2019
By installing you accept licenses for the packages.

sql-server-2019 v15.0.2000.20200506
sql-server-2019 package files install completed. Performing other installation steps.
Downloading sql-server-2019 
  from 'https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLServer2019-x64-ENU-Dev.iso'

Download of SQLServer2019-x64-ENU-Dev.iso (1.33 GB) completed.
Hashes match.
C:\Users\runneradmin\AppData\Local\Temp\chocolatey\sql-server-2019\15.0.2000.20200506\SQLServer2019-x64-ENU-Dev.iso
Installing sql-server-2019...
sql-server-2019 has been installed.
MSFT_DiskImage (ImagePath = "C:\Users\runneradmin\AppData\Local\Temp..., StorageType = 1)
  sql-server-2019 may be able to be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The install of sql-server-2019 was successful.
  Software installed as 'EXE', install location is likely default.

Chocolatey installed 1/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
flcdrg commented 4 years ago

Submitted new package - https://chocolatey.org/packages/sql-server-2019/15.0.2000.20200604