Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I created an AppleScript to restart my Mac:

tell application "System Events"
restart
end tell

I put this script into Calendar.app and set it to start at 7.00. When I put script into calendar and click done button it will restart my OS over and over again. It's like the Mac is restoring the system to the pre-shutdown state, including re-launching any applications that were open at the time.

How can I stop it?

share|improve this question
add comment

1 Answer

Try starting up in single user mode by holding command-S on startup, running mount -uw / (fsck -fy is probably not needed), and removing these files:

rm /Users/username/Library/Preferences/ByHost/com.apple.loginwindow.*.plist
rm -r /Users/yourusername/Library/Saved\ Application\ State
share|improve this answer
    
Hi ,I don t know how exacly I can remove these files? Could you be more specific like? Should I type it in terminal or .... ? thx for any replie –  Macko Oct 15 '13 at 15:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.