113 lines
3.4 KiB
Batchfile
113 lines
3.4 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
echo.
|
|
echo ==========================================
|
|
echo Chrome Complete Cleaner
|
|
echo ==========================================
|
|
echo.
|
|
echo WARNING: This script will completely remove Chrome
|
|
echo Including: Program files, user data, registry entries
|
|
echo.
|
|
set /p confirm="Continue? (Y/N): "
|
|
if /i not "%confirm%"=="Y" (
|
|
echo Operation cancelled
|
|
pause
|
|
exit /b 0
|
|
)
|
|
|
|
echo.
|
|
echo Starting Chrome cleanup...
|
|
echo.
|
|
|
|
REM 1. Kill Chrome processes
|
|
echo Stopping Chrome processes...
|
|
taskkill /f /im chrome.exe >nul 2>&1
|
|
taskkill /f /im chromedriver.exe >nul 2>&1
|
|
taskkill /f /im GoogleUpdate.exe >nul 2>&1
|
|
taskkill /f /im GoogleCrashHandler.exe >nul 2>&1
|
|
taskkill /f /im GoogleCrashHandler64.exe >nul 2>&1
|
|
timeout /t 3 /nobreak >nul
|
|
|
|
REM 2. Stop Google services
|
|
echo Stopping Google services...
|
|
sc stop gupdate >nul 2>&1
|
|
sc stop gupdatem >nul 2>&1
|
|
sc stop GoogleChromeElevationService >nul 2>&1
|
|
|
|
REM 3. Delete program files
|
|
echo Deleting program files...
|
|
if exist "C:\Program Files\Google\" (
|
|
echo Removing: C:\Program Files\Google
|
|
rmdir /s /q "C:\Program Files\Google\" >nul 2>&1
|
|
)
|
|
if exist "C:\Program Files (x86)\Google\" (
|
|
echo Removing: C:\Program Files ^(x86^)\Google
|
|
rmdir /s /q "C:\Program Files (x86)\Google\" >nul 2>&1
|
|
)
|
|
|
|
REM 4. Delete current user data
|
|
echo Deleting user data...
|
|
if exist "%LOCALAPPDATA%\Google\" (
|
|
echo Removing current user data
|
|
rmdir /s /q "%LOCALAPPDATA%\Google\" >nul 2>&1
|
|
)
|
|
if exist "%APPDATA%\Google\" (
|
|
echo Removing current user config
|
|
rmdir /s /q "%APPDATA%\Google\" >nul 2>&1
|
|
)
|
|
|
|
REM 5. Clean registry
|
|
echo Cleaning registry...
|
|
reg delete "HKEY_CURRENT_USER\Software\Google" /f >nul 2>&1
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Google" /f >nul 2>&1
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google" /f >nul 2>&1
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google" /f >nul 2>&1
|
|
reg delete "HKEY_CURRENT_USER\Software\Policies\Google" /f >nul 2>&1
|
|
|
|
REM 6. Clean installer records
|
|
echo Cleaning installer records...
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome" /f >nul 2>&1
|
|
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome" /f >nul 2>&1
|
|
|
|
REM 7. Clean shortcuts
|
|
echo Cleaning shortcuts...
|
|
del "%PUBLIC%\Desktop\Google Chrome.lnk" >nul 2>&1
|
|
del "%USERPROFILE%\Desktop\Google Chrome.lnk" >nul 2>&1
|
|
rmdir /s /q "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Google Chrome\" >nul 2>&1
|
|
rmdir /s /q "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Google Chrome\" >nul 2>&1
|
|
|
|
REM 8. Clean scheduled tasks
|
|
echo Cleaning scheduled tasks...
|
|
schtasks /delete /tn "GoogleUpdateTaskMachineCore" /f >nul 2>&1
|
|
schtasks /delete /tn "GoogleUpdateTaskMachineUA" /f >nul 2>&1
|
|
|
|
REM 9. Delete services
|
|
echo Deleting services...
|
|
sc delete gupdate >nul 2>&1
|
|
sc delete gupdatem >nul 2>&1
|
|
sc delete GoogleChromeElevationService >nul 2>&1
|
|
|
|
REM 10. Clean temp files
|
|
echo Cleaning temp files...
|
|
del /s /q "%TEMP%\chrome*" >nul 2>&1
|
|
del /s /q "%TEMP%\google*" >nul 2>&1
|
|
|
|
REM 11. Flush DNS
|
|
echo Flushing DNS cache...
|
|
ipconfig /flushdns >nul 2>&1
|
|
|
|
echo.
|
|
echo Chrome cleanup completed!
|
|
echo.
|
|
echo Cleaned items:
|
|
echo - Program files
|
|
echo - User data and configs
|
|
echo - Registry entries
|
|
echo - Shortcuts
|
|
echo - Scheduled tasks
|
|
echo - System services
|
|
echo - Temp files
|
|
echo.
|
|
echo You can now reinstall Chrome!
|
|
echo.
|
|
pause |