@echo off
setlocal

set "CHROME="

for /f "delims=" %%I in ('where chrome.exe 2^>nul') do if not defined CHROME set "CHROME=%%I"

if not defined CHROME if exist "%ProgramFiles%\Google\Chrome\Application\chrome.exe"      set "CHROME=%ProgramFiles%\Google\Chrome\Application\chrome.exe"
if not defined CHROME if exist "%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" set "CHROME=%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"
if not defined CHROME if exist "%LocalAppData%\Google\Chrome\Application\chrome.exe"      set "CHROME=%LocalAppData%\Google\Chrome\Application\chrome.exe"

if not defined CHROME (
    echo chrome.exe not found in PATH or standard install locations.
    exit /b 1
)

start "" "%CHROME%" ^
  --user-data-dir="%USERPROFILE%\Downloads\slither_profile" ^
  --no-first-run ^
  --no-default-browser-check ^
  --dns-prefetch-disable ^
  --ignore-gpu-blocklist ^
  --enable-gpu-rasterization ^
  --enable-zero-copy ^
  --canvas-oop-rasterization ^
  --disable-background-timer-throttling ^
  --disable-renderer-backgrounding ^
  --disable-backgrounding-occluded-windows ^
  --disable-occlusion-tracking ^
  --disable-domain-reliability ^
  --no-pings ^
  --blink-settings="dnsPrefetchingEnabled=false" ^
  --disable-features=^
Prerender2,^
PreloadMediaEngagementData,^
OmniboxTriggerForNoStatePrefetch,^
SpeculationRulesPrefetchProxy,^
NavigationRequestPreconnect,^
OptimizationHints,^
OptimizationHintsFetching,^
OptimizationHintsFetchingAnonymousDataConsent,^
OptimizationHintsFieldTrials,^
ContextMenuPerformanceInfoAndRemoteHintFetching,^
NetworkTimeServiceQuerying,^
SafeBrowsingBetterTelemetryAcrossReports,^
CalculateNativeWinOcclusion,^
UseEcoQoSForBackgroundProcess