Important alert: (current site time 7/15/2013 9:19:14 AM EDT)
 

winzip icon

Registry.NET

Email
Submitted on: 10/9/2002 5:30:48 PM
By: Lionhart Systems 
Level: Beginner
User Rating: By 16 Users
Compatibility: VB.NET
Views: 23698
author picture
 
     Finally, Microsoft actually made it fairly straight forward to access the Registry. This simple application show 6 major Registry Calls, CreateKey,DeleteKey,DeleteKeyTree,SetValue,ReadValue,DeleteValue And the best part is they're all done in about 4 to 8 lines of code. This is built into .NET so finally no API calls and Constants to remember.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

12/6/2002 3:26:36 PMWillRawls

I'd change the line:
Dim MyRegistryObject
to
Dim MyRegistryObject As RegistryKey

to make everything more strongly typed.
(If this comment was disrespectful, please report it.)

 
12/24/2002 4:57:57 AMkevin arana

you my friend... are very HELPFUL!
This is exactly what i was looking for.
I needed to know how to manipulate the registry from vb 7 and all of the other samples where useless. But this one show me how :)
I give you a 5!
(If this comment was disrespectful, please report it.)

 
4/6/2003 4:01:12 PM

Thanks cubed!

Just about all of the other regkey examples out there are junk.
(If this comment was disrespectful, please report it.)

 
4/16/2003 2:22:48 PMdiabloice

Nice FSO style registry but there is no advantage of it over using SaveSetting and GetSetting no need to import if your after saving one or two values use these not this method, it's a common PSC aproach don't use the tools supplied make your own, well some should not be remade unless there is a specific need.
(If this comment was disrespectful, please report it.)

 
1/6/2004 4:07:55 AM

This code was excellent, but i have another query. can give permission to a particular group of users in windows to the registry using C#. my mail address is pkella77@hotmail.com.

Please Help me out of this.
Thnaks in Advance

Regards
Praveen Kella

(If this comment was disrespectful, please report it.)

 
1/6/2004 4:10:36 AM

Hi this code was excellent, U really saved me out. but i have another problem I am writing a windows application in that application set up i have to give permission on registry to one User Group. how to give user group permissions using C#.Net.

Thanks in Adavance
Praveen Kella
(If this comment was disrespectful, please report it.)

 
10/26/2004 11:19:55 PM

ty for this code! It is jsut what i needed and is the easiest to follow registry code ive seen.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.