param()

$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest

$hostName = "io.veck.relative_input"
$registryPaths = @(
  "HKCU:\Software\Google\Chrome\NativeMessagingHosts\$hostName",
  "HKCU:\Software\Chromium\NativeMessagingHosts\$hostName"
)

foreach ($registryPath in $registryPaths) {
  if (Test-Path -LiteralPath $registryPath) {
    Remove-Item -LiteralPath $registryPath
  }
}

Write-Output "Registro do host nativo removido do usuário atual."
