How to connect to the services and registry from a another computer via batch file

2.4k Views Asked by At

I would like to run a batch file that could open the services window and allows me to connect to another computer in order to restart a service on a remote machine. And a different batch file to remote a network registry located in the same domain.

Here are the steps that I'm trying to do using a batch file :

  1. open "services.msc"
  2. connect to another computer...
  3. select computer name (I will then type the computer name manually)
  4. net start RemoteRegistry + Select Startup type to "Automatic"
  5. open "regedit"
  6. GO to File > Connect Network Registry > enter computer name (I will then type the computer name manually once again)
  7. modify the following key : HKEY_Local_Machine>System>CurrentControlSet>services>LanManServer>Parameters

to [0] disable or [1] enable

  1. Restart "Server" services
1

There are 1 best solutions below

0
On

Type sc /?. This is built in to Windows. At it's most simple

sc \\server start service

Registry (reg /?) is the same but the computer name is part of the registry path.

REG QUERY \\server\HKLM\Software\Microsoft\ResKit\Nt\Setup /s