Click here to Skip to main content
15,920,468 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want do application that alerts me with a messagebox when any application wants to edit the registry and get permission from my application that it is ok to go ahead with the edit
Posted
Updated 28-Jun-10 1:58am
v2

What you will need to do is Hook the Windows API Calls that deal with the registry.

First starting point would be to search the articles, there are a few on CodeProject about API Hooking, and also search google, where there are loads of articles out on the net.

I think you also need to prepare yourself for some challenges also if you really want to try!
 
Share this answer
 
v2
I think you're going to face a lot of trouble trying to do this, but you're welcome to try. There are a few things that you should think of, though:

The security in Vista and before that was not much to write home about, but in 7 it's a little different. Here, applications have to ask permission (using the System.IO.Permissions namespace if I'm not mistaken) amongst other thing to write in the registry or certain parts of it, and if the application doesn't have the correct permissions, a dialog will be shown asking if it's ok.

That means that if you succeed in making your application, the user will get TWO alerts at the same time (because I don't think it's possible to disable the internal permissions system).

Also, you might want to ask yourself if your application should protect the WHOLE registry or only certain parts...

Good luck
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900