Re: Best approach to write an uninstaller for osx
Re: Best approach to write an uninstaller for osx
- Subject: Re: Best approach to write an uninstaller for osx
- From: Jens Alfke <email@hidden>
- Date: Tue, 24 Nov 2009 08:32:30 -0800
On Nov 24, 2009, at 6:30 AM, Parimal Das wrote:
> 4. This script copies DeleteAll.app to /private/tmp/ AND then runs DeleteAll.app from Temp location.
Why do you need two different apps? Just have Uninstall.app delete itself when it finishes.
> do shell script "sudo cp -R '" & ourPath & "' '" & tempPath & "'" with administrator privileges
Remember how I said to be careful about quoting? The command above will fail if ourPath contains any single quotes.
Also, this task really shouldn't require admin privileges. You're making it impossible for a non-admin to uninstall the app (even from their own home directory), and greatly increasing the potential danger of your quoting error, since that cp command is capable of copying anything anywhere.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden