@echo off
rem Retire l'extension CLIK PASS de la strategie ExtensionInstallForcelist de Chrome et Edge.
net session >nul 2>&1 || (powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" & exit /b)
powershell -NoProfile -ExecutionPolicy Bypass -Command "$s = Get-Content -LiteralPath '%~f0' -Raw -Encoding UTF8; Invoke-Expression ($s.Substring($s.IndexOf('#PS' + 'START')))"
echo.
pause
exit /b

#PSSTART
$prefix = 'hpjkpopkhjidhknfmdflihbdihfkdhff;'
foreach ($path in 'HKLM:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist', 'HKLM:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist') {
  if (-not (Test-Path $path)) { continue }
  foreach ($name in (Get-Item -Path $path).GetValueNames()) {
    if ((Get-ItemProperty -Path $path -Name $name).$name -like "$prefix*") {
      Remove-ItemProperty -Path $path -Name $name
      Write-Host "Retire : $path"
    }
  }
}
Write-Host 'Redemarrez Chrome et Edge pour retirer l''extension.'
