Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Restarting a remote Mac via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Restarting a remote Mac via AppleScript
Authored by: msk on Nov 09, '04 09:33:59AM

"When logging into a Mac remotely, sometimes it's necessary to restart the computer (for example, after performing an update using softwareupdate)." and that AppleScript does not work if the Finder is not running since you logged in remotely via ssh and noone else is logged into the machine directly, the error message is "24:34: excution error: Application isn't running. (-60)".

Following the logic of the other replies I tried:

osascript -e 'tell application "System Events" to restart'

and no go, tried it both using sudo and after using sudo -s (certain commands won't work using sudo, for example "nvram "skip-netboot?=true").

I should also note I just finished a softwareupdate which included QuickTime and I had to walk over to the machine to press continue even though I had issued the command "setenv COMMAND_LINE_INSTALL 1" beforehand as recommended by an Apple Engineer.

[ Reply to This | # ]