[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-win32
Subject:    MySQL Service Status
From:       "Samuel" <samuel () socal ! rr ! com>
Date:       2004-05-28 17:30:02
Message-ID: 003001c444d9$6974f0c0$5755a518 () samsystem
[Download RAW message or body]

The following VB script uses Windows® Management Instrumentation (WMI) to
show whether the MySQL service is started or stopped.

    Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\.\root\cimv2")
    Set objMySQLService = objWMIService.Get("Win32_Service.Name='MySQL'")
    Wscript.Echo objMySQLService.State

See the following page for other relevant sample scripts. Note that they all
use "ExecQuery" to get instances of a service, whereas the sample above uses
"Get".

http://www.microsoft.com/technet/community/scriptcenter/services/default.mspx

Specific samples are: "Configure Service Start Options", "Start a Service
and Its Dependents" and "Stop a Service and Its Dependents".

Also note that WMI is the Microsoft implementation of Web-Based Enterprise
Management (WBEM), which is a standard for accessing management information.


-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/win32?unsub=mysql-win32@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic