Skip to main content
Solved

Restart notification using Apple's dialog

  • August 16, 2016
  • 1 reply
  • 0 views

Forum|alt.badge.img+12
  • Valued Contributor
  • 190 replies

I'd like to add a restart to the end of a delete keychain script that users can run from Self Service,
is there any way to trigger Apple's restart dialog so the users can choose to Cancel or Restart, i know
i could create a notification/script using Cocoa Dialog or jamfHelper but i'd like to keep it simple if possible.

I've looked for a keyboard shortcut that simulates restart from the Apple Menu as i thought i could maybe send those key strokes in a script?, and running sudo shutdown -r doesn't give any feedback at the user level.

cheers

Best answer by May

If i'd just searched harder!

osascript -e 'tell app "loginwindow" to «event aevtrrst»'

does what i need

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+12
  • Author
  • Valued Contributor
  • 190 replies
  • Answer
  • August 16, 2016

If i'd just searched harder!

osascript -e 'tell app "loginwindow" to «event aevtrrst»'

does what i need


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings