Home > Net >  Start XAMPP Control Panel Apache MySql from Python 2.7 script
Start XAMPP Control Panel Apache MySql from Python 2.7 script

Time:11-18

I would like to automatically start Apache and MySql of the XAMPP Control Panel without having to make it to the users of the application. Using Python 2.7
The buttons are highlighted below.

XAMPP Control Panel v3.2.4

Thanks in advance!

CodePudding user response:

Open Windows Command Prompt as Administrator

Type 'net start' to see a list of running services windows.

locate the name for service e.g. "Apache2.4"

write python command to start/stop/restart service....

import win32serviceutil
win32serviceutil.StartService('Apache2.4')
win32serviceutil.RestartService('Apache2.4')
win32serviceutil.StopService('Apache2.4')
  • Related