Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing to the registry
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Writing to the registry
Miscellaneous
Thread ID:
00666430
Message ID:
00666430
Views:
67
Hi guys,
i am trying to create a registry key in my code but i keep getting system.unauthorizedaccessexception occured in mscorlib.dll , cannot write to registry key.

here is my code

using Microsoft.Win32;

RegistryKey Hklm = Registry.LocalMachine;
RegistryKey HkSoftware = Hklm.OpenSubKey("Software");
// errror on the line below
RegsitryKey Hkmycompany = Hkml.CreateSubKey("mycompany");

Can anyone help me.

TIA
Fred Besterwitch, MCP

The harder you work. The luckier you get.
Next
Reply
Map
View

Click here to load this message in the networking platform