This script will show programs and things that start-up automatically on your computer. It is a useful script for a help desk, or net admin to run when troubleshooting desktop performance issues. It uses the Win32_StartupCommand wmi class, and can easily be incorporated into other scripts.


' NAME: <ShowStartUpPrograms.vbs>
' COMMENT: Key concepts are listed below:
'1.uses Win32_StartupCommand wmi class
Option Explicit
On Error Resume Next
dim strComputer
dim wmiNS
dim wmiQuery
dim objWMIService
dim colItems
dim objItem

strComputer = "."
wmiNS = "\root\cimv2"
wmiQuery = "Select * from win32_StartupCommand"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & wmiNS)
Set colItems = objWMIService.ExecQuery(wmiQuery)

For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Command: " & objItem.Command
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "Location: " & objItem.Location
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "User: " & objItem.User