Skip to main content
Solved

Restart notification using Apple's dialog

  • August 16, 2016
  • 1 reply
  • 12 views

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

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

1 reply

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

If i'd just searched harder!

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

does what i need