Hello! I want to write an applescript to repair the disk permissions each 2 months. I'll save it as an app and open it with iCal, but I need someone to check if my code is ok so that I don't screw up. Thanks!
set errormessage to "Error!"
with timeout of 1800 seconds
try
do shell script "sudo diskutil repairPermissions /" with administrator privileges
do shell script "sudo -K"
on error errormessage
display dialog errormessage
end try
end timeout
activate me
display dialog "Operation Completed!"