Access registry from Silverlight OOB

2020-04-19 06:18发布

Can I access Registry from Silverlight Out Of Browser, I just want to search/read the key and get key value pairs. Is this possible?

Or, is there any other way like running a powershell script, or launching some other exe to know the values, how can I get the return values from these script/exe to my silverlight application.

2条回答
我欲成王,谁敢阻挡
2楼-- · 2020-04-19 06:52

we can do it using RegRead

    using (dynamic shell = AutomationFactory.CreateObject("WScript.Shell"))
    {
          var key = shell.RegRead(@"HKLM\SOFTWARE\Wow6432Node\......");
    }
查看更多
乱世女痞
3楼-- · 2020-04-19 06:58

OOB can use COM objects, so pretty much "anything" is possible (but it will be Windows specific of course).

That does mean having to develop a COM module yourself (unless you can find one off-the-shelf).

There may be an easier way to access registry, so you may want to leave this question open a while.

查看更多
登录 后发表回答