creating a scheduled task to restart an existing service in SERVICES.MSC


  I have a service called "workflow" in services.msc (on Windows 2008 Std) that becomes ineffective from time to time, so I end up restarting it once a week on average when the user calls me.
 Can I create a DOS command script, store in .BAT file and have it run once a day so that I don't have to open SERVICES.MSC and re-start every time the user calls me with the problem.

Path to Executable:
C:\Program Files\Software Systems, Inc\DirectoryName\Workflow.exe
Logon as "Local System Account"

Who is Participating?
net stop workflow
net start workflow

Open in new window


taskkill /F /IM workflow.exe
C:\Program Files\Software Systems, Inc\DirectoryName\Workflow.exe

Open in new window

Top one will use the services.msc snap in to stop/start cleanly

Bottom one will forcefully kill the process and start it again.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.