Access registry from Silverlight OOB

扶醉桌前 提交于 2019-12-04 05:30:57

问题


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.


回答1:


we can do it using RegRead

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



回答2:


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.



来源:https://stackoverflow.com/questions/6907484/access-registry-from-silverlight-oob

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!