Exectuer un apple lorsqu'on demander l'arrêt du mac

BigEdison

Membre actif
2 Juillet 2004
203
5
47
entre ici et là bas
www.ybphotos.book.fr
Bonjour,
Je suis sur Lion et je souhaiterais exécuter un applescript une fois que j'ai demandé l'arrêt du système.
Connaissez vous un moyen pour le faire ?
Merci pour votre aide
 
Dans ton cas, il faut remplacer loginHook par logoutHook

Note that with Mac OS X 10.3.x and 10.4.2 or later, you can use the alternative method at the bottom of this document instead, if you wish. For Mac OS X 10.4 and 10.4.1, you should always use the following steps:

Open Terminal (Applications/Utilities).
In the Terminal window, type:

sudo defaults write com.apple.loginwindow LoginHook /path/to/script

(where /path/to/script is the full path to the script that you want to execute when a user logs in—it doesn't have to be in the user's Home directory).

This modifies the /var/root/Library/Preferences/com.apple.loginwindow file.

Type your password at the prompt, then press Return.



ceci est tiré de : http://support.apple.com/kb/HT2420?viewlocale=en%5FUS