Delete folder from script
Posted on 2004-09-01
I need to write an uninstallscript for an application. The script needs to delete a folder in the /Applications folder and delete a file from /etc/mach_init_per_user.d/
I need this script to be run from finder using a double click, but can not seem to get it right.
I have a bash script that works, but of course when double clicking in finder I simply get "There is no default application specified to open the document 'uninstall'". I tried it in Applescript, but I am afraid Applescript is not something you pick up in 1 hour.
Can someone translate this bash script to Applescript, or can tell me how to get the bash script to run from finder.
rm -Rf /Applications/MyApp
echo Root password required to delete file.
sudo rm /etc/mach_init_per_user.d/monitorApp.plist