0

I have a Silverlight Application. I need to get registry values, and I used Microsoft.Win32 .
Still, when I'm trying to access Registry object

string path = (string)Registry.GetValue(@"....);

the Registry is marked by red underline, and the error is:

"Cannot access internal class 'Registry' here."

What am I doing wrong?

Nkosi
  • 235,767
  • 35
  • 427
  • 472
Tali B.
  • 125
  • 1
  • 11

1 Answers1

0

As referenced here:

Access registry from Silverlight OOB

and

Reading from the registry with Silverlight

it is possible once certain criteria are met. The gist of accessing the registry from silverlight application is :

using (dynamic shell = AutomationFactory.CreateObject("WScript.Shell")){
    var key = shell.RegRead(@"HKLM\SOFTWARE\Wow6432Node\......");
}

Hope this helps.

Community
  • 1
  • 1
Nkosi
  • 235,767
  • 35
  • 427
  • 472