说明:判断mysql主进程是否关闭,如果关闭则返回0

创建文件:MySQL-ping.vbs

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objArgs = WScript.Arguments
str1 = getCommandOutput("C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin -uroot -pqaz123wsx ping")

If Instr(str1,"alive") > 0 Then
WScript.Echo 1
Else
WScript.Echo 0
End If

Function getCommandOutput(theCommand)

Dim objShell, objCmdExec
Set objShell = CreateObject("WScript.Shell")
Set objCmdExec = objshell.exec(thecommand)
getCommandOutput = objCmdExec.StdOut.ReadAll

end Function

 

添加自定义key:http://www.cnblogs.com/xiangsikai/p/8289535.html

相关文章:

  • 2021-11-23
  • 2021-09-14
  • 2021-09-26
  • 2021-05-07
猜你喜欢
  • 2021-12-19
  • 2021-12-28
  • 2021-11-17
  • 2021-08-11
  • 2021-12-05
  • 2021-06-24
  • 2021-08-02
  • 2021-09-11
相关资源
相似解决方案