-2

For example : I have my custom exe lets say "sample.exe". Assume firefox was my default browser on windows 10, and now i changed it to google chrome. So after changing default browser to google chrome, is there any way to register sample.exe to receive callback.

Amruta Ghodke
  • 115
  • 1
  • 3

1 Answers1

0

You need to register with the windows registry, identify the key that denotes the default browser and then set up a RegNotifyChangeKeyValue callback. There is a number of possible variations on how a default browser can be set which is - due to the fact that you didn't exactly ask for that - probably too much to ask for inclusion in this answer. Here is a nice article on this topic.

This will call your code when something happens with the specified registry key.

Note this callback is not called on bulk changes to the registry - So depending on the method the default browser is changed, it might or might not be called.

tofro
  • 5,640
  • 14
  • 31