未经我的应用程序许可,如何防止注册表编辑? [英] How can I prevent registry editing without my applications permission?

查看:59
本文介绍了未经我的应用程序许可,如何防止注册表编辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有一个应用程序能够在任何应用程序想要编辑注册表并从我的应用程序获得许可的情况下通过消息框提醒我,可以继续进行edit

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

推荐答案

您需要做的是挂钩处理注册表的Windows API调用.

第一个起点是搜索文章,在CodeProject上有一些关于API挂钩的文章,还搜索google,网上有大量的文章.

如果您真的想尝试,我认为您还需要为遇到的挑战做好准备!
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!


我认为您在尝试执行此操作时会遇到很多麻烦,但是您'欢迎尝试.不过,您应该注意以下几点:

Vista和之前的安全性值得一提,但是在7中则有所不同.在这里,应用程序必须询问权限(如果没有记错的话,请使用System.IO.Permissions命名空间),以便在注册表或其某些部分中进行写操作,以及应用程序是否没有正确的权限. ,则会显示一个对话框,询问是否可以.

这意味着,如果您成功制作了应用程序,则用户将同时收到两个警报(因为我认为无法禁用内部权限系统).

此外,您可能想问自己,您的应用程序是否应该保护整个注册表或仅某些部分...

祝你好运
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


这篇关于未经我的应用程序许可,如何防止注册表编辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆