Intercepting a specific messagebox (driver updated messagebox)

H

Himanshu

Does anyone know if there is a way detect specific message box popups.
Sometimes when certain PnP hardware is inserted (PCMCIA card) a
"driver updated..., do you want to restart Y/N" message appears. I
would like to detect and, either prevent that message from showing or
select NO and close it, before the user can interact w/ it. Is there
a windows API function like FindWindow that would work? If there is
no way to do this is there a way to disable driver update messages
only. I already no how to intercept and disable all messages, but I
don't want to risk losing other important messages. Finally if
someone has a better explanation than the one I gave for why the
message pops up in the first place, let me know.

Thanks,
Himanshu
 
S

Slobodan Brcin \(eMVP\)

Hi Himanshu,

This message is shown probably by newdev.dll try deleting this file so that we are sure that it is a culprit. (You don't need it
anyway for your image to work properly).
If this is a problem then read about CoInstallers you need to register your CoInstaller with driver that will cancel reboot bit if
you know for sure that your device will work properly without reboot.

Regards,
Slobodan
 
K

KM

Himanshu,
Does anyone know if there is a way detect specific message box popups.
Sometimes when certain PnP hardware is inserted (PCMCIA card) a
"driver updated..., do you want to restart Y/N" message appears. I
would like to detect and, either prevent that message from showing or
select NO and close it, before the user can interact w/ it. Is there
a windows API function like FindWindow that would work?

Did I get it right - you want to filter out some messages?
Look at the FindWindowEx and EnumWindows/EnumChildWindows API functions.
With the latter you would be able to create any possible window filtering procedure.
If there is
no way to do this is there a way to disable driver update messages only.

How about removing "Add Hardware Control Panel" component or just disabling newdev.dll?
 
H

Himanshu

Thanks for all suggestions. I will be taking some time to look into
both options presented. Yes KM, your understanding was correct. I
will post my result.
Thanks,
Himanshu
 
K

KM

This is true. It would definitely be better to remove the source of the problem first.

However (thinking as a app guy :) ) if you have time with the message filtering you can create much more flexible procedure
(filter) to cover some more message types, not only driver update messages.
It could be useful for an embedded device with custom and controlled UI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top