As you said, "you can never know if the app will not crash before it resets
the Registry back to its original value." This holds true for the easy
approach as well as hooking system events. In fact, it is even more of a
danger when hooking system events. If an app crashes while hooking system
events, this can cause the system to behave in unforeseen ways, even
crashing the system.
There are registry events that you can hook into using WMI or C++ at
http://windowssdk.msdn.microsoft.com.../ms747845.aspx but it does
not work for the HKEY_CURRENT_USER hive and only monitors changes - not
reads.
And, although I know you don't like doing things the easy way, you could
always simply open the Windows Control Panel, then open sound properties
dialog and either choose silent sound scheme or just set no sound for start
navigation event.
Is there a reason for not setting this property permanently via the sound
properties control panel applet? After all, that sound sure is annoying.
"ewolfman" <ew******@yahoo.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Yeah, but thats the easy solution. Although it has its downsides too,
because it affects all navigation till the app closes, plus you can
never know if the app will not crash before it resets the Registry back
to its original value.
That's why I was looking for a different solution.
smerf wrote:
>Just a thought.....
Wouldn't it be easier to use System.Diagnostics.Process to watch for the
application to start - change the value in the registry to a non-clicking
sound - then, when the app closes, change it back?
You'd probably want this solution running as a service.
Even easier (and no service needed) would be to write a tiny app that
changes the registry key, launches the webbrowser and replaces the
registry
key when the browser closes.
Just a thought.....
"ewolfman" <ew******@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googleg roups.com...
Hi,
Is there any way in which I can monitor / hook the Registry, and upon a
call to a specific key from a specific application - swap the returned
value?
I was thinking of using this method to overcome the "click" sound of
the WebBrowser, without having to affect the Registry permanently. This
way I could monitor the call for the sound file to be played (located
in
HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\ Navigating\.Current)
and hope to return an empty or null string instead.
Any idea on how to do this?
Thanks.