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

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -