Important alert: (current site time 7/15/2013 7:42:15 AM EDT)
 

winzip icon

_ VB.NET Registry Class + Example _

Email
Submitted on: 4/26/2002 10:36:08 PM
By: BurningShadow 
Level: Intermediate
User Rating: By 18 Users
Compatibility: VB.NET
Views: 33303
 
     Implents a class for registry manipulation like create key, test for key, create value, ... Please rate. Thanx.
 
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 7 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 Intermediate 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

6/7/2003 4:31:19 PMEJ T

Hi, Excellent code. But one thing, the on error goto staement is so vb6. use the Try, Cach stament insted.
(If this comment was disrespectful, please report it.)

 
1/7/2004 7:51:45 PM

Hi,

This is excellent, it works great and I have used it 2 times. I agree that you should use newer error trapping methods and possibly an error class.

Thanks for the code!
(If this comment was disrespectful, please report it.)

 
4/21/2004 12:43:14 AMFade (Amit BS)

Nice work, I learned,
though you might want to make your code more modular, meaning - you have the same lines of code again and again for each function or procedure.

I will post my registry handle code soon.
(If this comment was disrespectful, please report it.)

 
9/18/2004 10:02:38 AM

Hello, Excellent work, unfortonately this code doesn't work in release, why ?
(If this comment was disrespectful, please report it.)

 
12/7/2005 11:45:47 PMJai

Excellent code, i agree with the comments on ERROR TRAP usage. But plus are greater than the Minus...good work...
(If this comment was disrespectful, please report it.)

 
7/9/2006 3:16:08 PMfatTony

Excellent examples, I disagree with the comments on the error traps, on error goto still has it’s place in VB.Net code, the structures are a matter of taste and can be implemented if desired (and probably would be on a larger project, just to keep the code tidy)
The examples did the job as intended , thank you.

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

 
12/7/2006 10:33:31 PMBinhLV

Excellent code, thanks you because it's very usefull for me, but why don't you use 'Try .. Catch ..' intead of 'On Error .. Go to ..'?
(If this comment was disrespectful, please report it.)

 
12/8/2006 4:58:47 AMBurningShadow

Thank you all for your comments. Today I agree that I should have used the newer error trapping method with try/catch, but this was one of my first submissions after switching from VB6 to VB.NET. So I just wasn´t really familiar with the try/catch method. In my newer submissions you can see, that I have used it.
(If this comment was disrespectful, please report it.)

 
12/19/2006 3:58:31 PMpavitra

i want to make a custom fields engine in my software who to do itplease help me
(If this comment was disrespectful, please report it.)

 
2/14/2008 1:15:27 AMMike Morrow

Does not do anything. Here are the statements I used. No error returned. All is well but the entry does not appear in the registry.

Trying to put in an autorun at startup command.
objNGSRegistry.CreateKey(clsNGSRegistry.ERegistryPossibleRoots.HKEY_LOCAL E_MACHINE,
_
"SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN")
objNGSRegistry.CreateValue(clsNGS Registry.ERegistryPossibleRoots.HKEY_LOCALE_MACHINE,
_
"SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\PVM1010 Companion", "StrVal", _
My.Application.Info.DirectoryPath & "\" & My.Application.Info.AssemblyName & ".exe")

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

 
2/24/2009 4:03:33 AMmike

who knows how t make a system of reservation for a cinema.
I hope some will help me..
Thank you and more powers
(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.