0

Possible Duplicate:
Remote Registry

I was doing a task to enter values in to registry.But it works only for local machine(mymachine) but if that is a remote system ,that time also writing in to my system. I dont know how to write in to remotesystem which have access also. The value string CurrentServer will give the server name ,it can be local system and remote system.

This was the code i was using previuosly, what modification i need to do here?, i saw we can use RegistryKey.OpenRemoteBaseKey to open registry value

         string CurrentServer = Member.GetServerName();
          RegistryKey rk = Registry.CurrentUser.OpenSubKey((LeafeRegistry.TempRoot ), true);
          rk.SetValue("ShowSystemName", tvvserver);
Community
  • 1
  • 1
ponting
  • 105
  • 2
  • 13
  • i have opened key by using RegistryKey.OpenRemoteBaseKey ,but not able to write it, i have admin privilege to that system, what to do now? – ponting Nov 30 '12 at 09:11
  • Requires impersonation, admin rights, and local log-on rights to that system. Duplicate of this post, too - see my answer at http://stackoverflow.com/questions/4330065/impersonate-admin-account-to-edit-registry-key-not-working-c/42403656#42403656 – vapcguy Feb 23 '17 at 15:21

1 Answers1

0

This thread seems related.. Remote Registry

Another possibility I found: Microsoft.Win32.Registry, Microsoft.Win32.RegistryKey and related Microsoft.Win32 registry enumerations are used for reading and writing to and from the System Registry

Community
  • 1
  • 1
swcraft
  • 2,014
  • 3
  • 22
  • 43
  • i have opened key by using RegistryKey.OpenRemoteBaseKey ,but not able to write it, i have admin privilege to that system, what to do now? – ponting Nov 30 '12 at 09:10
  • UAC is enabled in that system , can't we write forcefully in to registry? – ponting Nov 30 '12 at 09:15