diff --git a/images/win/windows2019.json b/images/win/windows2019.json index fe47fea3..7c16c7c7 100644 --- a/images/win/windows2019.json +++ b/images/win/windows2019.json @@ -144,11 +144,12 @@ { "type": "windows-restart", "check_registry": true, - "restart_check_command": "powershell -command \"& {if (-not (Get-Process TiWorker.exe -ErrorAction SilentlyContinue)) { Write-Output 'Restart complete' }}\"", + "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/Install-VCRedist.ps1", "{{ template_dir }}/scripts/Installers/Install-Docker.ps1",