关闭windows远程桌面后,仍保持远程服务器桌面的活动状态

原文:https://mrxiao.net/disconnect-rdp-keep-windows-desktop-active.html

for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
  %windir%\System32\tscon.exe %%s /dest:console
)

在想要断开远程桌面的连接时,以批处理方式运行上述代码,退出后即可保持服务器端桌面的活动状态

另外,如果需要长时间在浏览器上加载多个网页程序,也要小心浏览器的休眠模式:

上图为Edge的休眠模式

posted @ 2024-03-24 14:10  ice--cream  阅读(588)  评论(0编辑  收藏  举报