popunder new

https://www.blogger.com/blog/posts/1739890295310631346

Tuesday, August 30, 2011

VBS Script to Start the remote registry service

This script will allow you to start the Remote Registry Service on any computer by enering its name or IP
 ' RemoteRegistryservicestart.vbs   
' script to Start Remote Registry on strComputer
Option Explicit
Dim objWMIService, objItem, objService
Dim colListOfServices, strComputer, strService, strInput
strInput = False
' Creates the Input Message Box
Do
strComputer = InputBox("Which Machine? "_
," Remote Machine", strComputer)
If strComputer <> "" Then strInput = True
Loop Until strInput = True
' NB Spelling of RemoteRegistry (No space).
strService = " 'RemoteRegistry' "
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" _
& strComputer & "rootcimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where Name ="_
& strService & " ")
For Each objService in colListOfServices
WSCript.Sleep 1500
objService.StartService()
Next
WScript.Echo "Started " & strService & " on " & strComputer
WScript.Quit

No comments:

Post a Comment