Re: Error message: NOT super-user
Re: Error message: NOT super-user
- Subject: Re: Error message: NOT super-user
- From: John Stiles <email@hidden>
- Date: Sat, 8 Sep 2007 14:06:08 -0700
This is an extremely bad idea; if the user has any open applications
they will just be killed without warning. The user won't be asked "do
you want to save?," the app won't save out any changes to its
preference files, and if the app is in the middle of writing data,
the file will be corrupted.
Even if you don't care, trust me, your users will care, when this
poorly written app causes them to lose data.
Anyway, the correct technique doesn't require a password either, so
it's easier for you and for your users.
Use NSAppleScript and try a script like this.
tell application "System Events"
shut down
end tell
On Sep 8, 2007, at 1:28 PM, Ricardo Diaz wrote:
Yeah I don't care, how can I run it with root privileges?
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-
US&form=QBRE_______________________________________________
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:
40blizzard.com
This email sent to email@hidden
_______________________________________________
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