Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing to the registry
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00666430
Message ID:
00666463
Vues:
15
Are you logged in as an Administrator group account? Without that you can't write to Local Machine only to the user keys.

+++ Rick ---

>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
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform