Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. Option Explicit
  2.  
  3. ' variable declaration
  4. Dim svcs
  5. Dim procList
  6. Dim proc
  7. Dim msg
  8.  
  9. ' Process List Get
  10. Set svcs = WScript.CreateObject("WbemScripting.SWbemLocator").ConnectServer
  11. Set procList = svcs.ExecQuery("Select * From Win32_Process")
  12.  
  13. ' Process name Get
  14. For Each proc In procList
  15. msg = msg & proc.Description & vbCrLf
  16. Next
  17.  
  18. ' Output
  19. MsgBox msg
  20.  
  21. Set svcs = Nothing
  22. Set procList = Nothing
  23. Set proc = Nothing
  24. Set msg = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement