Results 1 to 18 of 18

Thread: Write to and Read from the HKEY_CLASSES_ROOT in the Registry

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2011
    Posts
    87

    Question Write to and Read from the HKEY_CLASSES_ROOT in the Registry

    I am using Visual Studio 2013 and have almost completed conversion of my project from vb6 to vb.net

    I need the application to be able to read and write to the HKEY_CLASSES_ROOT in the Registry (for file extension associations)

    When I try to use:

    Code:
    ' This works OK
    My.Computer.Registry.CurrentUser.CreateSubKey("MyTestKey")
    
    ' This does NOT work
    My.Computer.Registry.ClassesRoot.CreateSubKey("MyTestKey")
    I get:

    "An unhandled exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

    Additional information: Access to the registry key 'HKEY_CLASSES_ROOT\MyTestKey' is denied"

    The folder "HKEY_CLASSES_ROOT\MyTestKey" is NOT actually created

    Is it possible to modify permissions so that I can develop this program without running as Administrator and then enable my users to run it as non-Administrators?

    Obviously, I want users to be able to just run it (in other words I don't want them having to personally access the Registry)

    But either way, an idiot's guide to permission granting would be very useful ... many thanks
    Last edited by wavering; Nov 26th, 2014 at 05:49 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width