You should never put your password in any cleartext file...especially not an executable script... even if you lock down the permissions.bobw said:Remove Shut Down Warning
do shell script "sudo shutdown -h now" password "yourAdminPassword" with administrator privileges
You are correct - it only shuts down the machine,...sudo shutdown -h now in Terminal just shuts down the computer, afaik. It doesn't write this anywhere in system code so the warning message doesn't reappear after choosing 'Shutdown' from the Apple menu, or does it?
michaelsanford said:This means it mustn't be just sending signal 9 to every running process or else the screen would just go black (or switch to a "verbose" console).
I could always be wrong though, this is just a deduction.