I have an app which instantiates a local OLE server.
Under certain conditions this server opens a dialog box in response to a call to one of it’s exposed methods.
Do by any means there is a possibility to suppress this box, or somehow “auto-confirm” it?
The issue is the app shall run as scheduled task, and hangs if the dialog pops up.
I have access to the app’s sources, but not to the OLE server’s sources.
This is on win2k3.
I solved this issue by a somehow more or less reliable workaround, depending on the uniqueness of the pop-up window’s text caption.
I wrote a small program, which scans all top-level windows using
EnumWindows(), graps their caption usingGetWindowText(), compares the caption to a pattern provided on program startup and if a match occurs posts (usingPostMesssage()) aWM_CLOSEto this window.This process is repeated every T milli-seconds.
This programm is run in parallel to the process creating the OLE server which opens the unwanted pop ups and closes them latest after T milli-seconds.
If run every 1000ms seconds no visible system load appears.
Using VC10 the binary is very light weighted (<8k), the only dependency is
msvcr100.dll, no setup is needed, if the latter is put in the same directory as the binary itself. I built it on win7 and it runs seamlessly under win2k and win2k3 … 🙂The sources to this solution (along with VC10 solution/project files) can be found here: https://github.com/ealk/wd