Search code examples
c#windows-serviceswindows-10remote-registry

How to start remote registry services on windows 10 from a remote machine using c#/vb


I am facing a problem on windows 10 remote registry services - it stops a short while (10-15minutes) after starting. My program needs to go the remote machines and read the registry. I have even tried setting it up on the group domain policy - which makes it to start when the machine is re-booted - but after 10-15 minutes it stops again (Back to square one :-( )

Is there a way i can remotely start the remote registry service, before I execute the registry read functions so that my code can work?

OR

Is there a setting that can be done through the group policy that will make the service to not stop and keep running?

Pl help!


Solution

  • I have solved the problem by programmatically starting the remote registry service.

        ServiceController remoteRegistryController = new ServiceController("REMOTEREGISTRY", "MachineName"); 
        remoteRegistryController.Start();