diff --git a/build-telemac.bat b/build-telemac.bat
index c124643c82310135607995933778e57573677b9f..eccf4d114a913740364cbbfb5727cd0b662fa868 100644
--- a/build-telemac.bat
+++ b/build-telemac.bat
@@ -219,6 +219,21 @@ for %%f in (scripts\python3\*.py) do (
   echo python %%~dp0\python3\%%~nf.py %%* >> scripts\%%~nf.py.bat
 )
 
+rem Patch stbtel_refine.py and stbtel_converter.py to ensure that the batch file
+rem wrapping sbtel.py is called instead of the script itself
+set temp_path=%path%
+for %%a in ("%git_path%\..\..") do set "path=%%~fa\usr\bin;%path%"
+if not %version% == main (
+  echo Patching stbtel_refine.py and stbtel_converter.py...
+  pushd scripts\python3\pretel
+  sed -i 's/stbtel_args\ =\ \[path_stbtel/stbtel_args\ =\ \["stbtel.py"/g' stbtel_refine.py
+  popd
+  pushd scripts\python3\data_manip\conversion
+  sed -i 's/stbtel_args\ =\ \[path_stbtel/stbtel_args\ =\ \["stbtel.py"/g' stbtel_converter.py
+  popd
+)
+set path=%temp_path%
+
 rem Build TELEMAC for gnu.static
 call configs\pysource.gnu.static.bat
 call compile_telemac.py