taskkill /f /im OverwolfUpdater.exe /t
taskkill /f /im OverwolfStore.exe /t
taskkill /f /im Overwolf.exe /t
taskkill /f /im OverwolfHelper.exe /t
taskkill /f /im OverwolfHelper64.exe /t
taskkill /f /im OverwolfBrowser.exe /t
taskkill /f /im OverwolfLauncher.exe /t

sc delete OverwolfUpdater
timeout 2
rmdir "%~dp0OverwolfCoreDll" /S /Q
rmdir "%~dp0OverwolfDll" /S /Q
rmdir "%LocalAppData%\Overwolf" /S /Q
rmdir "%ProgramFiles(x86)%\Common Files\Overwolf" /S /Q
rmdir "%~dp0Common Files" /S /Q
rmdir "%~dp0LocalAppData" /S /Q
for /f "delims=" %%i in ('dir /s/b/ad "%~dp00.*"') do rmdir /S /Q "%%~i"
del "%~dp0overwolf*.*" /Q
del "%~dp0ow*.*" /Q
del "%~dp0crash_reporter.cfg" /Q
del "%~dp0.gitignore" /Q
del "%~dp0CLAUDE.md" /Q

mkdir "%~dp0Common Files"
mkdir "%~dp0LocalAppData\Settings\game_settings.db"
rem xcopy "%~dp0game_settings.db\*.*" "%~dp0LocalAppData\Settings\game_settings.db" /I /E /Y 

mklink /J "%LocalAppData%\Overwolf" "%~dp0LocalAppData"
mklink /J "%ProgramFiles(x86)%\Common Files\Overwolf" "%~dp0Common Files"

Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Overwolf" /v "InstallFolder" /t REG_SZ /d "%~dp0\" /f

"%~dp0icafecloudtrackersetup.exe" -silent