My 'run with administrative privileges' applescript no longer works
by Jeff Murchison on Nov 8, 2010 at 6:10:05 pm
Hey all. I have an applescript that I made a while back that shuts down the computer. I pulled it out today to use it and it no longer works. Here's part of the code I'm having trouble with:
do shell script ¬
"sudo shutdown -h now" password "myadminpassword" with administrator privileges
On old machines this worked great, I would just put the admin password where myadminpassword is and it would work perfectly. Now though, I run it on my machine and I get the prompt to enter my admin username and password before it will shutdown.
Now this is going on a remote install so I need it to work. Any ideas? The machine is running snow leopard, but it seems to still work on an old leopard macbook pro.