2 replies
by sgt_shultz
here is sgt 2 cejts. more details on your particular situation might help us give a more complete answer. but what i would do is 2 batch files, one with net stop and and the other with net start
the name of the service can be tricky to find out but that is just what these guys here are good at. i am thinking you may also need to unregister and reregister a dll depending on what you are doing. for that use regsvr32
by joshua1
Batch files are simple. Usage example:
File 1: Net Stop Spooler
File 2: Net Start Spooler
Schedule them 2 minutes apart and you're off.
This works for simple stuff, but gets trickier depending on the service you're tackling or how to handle errors.
I'd recommend looking into WMI/WSH. This gives you much more control (over error handling, and over the system as a whole). You can google terms like wmi, wsh, tutorial, how-to, etc. and find more info. The Microsoft Script center is a great resource: www.microsoft.com/technet/scriptcenter/
Check out Sesame Script from the MS Script Center for an introduction to scripting.
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending