Start a script on shutdown?

I like to run a script everytime the user shutsdown his Mac. The action to start is to backup/copy some important file to a specific location. Is there any Scripting Addition, cron-script or other solution to do this?

Thanks!
Pieter
:smiley:

I recently asked a similar question on the applescript-users mailing list. Here’s the question and answer.

You should check out Mike Bombich’s excellent site for information about LoginWindowManager and his running shell scripts at login/logout tip page which should allow you to run an AppleScript via a shell script.

Jon

Good stuff Jon! It looks like Mike makes use of the info provided in the link supplied by Chris Nebel. It seems like his app could go one step further and provide a wrapper for AppleScript scripts but I suppose that there’s a lot to consider when trying to implement something like that (since a script could make forbidden calls to the UI). Thanks for the links!

– Rob