Simple script que nos dice si un proceso se está ejecutando. En el caso siguiente utilizo el notepad.exe pero claro sustituyendo el proceso podéis buscar cualquier otro.

Visual Basic:
  1. Set WshShell = WScript.CreateObject ("WScript.Shell")
  2. Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from Win32_Process")
  3.  
  4. For Each objProcess in colProcessList
  5. If objProcess.name = "notepad.exe" then
  6. Encontrado = True
  7. End if
  8. Next
  9. If Encontrado = True then
  10. Msgbox("Proceso encontrado")
  11. Else
  12. Msgbox("Proceso No encontrado")
  13. End If


Vota este artículo:
1 Estrella2 Estrellas3 Estrellas4 Estrellas5 Estrellas (No Ratings Yet)
Loading ... Loading ...

Posts anterior y posterior:


Posts Relacionados: