禁止会话 0 中的 Windows7 消息 [英] Suppress Windows7 messages in Session 0

查看:32
本文介绍了禁止会话 0 中的 Windows7 消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 Windows 服务,它在后台安装并在用户系统上运行,但在某些 Windows 机器上,用户收到错误设备或程序已请求您注意"这是 Windows 7 特有的.

We have a windows service that gets installed and runs on users system in the background, but on some windows machine user get an error "A device or program has requested your attention" This is specific to Windows 7.

这是因为当我们使用 MSI(用 WIX 创建)在用户计算机上安装 .exe 时,我相信安装程序作业在会话 0 上运行,并且当出现任何提示时,会提示用户程序已请求关注然后他切换到会话 0.我们可以禁止在会话 0 中运行的安装程序或 exe 的消息.

This is because when we are installing the .exe on the user machine using MSI(created with WIX), the installer job I believe runs on Session 0, and when any prompt appears the user is prompted that a program has requested attention and he gets switched to Session 0. Can we suppress messages for installer or exe running in Session 0.

谢谢.

推荐答案

要解决此问题,您必须确定用户切换到会话 0 时显示的 UI、显示的内容以及如何删除它.

To fix this you will have to determine what UI is shown if the user switches to Session 0, what shows it, and how to remove it.

服务在会话 0 上运行.在 Windows Vista 之前,它们可以与桌面交互,很多人都这样做了.很有可能您的服务正在尝试显示一些 UI.检测到这一点后,Windows 会尝试帮助您.修复服务以避免显示 UI,消息将消失.

Services run on Session 0. Before Windows Vista, they could interact with the desktop, so many did. Chances are your service is trying to show some UI. Upon detecting this, Windows is trying to help you out. Fix the service to avoid showing UI, and the message will go away.

对于系统上下文中的延迟自定义操作(因为这些操作由 Windows Installer 服务调用),这也可能发生是合理的,但我从未遇到过这种情况.如果是这样,修复方法是相同的:使该操作不显示任何 UI.

It's plausible that this could also occur for a deferred custom action in the system context (as those are invoked by the Windows Installer service), but I've never run into this scenario. If so, the fix is the same: make that action not show any UI.

这篇关于禁止会话 0 中的 Windows7 消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆