Skip to main content

Hello.

I'm trying to ensure teams is closed prior to updating app and getting errors when trying to force close it.

 

killall "Microsoft Teams (work or school).app"

 

Works fine with Classic teams i'm sure it's something about work or school part getting lost in code just don't know how to fix it.

 

Thank you for your time.

try AppleScript.. better than a kill:  (you may need to change the name here, don't have teams) 


 


#!/bin/sh

osascript <<EOF
try
tell application "Microsoft Teams"
quit
end tell
end try
EOF

 


If you are using Microsoft's Teams package, the preinstall script in the package will quit teams for you without you needing to do anything else.


If you are using Microsoft's Teams package, the preinstall script in the package will quit teams for you without you needing to do anything else.


Thanks for replying. I do run the pkg but I've noticed since switch to the new teams version app crashes after install but if I fully remove the app then install seems to work better. I was able to script to remove the app just haven't figured out script to force close it as well.


If you are using Microsoft's Teams package, the preinstall script in the package will quit teams for you without you needing to do anything else.


Thanks for pointing me in the right direction here is final script that worked

Quit Teams Classic if it's running
osascript -e 'quit app "Microsoft Teams (work or school)"'

Remove the Teams work or School app
rm -rf //Applications/Microsoft\\ Teams\\ \\(work\\ or\\ school\\).app


try AppleScript.. better than a kill:  (you may need to change the name here, don't have teams) 


 


#!/bin/sh

osascript <<EOF
try
tell application "Microsoft Teams"
quit
end tell
end try
EOF

 


Sorry I replied to wrong post 

 

Thanks for pointing me in the right direction here is final script that worked

Quit Teams Classic if it's running
osascript -e 'quit app "Microsoft Teams (work or school)"'

Remove the Teams work or School app
rm -rf //Applications/Microsoft\\ Teams\\ \\(work\\ or\\ school\\).app


Reply