0

I've been searching for a way to access a Remote Registry of a computer in my Network ( no domain configured ) but failed several times.

Only way I can successfully get access is previously going to regedit and connect to it trought it ( which will ask me to enter user and password ) and then try to do it in my program.

Seems to be a problem with credentials, but I've failed on searching a way to programatically do this in my code.

Regards, Marco.

Ima Geekah
  • 13
  • 1
  • 3

1 Answers1

0

You have to establish the network connection with proper credentials. Sure manually doing a remote registry first will establish this but if you want to establish this in code use this class.

C# Class to establish a network connection with credentials

By the way, we use this to do exactly what you are asking, access remote registry. We establish a connection using creds that have remote registry rights and then we get some remote registry values.

Rhyous
  • 6,510
  • 2
  • 44
  • 50
  • How do you access registry from that point? This is completly different of what I've been doing and dont see how to mix this. Maybe you could tell me how you do it so I can change my part of the code? – Ima Geekah Aug 04 '11 at 14:04
  • You just establish a connection to any share, the C$ or IPC$ share, this just gets you authenticated to the system. Once authenticated, your already existing code, probably using RegistryKey.OpenRemoteBaseKey, should work. – Rhyous Aug 07 '11 at 16:11
  • I went ahead and made a more complete post: http://www.rhyous.com/2011/08/07/how-to-authenticate-and-access-the-registry-remotely-using-c/ – Rhyous Aug 08 '11 at 03:01