diff --git a/Updater/Update-Service.ps1 b/Updater/Update-Service.ps1 index d52e00719a5b69d2ecc77fd6fef24367962d6068..7e3333b9eca94049b33fa821f2b7792f32ccc767 100644 --- a/Updater/Update-Service.ps1 +++ b/Updater/Update-Service.ps1 @@ -52,6 +52,17 @@ function ServiceIsBusy { } } +function Stop-TrayApp() { + try { + Stop-Process -Name "ATxTray" -Force -ErrorAction Stop + Start-Sleep -Milliseconds 200 + Log-Debug "Stopped Tray App process." + } + catch { + Log-Debug "Unable to stop tray app, is it running?" + } +} + function Exit-IfDirMissing([string]$DirName, [string]$Desc) { if (Test-Path -PathType Container $DirName) { @@ -279,6 +290,7 @@ function Update-ServiceBinaries { Log-Debug "Found marker [$($MarkerFile)], not updating service." Return $False } + Stop-TrayApp Copy-ServiceFiles try { New-Item -Type File "$MarkerFile" -ErrorAction Stop | Out-Null