Registry Application

I need to create a simple application that would create a new registry key and a new value. That is all this application is going to do. Can anyone point me in the right direction

Answer this question

Registry Application

  • Papy Normand

    gotchya, i remember doing that one myself, fun!  :-| 
  • JeremyB

    Yeah, to patch the attachment issue in Outlook 2000 SP3 and Outlook 2002. End users need the patch to receive some critical files such as Batch Scripts, Shortcuts, and Access Databases.
  • Gathar

    There are sometimes very good reasons to use the registry, but I try my best to never use it if at all possible.  Mind if I ask what you'll be writing in the registry and for what ultimate purpose
  • bwhunan

    Thanks. I didn't even know that class existed. I figured there was a Registry class, but did not know where to look.

     :) 

  • Brian Clark BCBSMT

    Use the Microsoft.Win32 namespace, taking advantage of the Registry class and its friends.

    For example, you might add this Imports statement:


    Imports Microsoft.Win32

    and then write code like this:

    Dim key As RegistryKey = _
     Registry.CurrentUser.OpenSubKey("Software\Lake\LakeControl", True)
    Dim subKey As RegistryKey = key.CreateSubKey("NewItem")
    subKey.SetValue("NewName", "NewValue")

    to create a new key, and a new subkey. Note that keys aren't writable unless you pass True as the second parameter to the OpenSubKey method, and that you'll need to have permissions to write to the user's registry to be able to run this code. 

  • Jorge Luis

    I finally got it. You can see how if you <post>843</post>. :) 
  • VenomWolf

    I can't even get that. I get an error saying that you can't add it.
  • emma russell

    No I don't sorry.  I don't really create any installs ever.  I heard it's a little bit of a problem right now unless you buy some third party software where most of them just make it a checkbox for your install.  I believe this will be made easier in future versions of VS.NET.  Sorry I don't know how to help!
  • prgeorge

    Yeah. The problem is that I don't want to install the Framework on each computer and I can't figure out how to bundle the .Net Framework in the install package. Do you now how to fix that

     :} 

  • Registry Application