Skip to content

Commit 41935e2

Browse files
committed
Enhance Windows auto-start instructions for Syncthing with PowerShell script example
1 parent 2753273 commit 41935e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/data/blog/syncthing-synchronize-my-notes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ App Store 中先下载 Synctrain,我们先来把同步服务器添加进来,
2222

2323
## 其它
2424
### Windows 下自动后台运行
25-
在运行中输入 `shell:startup` 新建一个快捷方式,把 Syncthing 地址后面加上`--no-console --no-browser`即可
25+
在运行中输入 `shell:startup` 打开启动文件夹,新建一个快捷方式,把 Syncthing 地址后面加上`--no-console --no-browser`即可。在 Win11 中由于默认使用的是终端程序,导致不能正常隐藏,解决办法是用计划任务运行一段 ps 脚本。
26+
```ps
27+
Start-Process -FilePath "D:\syncthing.exe" -ArgumentList "--no-console --no-browser" -WindowStyle Hidden
28+
```
29+
在计划任务中,用 PowerShell 打开这个脚本即可隐藏启动 Syncthing。
2630

2731
### 将服务器中的端口映射到本地
2832
VS Code 中的端口映射太方便开发了,同样的方法我们在不用改防火墙配置就能访问服务器管理网页,搜了一下,原来就是一条命令 `ssh -L (本地端口)8888:localhost:8384(服务器端口) server_user@server`

0 commit comments

Comments
 (0)