Running "shutdown -r now" as a do shell command for non-admins??

I have created a little button (script app) that quits all (even multiple tabbed firefox) and restarts to rEFIt for OS selection, but if this is run from a non-admin account it asked for the admin username and password. Is there a way to accomplish the same thing without requiring the admin username and/or password? The current line in the script reads like this:

do shell script “shutdown -r now” password “password” with administrator privileges

Any insight would be greatly appreciated.


Try something like this:

tell application "System Events" to shut down

The problem with this command is it doesn’t quit applications (e.g. safari if there are tabs).

Any thing else you can think of?