stopping windows services

George Kinney gk_2345 at
Fri Aug 20 15:30:41 CEST 2004

"Bart Nessux" <bart_nessux at> wrote in message
news:cg3lgl$eou$1 at
> Can Python be used to stop windows services? I'm writing a script to
> automaically remove some troublesome Symantec software, but before
> running the main removal script, I need to kill some services.

if you know the services name, and are running under an account with
sufficient permissions, you could just use the cmd shell.

i.e. os.system('net stop Apache2') - kills my apache server, and obviously
os.system('net start Apache2') starts it again.

Probably a nicer API out there somewhere though.

More information about the Python-list mailing list