Last active
March 24, 2024 10:29
-
-
Save eggist77/2e04686d7e35f6b3f1ccbf1c2d69f521 to your computer and use it in GitHub Desktop.
[vbs] Get process information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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