Logout user script
- by Baconlove
I am trying to create a script in ARD that will let me logout a user. Now I have a script which does start the logout, but I want it to execute instead of waiting 60 seconds. The script currently is:
osascript -e 'tell application "System Events" to log out'
As I said, this works but then I want it to press return on the logout dialog. The script I tried to make it do that is:
osascript -e 'tell application "System Events" to log out' -e 'keystroke return'
which doesn't work.
Is there a way, possibly by telling the system to press Cmd+Opt+q, then Enter, to log out without waiting for the timeout to expire?