开发者

Access registry from Silverlight OOB

开发者 https://www.devze.com 2023-03-24 05:54 出处:网络
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?

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.


we can do it using RegRead

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消