抑制 Windows 中的弹出窗口

发布于 2024-07-07 02:42:36 字数 120 浏览 5 评论 0原文

有没有一种简单的方法可以告诉 Windows 不要在无头服务器计算机上显示弹出窗口?

目前,偶尔的应用程序弹出窗口导致我的应用程序冻结,因为没有人可以在控制台上按“确定”。 只需记录到事件日志就足够了。

Is there an easy way to tell Windows not to display popups on a headless server machine?

Currently occasional application popups are causing my app to freeze because no one is available to press 'Okay' on the console. Just logging to the eventlog would be more than sufficient.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

假面具 2024-07-14 02:42:36

根据需要处理的弹出窗口的具体情况,有几种方法。

  1. 对于硬错误弹出窗口处理,HOWTO:如何更改 Windows NT 中的硬错误弹出窗口处理
  2. 创建一个应用程序来抑制消息。 Microsoft 有一些文档(来自 XP Embedded 文档,但这不需要 XP Embedded): 创建 Win32 服务 这允许在消息、日志记录和回复的处理方面进行大量的自定义(即按下您想要的按钮)。

Depending on precisely what popups need to be handled, there are a couple of approaches.

  1. For hard error popup handling, HOWTO: How To Change Hard Error Popup Handling in Windows NT
  2. Creating an application to suppress messages. Microsoft has some documentation (from the XP Embedded documentation, but this does not require XP Embedded): Creating a Win32 Service This allows for considerable customization in the handling of the messages, logging, and replies (i.e. depressing the button you want).
被翻牌 2024-07-14 02:42:36

这一切都取决于弹出窗口的类型,从系统的消息框到自定义对话框。 所以我认为对此没有通用的解决方案。

如果我遇到问题,我会使用宏语言,例如 AutoHotkey(或 AutoIt),来检测弹出窗口的激活并自动单击放弃按钮。

[编辑] 找到一个现成的 AHK 弹出窗口拦截器: 新窗口(弹出窗口)拦截器
也许可以按原样使用,或者作为起点。

It all depends on the kind of popup, from system's message box to custom dialog. So I don't think there is a generic solution to this.

Should I have the problem, I would use a macro language, like AutoHotkey (or AutoIt), to detect the activation of the popup and automate the click on the discard button.

[EDIT] Found a ready to use AHK popup blocker: New window (popup) blocker
Perhaps usable as is, or as a starting point.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文