I am looking for a way to kill an exe program for Windows, which when testing with a python script crashes and presents a dialog to the user; since this program is called many times, and can run multiple times, this is not suitable.
The problem dialog is a standard Windows error reporting:
"Foo.exe has encountered a problem and needs to close. We are sorry for the inconvenience
and offers buttons for debugging, sending error messages and buttons "Do not send."
I can kill other forms of dialogue that result from crashes (for example, the dialog of rejecting the debug report is okay.)
I tried to execute taskkill.exe, pskill and the terminate () function of the Popen object from the subprocess module that was used to call .exe
Has anyone encountered this particular problem and found a solution?
I expect automation of user input to select a window, and click the "Do not send" button - this is one of the possible solutions, but I would like to do something much simpler
source
share