| | |
Prevent a registry key from deletion
Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
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.
well, to make registry access read only you could log into your windows without admin rights
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
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...
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

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...
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
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.
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.
![]() |
Similar Threads
- I want to manipulate the registry key values through a vb.net application (VB.NET)
- Problems with opening and editing a registry key with C++ (C++)
- deleting registry key for error code 19 (Windows NT / 2000 / XP)
Other Threads in the C# Forum
- Previous Thread: PLEASE HELP about Using C# to add an executable file to my program!
- Next Thread: How To Interface with x25
| Thread Tools | Search this Thread |
.net 2007 access algorithm array bitmap box c# camera check checkbox client combobox control conversion cryptographyc#winformsencryption cs4 csharp customactions database datagrid datagridview dataset datastructure date datetime degrees disabled displayingopenforms draganddrop drawing encryption enum eventcloseformc# excel file form format forms ftp function gdi+ gis image index index-error input install java label list listview load math mathematics mouseclick mysql operator path photoshop picturebox pixelinversion pixels post prime programming radians regex remoting richtextbox rotation search security server setup sleep socket sql statistics stream string table text textbox thread time timer totaldays update user usercontrol validation view visual visualstudio webbrowser winforms wordautomation wpf xml






