Try to change:
RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path);
To:
RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
More Related Contents:
- How to start WinForm app minimized to tray?
- Windows Application Startup Error Exception code: 0xe0434352
- Localization of DisplayNameAttribute
- The name ‘ConfigurationManager’ does not exist in the current context
- How do I connect to an .mdf (Microsoft SQL Server Database File) in a simple web project?
- Best way to deploy Visual Studio application that can run without installing
- Don’t stop debugger at THAT exception when it’s thrown and caught
- How to pass parameters to the custom action?
- How to debug a referenced dll (having pdb)
- How can I embed an application manifest into an application using VS2008?
- app.config for a class library
- How to check the OS version at runtime, e.g. on Windows or Linux, without using a conditional compilation statement
- Request.UrlReferrer null?
- Unable to connect to ASP.Net Development Server issue
- Selectively suppress custom Obsolete warnings
- WiX silent install unable to launch built in .EXE: WiX v3
- Difference between the KeyDown Event, KeyPress Event and KeyUp Event in Visual Studio
- How to make an installer for my C# application?
- Microsoft Visual Studio and C#: How to Visually Add Events to Controls?
- Is there anyway to #define CONSTANT on a solution basis?
- Convert to UCS2
- Put WPF control into a Windows Forms Form?
- How do I programmatically list all projects in a solution?
- What is MyAssembly.XmlSerializers.dll generated for?
- How to declare a friend assembly?
- Why doesn’t VS 2008 display extension methods in Intellisense for String class
- How can I get “Copy to Output Directory” to work with Unit Tests?
- HttpWebRequest: The request was aborted: The request was canceled
- How to add namespaces in web.config file?
- More Than Two main Method in Visual Studio application?