Fix Outlook add-in registration: use Exchange or manual sideload
The TrustedCatalogs registry approach only works for Word/Excel/ PowerPoint, NOT for Outlook. Outlook add-ins must be registered via Exchange or manually through OWA. Setup now offers two paths: - Exchange Online PowerShell (New-App) for organizations - Manual sideload via https://aka.ms/olksideload as fallback Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+17
-27
@@ -99,35 +99,25 @@ if (Test-Path $certInfoPath) {
|
||||
# Schritt 3: Outlook Add-in Registrierung entfernen
|
||||
# ============================================================
|
||||
|
||||
Write-Header "Schritt 3: Outlook-Registrierung entfernen"
|
||||
Write-Header "Schritt 3: Outlook Add-in Registrierung"
|
||||
|
||||
$outlookVersions = @("16.0", "15.0")
|
||||
foreach ($ver in $outlookVersions) {
|
||||
# HKCU (Einzelplatz / aktueller User)
|
||||
$catalogBasePath = "HKCU:\Software\Microsoft\Office\$ver\WEF\TrustedCatalogs"
|
||||
if (Test-Path $catalogBasePath) {
|
||||
$catalogs = Get-ChildItem $catalogBasePath -ErrorAction SilentlyContinue
|
||||
foreach ($catalog in $catalogs) {
|
||||
$url = Get-ItemProperty -Path $catalog.PSPath -Name "Url" -ErrorAction SilentlyContinue
|
||||
if ($url -and $url.Url -like "*StarfaceOutlookSync*") {
|
||||
Remove-Item $catalog.PSPath -Recurse -Force
|
||||
Write-Step "Outlook $ver Katalog-Registrierung entfernt (HKCU)."
|
||||
}
|
||||
}
|
||||
}
|
||||
# Pruefen ob per Exchange registriert
|
||||
$installInfoPath = Join-Path $InstallDir "install-info.json"
|
||||
$registeredViaExchange = $false
|
||||
if (Test-Path $installInfoPath) {
|
||||
$installInfo = Get-Content $installInfoPath -Raw | ConvertFrom-Json
|
||||
$registeredViaExchange = $installInfo.registeredViaExchange -eq $true
|
||||
}
|
||||
|
||||
# HKLM (Terminal Server / alle User)
|
||||
$catalogBasePathLM = "HKLM:\Software\Microsoft\Office\$ver\WEF\TrustedCatalogs"
|
||||
if (Test-Path $catalogBasePathLM) {
|
||||
$catalogs = Get-ChildItem $catalogBasePathLM -ErrorAction SilentlyContinue
|
||||
foreach ($catalog in $catalogs) {
|
||||
$url = Get-ItemProperty -Path $catalog.PSPath -Name "Url" -ErrorAction SilentlyContinue
|
||||
if ($url -and $url.Url -like "*StarfaceOutlookSync*") {
|
||||
Remove-Item $catalog.PSPath -Recurse -Force
|
||||
Write-Step "Outlook $ver Katalog-Registrierung entfernt (HKLM)."
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($registeredViaExchange) {
|
||||
Write-Warn "Das Add-in wurde per Exchange bereitgestellt."
|
||||
Write-Host " Um es dort zu entfernen:" -ForegroundColor Gray
|
||||
Write-Host " 1. Exchange Online PowerShell: Get-App | Remove-App" -ForegroundColor Gray
|
||||
Write-Host " 2. Oder im Microsoft 365 Admin Center" -ForegroundColor Gray
|
||||
} else {
|
||||
Write-Step "Das Add-in wurde manuell in Outlook hinzugefuegt."
|
||||
Write-Host " Bitte manuell entfernen:" -ForegroundColor Gray
|
||||
Write-Host " Outlook -> Add-Ins verwalten -> Add-In entfernen" -ForegroundColor Gray
|
||||
}
|
||||
|
||||
# ============================================================
|
||||
|
||||
Reference in New Issue
Block a user