Starting and Stopping a Service


Click here to change the theme.

My MySQL Service is a HTML Application (file extension HTA) file that can start and stop a service. It probably works only for Windows NT/2000/XP and later, since Windows 96/98/ME and such do not really have services. The service used in this sample is MySQL but it should be easy to modify the sample for other services instead. This sample uses WMI, as does the other sample script I have provided.

HTML Application (HTA) Files

When you click on the link above, you should have the opportunity to download it (the HTA file). To execute the application, after downloading, just open the file by double-clicking or whatever. A HTML Application (HTA) file has more access to a system than a HTML file does, which means that we don't get prompts asking for permission to use things such as ActiveX controls. The HTA file has automatic permission to do things that other applications (such as an EXE) can do.