Re: Trying to run script to enable and restart service




"AJ" <AJ@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B408BE0B-1028-499E-91E6-450D118A0CEF@xxxxxxxxxxxxxxxx
I'm trying to run a .bat file which will automatically re-enable a
disabled
Windows spooler service and then restart the service. I've got the
following
script ready

sc config spooler start= auto
net start spooler

When the Windows spooler service changes to disabled, i tried putting this
script under the recovery option in the services console - (when service
fails, run this script), but it does not run... i've tried running the bat
file manually and the service is correctly restarted, etc, i just need to
find out how to get it to run automatically when the service sets itself
to
disabled.

I think you have the wrong idea. A disabled service is not the
same as a failed service, hence your script will never be triggered!

What makes you think that the service sets itself to "disabled"?


.



Relevant Pages

  • [HPADM] [SUMMARY] lpspooler Question
    ... You might want to restart the print spooler and use the "-v" option to ... printer script, so anything inside the script may have caused the error. ... and you are sending the data to the remote computer to send to the printer. ... If laser33 uses an HP JetDirect adapter card, ...
    (HP-UX-Admin)
  • Re: WSH error help
    ... Trying to write a script that will take a list of computers from a file, ... stop the spooler process, remove a printer and then start the spooler ... PrintUIEntry command run at each workstation. ...
    (microsoft.public.windows.server.scripting)
  • Re: WSH error help
    ... Trying to write a script that will take a list of computers from a file, ... stop the spooler process, remove a printer and then start the spooler ... Set objWMIService = objwbemLocator.ConnectServer (strComputer, ... wsh.echo "Operation was NOT sucessful" ...
    (microsoft.public.windows.server.scripting)
  • WSH error help
    ... Trying to write a script that will take a list of computers from a file, ... stop the spooler process, remove a printer and then start the spooler ... errReturnCode = objService.StartService ...
    (microsoft.public.windows.server.scripting)