René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Listing Processes with VBScript | ||
list_processes.vbs
Dim WMIService : Set WMIService = GetObject("winmgmts:") Dim processList : Set processList = WMIService.ExecQuery("select * from win32_process") Dim process For Each process In processList WSCript.Echo(process.Name & " (" & process.ExecutablePath & ")") Next
This script should be executed like so:
C:\>csript list_processes.vbs
because WScript.Echo by default creates a message box. If the script is started with cscript, it prints the messages to the console.
Links |