LaunchAgents: What’s running?

Often when someone is in need to diagnose troubles with their macs, I need to know what’s running in the background. And what’s starting on boot up. But it’s not easy to get them to tell you that. So I made this small apple script that will collect needed data, copy it into the clipboard and have it ready for pasting.

Download


set SLD to (list folder ("/Library/LaunchDaemons/") without invisibles)
set SLA to (list folder ("/Library/LaunchAgents/") without invisibles)
set ULA to (list folder ((path to home folder as string) & "Library:LaunchAgents") without invisibles)
set x to ""
set SLDL to "System LaunchDaemons :: "
repeat with theItem in SLD
set x to theItem & "
" & x as string
end repeat
set msg to SLDL & x
set x to ""
set SLAL to "
System LaunchAgents :: "
repeat with theItem in SLA
set x to theItem & "
" & x as string
end repeat
set msg to msg & SLAL & x
set x to ""
set ULAL to "
User LaunchAgents :: "
repeat with theItem in ULA
set x to theItem & "
" & x as string
end repeat
set msg to msg & ULAL & x
set the clipboard to msg
display alert "Result copied to clipboard.
Use CMD + V to paste result."