• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Prompting for reboot programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prompting for reboot programatically


  • Subject: Re: Prompting for reboot programatically
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 30 May 2012 11:18:24 +0200

Le 30 mai 2012 à 10:30, Arun a écrit :

> Hi All
>
> Any one has a idea of how we can launch the prompt for Mac reboot from a
> Cocoa / Obj-C code?

You can use AppleEvent to ask the loginwindow to do it:

I'm using the C AppleEvent API to do this, but in AppleScript it is equivalent to

tell application "loginwindow" to «event aevtrrst»


-- Jean-Daniel




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Prompting for reboot programatically (From: Arun <email@hidden>)

  • Prev by Date: Prompting for reboot programatically
  • Next by Date: Re: NSDocument never deallocated with autosave/versions
  • Previous by thread: Prompting for reboot programatically
  • Next by thread: Lion : Sandboxing and IKCameraDeviceView
  • Index(es):
    • Date
    • Thread