# Run explicitly in an elevated PowerShell. Trusts only the FileBow development certificate. [CmdletBinding()]param() $ErrorActionPreference='Stop' $root=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..')) $record=Get-Content (Join-Path $root 'out\msix\build-Development.json') -Raw | ConvertFrom-Json if (-not $record.Signed) { throw 'Zuerst build-msix.ps1 -SignDevelopment ausführen.' } if ((Get-FileHash $record.Package -Algorithm SHA256).Hash -ne $record.SHA256) { throw 'Paket-Prüfsumme stimmt nicht überein.' } $cert=[Security.Cryptography.X509Certificates.X509Certificate2]::new($record.Certificate) if ($cert.Subject -ne 'CN=FileBow Development') { throw 'Unerwartetes Zertifikat.' } Import-Certificate -FilePath $record.Certificate -CertStoreLocation Cert:\LocalMachine\TrustedPeople | Out-Null Add-AppxPackage -Path $record.Package