@echo off
title Remove Certificates
color 0C


net session >nul 2>&1
if %errorlevel% neq 0 (
    echo Please run this script as Administrator.
    pause
    exit /b
)

echo.
echo Searching and removing certificates...
echo.

for %%S in (Root CA Auth TrustedPublisher My) do (
    certutil -user -delstore %%S "keyauth.win" >nul 2>&1
    certutil -user -delstore %%S "localhost" >nul 2>&1
    certutil -user -delstore %%S "127.0.0.1" >nul 2>&1

    certutil -delstore %%S "keyauth.win" >nul 2>&1
    certutil -delstore %%S "localhost" >nul 2>&1
    certutil -delstore %%S "127.0.0.1" >nul 2>&1
)

echo.
echo Done.
pause