Shut down remote machine running Mountain Lion via
AppleSc
I wanted to pass along some hard-earned knowledge. I am using
AppleScript to shut down a machine running Mountain Lion on the local
network. After numerous attempts, what I found works is to use a local
application on that machine, launched by the Finder via
eppc://, with (after some cleanup), tell application
"System Events" to shut down. Very well so far. It shuts
down. But, guess what? Because of Mountain Lion's "resume"
flakiness (it's flaky because this does not happen 100% of the time),
when I reboot that machine it immediately shuts itself off again
because it resumes the shutdown app! My workaround is to have the
shutdown app instead tell AppleScript Runner to do a script with that
line to tell application "System Events" to shut
down. Ha.