[CmdletBinding()] param([switch]$SkipProductionDeploy) Set-StrictMode -Version 2.0 $ErrorActionPreference = 'Stop' Add-Type -AssemblyName PresentationFramework Add-Type -AssemblyName PresentationCore Add-Type -AssemblyName WindowsBase Add-Type -AssemblyName System.Xaml $PackageRoot = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot '..\..') -ErrorAction Stop).ProviderPath.TrimEnd([System.IO.Path]::DirectorySeparatorChar,[System.IO.Path]::AltDirectorySeparatorChar) $TargetVersion = '1.43.0' $UpdaterVersion = '3.3.0' $WorkerScript = Join-Path $PSScriptRoot 'Vendoo.Updater.Worker.ps1' $WorkerHostScript = Join-Path $PSScriptRoot 'Vendoo.Updater.Host.ps1' $LocalRoot = Join-Path $env:LOCALAPPDATA 'Vendoo\Updater' $RuntimeRoot = Join-Path $LocalRoot 'runtime' $SessionRoot = Join-Path $LocalRoot 'sessions' New-Item -ItemType Directory -Path $RuntimeRoot,$SessionRoot -Force | Out-Null $createdNew = $false $mutex = [System.Threading.Mutex]::new($true, 'Local\VendooProductionUpdater', [ref]$createdNew) if (-not $createdNew) { [System.Windows.MessageBox]::Show('Der Vendoo-Updater läuft bereits. Bitte das vorhandene Fenster verwenden.','Vendoo Updater',[System.Windows.MessageBoxButton]::OK,[System.Windows.MessageBoxImage]::Information) | Out-Null return } $xaml = @'