使用WindowsScript枚举运行中进程

发表于:2007-06-23来源:作者:点击数: 标签:

   
  <job >
  <script language="VBScript">
  logip="202.204.48.112"       //计算机名(IP)
  user=""                    //用户名
  password=""                //密码

  namespace="rootcimv2"       //WMI名称空间
  
  wScript.Echo "STRAT"
  
  set wmiLocator = CreateObject ("WbemScripting.SWbemLocator")  
  set objwmi = wmiLocator.ConnectServer (logip, namespace, user, password)
  
  set col =objwmi.execquery ("select * from Win32_Process")
  
  for each colin in col
  wScript.Echo colin.name
  
  next
  wScript.Echo "END"
  </script>
  </job>

原文转自:http://www.ltesting.net