Search code examples
c#windows-7windows-server-2008-r2remote-accessremote-registry

Accessing Remote Registry of Windows 7 and Server 2008 through C#


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.


Solution

  • 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.