Toggle PC Worx SRT service

Tested on Windows 10, 64bit

When you work with PC Worx SRT, one annoying thing is that its service runs in the background even if you exit it and prevents your computer to enter into sleep mode. You have to stop it from the Task Manager. And once stopped, on win 10, it will not automatically start when you open again the program.

Probably this will be fixed in future updates but until then, here is a simple batch code that would toggle the status. But there is a catch: you have to run it as administrator. See below what’s needed.

Jump to

Step1: Create the file

 
 
  1. echo off
  2. echo PC WORX SRT will be toggled, note that you need to Run as Administrator
  3. echo See here how: http://online-training.ro/toggle-pc-worx-srt-service
  4. for /F "tokens=3 delims=: " %%H in ('sc query "PC WORX SRT" ^| findstr "STATE"') do (
  5.   if /I "%%H" == "RUNNING" (
  6.    net stop "PC WORX SRT"
  7.   )  else      (
  8.   net start "PC WORX SRT"
  9.   )
  10. )
  11. echo If it wasn't successful, drop a line on the above mentioned
  12. echo web page and start/stop manually from Task manager, Services tab
  13. pause

Copy the code and put it in Notepad. Save the file with .bat extension.

Note: if extensions are not displayed on your computer the file will get an invisible .txt at the end. Make sure the saved file is not a simple text one.

Step2: Make shortcut on Desktop

Select the file, ctrl+v, go to Desktop and right-click on an empty space and select Paste as shortcut.

Step3: Make it to run as administrator

Right-click on the shortcut and select Properties=>Shortcut. Click on Advanced.

Here, check Run as Administrator. Then Ok, Ok.

Use this shortcut anytime you need to change the status of the PC Worx SRT service. You’ll be prompted to allow changes on your computer, click Yes.

Alternate script, keeping the window alive

Use this script instead. To run it, you could simply to right-click on it and select Run as Administrator or create a shortcut as above. Once the toggle was done the script asks you if you want to keep the window open and will wait for your input. It’s pretty much the same as keeping Task Manager open and toggle from there.

 
 
  1. echo off
  2. echo.
  3. echo.
  4. echo PC WORX SRT will be toggled, note that you need to Run as Administrator
  5. echo See here how: http://online-training.ro/toggle-pc-worx-srt-services/
  6. echo.
  7. :start_doing
  8. echo.
  9. for /F "tokens=3 delims=: " %%H in ('sc query "PC WORX SRT" ^| findstr "STATE"') do (
  10.   if /I "%%H" == "RUNNING" (
  11.    net stop "PC WORX SRT"
  12.   )  else    (
  13.   net start "PC WORX SRT"
  14.   )
  15. )
  16. echo.
  17. echo Type Y to run again and keep this window open.
  18. echo This way you can avoid the Run as Administrator dialog on the next run.
  19. echo Type N to end it.
  20. choice /c YN /m "Run again and keep window open?"
  21. if errorlevel=2 goto end_doing
  22. if errorlevel=1 goto start_doing
  23. :end_doing
  24. echo.
  25. echo.
  26. echo If it wasn't successful, drop a line on the above mentioned
  27. echo web page and start/stop manually from Task manager, Services tab
  28. echo.
  29. echo.
  30. pause

 

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.