DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   Prevent a registry key from deletion (http://www.daniweb.com/forums/thread38781.html)

nanosani Jan 27th, 2006 11:24 am
Prevent a registry key from deletion
 
How can I prevent a registry key from deletion ?? I want to have my application store passwords of the users in a registy key ... so I want to prevent users from deleting the registry key manually.

campkev Jan 27th, 2006 2:39 pm
Re: Prevent a registry key from deletion
 
i don't think you can, nor do I think you should try. It's my registry and if I don't want something in there, I should be able to delete it.

nanosani Jan 28th, 2006 1:08 am
Re: Prevent a registry key from deletion
 
So where should I store the password so that it may not be deleted by anyone.

_r0ckbaer Jan 28th, 2006 6:32 am
Re: Prevent a registry key from deletion
 
well, to make registry access read only you could log into your windows without admin rights :P
another thing maybe would be to store that data in a file and fiddle with the security rights of it (right click file -> choose security tab) and modify these to have some (password protected) user have full rights on these and the rest (including you) have only read access :S

On the other hand what you wanna do there sounds quite impossible cause the currenty logged in user (which has the rights to install the application) will also have the corresponding file access rights on his system, maybe you wanna consider proctecting your file by some system driver, that monitors access to the file and prevents its deletion...

f1 fan Jan 29th, 2006 12:17 am
Re: Prevent a registry key from deletion
 
Is it the users password or the application password? Its going to be tricky. Best place would be isolated storage and possibly some encryption but you wont stop a determined person finding it.

I would have to ask why you have the requirement. It is obviously not your pc so why wont you let me (for example) do whatever i want to my own pc? If it is crucial to have this information then store it where the average person cannot accidently delete it and make it known in the helpfile or whatever that they remove it at their own risk. You can only go so far at protecting things on other peoples pcs. It is their own after all. Its the same with anything else. I guess car manufacturers have hidden the fuel pump from the average driver, but if you are determined to remove it, dont complain when the car wont start.


All times are GMT -4. The time now is 5:23 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC