beermat: (Default)
greg elkin ([personal profile] beermat) wrote2003-10-16 09:41 am

(no subject)


Any Windows gurus know how to knock up a bit of (.BAT or WSH script?) to
stop a service
delete a registry key
restart that service

(need to force Automatic Update to go look at the new patches on our LAN SUS server by stopping the Automatic Update service from running, deleting the "LastWaitTimeout" key & then restarting the Automatic Update service)

[identity profile] hazeii.livejournal.com 2003-10-16 02:01 am (UTC)(link)
You can in fact use the 'net' command to stop and start services. For the registry tweaking, you just put the regedit changes into a little text file and feed it into regedit...I forget the details, it'd widely around the 'net though.

So, in a batch file, 'net stop' the service, feed the text file into regedit, then 'net start' the service.