Announcement

Collapse
No announcement yet.

Stop service( Example stop 'print spooler' service)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stop service( Example stop 'print spooler' service)

    You can use below script to stop any service with name provided in the script,


    Note: In this script we have illustrated how to stop printer spooler service.



    Code:
    import os;
    result=os.popen('wmic service spooler  call StopService').read();
    print(result);


    sample output would be as below,


    Click image for larger version

Name:	stop.jpg
Views:	1
Size:	24.5 KB
ID:	4788

Working...
X