diff --git a/Updater/Update-Service.ps1 b/Updater/Update-Service.ps1 index 345175c56461fc61ba6b4e30b4de6cbf491ccbdc..4bd8024cf66ffb147f26177e311568384cfe8568 100644 --- a/Updater/Update-Service.ps1 +++ b/Updater/Update-Service.ps1 @@ -333,11 +333,11 @@ function Copy-ServiceFiles { function Update-ServiceBinaries { - $MarkerFile = "$($UpdPathMarkerFiles)\$($env:COMPUTERNAME)" - if (Test-Path "$MarkerFile" -Type Leaf) { - Log-Debug "Found marker [$($MarkerFile)], not updating service." + $NewService = NewServiceBinaries-Available + if (-Not ($NewService)) { Return $False } + Stop-TrayApp Copy-ServiceFiles try { @@ -351,6 +351,16 @@ function Update-ServiceBinaries { Return $True } +function NewServiceBinaries-Available { + $MarkerFile = "$($UpdPathMarkerFiles)\$($env:COMPUTERNAME)" + if (Test-Path "$MarkerFile" -Type Leaf) { + Log-Debug "Found marker [$($MarkerFile)], not updating service." + Return $False + } + Write-Verbose "Marker [$($MarkerFile)] missing, service should be updated!" + Return $True +} + function Upload-LogFiles { $Dest = "$($UploadPathLogs)\$($env:COMPUTERNAME)"