• 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: Quit all programs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quit all programs


  • Subject: Re: Quit all programs
  • From: Graff <email@hidden>
  • Date: Sat, 08 Nov 2003 04:38:07 -0500

You can force a shutdown in the Terminal by doing:
/sbin/shutdown -h now

and a reboot by:
/sbin/shutdown -r now

These need to be executed as root (or through sudo) and they do not exit Mac OS X applications cleanly, they just force quit them without bringing up save dialogs or any kind of warning. Even though this may be what you want you could seriously mess up some programs by force-closing them like this, so use it carefully. To get more information on the shudown command go to the Terminal and do:
man shutdown

Of course to use it in an AppleScript you need to call one of two ways:
do shell script "/sbin/shutdown -h now" with administrator privileges
or
do shell script "/sbin/shutdown -h now" password "mypassword" with administrator privileges

The first method will bring up a dialog box asking for your password, it is definitely the safer way since your password is not stored in the first command like it is in the second command

- Ken

On Nov 8, 2003, at 2:38 AM, Sovereign Diamonds wrote:

I'd like to automatically quit all running programs without having to go
through the 'do you want to save' routine followed by an orderly 'shut down'
instruction via applescript.

Is there a Terminal command to kill all running programs in one swoop? Or is
there an applescript way?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Quit all programs (From: Sovereign Diamonds <email@hidden>)

  • Prev by Date: Panther: Finder sort doesn't stick
  • Next by Date: Re: Panther's version
  • Previous by thread: Quit all programs
  • Next by thread: Re: Quit all programs
  • Index(es):
    • Date
    • Thread