Starting and Stopping a service on windows 2008 R2 through python script -
i trying start , stop windows services through python script on machine running windows 2008 r2. small piece of code have in place stated below
import subprocess import os import time,datetime p = subprocess.popen("sc.exe stop abc", stderr=subprocess.stdout,stdout=subprocess.pipe, shell = true) p.communicate()
Comments
Post a Comment