@echo off REM Portable: use python on PATH. Avoid py.exe as an extra native-messaging REM stdio hop; Chrome/Brave can be picky about inherited handles. REM Stderr capture lives INSIDE rcjav-host.py now (shared-access append via REM os.open + os.dup2). The previous `2>>` redirection here used cmd.exe's REM exclusive-write file handle, which caused SHARING VIOLATION races when REM two host processes spawned near-simultaneously — surfacing to the REM extension as "Error when communicating with the native messaging host." setlocal set "PYBIN=python" if not exist "%~dp0logs" mkdir "%~dp0logs" "%PYBIN%" -u "%~dp0rcjav-host.py"