Files
DepressedCat 5f2aad00f4
Check extension and helper / check (push) Canceled after 0s
Publish YouTubeDL 1.4.5 and website on Gitea
2026-10-10 23:53:17 +03:00

14 lines
709 B
PowerShell

[CmdletBinding()]
param()
$ErrorActionPreference = 'Stop'
$taskExpectedManifest = Join-Path $PSScriptRoot '.runtime\native-host.json'
foreach ($taskBrowser in @('Google\Chrome','Microsoft\Edge','Chromium')) {
$taskRegistryPath = "HKCU:\Software\$taskBrowser\NativeMessagingHosts\com.youtubedl.native"
if (Test-Path -LiteralPath $taskRegistryPath) {
$taskCurrentManifest = (Get-Item -LiteralPath $taskRegistryPath).GetValue('')
if ($taskCurrentManifest -eq $taskExpectedManifest) { Remove-Item -LiteralPath $taskRegistryPath }
}
}
Write-Host 'Native helper unregistered. Remove YouTubeDL from the browser extensions page.'
Write-Host 'Downloaded media files have not been removed.'