WindowsServer保持会话,让前台程序永久执行

本文介绍了如何通过组策略编辑器(gpedit.msc)在Windows Server上设置远程桌面会话,使前台程序永久执行。通过禁用各种时间限制,确保已中断和活动的会话不会被终止,同时涵盖了设置RemoteApp会话的注销时间限制。此外,还提到了解决注册表写入失败的问题,并给出了需要修改的注册表路径,如System、CurrentControlSet下的多个子路径,完成设置后需重启生效。
摘要由CSDN通过智能技术生成

WindowsServer保持会话,让前台程序永久执行

计算机配置–管理模板–Windows组件–远程桌面服务–远程桌面会话主机–会话时间限制

设置已中断会话的时间限制 已启用 否
设置活动但空闲的远程桌面服务会话的时间限制 已启用 否
设置活动的远程桌面服务会话的时间限制 已启用 否
达到时间限制时终止会话 已禁用 否
设置 RemoteApp 会话的注销时间限制 已启用 否

上面这些的时间全部配置成了"从不".

gpedit.msc gpupdate/force

image-20220214101634197

安装Windows失败,写入注册表失败

给上写入注册表的权限,gpedit.msc gpupdate/force

用户配置--管理模板--系统

image-20220214102030830

image-20220214102556122

image-20220214144640699

将图中两条信息分别填入:

System\CurrentControlSet\Control\ProductOptions
System\CurrentControlSet\Control\Server Applications
Software\Microsoft\Windows NT\CurrentVersion

---

System\CurrentControlSet\Control\Print\Printers
System\CurrentControlSet\Services\Eventlog
Software\Microsoft\OLAP Server
Software\Microsoft\Windows NT\CurrentVersion\Print
Software\Microsoft\Windows NT\CurrentVersion\Windows
System\CurrentControlSet\Control\ContentIndex
System\CurrentControlSet\Control\Terminal Server
System\CurrentControlSet\Control\Terminal Server\UserConfig
System\CurrentControlSet\Control\Terminal Server\DefaultUserConfiguration
Software\Microsoft\Windows NT\CurrentVersion\Perflib
System\CurrentControlSet\Services\SysmonLog

确定后需要重启生效。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

WinJayX

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值