如果它自动出现在窗口7中,则杀死错误过程 [英] Kill error process if it appears in window 7 automatically
问题描述
我正在运行一些自动化脚本.在测量的某个阶段,其中一个过程(在我的情况下为iMPACT)失败了.依次调用window7生成错误对话框.如果该过程出现在实验过程中,我该如何自动关闭或终止该过程.我已经附上了测试执行过程中出现的错误的屏幕截图.
I am running some automation script. During some point in measurement one of the process (iMPACT in my case) gives fails. This in turn invokes window7 to generate error dialogue box. How can I automatically close or kill this process if it appears in the middle of experiment. I have attached the screenshot of the error that appears during test execution.
推荐答案
Windows有一个称为ErrorMode的注册表设置,该设置控制发生这些类型的错误时将发生的情况.默认是显示对话框,但是您可以让系统将错误写入事件日志.请注意,这是系统范围的设置,因此会影响所有程序.有效值为:
Windows has a registry setting called ErrorMode that controls what happens when these types of errors occur. The default is to show the dialog boxes but you can have the system write the errors to the event log instead. Just be aware that it's a system wide setting so it affects all programs. The valid values are:
0 Errors are serialized and wait for a response.
1 If the error does not come from the system, then the system
continues in normal operating mode. If the error comes from the
system, then it is written to the system log; no user
intervention is required and dialog boxes are not displayed.
2 The error is written to the system log; the dialog box is not
displayed.
请参见 https://support.microsoft.com/en-us/kb/124873
这篇关于如果它自动出现在窗口7中,则杀死错误过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!