运行synthing不要控制台窗口和浏览器弹窗

34 次阅读

本文最后更新于 2026年5月11日。

把下面内容保存为bat文件运行


@echo off
REM 完全隐藏窗口
if "%1" == "h" goto execute
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0,false)(window.close)&&exit
:execute

REM 设置环境变量阻止浏览器打开
set STNOBROWSER=true

REM 静默启动Syncthing
"C:\Program Files\s\green\syncthing-windows-amd64-v2.0.2\syncthing.exe" --no-browser --no-console >nul 2>&1

REM 立即退出批处理
exit

最新可用版本 把下面内容保存成bat

if not “%1″==”hide” start /min “” “%~dpnx0” hide && exit
“C:\Program Files\s\green\syncthing-windows-amd64-v2.0.2\syncthing.exe” –no-console –no-browser