“允许服务与桌面交互”使用本地系统以外的帐户配置 Windows 服务时,该选项不可用
从控制面板配置 Windows 服务时,为什么“允许服务与桌面交互”选项仅适用于本地系统帐户,不适用于任何其他帐户?我想配置 Windows 服务,以便允许与桌面交互,而不管它配置为运行的帐户是什么。如何实现?
Why the option ‘Allow service to interact with desktop’ is only available for Local System account and not for any other account while configuring a windows service from control panel? I want to configure the windows service so as to allow interaction with desktop irrespective of the account it is configured to run with. How to achieve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是个好问题!我从未见过微软官方的解释,但我猜测原因与权限和权限有关,不想误导用户。
并非所有用户都是生而平等的。有些无权在会话 0 上显示用户界面,或与其一起运行的任意程序(和资源)完全交互。让这些用户能够显示服务中的 GUI 元素可能会导致混乱。例如,如果具有有限权限的用户帐户将 Windows 资源管理器的实例作为服务启动,则该窗口可能无法接受从交互式用户启动的“常规”资源管理器中删除的文件。这种事情可能很难诊断和解释!
请注意,Windows 当然可以做您喜欢做的事情,并且我们一直在我们的服务应用程序中对其进行编码 (http://www.CoreTechnologies .com/)。 Windows 根本不向任何任意用户提供该选项。
当然,请退后一步,留意 Vista 中的变化。 “会话 0 隔离”是交互式 Windows 服务的游戏规则改变者!
that is a good question! I have never seen an official explanation from Microsoft, but I would guess that the reason has to do with permissions and rights and not wanting to mislead users.
Not all users are created equal. Some do not have the rights to display a user interface on session 0, or interact fully with arbitrary programs (and resources) it is running alongside. Having those users able to show GUI elements from a service may lead to confusion. For example, if a user account having limited rights starts an instance of Windows Explorer as a service, that window may not be able to accept dropped files from a "regular" explorer started by the interactive user. This sort of thing may be very difficult to diagnose and explain!
Note that Windows can certainly do what you like and we code it all the time in our service applications (http://www.CoreTechnologies.com/). Windows is simply not making that option available to you for any arbitrary user.
Of course please please take a step back and beware changes in Vista. "Session 0 Isolation" is a game changer for interactive Windows Services!