Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Cocoa/Obj-C Restart Computer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa/Obj-C Restart Computer



Hmmm, well the terminal command: "shutdown -r now" will do that. All you need to do is call that from Objective-C. I don't remember how to call terminal commands off the top of my head, but worst comes to worst you can stick it in an applescript.

Try a "man shutdown" to see all the options and do a search on the apple docs to see how to put a terminal command in a Cocoa app.


On Jul 30, 2004, at 5:41 PM, Matt Jaffa wrote:

Hi,

I was wondering if there was any command in Cocoa/Obj-C to restart the computer, so that my app can do that when they push a button.

Or any other way of doing this would be fine.

Matt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


On Jul 30, 2004, at 5:41 PM, Matt Jaffa wrote:

Hi,

I was wondering if there was any command in Cocoa/Obj-C to restart the computer, so that my app can do that when they push a button.

Or any other way of doing this would be fine.

Matt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Cocoa/Obj-C Restart Computer (From: Matt Jaffa <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.