• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best approach to write an uninstaller for osx
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Best approach to write an uninstaller for osx
      • From: Parimal Das <email@hidden>
References: 
 >Best approach to write an uninstaller for osx (From: Parimal Das <email@hidden>)
 >Re: Best approach to write an uninstaller for osx (From: Jens Alfke <email@hidden>)
 >Re: Best approach to write an uninstaller for osx (From: Parimal Das <email@hidden>)
 >Re: Best approach to write an uninstaller for osx (From: Jens Alfke <email@hidden>)
 >Re: Best approach to write an uninstaller for osx (From: Kyle Sluder <email@hidden>)
 >Re: Best approach to write an uninstaller for osx (From: Parimal Das <email@hidden>)

  • Prev by Date: Re: Core Data: Specifying latest .mom resource. Was: NSMigratePersistentStoresAutomaticallyOption...
  • Next by Date: Cant Access Properties of NSManagedObject from a NSArrayController...
  • Previous by thread: Re: Best approach to write an uninstaller for osx
  • Next by thread: Re: Best approach to write an uninstaller for osx
  • Index(es):
    • Date
    • Thread