Removing Login Items

GiveEmHelms
New Contributor III

Our company has recently decided to move away from Skype for Business and start using Microsoft Teams. Part of this process is to remove Skype from the login items about a month before uninstalling. I have attempted some scripts that I have found and they haven't been successful. We are running mainly Mojave and Catalina.

1 REPLY 1

mm2270
Legendary Contributor III

The only way I know how to do it is with an AppleScript command (osascript), which only works on the currently logged in user's login items.
But you'd have to have a proper PPPC profile in place to allow osascript access to System Events for it to work in Mojave and Catalina.

The command would look something like this:

/usr/bin/osascript -e 'tell application "System Events" to delete login item "Skype for Business"'