From 023104e40772fdf74eb69d6a6c6d5e30a13dad48 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Thu, 20 Jan 2022 22:23:57 +0300 Subject: [PATCH] Wait for Windows Updates (#4924) --- images/win/windows2016.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images/win/windows2016.json b/images/win/windows2016.json index e2aaa2d6..eeb8973a 100644 --- a/images/win/windows2016.json +++ b/images/win/windows2016.json @@ -258,11 +258,15 @@ }, { "type": "windows-restart", + "check_registry": true, + "restart_check_command": "powershell -command \"& {if ((-not (Get-Process TiWorker.exe -ErrorAction SilentlyContinue)) -and (-not [System.Environment]::HasShutdownStarted) ) { Write-Output 'Restart complete' }}\"", "restart_timeout": "30m" }, { "type": "powershell", + "pause_before": "2m", "scripts": [ + "{{ template_dir }}/scripts/Installers/Wait-WindowsUpdatesForInstall.ps1", "{{ template_dir }}/scripts/Tests/RunAll-Tests.ps1" ] },