Skip to content

Instantly share code, notes, and snippets.

@danijeljw
Created October 30, 2013 09:32
Show Gist options
  • Save danijeljw/7229675 to your computer and use it in GitHub Desktop.
Save danijeljw/7229675 to your computer and use it in GitHub Desktop.
tell application "System Events"
-- Careful of things we DON'T want to remove...
get the name of every login item
-- Check for both.
if login item "MacProtector" exists then
delete login item "MacProtector"
display dialog "Removed MacProtector from Login Items."
else
display dialog "No MacProtector infection found."
end if
if login item "MacDefender" exists then
delete login item "MacDefender"
display dialog "Removed MacDefender from Login Items."
else
display dialog "No MacDefender infection found."
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment