开发者

Accessing a registry entry for a server IP

开发者 https://www.devze.com 2023-01-10 11:20 出处:网络
Is there a way to get a registry value from a server IP in c#? I know to get for a local machine Registry.LocalMachine.OpenSubKey(@\"Software\\Test\"))

Is there a way to get a registry value from a server IP in c#?

I know to get for a local machine

Registry.LocalMachine.OpenSubKey(@"Software\Test"))

Instead of local machine, i need to find out for a serve开发者_高级运维r IP, in other words i need to access registry entry of test folder under software residing in a server.

Yours thoughts are appreciated.


If you're trying to open a key from a remote machine, check out this MSDN article. It basically involves the following:

  1. Setting RegistryPermissionAttribute and SecurityPermissionAttribute for security purposes.
  2. Using RegistryKey.OpenRemoteBaseKey to connect to a remote key.

HTH

0

精彩评论

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