0

I tried the below code to create Registry Key. but not successfull.

Microsoft.Win32.Registry.LocalMachine.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MyKey", Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);

Even this command is not returning any Exception. I need help on this

Thanks skharod

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Suresh Kharod
  • 51
  • 1
  • 7

2 Answers2

1

You need administrator privileges to create a key in Local Machine.. Perhaps you should try running the application as administrator..

Dear XXX
  • 27
  • 3
0

If you don't get an exception then you know that the key got created.

Look in Software\Wow6432Node instead

Suresh Kharod
  • 51
  • 1
  • 7