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

List:       mysql-win32
Subject:    Executing VBScript
From:       "Samuel" <samuel () socal ! rr ! com>
Date:       2004-05-28 18:20:11
Message-ID: 005401c444e0$6a7fcce0$5755a518 () samsystem
[Download RAW message or body]

I forgot about wrapping, and the script in my previous message got wrapped.
The following is a modified version that should not be affected by wrapping.
To execute, just put the following into a file with a vbs extension and then
execute it.

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


-- 
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