stopping windows services

George Kinney gk_2345 at yahoo.com
Fri Aug 20 09:30:41 EDT 2004


"Bart Nessux" <bart_nessux at hotmail.com> wrote in message
news:cg3lgl$eou$1 at solaris.cc.vt.edu...
> 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