Skip to content

Instantly share code, notes, and snippets.

@eggist77
Last active March 24, 2024 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggist77/2e04686d7e35f6b3f1ccbf1c2d69f521 to your computer and use it in GitHub Desktop.
Save eggist77/2e04686d7e35f6b3f1ccbf1c2d69f521 to your computer and use it in GitHub Desktop.
[vbs] Get process information
Option Explicit
' variable declaration
Dim svcs
Dim procList
Dim proc
Dim msg
' Process List Get
Set svcs = WScript.CreateObject("WbemScripting.SWbemLocator").ConnectServer
Set procList = svcs.ExecQuery("Select * From Win32_Process")
' Process name Get
For Each proc In procList
msg = msg & proc.Description & vbCrLf
Next
' Output
MsgBox msg
Set svcs = Nothing
Set procList = Nothing
Set proc = Nothing
Set msg = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment