Enumerates all startup commands on a computer, including those found in the Startup folder and those found in the Registry.

This script was tested using Kixtart 2001 (412) for Microsoft Windows, available from Kixtart.org.

Kixtart
Edit|Remove
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\"+ $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_StartupCommand")
For Each $objItem in $colItems
    ? "Caption:" + $objItem.Caption
    ? "Command:" + $objItem.Command
    ? "Description:" + $objItem.Description
    ? "Location:" + $objItem.Location
    ? "Name:" + $objItem.Name
    ? "Setting ID:" + $objItem.SettingID
    ? "User:" + $objItem.User
Next