Hey!
I’m creating an uninstall script for an application that has 3 files owned by system.
Using a finder tell to move the files to the trash prompts for the administrator password for EACH file. Very annoying.
So I tried this:
do shell script "mv " & (quoted form of (POSIX path of ((path to internet plugins from user domain as Unicode text))) & "the.file ~/.Trash") with administrator privileges
The shell will keep the entered password for a a limited time, thus only prompting once for the 3 moves. However, the move will only execute if the said file doesn’t already exist in the trash. And I certainly don’t want to script emptying the user’s trash.
Is there a way to get this smooth and clean?
Or is there a better way to temporary verify and store the entered password for use with all 3 file operations?
Love and kisses,
O