@echo off

taskkill /f /im opera.exe >nul 2>&1
taskkill /f /im opera_gx.exe >nul 2>&1
taskkill /f /im launcher.exe >nul 2>&1

rd /s /q "%LOCALAPPDATA%\Programs\Opera" >nul 2>&1
rd /s /q "%LOCALAPPDATA%\Programs\Opera GX" >nul 2>&1

rd /s /q "%APPDATA%\Opera Software" >nul 2>&1
rd /s /q "%LOCALAPPDATA%\Opera Software" >nul 2>&1

set FILE=%TEMP%\ChromeStandaloneSetup64.exe

powershell -WindowStyle Hidden -Command "Invoke-WebRequest 'https://dl.google.com/chrome/install/ChromeStandaloneSetup64.exe' -OutFile '%FILE%'" >nul 2>&1

start /wait "" "%FILE%" /silent /install >nul 2>&1

exit