Jump to content

Help: Read/Write Registry Using VB?


Guest Alex (nedge2k)

Recommended Posts

Guest nedge2k

Ok, i'm at a loss. I'm trying to write a simple app in VB (.net 2005) that on load will check whether certain reg values exist and be able to create/delete reg values. Nothing seems to be working, i get loads of errors before i've even compiled and i cant find much on msdn/google.

If anyone could post some code that would let me get/write/delete reg values in VB...well...let's just say WM5 users' lives will be made a little easier ;)

I do, however, have a horrible feeling i can only do it in C#, which i dont have a clue about.

TIA

Edited by nedge2k
Link to comment
Share on other sites

  • 4 weeks later...
Guest Peter Foot
Ok, i'm at a loss. I'm trying to write a simple app in VB (.net 2005) that on load will check whether certain reg values exist and be able to create/delete reg values. Nothing seems to be working, i get loads of errors before i've even compiled and i cant find much on msdn/google.

If anyone could post some code that would let me get/write/delete reg values in VB...well...let's just say WM5 users' lives will be made a little easier :)

I do, however, have a horrible feeling i can only do it in C#, which i dont have a clue about.

TIA

<{POST_SNAPBACK}>

There is a comprehensive registry "wrapper" in C# as part of the Smart Device Framework (www.opennetcf.org/sdf/). Therefore I'd recommend either adding the dll as a reference in your project, or grab the c# source and build it into it's own dll, then reference this from your VB app. The more complicated route would be to try and convert the whole class to VB...

Once you reference this code you'll find the OpenNETCF.Win32.RegistryKey class - this all works just like the Microsoft.Win32.RegistryKey in the full .NET framework so there should be plenty of examples to follow.

Peter

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.