473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Monitor or hook a call to the Registry, and swap the returned value

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.

Sep 25 '06 #1
6 2498
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.googlegr oups.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.

Sep 25 '06 #2
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.googlegr oups.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.
Sep 25 '06 #3
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.

Sep 26 '06 #4
I'm aware of the WMI capabilities, and this is why I asked the question
in the first place.

Its not that I don't like the easy way - of course I'd like to find an
easy way. The thing is that I don't think that switching the navigation
sound off, globaly, for the purpose of a single client application
instance, is the correct choice (unless I don't have any other choice,
and in this case I will ask the user for permission to do so).

Sep 26 '06 #5
There is one other option for your user... You can use AutoIT (freeware) to
give your user a simple icon to double click to turn the sound on or off.
You can get it at http://www.autoitscript.com/autoit3/. You can even make
compiled executable scripts that can be run without having to install AutoIT
on the users system.

Sorry I couldn't be of more help. Good luck to you.
"ewolfman" <ew******@yahoo.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
I'm aware of the WMI capabilities, and this is why I asked the question
in the first place.

Its not that I don't like the easy way - of course I'd like to find an
easy way. The thing is that I don't think that switching the navigation
sound off, globaly, for the purpose of a single client application
instance, is the correct choice (unless I don't have any other choice,
and in this case I will ask the user for permission to do so).

Sep 26 '06 #6
Sorry I couldn't be of more help. Good luck to you.

Thanks for trying.

Sep 27 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: bughunter | last post by:
Hi, Consider this code: ---- Monitor.Pulse(oLock); Monitor.Exit(oLock); ---- If a thread was waiting on oLock then will the current thread
11
by: Michi Henning | last post by:
Hi, I'm calling Monitor.Wait() from a console event handler. It's not working -- the call to Wait() immediately causes the process to exit. Is it impossible for some reason to call Wait() from...
4
by: msnews.micorsoft.com | last post by:
i want to receive a message when a window was activated. I use the WH_CBT type hook to process,the code is following: LRESULT CALLBACK CBTProc(int nCode,WPARAM wParam, LPARAM lParam) { HWND hWnd;...
9
by: Jesse | last post by:
Hi All, I want to be able to make an engine in VB.Net which creates a bridge between applications and the system registry, so before it's processed by the O/S, I want to be able to have the...
11
by: Yelena Varshal via AccessMonster.com | last post by:
Hello, I have a problem with one of msaccess.exe API calls that work on my desctop but does not work on the laptop from within MS ACCESS. There is a lot of differences between 2 computers...
12
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock...
10
by: RobinS | last post by:
Hello to all, and happy new year! I have this application that someone wrote that I'm sort of checking out. The forms look fine in design mode, but when I run the application, it crops off the...
2
by: TwistedPair | last post by:
All, This is sort of a continuation of a previous post of mine. The code below basically reads a registry key to get a path to a folder and it watches for files created in that folder (only...
0
by: TwistedPair | last post by:
All, I had some great advice about this a bit ago, but I'm just not good enough with this code to put together all the pieces. The way the code below works is as a service. When it is started,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.