Code Script .co.uk

Home | Scripts | Tutorials | Disclaimer | Sitemap | Contact

   Running Process Properties
 

Vbscript / Processes And Services / Running Process Properties

Script to display a list of all running processes and their properties in Internet Explorer.

Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 1
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1

Do While (objExplorer.Busy)
Loop

Set objDocument = objExplorer.Document
objDocument.Open


objDocument.Writeln "<html><head><title>Service Status</title></head>"
objDocument.Writeln "<body bgcolor='white'>"

'Start data output

objDocument.Writeln "<table width='100%'>"


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\" & strComputer& " ootcimv2")

Set colServices = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_Process")

For Each objService in colServices
     objDocument.Writeln "<tr><pre>"
 objDocument.writeln "<td width='50%'>" & objService.Name & "</td><pre>"
 objDocument.writeln "<td width='50%'>" & objService.ExecutablePath & "</td><pre>"
 objDocument.writeln "<td width='50%'>" & objService.ExecutionState & "</td><pre>"
 objDocument.writeln "<td width='50%'>" & objService.ProcessID & "</td><pre>"
 objDocument.writeln "<td width='50%'>" & objService.Priority & "</td><pre>"
     objDocument.Writeln "</tr><pre>"
Next

objDocument.Writeln "</table>"

'End data output
 
objDocument.Writeln "</body></html>"
objDocument.Write()
objDocument.Close

Set objDocument = Nothing
Set objExplorer = Nothing






Please note that a disclaimer applies to any code on this page.
 
   Actions
  Go Back
  Bookmark
  Print Page


   Menu
 
- Links
- Reference
- Script Editors
- Tutorials
- Vbscript
     - Active Directory
     - Exchange
     - Files And Folders
     - General
     - Ms Office
     - Operating System
     - Processes And Services
          - Computer Service Properties
          - End Process
          - Running Process Properties
          - Start Stop Service
     - Text Processing
     - User Interaction
     - Web Servers